diff mbox

[4/4] arm: omap: display: Don't build device for DMM

Message ID 1379063679-4869-5-git-send-email-archit@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

archit taneja Sept. 13, 2013, 9:14 a.m. UTC
DMM exists on omap4+ platforms, these platforms will always boot with DT. Remove
the previous method of searching the dmm hwmod and building the device by
ourselves. Addition of a DMM nodes in DT will ensure a DMM device is built.

For OMAP4, the address and irq data for most hwmods were removed, so the older
method doesn't work anyway.

Cc: Andy Gross <andygro@gmail.com>
Signed-off-by: Archit Taneja <archit@ti.com>
---
 arch/arm/mach-omap2/display.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

Comments

Tomi Valkeinen Sept. 13, 2013, 9:29 a.m. UTC | #1
On 13/09/13 12:14, Archit Taneja wrote:
> DMM exists on omap4+ platforms, these platforms will always boot with DT. Remove
> the previous method of searching the dmm hwmod and building the device by
> ourselves. Addition of a DMM nodes in DT will ensure a DMM device is built.
> 
> For OMAP4, the address and irq data for most hwmods were removed, so the older
> method doesn't work anyway.
> 
> Cc: Andy Gross <andygro@gmail.com>
> Signed-off-by: Archit Taneja <archit@ti.com>
> ---
>  arch/arm/mach-omap2/display.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> index d097d23..e0642bd 100644
> --- a/arch/arm/mach-omap2/display.c
> +++ b/arch/arm/mach-omap2/display.c
> @@ -126,20 +126,8 @@ static int __init omapdrm_init(void)
>  {
>  	int r = 0;
>  
> -	/* create DRM and DMM device */
> +	/* create DRM device(DMM device created via DT) */
>  	if (omap_drm_device != NULL) {
> -		struct omap_hwmod *oh = NULL;
> -		struct platform_device *pdev;
> -
> -		/* lookup and populate the DMM information, if present - OMAP4+ */
> -		oh = omap_hwmod_lookup("dmm");
> -		if (oh) {
> -			pdev = omap_device_build(oh->name, -1, oh, NULL, 0);
> -			WARN(IS_ERR(pdev),
> -				"Could not build omap_device for %s\n",
> -				oh->name);
> -		}
> -
>  		platform_drm_data.omaprev = GET_OMAP_TYPE;

Ok, so you remove the DMM device creation here. Why not do this as a
first patch, before moving the DMM/DRM code?

 Tomi
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index d097d23..e0642bd 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -126,20 +126,8 @@  static int __init omapdrm_init(void)
 {
 	int r = 0;
 
-	/* create DRM and DMM device */
+	/* create DRM device(DMM device created via DT) */
 	if (omap_drm_device != NULL) {
-		struct omap_hwmod *oh = NULL;
-		struct platform_device *pdev;
-
-		/* lookup and populate the DMM information, if present - OMAP4+ */
-		oh = omap_hwmod_lookup("dmm");
-		if (oh) {
-			pdev = omap_device_build(oh->name, -1, oh, NULL, 0);
-			WARN(IS_ERR(pdev),
-				"Could not build omap_device for %s\n",
-				oh->name);
-		}
-
 		platform_drm_data.omaprev = GET_OMAP_TYPE;
 
 		r = platform_device_register(omap_drm_device);
@@ -464,7 +452,7 @@  int __init omap_display_init(struct omap_dss_board_info *board_data)
 		}
 	}
 
-	/* create DRM and DMM device */
+	/* create DRM device */
 	r = omapdrm_init();
 	if (r < 0) {
 		pr_err("Unable to register omapdrm device\n");