Skip to content

Commit

Permalink
video: fbdev: sunxi: hdmi2: call phy_set_reg_base if AW_PHY is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
scpcom committed Sep 14, 2022
1 parent 7a195c2 commit 0a1107b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_core/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,13 @@ static void api_dvimode_enable(u8 enable)

}

static void api_set_phy_base(uintptr_t base)
{
#ifdef CONFIG_AW_PHY
phy_set_reg_base(base);
#endif
}

void hdmitx_api_init(hdmi_tx_dev_t *dev,
videoParams_t *video,
audioParams_t *audio,
Expand Down Expand Up @@ -633,6 +640,7 @@ void hdmitx_api_init(hdmi_tx_dev_t *dev,
func.avmute_enable = api_avmute_enable;
func.phy_power_enable = api_phy_power_enable;
func.dvimode_enable = api_dvimode_enable;
func.set_phy_base_addr = api_set_phy_base;

#ifdef CONFIG_AW_PHY
func.phy_reset = api_phy_reset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ struct hdmi_dev_func {
void (*avmute_enable)(u8 enable);
void (*phy_power_enable)(u8 enable);
void (*dvimode_enable)(u8 enable);
void (*set_phy_base_addr)(uintptr_t reg_base);
#ifdef CONFIG_AW_PHY
void (*phy_reset)(void);
int (*phy_config_resume)(void);
Expand Down
9 changes: 9 additions & 0 deletions drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_core/hdmi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ u32 hdmi_core_get_hpd_state(void)
return core->dev_func.dev_hpd_status();
}

void hdmi_core_set_phy_reg_base(void)
{
struct hdmi_tx_core *core = get_platform();

core->dev_func.set_phy_base_addr(hdmi_reg_base);
}

/**
* @short Set PHY number
* @param[in] core Main structure
Expand Down Expand Up @@ -228,6 +235,8 @@ static int _api_init(struct hdmi_tx_core *core)
&core->mode.pVideo,
&core->mode.pAudio,
&core->mode.pHdcp);

hdmi_core_set_phy_reg_base();
return 0;
}

Expand Down

0 comments on commit 0a1107b

Please sign in to comment.