Skip to content

Commit 0a1107b

Browse files
committed
video: fbdev: sunxi: hdmi2: call phy_set_reg_base if AW_PHY is enabled
1 parent 7a195c2 commit 0a1107b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_core/api/api.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,13 @@ static void api_dvimode_enable(u8 enable)
554554

555555
}
556556

557+
static void api_set_phy_base(uintptr_t base)
558+
{
559+
#ifdef CONFIG_AW_PHY
560+
phy_set_reg_base(base);
561+
#endif
562+
}
563+
557564
void hdmitx_api_init(hdmi_tx_dev_t *dev,
558565
videoParams_t *video,
559566
audioParams_t *audio,
@@ -633,6 +640,7 @@ void hdmitx_api_init(hdmi_tx_dev_t *dev,
633640
func.avmute_enable = api_avmute_enable;
634641
func.phy_power_enable = api_phy_power_enable;
635642
func.dvimode_enable = api_dvimode_enable;
643+
func.set_phy_base_addr = api_set_phy_base;
636644

637645
#ifdef CONFIG_AW_PHY
638646
func.phy_reset = api_phy_reset;

drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_core/api/core_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ struct hdmi_dev_func {
905905
void (*avmute_enable)(u8 enable);
906906
void (*phy_power_enable)(u8 enable);
907907
void (*dvimode_enable)(u8 enable);
908+
void (*set_phy_base_addr)(uintptr_t reg_base);
908909
#ifdef CONFIG_AW_PHY
909910
void (*phy_reset)(void);
910911
int (*phy_config_resume)(void);

drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi_core/hdmi_core.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ u32 hdmi_core_get_hpd_state(void)
160160
return core->dev_func.dev_hpd_status();
161161
}
162162

163+
void hdmi_core_set_phy_reg_base(void)
164+
{
165+
struct hdmi_tx_core *core = get_platform();
166+
167+
core->dev_func.set_phy_base_addr(hdmi_reg_base);
168+
}
169+
163170
/**
164171
* @short Set PHY number
165172
* @param[in] core Main structure
@@ -228,6 +235,8 @@ static int _api_init(struct hdmi_tx_core *core)
228235
&core->mode.pVideo,
229236
&core->mode.pAudio,
230237
&core->mode.pHdcp);
238+
239+
hdmi_core_set_phy_reg_base();
231240
return 0;
232241
}
233242

0 commit comments

Comments
 (0)