RE: [PATCH 05/20] Move dss platform driver to dss.c
-Original Message- From: Tomi Valkeinen [mailto:tomi.valkei...@nokia.com] Sent: Wednesday, August 25, 2010 2:20 PM To: Guruswamy, Senthilvadivu Cc: linux-omap@vger.kernel.org; p...@pwsan.com; Hilman, Kevin Subject: Re: [PATCH 05/20] Move dss platform driver to dss.c On Mon, 2010-08-23 at 17:57 +0200, ext Guruswamy Senthilvadivu wrote: From: Senthilvadivu Guruswamy svad...@ti.com dsshw_probe and remove functions are moved to dss.c To maintain the order of init, through the dsshw_probe, omap_dss_init2 is made as device_init_call_sync. Signed-off-by: Senthilvadivu Guruswamy svad...@ti.com Why is the omap_dsshw_driver moved to dss.c, but the hw_driver for other blocks stay in core.c? Ideally the plan is to move all the IP blocks to its corresponding files. As I mentioned in the TODO list I will try to move dispc, venc, rfbi, dsi in the next versions. And generally about dss.c: There are confusingly two things DSS may refer to: 1) the whole display subsystem, including DSI/RFBI etc 2) the small main block inside DSS, meaning the few DSS_* registers. It would be good to have different names for those, but at the time being they are both DSS. In some patch I saw names like dss_dispc. Perhaps we could have dss_dss there too. Although it looks a bit confusing too =). dss.c is meant to handle the DSS_* registers, so it's about case 2. And so it doesn't contain general DSS stuff, like clock allocation etc., those have been in core.c. I'm not sure if this comment is valid for this patch, but at least [PATCH 07/20] Move clock functions from core driver to dss driver sounds like dss.c is used like case 1. Once opt clocks are available for each of the DSS IP blocks like venc, Dsi also, then I should be able to move the clocks to the respective files Leaving only dss related clocks in dss.c. So the aim is to maintain dss.c restricted to few DSS_* registers. Tomi
Re: [PATCH 05/20] Move dss platform driver to dss.c
On Mon, 2010-08-23 at 17:57 +0200, ext Guruswamy Senthilvadivu wrote: From: Senthilvadivu Guruswamy svad...@ti.com dsshw_probe and remove functions are moved to dss.c To maintain the order of init, through the dsshw_probe, omap_dss_init2 is made as device_init_call_sync. Signed-off-by: Senthilvadivu Guruswamy svad...@ti.com Why is the omap_dsshw_driver moved to dss.c, but the hw_driver for other blocks stay in core.c? And generally about dss.c: There are confusingly two things DSS may refer to: 1) the whole display subsystem, including DSI/RFBI etc 2) the small main block inside DSS, meaning the few DSS_* registers. It would be good to have different names for those, but at the time being they are both DSS. In some patch I saw names like dss_dispc. Perhaps we could have dss_dss there too. Although it looks a bit confusing too =). dss.c is meant to handle the DSS_* registers, so it's about case 2. And so it doesn't contain general DSS stuff, like clock allocation etc., those have been in core.c. I'm not sure if this comment is valid for this patch, but at least [PATCH 07/20] Move clock functions from core driver to dss driver sounds like dss.c is used like case 1. Tomi -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/20] Move dss platform driver to dss.c
From: Senthilvadivu Guruswamy svad...@ti.com dsshw_probe and remove functions are moved to dss.c To maintain the order of init, through the dsshw_probe, omap_dss_init2 is made as device_init_call_sync. Signed-off-by: Senthilvadivu Guruswamy svad...@ti.com --- drivers/video/omap2/dss/core.c | 26 +- drivers/video/omap2/dss/dss.c | 29 + 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 3b6a309..f01e8e6 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -707,17 +707,6 @@ static int omap_dss_resume(struct platform_device *pdev) return dss_resume_all_devices(); } -/* DSS HW IP initialisation */ -static int omap_dsshw_probe(struct platform_device *pdev) -{ - return 0; -} - -static int omap_dsshw_remove(struct platform_device *pdev) -{ - return 0; -} - /* DISPC HW IP initialisation */ static int omap_dispchw_probe(struct platform_device *pdev) { @@ -775,18 +764,6 @@ static struct platform_driver omap_dss_driver = { }, }; -static struct platform_driver omap_dsshw_driver = { - .probe = omap_dsshw_probe, - .remove = omap_dsshw_remove, - .shutdown = NULL, - .suspend= NULL, - .resume = NULL, - .driver = { - .name = dss, - .owner = THIS_MODULE, - }, -}; - static struct platform_driver omap_dispchw_driver = { .probe = omap_dispchw_probe, .remove = omap_dispchw_remove, @@ -1100,7 +1077,6 @@ static int __init omap_dss_init(void) static int __init omap_dss_init2(void) { - platform_driver_register(omap_dsshw_driver); platform_driver_register(omap_dispchw_driver); platform_driver_register(omap_dsi1hw_driver); platform_driver_register(omap_rfbihw_driver); @@ -1109,7 +1085,7 @@ static int __init omap_dss_init2(void) } core_initcall(omap_dss_init); -device_initcall(omap_dss_init2); +device_initcall_sync(omap_dss_init2); #endif MODULE_AUTHOR(Tomi Valkeinen tomi.valkei...@nokia.com); diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 24b1825..5f91e37 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -122,6 +122,29 @@ void dss_restore_context(void) #undef SR #undef RR +/* DSS HW IP initialisation */ +static int omap_dsshw_probe(struct platform_device *pdev) +{ + return 0; +} + +static int omap_dsshw_remove(struct platform_device *pdev) +{ + return 0; +} + +static struct platform_driver omap_dsshw_driver = { + .probe = omap_dsshw_probe, + .remove = omap_dsshw_remove, + .shutdown = NULL, + .suspend= NULL, + .resume = NULL, + .driver = { + .name = dss, + .owner = THIS_MODULE, + }, +}; + void dss_sdi_init(u8 datapairs) { u32 l; @@ -633,3 +656,9 @@ void dss_exit(void) iounmap(dss.base); } +static int __init omap_dss_init1(void) +{ + return platform_driver_register(omap_dsshw_driver); +} + +device_initcall(omap_dss_init1); -- 1.6.3.3 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html