Message ID | 20220616075947.347888-3-dmitry.baryshkov@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | drm/msm/hdmi: move resource allocation to probe function | expand |
On 6/16/2022 12:59 AM, Dmitry Baryshkov wrote: > All MSM HDMI devices use "core_physical" and "qfprom_physical" names for > register areas. Drop them from the platform config. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > --- > drivers/gpu/drm/msm/hdmi/hdmi.c | 9 +++------ > drivers/gpu/drm/msm/hdmi/hdmi.h | 3 --- > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c > index 9ff9a68b201b..8dfe5690366b 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c > @@ -133,7 +133,7 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) > hdmi->config = config; > spin_lock_init(&hdmi->reg_lock); > > - hdmi->mmio = msm_ioremap(pdev, config->mmio_name); > + hdmi->mmio = msm_ioremap(pdev, "core_physical"); > if (IS_ERR(hdmi->mmio)) { > ret = PTR_ERR(hdmi->mmio); > goto fail; > @@ -141,14 +141,14 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) > > /* HDCP needs physical address of hdmi register */ > res = platform_get_resource_byname(pdev, IORESOURCE_MEM, > - config->mmio_name); > + "core_physical"); > if (!res) { > ret = -EINVAL; > goto fail; > } > hdmi->mmio_phy_addr = res->start; > > - hdmi->qfprom_mmio = msm_ioremap(pdev, config->qfprom_mmio_name); > + hdmi->qfprom_mmio = msm_ioremap(pdev, "qfprom_physical"); > if (IS_ERR(hdmi->qfprom_mmio)) { > DRM_DEV_INFO(&pdev->dev, "can't find qfprom resource\n"); > hdmi->qfprom_mmio = NULL; > @@ -510,9 +510,6 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) > return -ENXIO; > } > > - hdmi_cfg->mmio_name = "core_physical"; > - hdmi_cfg->qfprom_mmio_name = "qfprom_physical"; > - > dev->platform_data = hdmi_cfg; > > hdmi = msm_hdmi_init(to_platform_device(dev)); > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h > index a6c88d157bc3..7263bcbf4d06 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.h > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h > @@ -84,9 +84,6 @@ struct hdmi { > > /* platform config data (ie. from DT, or pdata) */ > struct hdmi_platform_config { > - const char *mmio_name; > - const char *qfprom_mmio_name; > - > /* regulators that need to be on for hpd: */ > const char **hpd_reg_names; > int hpd_reg_cnt;
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 9ff9a68b201b..8dfe5690366b 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -133,7 +133,7 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) hdmi->config = config; spin_lock_init(&hdmi->reg_lock); - hdmi->mmio = msm_ioremap(pdev, config->mmio_name); + hdmi->mmio = msm_ioremap(pdev, "core_physical"); if (IS_ERR(hdmi->mmio)) { ret = PTR_ERR(hdmi->mmio); goto fail; @@ -141,14 +141,14 @@ static struct hdmi *msm_hdmi_init(struct platform_device *pdev) /* HDCP needs physical address of hdmi register */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - config->mmio_name); + "core_physical"); if (!res) { ret = -EINVAL; goto fail; } hdmi->mmio_phy_addr = res->start; - hdmi->qfprom_mmio = msm_ioremap(pdev, config->qfprom_mmio_name); + hdmi->qfprom_mmio = msm_ioremap(pdev, "qfprom_physical"); if (IS_ERR(hdmi->qfprom_mmio)) { DRM_DEV_INFO(&pdev->dev, "can't find qfprom resource\n"); hdmi->qfprom_mmio = NULL; @@ -510,9 +510,6 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) return -ENXIO; } - hdmi_cfg->mmio_name = "core_physical"; - hdmi_cfg->qfprom_mmio_name = "qfprom_physical"; - dev->platform_data = hdmi_cfg; hdmi = msm_hdmi_init(to_platform_device(dev)); diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index a6c88d157bc3..7263bcbf4d06 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -84,9 +84,6 @@ struct hdmi { /* platform config data (ie. from DT, or pdata) */ struct hdmi_platform_config { - const char *mmio_name; - const char *qfprom_mmio_name; - /* regulators that need to be on for hpd: */ const char **hpd_reg_names; int hpd_reg_cnt;
All MSM HDMI devices use "core_physical" and "qfprom_physical" names for register areas. Drop them from the platform config. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/msm/hdmi/hdmi.c | 9 +++------ drivers/gpu/drm/msm/hdmi/hdmi.h | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-)