summaryrefslogtreecommitdiffstats
path: root/drivers/staging/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorAndy Gross <andy.gross@ti.com>2012-03-05 10:48:39 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-07 13:38:08 -0800
commit5c137797377db64d4cfb429ee8e4a420d9743660 (patch)
tree6a96a8db5ade06a7d7074860fa39701708189e2f /drivers/staging/omapdrm/omap_drv.c
parent02646fb8b3de95a170f8ac4f0773a4f5e2a1b54c (diff)
downloadlinux-stable-5c137797377db64d4cfb429ee8e4a420d9743660.tar.gz
linux-stable-5c137797377db64d4cfb429ee8e4a420d9743660.tar.bz2
linux-stable-5c137797377db64d4cfb429ee8e4a420d9743660.zip
staging: drm/omap: Get DMM resources from hwmod
This patch splits the DMM off into a separate sub-device, in order to utilize the platform device information that was created as part of the OMAP hwmod entry for the DMM. The driver probe function queries the iomem resource and IRQ using standard platform_get functions. The OMAP DRM driver now calls the platform_driver_register() function for the subordinate DMM driver inside its probe function. This guarantees the required order for the DMM and ensures the DMM resources are available for use by the DRM driver. Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/omapdrm/omap_drv.c')
-rw-r--r--drivers/staging/omapdrm/omap_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index e2100bb5609c..3df5b4c58ecd 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -21,6 +21,7 @@
#include "drm_crtc_helper.h"
#include "drm_fb_helper.h"
+#include "omap_dmm_tiler.h"
#define DRIVER_NAME MODULE_NAME
#define DRIVER_DESC "OMAP DRM"
@@ -802,6 +803,9 @@ static void pdev_shutdown(struct platform_device *device)
static int pdev_probe(struct platform_device *device)
{
DBG("%s", device->name);
+ if (platform_driver_register(&omap_dmm_driver))
+ dev_err(&device->dev, "DMM registration failed\n");
+
return drm_platform_init(&omap_drm_driver, device);
}
@@ -809,6 +813,8 @@ static int pdev_remove(struct platform_device *device)
{
DBG("");
drm_platform_exit(&omap_drm_driver, device);
+
+ platform_driver_unregister(&omap_dmm_driver);
return 0;
}