aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-28 09:11:01 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-09 08:11:30 -0400
commit59b3d38a3691396783df108e6afbba30656edccb (patch)
treeb3a66a1911025a5cecb881eb245593a634a81988
parentf5bab22291908dc395c018f12c8485ef5fc9b90a (diff)
OMAPDSS: HDMI: cleanup ioremaps
Now that all the boards using OMAP HDMI are using DT boot, we can remove the hacks for getting the ioresources with non-DT boot. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi4_core.c21
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi5_core.c2
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi_phy.c21
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi_pll.c21
4 files changed, 10 insertions, 55 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4_core.c b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
index 2eb04dcf807c..f02e9541bd6b 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4_core.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4_core.c
@@ -1004,29 +1004,14 @@ int hdmi4_audio_get_dma_port(u32 *offset, u32 *size)
1004int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core) 1004int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
1005{ 1005{
1006 struct resource *res; 1006 struct resource *res;
1007 struct resource temp_res;
1008 1007
1009 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core"); 1008 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
1010 if (!res) { 1009 if (!res) {
1011 DSSDBG("can't get CORE mem resource by name\n"); 1010 DSSERR("can't get CORE mem resource\n");
1012 /* 1011 return -EINVAL;
1013 * if hwmod/DT doesn't have the memory resource information
1014 * split into HDMI sub blocks by name, we try again by getting
1015 * the platform's first resource. this code will be removed when
1016 * the driver can get the mem resources by name
1017 */
1018 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1019 if (!res) {
1020 DSSERR("can't get CORE mem resource\n");
1021 return -EINVAL;
1022 }
1023
1024 temp_res.start = res->start + CORE_OFFSET;
1025 temp_res.end = temp_res.start + CORE_SIZE - 1;
1026 res = &temp_res;
1027 } 1012 }
1028 1013
1029 core->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 1014 core->base = devm_ioremap_resource(&pdev->dev, res);
1030 if (!core->base) { 1015 if (!core->base) {
1031 DSSERR("can't ioremap CORE\n"); 1016 DSSERR("can't ioremap CORE\n");
1032 return -ENOMEM; 1017 return -ENOMEM;
diff --git a/drivers/video/fbdev/omap2/dss/hdmi5_core.c b/drivers/video/fbdev/omap2/dss/hdmi5_core.c
index 270ebdd803d8..18041b71418d 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi5_core.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi5_core.c
@@ -912,7 +912,7 @@ int hdmi5_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
912 return -EINVAL; 912 return -EINVAL;
913 } 913 }
914 914
915 core->base = devm_request_and_ioremap(&pdev->dev, res); 915 core->base = devm_ioremap_resource(&pdev->dev, res);
916 if (!core->base) { 916 if (!core->base) {
917 DSSERR("can't ioremap HDMI core\n"); 917 DSSERR("can't ioremap HDMI core\n");
918 return -ENOMEM; 918 return -ENOMEM;
diff --git a/drivers/video/fbdev/omap2/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/dss/hdmi_phy.c
index 2614cf9dafb0..730641c076de 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi_phy.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi_phy.c
@@ -237,7 +237,6 @@ int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
237{ 237{
238 int r; 238 int r;
239 struct resource *res; 239 struct resource *res;
240 struct resource temp_res;
241 240
242 r = hdmi_phy_init_features(pdev); 241 r = hdmi_phy_init_features(pdev);
243 if (r) 242 if (r)
@@ -245,25 +244,11 @@ int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
245 244
246 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy"); 245 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
247 if (!res) { 246 if (!res) {
248 DSSDBG("can't get PHY mem resource by name\n"); 247 DSSERR("can't get PHY mem resource\n");
249 /* 248 return -EINVAL;
250 * if hwmod/DT doesn't have the memory resource information
251 * split into HDMI sub blocks by name, we try again by getting
252 * the platform's first resource. this code will be removed when
253 * the driver can get the mem resources by name
254 */
255 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
256 if (!res) {
257 DSSERR("can't get PHY mem resource\n");
258 return -EINVAL;
259 }
260
261 temp_res.start = res->start + PHY_OFFSET;
262 temp_res.end = temp_res.start + PHY_SIZE - 1;
263 res = &temp_res;
264 } 249 }
265 250
266 phy->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 251 phy->base = devm_ioremap_resource(&pdev->dev, res);
267 if (!phy->base) { 252 if (!phy->base) {
268 DSSERR("can't ioremap TX PHY\n"); 253 DSSERR("can't ioremap TX PHY\n");
269 return -ENOMEM; 254 return -ENOMEM;
diff --git a/drivers/video/fbdev/omap2/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/dss/hdmi_pll.c
index 2b910cb9eee4..668c095c5552 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi_pll.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi_pll.c
@@ -273,7 +273,6 @@ int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll)
273{ 273{
274 int r; 274 int r;
275 struct resource *res; 275 struct resource *res;
276 struct resource temp_res;
277 276
278 r = hdmi_pll_init_features(pdev); 277 r = hdmi_pll_init_features(pdev);
279 if (r) 278 if (r)
@@ -281,25 +280,11 @@ int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll)
281 280
282 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll"); 281 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll");
283 if (!res) { 282 if (!res) {
284 DSSDBG("can't get PLL mem resource by name\n"); 283 DSSERR("can't get PLL mem resource\n");
285 /* 284 return -EINVAL;
286 * if hwmod/DT doesn't have the memory resource information
287 * split into HDMI sub blocks by name, we try again by getting
288 * the platform's first resource. this code will be removed when
289 * the driver can get the mem resources by name
290 */
291 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
292 if (!res) {
293 DSSERR("can't get PLL mem resource\n");
294 return -EINVAL;
295 }
296
297 temp_res.start = res->start + PLL_OFFSET;
298 temp_res.end = temp_res.start + PLL_SIZE - 1;
299 res = &temp_res;
300 } 285 }
301 286
302 pll->base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); 287 pll->base = devm_ioremap_resource(&pdev->dev, res);
303 if (!pll->base) { 288 if (!pll->base) {
304 DSSERR("can't ioremap PLLCTRL\n"); 289 DSSERR("can't ioremap PLLCTRL\n");
305 return -ENOMEM; 290 return -ENOMEM;