OMAP2,3: hwmod DSS Adaptation
Subsystems (6)
v5 cover OMAP2,3: hwmod DSS Adaptation
v4 of the DSS hwmod patch series focusses on fixing the review comments. OMAP4 hwmod support will be posted after the acceptance of this basic change in the dss2 design.
This patch series decouples the "Clocks for DSS in hwmod adaptation" changes from this series. Another series would be posted which could be discussed w.r.t clocks in DSS across omap2,3.
Removing the SYSCONFIG settings from DSS driver would also be part of these clock changes series and not covered in this series as it depends on some of the omap_hwmod framework changes w.r.t opt clocks handling.
Summary of the hwmod DSS design:
================================
DSS, DISPC, DSI, RFBI, VENC are made as platform drivers each corresponding to the hwmod class in the hwmod database.
Each of these platform drivers' init / deinit are handled from core.c's omap_dss_probe() in the exact sequence as required.
No Hardcoding of silicon data:
hwmod database abstracts the SOC data like base addr, irq numbers and are implemented in this patch series.
Continue to have custom bus for display panels:
"omapdss" driver continues to be a platform driver that registers the custom bus. It also continues to register the display panels(omap_dss_device) on the board to the panel drivers (omap_dss_driver)
For Eg: primary lcd device would be registered with lcd panel driver. lcd panel driver if it is on a parallel interface would use library functions exported from dpi.o. if it is on a dsi interface would use library functions exported from dsi platform driver(dsi.o).
Clocks:
Handling of clocks in DSS only is one of the design approaches, that does not change the existing implementation. If each of the DSS HW IPs had to handle their own clocks, then corresponding clock changes can be requested in the hwmod database as well which is not the current design/implementation. As stated, this would be handled in another series seperately.
For Eg: VENC would need 54MCLK which is termed as dss_opt clocks as of now apart for the dss main clocks. Currently VENC driver needs to be aware of this and has to use clk_get/put, clk_enable/disable, since VENC hwmod is not aware of 54MCLK.
Current dss driver:
-------------------
1. Omapdss platform driver
- initialises necessary Ips dss, dispc.
- also initialises Ips like sdi, dsi, venc, rfbi
- creates a custom bus and registers the display devices/drivers connected on the board to the custom bus.
2. Suspend/resume of omapdss
- in turn sends suspend/resume calls for each of the display devices registered to it.
Modified change:
---------------
Platform driver for each DSS HW IP in addition to the software "omapdss" driver.
Omapdss platform driver
- initialises necessary h/w IPs' platform drivers [dss, dispc, dsi, venc, rfbi] and software libraries like dpi, sdi.
- continues to have a custom bus and registers the display devices and drivers connected on the board to the custom bus.
- continues to handle suspend/resume of the display devices registered to the custom bus.
DSS platform driver
- initialises DSS IP alone
- Handles the clocks related to the DSS and other DSSHW IPs like RFBI, DSI, VENC, DISPC. Previously this was a part of "omapdss" driver in core.c
- Continues to handle the DSS IRQs.
- No suspend/resume hooks.
DISPC platform driver
- initialises DISPC IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DISPC library functions.
DSI platform driver
- initialises DSI IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DSI library functions.
RFBI, VENC platform drivers
- initialises DSI,VENC IPs
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide RFBI and VENC library functions.
Testing:
---------
The patches are tested on 2420-n800, 2430sdp, 3630zoom, 3430sdp. Complete bootup with penguins on panel is done on 3430sdp.
For the rest of the mentioned platforms, kernel is built with "OMAP2_DSS" and bootup is tested so that base address and clk_get calls are successful.
DSS was built successfully as module, though not tested yet.
Changes since v4:
----------------
1) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41970.html
Corrected the clocks to be enabled in omap_dss_probe.
Changes since v3:
----------------
1.) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41705.html
http://www.mail-archive.com/[email protected]/msg41683.html Created a new display.c file for dss driver registration related code.
* http://www.mail-archive.com/[email protected]/msg41573.html
Changed the oh_name/dev_name handling in hwmod usage.
* http://www.mail-archive.com/[email protected]/msg41753.html
http://www.mail-archive.com/[email protected]/msg41718.html removed device_initcall_sync(); init / deinit of each DSS h/w IP platform drivers are done from omap_dss_probe() in sequence.
* http://www.mail-archive.com/[email protected]/msg41754.html
clock patches were cleaned up as per review comments.
* http://www.mail-archive.com/[email protected]/msg41756.html
printk() => dev_dbg change was separated out.
Changes since v2:
-------------------
1.) Following review comments incorporated:
Split the device/driver name change and registration patches logically. http://www.mail-archive.com/[email protected]/msg41205.html http://www.mail-archive.com/[email protected]/msg41204.html http://www.mail-archive.com/[email protected]/msg41203.html
Changes since v1:
------------------
1.) Dynamically register for OMAP2,3 specific DSS HW IPs in devices.c 2.) Following review comments incorporated:
Updation of all the board files on l-o dss2 branch as per
http://www.mail-archive.com/[email protected]/msg36915.html
Comments incorporated in devices.c and display.h as per
http://www.mail-archive.com/[email protected]/msg36919.html
Comments incorporated in dispc.c, dss.c, dsi.c, venc.c, rfbi.c so that platform_device is just above platform_driver registrations as per
http://www.mail-archive.com/[email protected]/msg36963.html
3.) Squashed some of the patches to one patch.
Changes since RFC:
-------------------
1) All the platform driver registration except DSS, were within the file core.c. Registeration of these driver got seperated to its own file.
2) Usage of regulators by different drivers are implemented.
For Eg: Regulator used by VENC is moved to venc driver. But vdda_dac would be needed by DPI and DSI as well.
4) OMAP2420 and OMAP2430 hwmod database are generated in this v1.
5) Module support for omapdss driver can continue as the DSS HW IP specific platform drivers are decoupled from omapdss driver.
6) Following review comments incorporated:
Changed the hwmod device name from "dss" to "dss_dss"
Changed name of core driver from "omapdss" to "omap_display" as it deals with panels. Fixed comments on return values from platform_get_resource/irq functions.
Patch Base:
===========
url = git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
branch "master"
Commit id: fa3b4e23ec20cfc944db7cc2b30b0d82c20e4472
Description: cbus: Fix retu_rtc_do_reset
----------------------------------------------------------------------------
Senthilvadivu Guruswamy (15):
OMAP2420: hwmod data: add DSS DISPC RFBI VENC
OMAP2430: hwmod data: add DSS DISPC RFBI VENC
OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC
OMAP2,3 DSS2 Change driver name to omap_display
OMAP2,3 DSS2 Use Regulator init with driver name
OMAP2,3: DSS2: board files: replace platform_device_register with
omap_display_init()
OMAP2,3: DSS2: Build omap_device for each DSS HWIP OMAP2,3: DSS2: DSS: create platform_driver, move init,exit to driver OMAP2,3: DSS2: Move clocks from core driver to dss driver OMAP2,3: DSS2: RFBI: create platform_driver, move init,exit to driver OMAP2,3: DSS2: DISPC: create platform_driver, move init,exit to
driver
OMAP2,3: DSS2: VENC: create platform_driver, move init,exit to driver OMAP2,3: DSS2: DSI: create platform_driver, move init,exit to driver OMAP2,3: DSS2: Use platform device to get baseaddr OMAP2,3: DSS2: Get DSS IRQ from platform device
Sumit Semwal (2):
OMAP2,3: DSS2: Create new file display.c for central dss driver
registration.
OMAP2,3: DSS2: replace printk with dev_dbg in init
arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/board-3430sdp.c | 26 +-- arch/arm/mach-omap2/board-am3517evm.c | 16 +- arch/arm/mach-omap2/board-cm-t35.c | 22 +- arch/arm/mach-omap2/board-devkit8000.c | 14 +- arch/arm/mach-omap2/board-igep0020.c | 16 +- arch/arm/mach-omap2/board-omap3beagle.c | 14 +- arch/arm/mach-omap2/board-omap3evm.c | 22 +- arch/arm/mach-omap2/board-omap3pandora.c | 16 +- arch/arm/mach-omap2/board-omap3stalker.c | 16 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 +- arch/arm/mach-omap2/board-rx51-video.c | 15 +- arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +- arch/arm/mach-omap2/display.c | 101 ++++++ arch/arm/mach-omap2/omap_hwmod_2420_data.c | 283 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_2430_data.c | 282 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 339 +++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 10 + drivers/video/omap2/dss/core.c | 450 ++------------------------ drivers/video/omap2/dss/dispc.c | 114 ++++--- drivers/video/omap2/dss/dsi.c | 78 ++++- drivers/video/omap2/dss/dss.c | 443 +++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 46 ++-- drivers/video/omap2/dss/rfbi.c | 118 ++++--- drivers/video/omap2/dss/venc.c | 125 +++++--- 27 files changed, 1851 insertions(+), 751 deletions(-) create mode 100644 arch/arm/mach-omap2/display.c
PATCH v5 1/17 OMAP2420: hwmod data: add DSS DISPC RFBI VENC
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for OMAP2420 Display Sub System,. Since DSS is also considered as an IP as DISPC, RFBI, name it as dss_dss.
--- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 283 ++++++++++++++++++++++++++++ 1 files changed, 283 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +283 -0
@@ -38,6 +38,10 @@ static struct omap_hwmod omap2420_mpu_hwmod;static struct omap_hwmod omap2420_iva_hwmod;static struct omap_hwmod omap2420_l3_main_hwmod;static struct omap_hwmod omap2420_l4_core_hwmod; +static struct omap_hwmod omap2420_dss_dss_hwmod; +static struct omap_hwmod omap2420_dss_dispc_hwmod; +static struct omap_hwmod omap2420_dss_rfbi_hwmod; +static struct omap_hwmod omap2420_dss_venc_hwmod;static struct omap_hwmod omap2420_wd_timer2_hwmod;static struct omap_hwmod omap2420_gpio1_hwmod;static struct omap_hwmod omap2420_gpio2_hwmod;
@@ -64,6 +68,13 @@ static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { &omap2420_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap2420_dss__l3 = { + .master = &omap2420_dss_dss_hwmod, + .slave = &omap2420_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { &omap2420_l3_main__l4_core,
@@ -470,6 +481,272 @@ static struct omap_hwmod omap2420_uart3_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap2420_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap2420_dss_irqs[] = { + { .irq =25 }, +}; + +static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { + &omap2420_dss__l3, +}; + +static struct omap_hwmod_addr_space omap2420_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap2420_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap2420_dss_addrs), + .user =OCP_USER_MPU , +}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { + &omap2420_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_54m_fck" }, + { .role ="sys_clk" , .clk ="dss2_fck" }, +}; + +static struct omap_hwmod omap2420_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap2420_dss_hwmod_class, + .main_clk ="dss1_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap2420_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap2420_dss_irqs), + .sdma_reqs = omap2420_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap2420_dss_sdma_chs), + + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dss_opt_clks), + .slaves = omap2420_dss_slaves, + .slaves_cnt =ARRAY_SIZE (omap2420_dss_slaves), + .masters = omap2420_dss_masters, + .masters_cnt =ARRAY_SIZE (omap2420_dss_masters), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2420 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_MIDLEMODE | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap2420_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = { + { + .pa_start =0x48050400 , + .pa_end =0x480507FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_dispc_hwmod, + .clk ="dss_ick" , + .addr = omap2420_dss_dispc_addrs, + .addr_cnt =ARRAY_SIZE (omap2420_dss_dispc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { + &omap2420_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap2420_dss_dispc_hwmod = { + .name ="dss_dispc" , + .class = &omap2420_dispc_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2420_dss_dispc_slaves, + .slaves_cnt =ARRAY_SIZE (omap2420_dss_dispc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2420 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap2420_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = { + { + .pa_start =0x48050800 , + .pa_end =0x48050BFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_rfbi_hwmod, + .clk ="dss_ick" , + .addr = omap2420_dss_rfbi_addrs, + .addr_cnt =ARRAY_SIZE (omap2420_dss_rfbi_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { + &omap2420_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap2420_dss_rfbi_hwmod = { + .name ="dss_rfbi" , + .class = &omap2420_rfbi_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2420_dss_rfbi_slaves, + .slaves_cnt =ARRAY_SIZE (omap2420_dss_rfbi_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2420 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap2420_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = { + { + .pa_start =0x48050C00 , + .pa_end =0x48050FFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_venc_hwmod, + .clk ="dss_54m_fck" , + .addr = omap2420_dss_venc_addrs, + .addr_cnt =ARRAY_SIZE (omap2420_dss_venc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { + &omap2420_l4_core__dss_venc, +}; + +static struct omap_hwmod omap2420_dss_venc_hwmod = { + .name ="dss_venc" , + .class = &omap2420_venc_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2420_dss_venc_slaves, + .slaves_cnt =ARRAY_SIZE (omap2420_dss_venc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2420 ), + .flags =HWMOD_NO_IDLEST , +}; +/* I2C common */ static struct omap_hwmod_class_sysconfig i2c_sysc = { .rev_offs =0x00 ,
@@ -874,6 +1151,12 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { &omap2420_uart1_hwmod, &omap2420_uart2_hwmod, &omap2420_uart3_hwmod, +/* dss class */ + &omap2420_dss_dss_hwmod, + &omap2420_dss_dispc_hwmod, + &omap2420_dss_rfbi_hwmod, + &omap2420_dss_venc_hwmod, +/* i2c class */ &omap2420_i2c1_hwmod, &omap2420_i2c2_hwmod,
Signature · 1 line
1.7.0.4
Paul Walmsley
maintainerRe: [PATCH v5 01/17] OMAP2420: hwmod data: add DSS DISPC RFBI VENC
Hello Sumit, Senthilvadivu,
here are some initial comments based on a preliminary review.
Quoted 83 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for OMAP2420 Display Sub System,. Since DSS is also considered as an IP as DISPC, RFBI, name it as
dss_dss.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Acked-by Benoit Cousson <[email protected]>--- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 283 ++++++++++++++++++++++++++++ 1 files changed, 283 insertions(+), 0 deletions(-)arch/arm/mach-omap2/omap_hwmod_2420_data.c +49
-0@@ -38,6 +38,10 @@ static struct omap_hwmod omap2420_mpu_hwmod;static struct omap_hwmod omap2420_iva_hwmod;static struct omap_hwmod omap2420_l3_main_hwmod;static struct omap_hwmod omap2420_l4_core_hwmod; +static struct omap_hwmod omap2420_dss_dss_hwmod; +static struct omap_hwmod omap2420_dss_dispc_hwmod; +static struct omap_hwmod omap2420_dss_rfbi_hwmod; +static struct omap_hwmod omap2420_dss_venc_hwmod;static struct omap_hwmod omap2420_wd_timer2_hwmod;static struct omap_hwmod omap2420_gpio1_hwmod;static struct omap_hwmod omap2420_gpio2_hwmod;@@ -64,6 +68,13 @@ static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { &omap2420_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap2420_dss__l3 = { + .master = &omap2420_dss_dss_hwmod, + .slave = &omap2420_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { &omap2420_l3_main__l4_core,@@ -470,6 +481,272 @@ static struct omap_hwmod omap2420_uart3_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap2420_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap2420_dss_irqs[] = { + { .irq =25 }, +}; + +static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { + &omap2420_dss__l3, +}; + +static struct omap_hwmod_addr_space omap2420_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 531
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap2420_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap2420_dss_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X].
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 532
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 11 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +11
-0+}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { + &omap2420_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_54m_fck" }, + { .role ="sys_clk" , .clk ="dss2_fck" }, +};
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 553
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ +static struct omap_hwmod omap2420_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap2420_dss_hwmod_class, + .main_clk ="dss1_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap2420_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap2420_dss_irqs), + .sdma_reqs = omap2420_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap2420_dss_sdma_chs), +
Please remove this extra blank line.
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 560
Quoted 7 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +7
-0+ .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
This should be .idlest_stdby_bit; see below.
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 570
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), + .slaves = omap2420_dss_slaves, + .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), + .masters = omap2420_dss_masters, + .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), + .flags = HWMOD_NO_IDLEST,
No hwmod should define .idlest_idle_bit and set HWMOD_NO_IDLEST; they are mutually exclusive. In this case, looking at the definition of ST_DSS in the TRM, it is defined as the module's standby status, so it is appropriate to leave HWMOD_NO_IDLEST set here, but the assignment of .idlest_idle_bit above is incorrect.
Quoted 25 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +25
-0+}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_MIDLEMODE | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap2420_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 605
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .pa_start = 0x48050400, + .pa_end = 0x480507FF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_dispc_hwmod,
It appears, from reading Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2420_dss_dss_hwmod as its .master ? See also Figure 17-2 "Display Subsystem Schematic".
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 608
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +3
-0+ .clk = "dss_ick", + .addr = omap2420_dss_dispc_addrs, + .addr_cnt = ARRAY_SIZE(omap2420_dss_dispc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X].
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 609
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +8
-0+}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { + &omap2420_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap2420_dss_dispc_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 627
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .name = "dss_dispc", + .class = &omap2420_dispc_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
This should be .idlest_stdby_bit; see below.
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 633
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +6
-0+ }, + }, + .slaves = omap2420_dss_dispc_slaves, + .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), + .flags = HWMOD_NO_IDLEST,
No hwmod should define .idlest_idle_bit and set HWMOD_NO_IDLEST; they are mutually exclusive. In this case, looking at the definition of ST_DSS in the TRM, it is defined as the module's standby status, so it is appropriate to leave HWMOD_NO_IDLEST set here, but the assignment of .idlest_idle_bit above is incorrect.
Quoted 24 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +24
-0+}; + +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2420_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap2420_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 667
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .pa_start = 0x48050800, + .pa_end = 0x48050BFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_rfbi_hwmod,
It appears, from reading Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2420_dss_dss_hwmod as its .master ? See also Figure 17-2 "Display Subsystem Schematic".
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 670
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +3
-0+ .clk = "dss_ick", + .addr = omap2420_dss_rfbi_addrs, + .addr_cnt = ARRAY_SIZE(omap2420_dss_rfbi_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X].
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 671
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +8
-0+}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { + &omap2420_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 689
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .name = "dss_rfbi", + .class = &omap2420_rfbi_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
I don't think this module should have .idlest_idle_bit, .idlest_stdby_bit, or .idlest_reg_id set. From my reading of the OMAP242x TRM Rev. X [SWPU064X], particularly Figure 17-2 "Display Subsystem Schematic", it appears that the L3 initiator interface is only connected to the DISPC module and possibly the main DSS module.
Quoted 20 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +20
-0+ }, + }, + .slaves = omap2420_dss_rfbi_slaves, + .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), + .flags = HWMOD_NO_IDLEST, +}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap2420_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 719
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .pa_start = 0x48050C00, + .pa_end = 0x48050FFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { + .master = &omap2420_l4_core_hwmod, + .slave = &omap2420_dss_venc_hwmod,
It appears, from reading Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2420_dss_dss_hwmod as its .master ? See also Figure 17-2 "Display Subsystem Schematic".
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 722
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +3
-0+ .clk = "dss_54m_fck", + .addr = omap2420_dss_venc_addrs, + .addr_cnt = ARRAY_SIZE(omap2420_dss_venc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 6-194 "L4 Interconnect Detailed Memory Mapping" of the OMAP242x TRM Rev. X [SWPU064X].
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 723
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +8
-0+}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { + &omap2420_l4_core__dss_venc, +}; + +static struct omap_hwmod omap2420_dss_venc_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2420_data.c static struct omap_hwmod omap2420_uart3_hwmod = { · line 741
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +10
-0+ .name = "dss_venc", + .class = &omap2420_venc_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
I don't think this module should have .idlest_idle_bit, .idlest_stdby_bit, or .idlest_reg_id set. From my reading of the OMAP242x TRM Rev. X [SWPU064X], particularly Figure 17-2 "Display Subsystem Schematic", it appears that the L3 initiator interface is only connected to the DISPC module and possibly the main DSS module.
Quoted 32 lines
arch/arm/mach-omap2/omap_hwmod_2420_data.c +14
-0+ }, + }, + .slaves = omap2420_dss_venc_slaves, + .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), + .flags = HWMOD_NO_IDLEST, +}; +/* I2C common */ static struct omap_hwmod_class_sysconfig i2c_sysc = { .rev_offs =0x00 ,@@ -874,6 +1151,12 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { &omap2420_uart1_hwmod, &omap2420_uart2_hwmod, &omap2420_uart3_hwmod, +/* dss class */ + &omap2420_dss_dss_hwmod, + &omap2420_dss_dispc_hwmod, + &omap2420_dss_rfbi_hwmod, + &omap2420_dss_venc_hwmod, +/* i2c class */ &omap2420_i2c1_hwmod, &omap2420_i2c2_hwmod,Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
- Paul
PATCH v5 2/17 OMAP2430: hwmod data: add DSS DISPC RFBI VENC
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for OMAP2430 Display Sub System. Since DSS is also considered as an IP as DISPC, RFBI, name it as dss_dss.
--- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 282 ++++++++++++++++++++++++++++ 1 files changed, 282 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2430_data.c +282 -0
@@ -38,6 +38,10 @@ static struct omap_hwmod omap2430_mpu_hwmod;static struct omap_hwmod omap2430_iva_hwmod;static struct omap_hwmod omap2430_l3_main_hwmod;static struct omap_hwmod omap2430_l4_core_hwmod; +static struct omap_hwmod omap2430_dss_dss_hwmod; +static struct omap_hwmod omap2430_dss_dispc_hwmod; +static struct omap_hwmod omap2430_dss_rfbi_hwmod; +static struct omap_hwmod omap2430_dss_venc_hwmod;static struct omap_hwmod omap2430_wd_timer2_hwmod;static struct omap_hwmod omap2430_gpio1_hwmod;static struct omap_hwmod omap2430_gpio2_hwmod;
@@ -65,6 +69,13 @@ static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = { &omap2430_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap2430_dss__l3 = { + .master = &omap2430_dss_dss_hwmod, + .slave = &omap2430_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { &omap2430_l3_main__l4_core,
@@ -469,6 +480,271 @@ static struct omap_hwmod omap2430_uart3_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap2430_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap2430_dss_irqs[] = { + { .irq =25 }, +}; +static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { + &omap2430_dss__l3, +}; + +static struct omap_hwmod_addr_space omap2430_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap2430_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_dss_addrs), + .user =OCP_USER_MPU , +}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { + &omap2430_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_54m_fck" }, + { .role ="sys_clk" , .clk ="dss2_fck" }, +}; + +static struct omap_hwmod omap2430_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap2430_dss_hwmod_class, + .main_clk ="dss1_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap2430_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap2430_dss_irqs), + .sdma_reqs = omap2430_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap2430_dss_sdma_chs), + + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dss_opt_clks), + .slaves = omap2430_dss_slaves, + .slaves_cnt =ARRAY_SIZE (omap2430_dss_slaves), + .masters = omap2430_dss_masters, + .masters_cnt =ARRAY_SIZE (omap2430_dss_masters), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2430 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_MIDLEMODE | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap2430_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = { + { + .pa_start =0x48050400 , + .pa_end =0x480507FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_dispc_hwmod, + .clk ="dss_ick" , + .addr = omap2430_dss_dispc_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_dss_dispc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { + &omap2430_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap2430_dss_dispc_hwmod = { + .name ="dss_dispc" , + .class = &omap2430_dispc_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2430_dss_dispc_slaves, + .slaves_cnt =ARRAY_SIZE (omap2430_dss_dispc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2430 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap2430_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = { + { + .pa_start =0x48050800 , + .pa_end =0x48050BFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_rfbi_hwmod, + .clk ="dss_ick" , + .addr = omap2430_dss_rfbi_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_dss_rfbi_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { + &omap2430_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap2430_dss_rfbi_hwmod = { + .name ="dss_rfbi" , + .class = &omap2430_rfbi_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2430_dss_rfbi_slaves, + .slaves_cnt =ARRAY_SIZE (omap2430_dss_rfbi_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2430 ), + .flags =HWMOD_NO_IDLEST , +}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap2430_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = { + { + .pa_start =0x48050C00 , + .pa_end =0x48050FFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_venc_hwmod, + .clk ="dss_54m_fck" , + .addr = omap2430_dss_venc_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_dss_venc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { + &omap2430_l4_core__dss_venc, +}; + +static struct omap_hwmod omap2430_dss_venc_hwmod = { + .name ="dss_venc" , + .class = &omap2430_venc_hwmod_class, + .main_clk ="dss1_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_DSS1_SHIFT , + .module_offs =CORE_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_ST_DSS_SHIFT , + }, + }, + .slaves = omap2430_dss_venc_slaves, + .slaves_cnt =ARRAY_SIZE (omap2430_dss_venc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2430 ), + .flags =HWMOD_NO_IDLEST , +}; +/* I2C common */ static struct omap_hwmod_class_sysconfig i2c_sysc = { .rev_offs =0x00 ,
@@ -929,6 +1205,12 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { &omap2430_uart1_hwmod, &omap2430_uart2_hwmod, &omap2430_uart3_hwmod, +/* dss class */ + &omap2430_dss_dss_hwmod, + &omap2430_dss_dispc_hwmod, + &omap2430_dss_rfbi_hwmod, + &omap2430_dss_venc_hwmod, +/* i2c class */ &omap2430_i2c1_hwmod, &omap2430_i2c2_hwmod,
Signature · 1 line
1.7.0.4
Paul Walmsley
maintainerRe: [PATCH v5 02/17] OMAP2430: hwmod data: add DSS DISPC RFBI VENC
Hello Sumit, Senthilvadivu,
here are some initial comments based on a preliminary review.
Quoted 17 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for OMAP2430 Display Sub System. Since DSS is also considered as an IP as DISPC, RFBI, name it as
dss_dss.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Acked-by Benoit Cousson <[email protected]>--- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 282 ++++++++++++++++++++++++++++ 1 files changed, 282 insertions(+), 0 deletions(-)arch/arm/mach-omap2/omap_hwmod_2430_data.c +0
-0
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_mpu_hwmod; · line 44
Quoted 7 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +4
-0@@ -38,6 +38,10 @@ static struct omap_hwmod omap2430_mpu_hwmod;static struct omap_hwmod omap2430_iva_hwmod;static struct omap_hwmod omap2430_l3_main_hwmod;static struct omap_hwmod omap2430_l4_core_hwmod; +static struct omap_hwmod omap2430_dss_dss_hwmod; +static struct omap_hwmod omap2430_dss_dispc_hwmod; +static struct omap_hwmod omap2430_dss_rfbi_hwmod; +static struct omap_hwmod omap2430_dss_venc_hwmod;
What about the SDI module? According to the OMAP2430 TRM Rev. Z [SWPU090Z] Figure 15-32 "Display Subsystem Integration", there is an SDI module here also.
Quoted 58 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +44
-0static struct omap_hwmod omap2430_wd_timer2_hwmod;static struct omap_hwmod omap2430_gpio1_hwmod;static struct omap_hwmod omap2430_gpio2_hwmod;@@ -65,6 +69,13 @@ static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = { &omap2430_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap2430_dss__l3 = { + .master = &omap2430_dss_dss_hwmod, + .slave = &omap2430_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { &omap2430_l3_main__l4_core,@@ -469,6 +480,271 @@ static struct omap_hwmod omap2430_uart3_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap2430_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap2430_dss_irqs[] = { + { .irq =25 }, +}; +static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { + &omap2430_dss__l3, +}; + +static struct omap_hwmod_addr_space omap2430_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 529
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap2430_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_dss_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z].
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 530
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 11 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +11
-0+}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { + &omap2430_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_54m_fck" }, + { .role ="sys_clk" , .clk ="dss2_fck" }, +};
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 551
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ +static struct omap_hwmod omap2430_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap2430_dss_hwmod_class, + .main_clk ="dss1_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap2430_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap2430_dss_irqs), + .sdma_reqs = omap2430_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap2430_dss_sdma_chs), +
Please remove this extra blank line.
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 558
Quoted 7 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +7
-0+ .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
According to Table 4-219 "CM_IDLEST_DSS" of the OMAP2430 TRM Rev. Z [SWPU090Z], the DSS has both a target idle and an initiator standby status bit. Please update the fields here accordingly. You may also need to add a patch to your series to update the mach-omap2/cm-regbits-24xx.h file.
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 568
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), + .slaves = omap2430_dss_slaves, + .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), + .masters = omap2430_dss_masters, + .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), + .flags = HWMOD_NO_IDLEST,
2430 DSS has a target idle status bit, so this flag shouldn't be set.
Quoted 25 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +25
-0+}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_MIDLEMODE | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap2430_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 603
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .pa_start = 0x48050400, + .pa_end = 0x480507FF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_dispc_hwmod,
It appears, from reading Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2430_dss_dss_hwmod as its .master ? See also Figure 15-33 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 606
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +3
-0+ .clk = "dss_ick", + .addr = omap2430_dss_dispc_addrs, + .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z].
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 607
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +8
-0+}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { + &omap2430_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap2430_dss_dispc_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 625
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .name = "dss_dispc", + .class = &omap2430_dispc_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
According to Table 4-219 "CM_IDLEST_DSS" of the OMAP2430 TRM Rev. Z [SWPU090Z], the DSS has both a target idle and an initiator standby status bit. Please update the fields here accordingly. You may also need to add a patch to your series to update the mach-omap2/cm-regbits-24xx.h file.
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 631
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +6
-0+ }, + }, + .slaves = omap2430_dss_dispc_slaves, + .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), + .flags = HWMOD_NO_IDLEST,
2430 DSS has a target idle status bit, so this flag shouldn't be set.
Quoted 24 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +24
-0+}; + +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap2430_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap2430_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 665
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .pa_start = 0x48050800, + .pa_end = 0x48050BFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_rfbi_hwmod,
It appears, from reading Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2430_dss_dss_hwmod as its .master ? See also Figure 15-33 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 668
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +3
-0+ .clk = "dss_ick", + .addr = omap2430_dss_rfbi_addrs, + .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z].
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 669
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +8
-0+}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { + &omap2430_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 687
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .name = "dss_rfbi", + .class = &omap2430_rfbi_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
See the above comments regarding these .prcm sections. Since this module doesn't have anything to do with the L3 interface, it shouldn't have an .idlest_stdby_bit, but the idlest_idle_bit should presumably be OMAP2430_ST_DSS_IDLE_SHIFT.
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 693
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +6
-0+ }, + }, + .slaves = omap2430_dss_rfbi_slaves, + .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), + .flags = HWMOD_NO_IDLEST,
2430 DSS has a target idle status bit, so this flag shouldn't be set.
Quoted 14 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +14
-0+}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap2430_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 717
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .pa_start = 0x48050C00, + .pa_end = 0x48050FFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { + .master = &omap2430_l4_core_hwmod, + .slave = &omap2430_dss_venc_hwmod,
It appears, from reading Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap2430_dss_dss_hwmod as its .master ? See also Figure 15-33 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 720
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +3
-0+ .clk = "dss_54m_fck", + .addr = omap2430_dss_venc_addrs, + .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-108 "L4 Core Memory Space Mapping" of the OMAP2430 TRM Rev. Z [SWPU090Z].
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 721
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2430_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 8 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +8
-0+}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { + &omap2430_l4_core__dss_venc, +}; + +static struct omap_hwmod omap2430_dss_venc_hwmod = {
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 739
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +10
-0+ .name = "dss_venc", + .class = &omap2430_venc_hwmod_class, + .main_clk = "dss1_fck", + .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP24XX_EN_DSS1_SHIFT, + .module_offs = CORE_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP24XX_ST_DSS_SHIFT,
See the above comments regarding these .prcm sections. Since this module doesn't have anything to do with the L3 interface, it shouldn't have an .idlest_stdby_bit, but the idlest_idle_bit should presumably be OMAP2430_ST_DSS_IDLE_SHIFT.
arch/arm/mach-omap2/omap_hwmod_2430_data.c static struct omap_hwmod omap2430_uart3_hwmod = { · line 745
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +6
-0+ }, + }, + .slaves = omap2430_dss_venc_slaves, + .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), + .flags = HWMOD_NO_IDLEST,
2430 DSS has a target idle status bit, so this flag shouldn't be set.
Quoted 26 lines
arch/arm/mach-omap2/omap_hwmod_2430_data.c +8
-0+}; +/* I2C common */ static struct omap_hwmod_class_sysconfig i2c_sysc = { .rev_offs =0x00 ,@@ -929,6 +1205,12 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { &omap2430_uart1_hwmod, &omap2430_uart2_hwmod, &omap2430_uart3_hwmod, +/* dss class */ + &omap2430_dss_dss_hwmod, + &omap2430_dss_dispc_hwmod, + &omap2430_dss_rfbi_hwmod, + &omap2430_dss_venc_hwmod, +/* i2c class */ &omap2430_i2c1_hwmod, &omap2430_i2c2_hwmod,Signature · 6 lines
1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
- Paul
PATCH v5 3/17 OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for Display Sub System applicable for OMAP3430-ES2 onwards and OMAP36xx. DSS is also considered as an IP as DISPC, RFBI and named as dss_dss. For all the IP modules in DSS, same clock is needed for enabling. Hwmod sees DSS IPs as independent IPs, so same clock has to be repeated for .main_clk in each IP.
OMAP3430ES1 do not have IDLEST bit to poll on for dss IP. So this hwmod is not applicable for 3430ES1.
--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 339 ++++++++++++++++++++++++++++ 1 files changed, 339 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +339 -0
@@ -44,6 +44,11 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod;static struct omap_hwmod omap3xxx_l4_core_hwmod;static struct omap_hwmod omap3xxx_l4_per_hwmod;static struct omap_hwmod omap3xxx_wd_timer2_hwmod; +static struct omap_hwmod omap3xxx_dss_dss_hwmod; +static struct omap_hwmod omap3xxx_dss_dispc_hwmod; +static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; +static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; +static struct omap_hwmod omap3xxx_dss_venc_hwmod;static struct omap_hwmod omap3xxx_i2c1_hwmod;static struct omap_hwmod omap3xxx_i2c2_hwmod;static struct omap_hwmod omap3xxx_i2c3_hwmod;
@@ -84,6 +89,13 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = { &omap3xxx_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { + .master = &omap3xxx_dss_dss_hwmod, + .slave = &omap3xxx_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { &omap3xxx_l3_main__l4_core,
@@ -664,6 +676,326 @@ static struct omap_hwmod_class i2c_class = { .sysc = &i2c_sysc, }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap3xxx_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = { + { .irq =25 }, +}; + +static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, + { .name ="dsi1" , .dma_req =74 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { + &omap3xxx_dss__l3, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap3xxx_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_addrs), + .user =OCP_USER_MPU , +}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { + &omap3xxx_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_tv_fck" }, + { .role ="dssclk" , .clk ="dss_96m_fck" }, + { .role ="sys_clk" , .clk ="dss2_alwon_fck" }, +}; + +static struct omap_hwmod omap3xxx_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap3xxx_dss_hwmod_class, + .main_clk ="dss1_alwon_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap3xxx_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap3xxx_dss_irqs), + .sdma_reqs = omap3xxx_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap3xxx_dss_sdma_chs), + + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt =ARRAY_SIZE (dss_opt_clks), + .slaves = omap3xxx_dss_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_slaves), + .masters = omap3xxx_dss_masters, + .masters_cnt =ARRAY_SIZE (omap3xxx_dss_masters), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_CLOCKACTIVITY | +SYSC_HAS_MIDLEMODE |SYSC_HAS_ENAWAKEUP | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap3xxx_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = { + { + .pa_start =0x48050400 , + .pa_end =0x480507FF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dispc_hwmod, + .clk ="dss_ick" , + .addr = omap3xxx_dss_dispc_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_dispc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { + &omap3xxx_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { + .name ="dss_dispc" , + .class = &omap3xxx_dispc_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_dispc_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_dispc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; + +/* +* 'dsi' class +* display serial interface controller +*/ + +static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { + .name ="dsi" , +}; + +/* dss_dsi1 */ +static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { + { + .pa_start =0x4804FC00 , + .pa_end =0x4804FFFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dsi1 */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dsi1_hwmod, + .addr = omap3xxx_dss_dsi1_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_dsi1_addrs), + .user =OCP_USER_MPU , +}; + + +/* dss_dsi1 slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { + &omap3xxx_l4_core__dss_dsi1, +}; + +static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { + .name ="dss_dsi1" , + .class = &omap3xxx_dsi_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_dsi1_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_dsi1_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap3xxx_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = { + { + .pa_start =0x48050800 , + .pa_end =0x48050BFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_rfbi_hwmod, + .clk ="dss_ick" , + .addr = omap3xxx_dss_rfbi_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_rfbi_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { + &omap3xxx_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { + .name ="dss_rfbi" , + .class = &omap3xxx_rfbi_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_rfbi_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_rfbi_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap3xxx_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = { + { + .pa_start =0x48050C00 , + .pa_end =0x48050FFF , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_venc_hwmod, + .clk ="dss_tv_fck" , + .addr = omap3xxx_dss_venc_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_venc_addrs), + .user =OCP_USER_MPU , +}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { + &omap3xxx_l4_core__dss_venc, +}; + +static struct omap_hwmod omap3xxx_dss_venc_hwmod = { + .name ="dss_venc" , + .class = &omap3xxx_venc_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_venc_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_venc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; +/* I2C1 */ static struct omap_i2c_dev_attr i2c1_dev_attr = {
@@ -1368,6 +1700,13 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_uart2_hwmod, &omap3xxx_uart3_hwmod, &omap3xxx_uart4_hwmod, +/* dss class */ + &omap3xxx_dss_dss_hwmod, + &omap3xxx_dss_dispc_hwmod, + &omap3xxx_dss_dsi1_hwmod, + &omap3xxx_dss_rfbi_hwmod, + &omap3xxx_dss_venc_hwmod, +/* i2c class */ &omap3xxx_i2c1_hwmod, &omap3xxx_i2c2_hwmod, &omap3xxx_i2c3_hwmod,
Signature · 1 line
1.7.0.4
Paul Walmsley
maintainerRe: [PATCH v5 03/17] OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC
Hello Sumit, Senthilvadivu,
Here's a first pass of comments based on a preliminary review.
Quoted 11 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod needs database of all IPs in a system. This patch generates the hwmod database for Display Sub System applicable for OMAP3430-ES2 onwards and OMAP36xx. DSS is also considered as an IP as DISPC, RFBI and named as
dss_dss. For all the IP modules in DSS, same clock is needed for enabling. Hwmod sees DSS IPs as independent IPs, so same clock has to be repeated for .main_clk in each IP.OMAP3430ES1 do not have IDLEST bit to poll on for dss IP. So this hwmod is not applicable for 3430ES1.
DSS still exists on the ES1 chips. So, this means that, after these patches, DSS won't be usable on 3430ES1. Instead, please create separate copies of the struct omap_hwmod_ocp_if and omap_hwmod records, labeled with "omap3430es1", and label the others as "omap3430es2". It should be possible to share most of the other data.
Quoted 78 lines
Signed-off-by Senthilvadivu Guruswamy <[email protected]>--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 339 ++++++++++++++++++++++++++++ 1 files changed, 339 insertions(+), 0 deletions(-)arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +51
-0@@ -44,6 +44,11 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod;static struct omap_hwmod omap3xxx_l4_core_hwmod;static struct omap_hwmod omap3xxx_l4_per_hwmod;static struct omap_hwmod omap3xxx_wd_timer2_hwmod; +static struct omap_hwmod omap3xxx_dss_dss_hwmod; +static struct omap_hwmod omap3xxx_dss_dispc_hwmod; +static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; +static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; +static struct omap_hwmod omap3xxx_dss_venc_hwmod;static struct omap_hwmod omap3xxx_i2c1_hwmod;static struct omap_hwmod omap3xxx_i2c2_hwmod;static struct omap_hwmod omap3xxx_i2c3_hwmod;@@ -84,6 +89,13 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = { &omap3xxx_mpu__l3_main, }; +/* DSS -> l3 */ +static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { + .master = &omap3xxx_dss_dss_hwmod, + .slave = &omap3xxx_l3_main_hwmod, + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; +/* Master interfaces on the L3 interconnect */ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { &omap3xxx_l3_main__l4_core,@@ -664,6 +676,326 @@ static struct omap_hwmod_class i2c_class = { .sysc = &i2c_sysc, }; +/* +* 'dss' class +* display sub-system +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_dss_hwmod_class = { + .name ="dss" , + .sysc = &omap3xxx_dss_sysc, +}; + +/* dss */ +static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = { + { .irq =25 }, +}; + +static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { + { .name ="dispc" , .dma_req =5 }, + { .name ="dsi1" , .dma_req =74 }, +}; + +/* dss */ +/* dss master ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { + &omap3xxx_dss__l3, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = { + { + .pa_start =0x48050000 , + .pa_end =0x480503FF , + .flags =ADDR_TYPE_RT
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 727
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ }, +}; + +/* l4_core -> dss */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dss_hwmod, + .clk ="dss_ick" , + .addr = omap3xxx_dss_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_dss_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H].
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 728
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 12 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +12
-0+}; + +/* dss slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { + &omap3xxx_l4_core__dss, +}; + +static struct omap_hwmod_opt_clk dss_opt_clks[] = { + { .role ="tv_clk" , .clk ="dss_tv_fck" }, + { .role ="dssclk" , .clk ="dss_96m_fck" }, + { .role ="sys_clk" , .clk ="dss2_alwon_fck" }, +};
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 750
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ +static struct omap_hwmod omap3xxx_dss_dss_hwmod = { + .name ="dss_dss" , + .class = &omap3xxx_dss_hwmod_class, + .main_clk ="dss1_alwon_fck" ,/* instead of dss_fck */ + .mpu_irqs = omap3xxx_dss_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap3xxx_dss_irqs), + .sdma_reqs = omap3xxx_dss_sdma_chs, + .sdma_reqs_cnt =ARRAY_SIZE (omap3xxx_dss_sdma_chs), +
Please remove this extra blank line.
Quoted 43 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +43
-0+ .prcm = { + .omap2 = { + .prcm_reg_id = 1, + .module_bit = OMAP3430_EN_DSS1_SHIFT, + .module_offs = OMAP3430_DSS_MOD, + .idlest_reg_id = 1, + .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT, + }, + }, + .opt_clks = dss_opt_clks, + .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), + .slaves = omap3xxx_dss_slaves, + .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves), + .masters = omap3xxx_dss_masters, + .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | + CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), +}; + +/* +* 'dispc' class +* display controller +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_CLOCKACTIVITY | +SYSC_HAS_MIDLEMODE |SYSC_HAS_ENAWAKEUP | +SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +MSTANDBY_FORCE |MSTANDBY_NO |MSTANDBY_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = { + .name ="dispc" , + .sysc = &omap3xxx_dispc_sysc, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 803
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ .pa_start = 0x48050400, + .pa_end = 0x480507FF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dispc */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dispc_hwmod,
It appears, from reading Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap3xxx_dss_dss_hwmod as its .master ? See also Figure 15-69 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 806
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +3
-0+ .clk = "dss_ick", + .addr = omap3xxx_dss_dispc_addrs, + .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H].
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 807
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 38 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +38
-0+}; + +/* dss_dispc slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { + &omap3xxx_l4_core__dss_dispc, +}; + +static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { + .name ="dss_dispc" , + .class = &omap3xxx_dispc_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_dispc_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_dispc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; + +/* +* 'dsi' class +* display serial interface controller +*/ + +static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { + .name ="dsi" , +}; + +/* dss_dsi1 */ +static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 855
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ .pa_start = 0x4804FC00, + .pa_end = 0x4804FFFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_dsi1 */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_dsi1_hwmod,
It appears, from reading Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap3xxx_dss_dss_hwmod as its .master ? See also Figure 15-69 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 858
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +3
-0+ .addr = omap3xxx_dss_dsi1_addrs, + .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs), + .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 48 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +48
-0+}; + + +/* dss_dsi1 slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { + &omap3xxx_l4_core__dss_dsi1, +}; + +static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { + .name ="dss_dsi1" , + .class = &omap3xxx_dsi_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_dsi1_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_dsi1_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; +/* +* 'rfbi' class +* remote frame buffer interface +*/ + +static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = { + .name ="rfbi" , + .sysc = &omap3xxx_rfbi_sysc, +}; + +static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 916
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ .pa_start = 0x48050800, + .pa_end = 0x48050BFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_rfbi */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_rfbi_hwmod,
It appears, from reading Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap3xxx_dss_dss_hwmod as its .master ? See also Figure 15-69 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 919
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +3
-0+ .clk = "dss_ick", + .addr = omap3xxx_dss_rfbi_addrs, + .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H].
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 920
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 38 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +38
-0+}; + +/* dss_rfbi slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { + &omap3xxx_l4_core__dss_rfbi, +}; + +static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { + .name ="dss_rfbi" , + .class = &omap3xxx_rfbi_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_rfbi_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_rfbi_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; + +/* +* 'venc' class +* video encoder +*/ + +static struct omap_hwmod_class omap3xxx_venc_hwmod_class = { + .name ="venc" , +}; + +/* dss_venc */ +static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = { + {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 968
Quoted 10 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +10
-0+ .pa_start = 0x48050C00, + .pa_end = 0x48050FFF, + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_core -> dss_venc */ +static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &omap3xxx_dss_venc_hwmod,
It appears, from reading Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H], that there is only one L4 CORE port for the entire DSS. However, the struct omap_hwmod_ocp_if data here claims that this submodule has its own L4 CORE port. Shouldn't this struct omap_hwmod_ocp_if record have omap3xxx_dss_dss_hwmod as its .master ? See also Figure 15-69 "Display Subsystem Full Schematic".
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 971
Quoted 3 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +3
-0+ .clk = "dss_tv_fck", + .addr = omap3xxx_dss_venc_addrs, + .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
This struct omap_hwmod_ocp_if record is missing firewall data. Please add. See, for example, "omap3_l4_core__i2c1" in mach-omap2/omap_hwmod_3xxx_data.c, for an example of how to add this data. Much of the data that you need can be found in Table 5-113 "Region Allocation for L4-Core Interconnect" of the OMAP34xx TRM Rev. ZH [SWPU222H].
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_class i2c_class = { · line 972
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1
-0+ .user = OCP_USER_MPU,
Unless there's some reason why the SDMA can't access this module, the .user field should be set to OCP_USER_MPU | OCP_USER_SDMA.
Quoted 45 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +33
-0+}; + +/* dss_venc slave ports */ +static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { + &omap3xxx_l4_core__dss_venc, +}; + +static struct omap_hwmod omap3xxx_dss_venc_hwmod = { + .name ="dss_venc" , + .class = &omap3xxx_venc_hwmod_class, + .main_clk ="dss1_alwon_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_DSS1_SHIFT , + .module_offs =OMAP3430_DSS_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430ES2_ST_DSS_IDLE_SHIFT , + }, + }, + .slaves = omap3xxx_dss_venc_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_dss_venc_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES2 | +CHIP_IS_OMAP3630ES1 |CHIP_GE_OMAP3630ES1_1 ), +}; +/* I2C1 */ static struct omap_i2c_dev_attr i2c1_dev_attr = {@@ -1368,6 +1700,13 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_uart2_hwmod, &omap3xxx_uart3_hwmod, &omap3xxx_uart4_hwmod, +/* dss class */ + &omap3xxx_dss_dss_hwmod, + &omap3xxx_dss_dispc_hwmod, + &omap3xxx_dss_dsi1_hwmod, + &omap3xxx_dss_rfbi_hwmod, + &omap3xxx_dss_venc_hwmod, +/* i2c class */ &omap3xxx_i2c1_hwmod, &omap3xxx_i2c2_hwmod, &omap3xxx_i2c3_hwmod,Signature · 1 line
1.7.0.4
- Paul
PATCH v5 4/17 OMAP2,3 DSS2 Change driver name to omap_display
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Change the driver name from omapdss to omap_display as the driver takes care of the display devices ie number of panels, type of panels available in the platform. Change the device name in the board files and 2420,2430,3xxx clock files from omapdss to omap_display to match the driver name.
--- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 6 +++--- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 6 +++--- arch/arm/mach-omap2/board-omap3evm.c | 4 ++-- arch/arm/mach-omap2/board-omap3pandora.c | 8 ++++---- arch/arm/mach-omap2/board-omap3stalker.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 ++-- arch/arm/mach-omap2/board-rx51-video.c | 2 +- arch/arm/mach-omap2/clock2420_data.c | 8 ++++---- arch/arm/mach-omap2/clock2430_data.c | 8 ++++---- arch/arm/mach-omap2/clock3xxx_data.c | 14 +++++++------- drivers/video/omap2/dss/core.c | 2 +- 15 files changed, 36 insertions(+), 36 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -1
@@ -302,7 +302,7 @@ static struct omap_dss_board_info sdp3430_dss_data = { };static struct platform_device sdp3430_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &sdp3430_dss_data,
arch/arm/mach-omap2/board-am3517evm.c +1 -1
@@ -368,7 +368,7 @@ static struct omap_dss_board_info am3517_evm_dss_data = { };static struct platform_device am3517_evm_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &am3517_evm_dss_data,
arch/arm/mach-omap2/board-cm-t35.c +1 -1
@@ -391,7 +391,7 @@ static struct omap_dss_board_info cm_t35_dss_data = { };static struct platform_device cm_t35_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &cm_t35_dss_data,
arch/arm/mach-omap2/board-devkit8000.c +3 -3
@@ -189,7 +189,7 @@ static struct omap_dss_board_info devkit8000_dss_data = { };static struct platform_device devkit8000_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &devkit8000_dss_data,
@@ -197,7 +197,7 @@ static struct platform_device devkit8000_dss_device = { };static struct regulator_consumer_supply devkit8000_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss" ); +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );static uint32_t board_keymap[] = {KEY (0 ,0 ,KEY_1 ),
@@ -272,7 +272,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = { };static struct regulator_consumer_supply devkit8000_vpll1_supply = -REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ); +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" );/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data devkit8000_vmmc1 = {
arch/arm/mach-omap2/board-igep0020.c +1 -1
@@ -479,7 +479,7 @@ static struct omap_dss_board_info igep2_dss_data = { };static struct platform_device igep2_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &igep2_dss_data,
arch/arm/mach-omap2/board-omap3beagle.c +3 -3
@@ -223,7 +223,7 @@ static struct omap_dss_board_info beagle_dss_data = { };static struct platform_device beagle_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &beagle_dss_data,
@@ -231,10 +231,10 @@ static struct platform_device beagle_dss_device = { };static struct regulator_consumer_supply beagle_vdac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss" ); +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );static struct regulator_consumer_supply beagle_vdvi_supply = -REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ); +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" );static void __init beagle_display_init (void ) {
arch/arm/mach-omap2/board-omap3evm.c +2 -2
@@ -323,7 +323,7 @@ static struct omap_dss_board_info omap3_evm_dss_data = { };static struct platform_device omap3_evm_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &omap3_evm_dss_data,
@@ -516,7 +516,7 @@ static struct regulator_init_data omap3_evm_vdac = {/* VPLL2 for digital video outputs */ static struct regulator_consumer_supply omap3_evm_vpll2_supply = -REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ); +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" );static struct regulator_init_data omap3_evm_vpll2 = { .constraints = {
arch/arm/mach-omap2/board-omap3pandora.c +4 -4
@@ -254,7 +254,7 @@ static struct omap_dss_board_info pandora_dss_data = { };static struct platform_device pandora_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &pandora_dss_data,
@@ -350,11 +350,11 @@ static struct regulator_consumer_supply pandora_vmmc3_supply =REGULATOR_SUPPLY ("vmmc" ,"mmci-omap-hs.2" );static struct regulator_consumer_supply pandora_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss" ); +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );static struct regulator_consumer_supply pandora_vdds_supplies[] = { -REGULATOR_SUPPLY ("vdds_sdi" ,"omapdss" ), -REGULATOR_SUPPLY ("vdds_dsi" ,"omapdss" ), +REGULATOR_SUPPLY ("vdds_sdi" ,"omap_display" ), +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" ), }; static struct regulator_consumer_supply pandora_vcc_lcd_supply =
arch/arm/mach-omap2/board-omap3stalker.c +1 -1
@@ -230,7 +230,7 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { };static struct platform_device omap3_stalker_dss_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &omap3_stalker_dss_data,
arch/arm/mach-omap2/board-rx51-peripherals.c +2 -2
@@ -360,11 +360,11 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { };static struct regulator_consumer_supply rx51_vaux1_consumers[] = { -REGULATOR_SUPPLY ("vdds_sdi" ,"omapdss" ), +REGULATOR_SUPPLY ("vdds_sdi" ,"omap_display" ), };static struct regulator_consumer_supply rx51_vdac_supply[] = { -REGULATOR_SUPPLY ("vdda_dac" ,"omapdss" ), +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" ), };static struct regulator_init_data rx51_vaux1 = {
arch/arm/mach-omap2/board-rx51-video.c +1 -1
@@ -67,7 +67,7 @@ static struct omap_dss_board_info rx51_dss_board_info = { };struct platform_device rx51_display_device = { - .name ="omapdss" , + .name ="omap_display" , .id =-1 , .dev = { .platform_data = &rx51_dss_board_info,
arch/arm/mach-omap2/clock2420_data.c +4 -4
@@ -1786,10 +1786,10 @@ static struct omap_clk omap2420_clks[] = {CLK (NULL ,"gfx_2d_fck" , &gfx_2d_fck,CK_242X ),CLK (NULL ,"gfx_ick" , &gfx_ick,CK_242X ),/* DSS domain clocks */ -CLK ("omapdss" ,"ick" , &dss_ick,CK_242X ), -CLK ("omapdss" ,"dss1_fck" , &dss1_fck,CK_242X ), -CLK ("omapdss" ,"dss2_fck" , &dss2_fck,CK_242X ), -CLK ("omapdss" ,"tv_fck" , &dss_54m_fck,CK_242X ), +CLK ("omap_display" ,"ick" , &dss_ick,CK_242X ), +CLK ("omap_display" ,"dss1_fck" , &dss1_fck,CK_242X ), +CLK ("omap_display" ,"dss2_fck" , &dss2_fck,CK_242X ), +CLK ("omap_display" ,"tv_fck" , &dss_54m_fck,CK_242X ),/* L3 domain clocks */ CLK (NULL ,"core_l3_ck" , &core_l3_ck,CK_242X ), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
arch/arm/mach-omap2/clock2430_data.c +4 -4
@@ -1890,10 +1890,10 @@ static struct omap_clk omap2430_clks[] = {CLK (NULL ,"mdm_ick" , &mdm_ick,CK_243X ),CLK (NULL ,"mdm_osc_ck" , &mdm_osc_ck,CK_243X ),/* DSS domain clocks */ -CLK ("omapdss" ,"ick" , &dss_ick,CK_243X ), -CLK ("omapdss" ,"dss1_fck" , &dss1_fck,CK_243X ), -CLK ("omapdss" ,"dss2_fck" , &dss2_fck,CK_243X ), -CLK ("omapdss" ,"tv_fck" , &dss_54m_fck,CK_243X ), +CLK ("omap_display" ,"ick" , &dss_ick,CK_243X ), +CLK ("omap_display" ,"dss1_fck" , &dss1_fck,CK_243X ), +CLK ("omap_display" ,"dss2_fck" , &dss2_fck,CK_243X ), +CLK ("omap_display" ,"tv_fck" , &dss_54m_fck,CK_243X ),/* L3 domain clocks */ CLK (NULL ,"core_l3_ck" , &core_l3_ck,CK_243X ), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
arch/arm/mach-omap2/clock3xxx_data.c +7 -7
@@ -3355,13 +3355,13 @@ static struct omap_clk omap3xxx_clks[] = {CLK ("omap_rng" ,"ick" , &rng_ick,CK_34XX |CK_36XX ),CLK (NULL ,"sha11_ick" , &sha11_ick,CK_34XX |CK_36XX ),CLK (NULL ,"des1_ick" , &des1_ick,CK_34XX |CK_36XX ), -CLK ("omapdss" ,"dss1_fck" , &dss1_alwon_fck_3430es1,CK_3430ES1 ), -CLK ("omapdss" ,"dss1_fck" , &dss1_alwon_fck_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), -CLK ("omapdss" ,"tv_fck" , &dss_tv_fck,CK_3XXX ), -CLK ("omapdss" ,"video_fck" , &dss_96m_fck,CK_3XXX ), -CLK ("omapdss" ,"dss2_fck" , &dss2_alwon_fck,CK_3XXX ), -CLK ("omapdss" ,"ick" , &dss_ick_3430es1,CK_3430ES1 ), -CLK ("omapdss" ,"ick" , &dss_ick_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), +CLK ("omap_display" ,"dss1_fck" , &dss1_alwon_fck_3430es1,CK_3430ES1 ), +CLK ("omap_display" ,"dss1_fck" , &dss1_alwon_fck_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), +CLK ("omap_display" ,"tv_fck" , &dss_tv_fck,CK_3XXX ), +CLK ("omap_display" ,"video_fck" , &dss_96m_fck,CK_3XXX ), +CLK ("omap_display" ,"dss2_fck" , &dss2_alwon_fck,CK_3XXX ), +CLK ("omap_display" ,"ick" , &dss_ick_3430es1,CK_3430ES1 ), +CLK ("omap_display" ,"ick" , &dss_ick_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ),CLK (NULL ,"cam_mclk" , &cam_mclk,CK_34XX |CK_36XX ),CLK (NULL ,"cam_ick" , &cam_ick,CK_34XX |CK_36XX ), CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
drivers/video/omap2/dss/core.c +1 -1
@@ -715,7 +715,7 @@ static struct platform_driver omap_dss_driver = { .suspend = omap_dss_suspend, .resume = omap_dss_resume, .driver = { - .name = "omapdss", + .name = "omap_display", .owner = THIS_MODULE, }, };
Signature · 1 line
1.7.0.4
Re: [PATCH v5 04/17] OMAP2,3 DSS2 Change driver name to omap_display
Quoted 8 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Change the driver name from omapdss to
omap_displayas the driver takes care of the display devices ie number of panels, type of panels available in the platform. Change the device name in the board files and 2420,2430,3xxx clock files from omapdss toomap_displayto match the driver name.Signed-off-by Senthilvadivu Guruswamy <[email protected]>
Sumit, your Signed-off-by: is missing on this and some of the other patches. Please add it in if you will be submitting these.
Quoted 4 lines
--- arch/arm/mach-omap2/clock2420_data.c | 8 ++++---- arch/arm/mach-omap2/clock2430_data.c | 8 ++++---- arch/arm/mach-omap2/clock3xxx_data.c | 14 +++++++-------
The clkdev changes in the above three files are
- Paul
Re: [PATCH v5 04/17] OMAP2,3 DSS2 Change driver name to omap_display
Paul,
Quoted 9 lines · Paul Walmsley
Quoted 7 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Change the driver name from omapdss to
omap_displayas the driver takes care of the display devices ie number of panels, type of panels available in the platform. Change the device name in the board files and 2420,2430,3xxx clock files from omapdss toomap_displayto match the driver name.
Quoted 4 lines
Quoted 1 line
Signed-off-by Senthilvadivu Guruswamy <[email protected]>Sumit, your Signed-off-by: is missing on this and some of the other patches. Please add it in if you will be submitting these.
Yes, I will be submitting these, so will add my Signed-off-by: for all.
Quoted 9 lines
Quoted 5 lines
---
arch/arm/mach-omap2/clock2420_data.c | 8 ++++---- arch/arm/mach-omap2/clock2430_data.c | 8 ++++---- arch/arm/mach-omap2/clock3xxx_data.c | 14 +++++++-------The clkdev changes in the above three files are
Acked-by Paul Walmsley <[email protected]>
Thanks!
~Sumit.
Quoted 4 lines
- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 5/17 OMAP2,3 DSS2 Use Regulator init with driver name
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Use driver name in regulator inits needed for display instead of using device structure name.
--- arch/arm/mach-omap2/board-3430sdp.c | 11 +++-------- arch/arm/mach-omap2/board-cm-t35.c | 12 ++++-------- arch/arm/mach-omap2/board-igep0020.c | 6 ++---- arch/arm/mach-omap2/board-omap3evm.c | 6 ++---- arch/arm/mach-omap2/board-omap3stalker.c | 6 ++---- 5 files changed, 13 insertions(+), 28 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +3 -8
@@ -309,10 +309,8 @@ static struct platform_device sdp3430_dss_device = { }, }; -static struct regulator_consumer_supply sdp3430_vdda_dac_supply = { - .supply ="vdda_dac" , - .dev = &sdp3430_dss_device.dev, -}; +static struct regulator_consumer_supply sdp3430_vdda_dac_supply = +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );static struct platform_device *sdp3430_devices[]__initdata = { &sdp3430_dss_device,
@@ -540,10 +538,7 @@ static struct regulator_init_data sdp3430_vdac = {/* VPLL2 for digital video outputs */ static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { - { - .supply ="vdds_dsi" , - .dev = &sdp3430_dss_device.dev, - } +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" ), };static struct regulator_init_data sdp3430_vpll2 = {
arch/arm/mach-omap2/board-cm-t35.c +4 -8
@@ -484,15 +484,11 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = { .supply = "vmmc_aux", }; -static struct regulator_consumer_supply cm_t35_vdac_supply = { - .supply ="vdda_dac" , - .dev = &cm_t35_dss_device.dev, -}; +static struct regulator_consumer_supply cm_t35_vdac_supply = +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" ); -static struct regulator_consumer_supply cm_t35_vdvi_supply = { - .supply ="vdvi" , - .dev = &cm_t35_dss_device.dev, -}; +static struct regulator_consumer_supply cm_t35_vdvi_supply = +REGULATOR_SUPPLY ("vdvi" ,"omap_display" );/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ static struct regulator_init_data cm_t35_vmmc1 = {
arch/arm/mach-omap2/board-igep0020.c +2 -4
@@ -486,10 +486,8 @@ static struct platform_device igep2_dss_device = { }, }; -static struct regulator_consumer_supply igep2_vpll2_supply = { - .supply ="vdds_dsi" , - .dev = &igep2_dss_device.dev, -}; +static struct regulator_consumer_supply igep2_vpll2_supply = +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" );static struct regulator_init_data igep2_vpll2 = { .constraints = {
arch/arm/mach-omap2/board-omap3evm.c +2 -4
@@ -494,10 +494,8 @@ static struct twl4030_codec_data omap3evm_codec_data = { .audio = &omap3evm_audio_data, }; -static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = { - .supply ="vdda_dac" , - .dev = &omap3_evm_dss_device.dev, -}; +static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );/* VDAC for DSS driving S-Video */ static struct regulator_init_data omap3_evm_vdac = {
arch/arm/mach-omap2/board-omap3stalker.c +2 -4
@@ -437,10 +437,8 @@ static struct twl4030_codec_data omap3stalker_codec_data = { .audio = &omap3stalker_audio_data, }; -static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = { - .supply ="vdda_dac" , - .dev = &omap3_stalker_dss_device.dev, -}; +static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = +REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );/* VDAC for DSS driving S-Video */ static struct regulator_init_data omap3_stalker_vdac = {
Signature · 1 line
1.7.0.4
PATCH v5 6/17 OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
In reply to Sumit SemwalA new file display.c is introduced for display driver init, which adds a function omap_display_init to do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.
--- arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/display.c | 57 +++++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 4 ++ 3 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/Makefile +2 -0
@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y) smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o obj-y += $(smsc911x-m) $(smsc911x-y) + +obj-y += display.o
arch/arm/mach-omap2/display.c new file +57 -0
57 lines not on this page · raw message
arch/arm/plat-omap/include/plat/display.h +4 -0
@@ -23,6 +23,7 @@#include <linux/list.h> #include <linux/kobject.h> #include <linux/device.h> +#include <linux/platform_device.h> #include <asm/atomic.h> #define DISPC_IRQ_FRAMEDONE (1 << 0)
@@ -220,6 +221,9 @@ struct omap_dss_board_info {struct omap_dss_device *default_device; }; +/* Init with the board info */ +extern int omap_display_init (struct omap_dss_board_info *board_data); +struct omap_video_timings {/* Unit: pixels */ u16 x_res;
Signature · 1 line
1.7.0.4
Re: [PATCH v5 06/17] OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
Hi,
Quoted 48 lines · ext Sumit Semwal
A new file
display.cis introduced for display driver init, which adds a functionomap_display_initto do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>--- arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/display.c | 57 +++++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 4 ++ 3 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/display.carch/arm/mach-omap2/Makefile +2
-0@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y) smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o obj-y += $(smsc911x-m) $(smsc911x-y) + +obj-y += display.oarch/arm/mach-omap2/display.c new file +19
-0@@ -0,0 +1,57 @@ +/* +* OMAP2plus display device setup / initialization. +* +* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +* Senthilvadivu Guruswamy +* Sumit Semwal +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/kernel.h> +#include <linux/init.h>
arch/arm/mach-omap2/display.c line 29
Quoted 10 lines
arch/arm/mach-omap2/display.c new file +10
-0+#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/clk.h> +#include <linux/err.h> + +#include <plat/display.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h> + +#ifdef CONFIG_OMAP2_DSS
This also needs to be built in when DSS is configured as module. The define above is only valid when DSS is configured as built-in.
So you can either check for both CONFIG_OMAP2_DSS and CONFIG_OMAP2_DSS_MODULE here, or, I think a bit more cleanly:
- Compile display.c only if CONFIG_OMAP2_DSS[_MODULE] is defined (see the Makefile, look for example how i2c-omap is handled).
- Check for CONFIG_OMAP2_DSS[_MODULE] in the header file, and define an empty static inline function for omap_display_init() if DSS is disabled.
Tomi
Re: [PATCH v5 06/17] OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
Tomi,
Quoted 65 lines · Tomi Valkeinen
Hi,
Quoted 48 lines · ext Sumit Semwal
A new file
display.cis introduced for display driver init, which adds a functionomap_display_initto do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
arch/arm/mach-omap2/Makefile | 2 +arch/arm/mach-omap2/display.c| 57 +++++++++++++++++++++++++++++arch/arm/plat-omap/include/plat/display.h| 4 ++3 files changed, 63 insertions(+), 0 deletions(-)create mode 100644
arch/arm/mach-omap2/display.carch/arm/mach-omap2/Makefile +0
-0@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y)smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
obj-y += $(smsc911x-m) $(smsc911x-y)arch/arm/mach-omap2/Makefile +2
-0+ +obj-y += display.oarch/arm/mach-omap2/display.c new file +19
-0@@ -0,0 +1,57 @@ +/* +* OMAP2plus display device setup / initialization. +* +* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +* Senthilvadivu Guruswamy +* Sumit Semwal +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> arch/arm/mach-omap2/display.c line 29
Quoted 10 lines
arch/arm/mach-omap2/display.c new file +10
-0+#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/clk.h> +#include <linux/err.h> + +#include <plat/display.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h> + +#ifdef CONFIG_OMAP2_DSS This also needs to be built in when DSS is configured as module. The define above is only valid when DSS is configured as built-in.
Quoted 7 lines
So you can either check for both
CONFIG_OMAP2_DSSandCONFIG_OMAP2_DSS_MODULEhere, or, I think a bit more cleanly:- Compile
display.conly if CONFIG_OMAP2_DSS[_MODULE] is defined (see theMakefile, look for example how i2c-omap is handled).
- Check for CONFIG_OMAP2_DSS[_MODULE] in the header file, and define an empty static inline function foromap_display_init()if DSS is disabled.
Yes, thanks. I did it the cleaner way :) - coming up in the next patch series.
Quoted 5 lines
Tomi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 06/17] OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
Quoted 71 lines · Sumit
Tomi,
Quoted 68 lines · Tomi Valkeinen
Hi,
Quoted 48 lines · ext Sumit Semwal
A new file
display.cis introduced for display driver init, which adds a functionomap_display_initto do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
arch/arm/mach-omap2/Makefile | 2 +arch/arm/mach-omap2/display.c| 57 +++++++++++++++++++++++++++++arch/arm/plat-omap/include/plat/display.h| 4 ++3 files changed, 63 insertions(+), 0 deletions(-)create mode 100644
arch/arm/mach-omap2/display.carch/arm/mach-omap2/Makefile +0
-0@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y)smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
obj-y += $(smsc911x-m) $(smsc911x-y)arch/arm/mach-omap2/Makefile +2
-0+ +obj-y += display.oarch/arm/mach-omap2/display.c new file +19
-0@@ -0,0 +1,57 @@ +/* +* OMAP2plus display device setup / initialization. +* +* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +* Senthilvadivu Guruswamy +* Sumit Semwal +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> arch/arm/mach-omap2/display.c line 29
Quoted 10 lines
arch/arm/mach-omap2/display.c new file +10
-0+#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/clk.h> +#include <linux/err.h> + +#include <plat/display.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h> + +#ifdef CONFIG_OMAP2_DSS This also needs to be built in when DSS is configured as module. The define above is only valid when DSS is configured as built-in.
So you can either check for both
CONFIG_OMAP2_DSSandCONFIG_OMAP2_DSS_MODULEhere, or, I think a bit more cleanly:
Quoted 6 lines
Quoted 4 lines
- Compile
display.conly if CONFIG_OMAP2_DSS[_MODULE] is defined (see theMakefile, look for example how i2c-omap is handled).
- Check for CONFIG_OMAP2_DSS[_MODULE] in the header file, and define an empty static inline function foromap_display_init()if DSS is disabled.Yes, thanks. I did it the cleaner way :) - coming up in the next patch series.
Oops - I meant next version.
Quoted 6 lines
Quoted 5 lines
Tomi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 06/17] OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
In reply to Sumit SemwalQuoted 46 lines · Sumit Semwal
A new file
display.cis introduced for display driver init, which adds a functionomap_display_initto do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>--- arch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/display.c | 57 +++++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 4 ++ 3 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/display.carch/arm/mach-omap2/Makefile +2
-0@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y) smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o obj-y += $(smsc911x-m) $(smsc911x-y) + +obj-y += display.oarch/arm/mach-omap2/display.c new file +17
-0@@ -0,0 +1,57 @@ +/* +* OMAP2plus display device setup / initialization. +* +* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +* Senthilvadivu Guruswamy +* Sumit Semwal +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +
arch/arm/mach-omap2/display.c line 27
Quoted 10 lines
arch/arm/mach-omap2/display.c new file +10
-0+#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/clk.h> +#include <linux/err.h> + +#include <plat/display.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h>
Minor nit: the hwmod and omap_device headers are not needed for this patch. Please add them when needed (PATCH 8)
Kevin
Re: [PATCH v5 06/17] OMAP2,3: DSS2: Create new file display.c for central dss driver registration.
Hi Kevin,
Quoted 53 lines · Kevin Hilman
Quoted 51 lines · Sumit Semwal
A new file
display.cis introduced for display driver init, which adds a functionomap_display_initto do the DSS driver registration. This is the first step in moving away registration of DSS from board files into a common place.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
arch/arm/mach-omap2/Makefile | 2 +arch/arm/mach-omap2/display.c| 57 +++++++++++++++++++++++++++++arch/arm/plat-omap/include/plat/display.h| 4 ++3 files changed, 63 insertions(+), 0 deletions(-)create mode 100644
arch/arm/mach-omap2/display.carch/arm/mach-omap2/Makefile +0
-0@@ -237,3 +237,5 @@ obj-y += $(smc91x-m) $(smc91x-y)smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
obj-y += $(smsc911x-m) $(smsc911x-y)arch/arm/mach-omap2/Makefile +2
-0+ +obj-y += display.oarch/arm/mach-omap2/display.c new file +22
-0@@ -0,0 +1,57 @@ +/* +* OMAP2plus display device setup / initialization. +* +* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ +* Senthilvadivu Guruswamy +* Sumit Semwal +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/clk.h>
Quoted 8 lines
arch/arm/mach-omap2/display.c line 27
Quoted 5 lines
arch/arm/mach-omap2/display.c new file +5
-0+#include <linux/err.h> + +#include <plat/display.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h> Minor nit: the hwmod and
omap_deviceheaders are not needed for this patch. Please add them when needed (PATCH 8)
Thanks; yes, - coming up in the next patch version.
Quoted 3 lines
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 7/17 OMAP2,3: DSS2: board files: replace platform_device_register with omap_display_init()
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
This patch updated board files to replace platform_device_register or platform_add_devices of DSS with omap_display_init(). This moves away registration of DSS from board files into a common place.
--- arch/arm/mach-omap2/board-3430sdp.c | 14 +------------- arch/arm/mach-omap2/board-am3517evm.c | 16 +--------------- arch/arm/mach-omap2/board-cm-t35.c | 10 +--------- arch/arm/mach-omap2/board-devkit8000.c | 10 +--------- arch/arm/mach-omap2/board-igep0020.c | 10 +--------- arch/arm/mach-omap2/board-omap3beagle.c | 10 +--------- arch/arm/mach-omap2/board-omap3evm.c | 14 +------------- arch/arm/mach-omap2/board-omap3pandora.c | 10 +--------- arch/arm/mach-omap2/board-omap3stalker.c | 10 +--------- arch/arm/mach-omap2/board-rx51-video.c | 15 +-------------- 10 files changed, 10 insertions(+), 109 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -13
@@ -301,21 +301,9 @@ static struct omap_dss_board_info sdp3430_dss_data = { .default_device = &sdp3430_lcd_device, }; -static struct platform_device sdp3430_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &sdp3430_dss_data, - }, -}; -static struct regulator_consumer_supply sdp3430_vdda_dac_supply =REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" ); -static struct platform_device *sdp3430_devices[]__initdata = { - &sdp3430_dss_device, -}; -static struct omap_board_config_kernel sdp3430_config[]__initdata = { };
@@ -790,7 +778,7 @@ static void __init omap_3430sdp_init(void) {omap3_mux_init (board_mux,OMAP_PACKAGE_CBB );omap3430_i2c_init (); -platform_add_devices (sdp3430_devices,ARRAY_SIZE (sdp3430_devices)); +omap_display_init (&sdp3430_dss_data);if (omap_rev () >OMAP3430_REV_ES1_0 ) ts_gpio =SDP3430_TS_GPIO_IRQ_SDPV2 ;else
arch/arm/mach-omap2/board-am3517evm.c +1 -15
@@ -367,24 +367,12 @@ static struct omap_dss_board_info am3517_evm_dss_data = { .default_device = &am3517_evm_lcd_device, }; -static struct platform_device am3517_evm_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &am3517_evm_dss_data, - }, -}; -/* * Board initialization */ static struct omap_board_config_kernel am3517_evm_config[]__initdata = { }; -static struct platform_device *am3517_evm_devices[]__initdata = { - &am3517_evm_dss_device, -}; -static void __init am3517_evm_init_irq (void ) { omap_board_config = am3517_evm_config;
@@ -484,9 +472,7 @@ static void __init am3517_evm_init(void)omap3_mux_init (board_mux,OMAP_PACKAGE_CBB );am3517_evm_i2c_init (); -platform_add_devices (am3517_evm_devices, -ARRAY_SIZE (am3517_evm_devices)); - +omap_display_init (&am3517_evm_dss_data);omap_serial_init ();/* Configure GPIO for EHCI port */
arch/arm/mach-omap2/board-cm-t35.c +1 -9
@@ -390,14 +390,6 @@ static struct omap_dss_board_info cm_t35_dss_data = { .default_device = &cm_t35_dvi_device, }; -static struct platform_device cm_t35_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &cm_t35_dss_data, - }, -}; -static struct omap2_mcspi_device_config tdo24m_mcspi_config = { .turbo_mode =0 , .single_channel =1 ,/* 0: slave, 1: master */
@@ -457,7 +449,7 @@ static void __init cm_t35_init_display(void)msleep (50 );gpio_set_value (lcd_en_gpio,1 ); - err =platform_device_register (&cm_t35_dss_device); + err =omap_display_init (&cm_t35_dss_data);if (err) {pr_err ("CM-T35: failed to register DSS device\n" ); goto err_dev_reg;
arch/arm/mach-omap2/board-devkit8000.c +1 -9
@@ -188,14 +188,6 @@ static struct omap_dss_board_info devkit8000_dss_data = { .default_device = &devkit8000_lcd_device, }; -static struct platform_device devkit8000_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &devkit8000_dss_data, - }, -}; -static struct regulator_consumer_supply devkit8000_vdda_dac_supply =REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );
@@ -561,7 +553,6 @@ static void __init omap_dm9000_init(void) }static struct platform_device *devkit8000_devices[]__initdata = { - &devkit8000_dss_device, &leds_gpio, &keys_gpio, &omap_dm9000_dev,
@@ -783,6 +774,7 @@ static void __init devkit8000_init(void)platform_add_devices (devkit8000_devices,ARRAY_SIZE (devkit8000_devices)); +omap_display_init (&devkit8000_dss_data);spi_register_board_info (devkit8000_spi_board_info,ARRAY_SIZE (devkit8000_spi_board_info));
arch/arm/mach-omap2/board-igep0020.c +1 -9
@@ -478,14 +478,6 @@ static struct omap_dss_board_info igep2_dss_data = { .default_device = &igep2_dvi_device, }; -static struct platform_device igep2_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &igep2_dss_data, - }, -}; -static struct regulator_consumer_supply igep2_vpll2_supply =REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" );
@@ -512,7 +504,6 @@ static void __init igep2_display_init(void) }static struct platform_device *igep2_devices[]__initdata = { - &igep2_dss_device, &igep2_vwlan_device, };
@@ -656,6 +647,7 @@ static void __init igep2_init(void)/* Register I2C busses and drivers */ igep2_i2c_init ();platform_add_devices (igep2_devices,ARRAY_SIZE (igep2_devices)); +omap_display_init (&igep2_dss_data);omap_serial_init ();usb_musb_init (&musb_board_data);usb_ehci_init (&ehci_pdata);
arch/arm/mach-omap2/board-omap3beagle.c +1 -9
@@ -222,14 +222,6 @@ static struct omap_dss_board_info beagle_dss_data = { .default_device = &beagle_dvi_device, }; -static struct platform_device beagle_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &beagle_dss_data, - }, -}; -static struct regulator_consumer_supply beagle_vdac_supply =REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" );
@@ -496,7 +488,6 @@ static void __init omap3_beagle_init_irq(void)static struct platform_device *omap3_beagle_devices[]__initdata = { &leds_gpio, &keys_gpio, - &beagle_dss_device, };static void __init omap3beagle_flash_init (void )
@@ -563,6 +554,7 @@ static void __init omap3_beagle_init(void)omap3_beagle_i2c_init ();platform_add_devices (omap3_beagle_devices,ARRAY_SIZE (omap3_beagle_devices)); +omap_display_init (&beagle_dss_data);omap_serial_init ();omap_mux_init_gpio (170 ,OMAP_PIN_INPUT );
arch/arm/mach-omap2/board-omap3evm.c +1 -13
@@ -322,14 +322,6 @@ static struct omap_dss_board_info omap3_evm_dss_data = { .default_device = &omap3_evm_lcd_device, }; -static struct platform_device omap3_evm_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &omap3_evm_dss_data, - }, -}; -static struct regulator_consumer_supply omap3evm_vmmc1_supply = { .supply ="vmmc" , };
@@ -626,10 +618,6 @@ static void __init omap3_evm_init_irq(void)omap_init_irq (); } -static struct platform_device *omap3_evm_devices[]__initdata = { - &omap3_evm_dss_device, -}; -static struct ehci_hcd_omap_platform_data ehci_pdata__initdata = { .port_mode[0 ] =EHCI_HCD_OMAP_MODE_UNKNOWN ,
@@ -667,7 +655,7 @@ static void __init omap3_evm_init(void)omap3_evm_i2c_init (); -platform_add_devices (omap3_evm_devices,ARRAY_SIZE (omap3_evm_devices)); +omap_display_init (&omap3_evm_dss_data);spi_register_board_info (omap3evm_spi_board_info,ARRAY_SIZE (omap3evm_spi_board_info));
arch/arm/mach-omap2/board-omap3pandora.c +1 -9
@@ -253,14 +253,6 @@ static struct omap_dss_board_info pandora_dss_data = { .default_device = &pandora_lcd_device, }; -static struct platform_device pandora_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &pandora_dss_data, - }, -}; -static void pandora_wl1251_init_card (struct mmc_card *card) {/*
@@ -690,7 +682,6 @@ fail:static struct platform_device *omap3pandora_devices[]__initdata = { &pandora_leds_gpio, &pandora_keys_gpio, - &pandora_dss_device, &pandora_wl1251_data, &pandora_vwlan_device, };
@@ -726,6 +717,7 @@ static void __init omap3pandora_init(void)pandora_wl1251_init ();platform_add_devices (omap3pandora_devices,ARRAY_SIZE (omap3pandora_devices)); +omap_display_init (&pandora_dss_data);omap_serial_init ();spi_register_board_info (omap3pandora_spi_board_info,ARRAY_SIZE (omap3pandora_spi_board_info));
arch/arm/mach-omap2/board-omap3stalker.c +1 -9
@@ -229,14 +229,6 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { .default_device = &omap3_stalker_dvi_device, }; -static struct platform_device omap3_stalker_dss_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &omap3_stalker_dss_data, - }, -}; -static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { .supply ="vmmc" , };
@@ -591,7 +583,6 @@ static void __init omap3_stalker_init_irq(void) }static struct platform_device *omap3_stalker_devices[]__initdata = { - &omap3_stalker_dss_device, &keys_gpio, };
@@ -631,6 +622,7 @@ static void __init omap3_stalker_init(void)platform_add_devices (omap3_stalker_devices,ARRAY_SIZE (omap3_stalker_devices)); +omap_display_init (&omap3_stalker_dss_data);spi_register_board_info (omap3stalker_spi_board_info,ARRAY_SIZE (omap3stalker_spi_board_info));
arch/arm/mach-omap2/board-rx51-video.c +1 -14
@@ -66,18 +66,6 @@ static struct omap_dss_board_info rx51_dss_board_info = { .default_device = &rx51_lcd_device, }; -struct platform_device rx51_display_device = { - .name ="omap_display" , - .id =-1 , - .dev = { - .platform_data = &rx51_dss_board_info, - }, -}; - -static struct platform_device *rx51_video_devices[]__initdata = { - &rx51_display_device, -}; -static int __init rx51_video_init (void ) {if (!machine_is_nokia_rx51 ())
@@ -95,8 +83,7 @@ static int __init rx51_video_init(void)gpio_direction_output (RX51_LCD_RESET_GPIO ,1 ); -platform_add_devices (rx51_video_devices, -ARRAY_SIZE (rx51_video_devices)); +omap_display_init (&rx51_dss_board_info);return 0 ; }
Signature · 1 line
1.7.0.4
PATCH v5 8/17 OMAP2,3: DSS2: Build omap_device for each DSS HWIP
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Looks up the hwmod database for each of the given DSS HW IP and builds omap_device which inturn does the platform device register for each of DSS HW IP
--- arch/arm/mach-omap2/display.c | 44 +++++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 6 ++++ 2 files changed, 50 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/display.c +44 -0
@@ -36,10 +36,54 @@ static struct platform_device omap_display_device = { }, }; +static struct omap_device_pm_latency omap_dss_latency[] = { + [0 ] = { + .deactivate_func = omap_device_idle_hwmods, + .activate_func = omap_device_enable_hwmods, + }, +}; +int __init omap_display_init (struct omap_dss_board_info *board_data) {int r =0 ; +struct omap_hwmod *oh; +struct omap_device *od; +int i; +struct omap_display_platform_data pdata; +char *oh_name[] = {"dss_dss" ,/* omap2,3 */ +"dss_dispc" ,/* omap2,3 */ +"dss_rfbi" ,/* omap2,3 */ +"dss_venc" ,/* omap2,3 */ +"dss_dsi1" };/* omap3 */ +char *dev_name[] = {"omap_dss" ,"omap_dispc" ,"omap_rfbi" , +"omap_venc" ,"omap_dsi1" }; +int oh_count; + +if (cpu_is_omap24xx ()) { + oh_count =ARRAY_SIZE (oh_name) -1 ; +/* last hwmod dev in oh_name is not available for omap2 */ + }else { + oh_count =ARRAY_SIZE (oh_name); + } + + pdata.board_data = board_data; + pdata.board_data->get_last_off_on_transaction_id =NULL ; + +for (i =0 ; i < oh_count; i++) { + oh =omap_hwmod_lookup (oh_name[i]); +if (!oh) { +pr_err ("Could not look up %s\n" , oh_name[i]); +return r; + } + od =omap_device_build (dev_name[i],-1 , oh, &pdata, +sizeof (struct omap_display_platform_data ), + omap_dss_latency, +ARRAY_SIZE (omap_dss_latency),0 ); + +WARN ((IS_ERR (od)),"Could not build omap_device for %s\n" , + oh_name[i]); + } omap_display_device.dev.platform_data = board_data; r =platform_device_register (&omap_display_device);
arch/arm/plat-omap/include/plat/display.h +6 -0
@@ -26,6 +26,7 @@#include <linux/platform_device.h> #include <asm/atomic.h> +#define DISPC_IRQ_FRAMEDONE (1 << 0)#define DISPC_IRQ_VSYNC (1 << 1)#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)
@@ -224,6 +225,11 @@ struct omap_dss_board_info {/* Init with the board info */ extern int omap_display_init (struct omap_dss_board_info *board_data); +struct omap_display_platform_data { +struct omap_dss_board_info *board_data; +/* TODO: Additional members to be added when PM is considered */ +}; +struct omap_video_timings {/* Unit: pixels */ u16 x_res;
Signature · 1 line
1.7.0.4
Re: [PATCH v5 08/17] OMAP2,3: DSS2: Build omap_device for each DSS HWIP
Quoted 17 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Looks up the hwmod database for each of the given DSS HW IP and builds
omap_devicewhich inturn does the platform device register for each of DSS HW IPSigned-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>--- arch/arm/mach-omap2/display.c | 44 +++++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 6 ++++ 2 files changed, 50 insertions(+), 0 deletions(-)arch/arm/mach-omap2/display.c +0
-0
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 42
Quoted 7 lines
arch/arm/mach-omap2/display.c +4
-0@@ -36,10 +36,54 @@ static struct platform_device omap_display_device = { }, }; +static struct omap_device_pm_latency omap_dss_latency[] = { + [0 ] = { + .deactivate_func = omap_device_idle_hwmods, + .activate_func = omap_device_enable_hwmods,
Without any latency numbers or AUTO_ADJUST you're going to have noisy output from omap_device.
Quoted 6 lines
arch/arm/mach-omap2/display.c +3
-0+ }, +}; +int __init omap_display_init (struct omap_dss_board_info *board_data) {
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 58
Quoted 10 lines
arch/arm/mach-omap2/display.c +9
-0int r =0 ; +struct omap_hwmod *oh; +struct omap_device *od; +int i; +struct omap_display_platform_data pdata; +char *oh_name[] = {"dss_dss" ,/* omap2,3 */ +"dss_dispc" ,/* omap2,3 */ +"dss_rfbi" ,/* omap2,3 */ +"dss_venc" ,/* omap2,3 */ +"dss_dsi1" };/* omap3 */
Why all the extra whitespace before the strings?
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 60
Quoted 2 lines
arch/arm/mach-omap2/display.c +2
-0+char *dev_name[] = {"omap_dss" ,"omap_dispc" ,"omap_rfbi" , +"omap_venc" ,"omap_dsi1" };
ditto
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 68
Quoted 8 lines
arch/arm/mach-omap2/display.c +8
-0+int oh_count; + +if (cpu_is_omap24xx ()) { + oh_count =ARRAY_SIZE (oh_name) -1 ; +/* last hwmod dev in oh_name is not available for omap2 */ + }else { + oh_count =ARRAY_SIZE (oh_name); + }
braces not needed
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 70
Quoted 1 line
arch/arm/mach-omap2/display.c +1
-0+ pdata.board_data = board_data;
extra whitespace not necessary
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 71
Quoted 1 line
arch/arm/mach-omap2/display.c +1
-0+ pdata.board_data->get_last_off_on_transaction_id =NULL ;
instead, you should probably zero all of pdata before using it since it is on the stack
arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 85
Quoted 13 lines
arch/arm/mach-omap2/display.c +13
-0+for (i =0 ; i < oh_count; i++) { + oh =omap_hwmod_lookup (oh_name[i]); +if (!oh) { +pr_err ("Could not look up %s\n" , oh_name[i]); +return r; + } + od =omap_device_build (dev_name[i],-1 , oh, &pdata, +sizeof (struct omap_display_platform_data ), + omap_dss_latency, +ARRAY_SIZE (omap_dss_latency),0 ); + +WARN ((IS_ERR (od)),"Could not build omap_device for %s\n" , + oh_name[i]);
yet code below will still try and register it?
arch/arm/plat-omap/include/plat/display.h line 29
Quoted 13 lines
arch/arm/mach-omap2/display.c +1
-0+ } omap_display_device.dev.platform_data = board_data; r =platform_device_register (&omap_display_device);arch/arm/plat-omap/include/plat/display.h +1
-0@@ -26,6 +26,7 @@#include <linux/platform_device.h> #include <asm/atomic.h> +
stray whitespace change
Quoted 5 lines
arch/arm/plat-omap/include/plat/display.h +0
-0#define DISPC_IRQ_FRAMEDONE (1 << 0)#define DISPC_IRQ_VSYNC (1 << 1)#define DISPC_IRQ_EVSYNC_EVEN (1 << 2)@@ -224,6 +225,11 @@ struct omap_dss_board_info {/* Init with the board info */
arch/arm/plat-omap/include/plat/display.h struct omap_dss_board_info { · line 235
Quoted 10 lines
arch/arm/plat-omap/include/plat/display.h +5
-0extern int omap_display_init (struct omap_dss_board_info *board_data); +struct omap_display_platform_data { +struct omap_dss_board_info *board_data; +/* TODO: Additional members to be added when PM is considered */ +}; +struct omap_video_timings {/* Unit: pixels */ u16 x_res;
Kevin
Re: [PATCH v5 08/17] OMAP2,3: DSS2: Build omap_device for each DSS HWIP
Hi Kevin,
Quoted 113 lines · Kevin Hilman
Quoted 17 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Looks up the hwmod database for each of the given DSS HW IP and builds
omap_devicewhich inturn does the platform device register for each of DSS HW IPSigned-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
arch/arm/mach-omap2/display.c | 44 +++++++++++++++++++++++++++++arch/arm/plat-omap/include/plat/display.h| 6 ++++2 files changed, 50 insertions(+), 0 deletions(-)arch/arm/mach-omap2/display.c +0
-0arch/arm/mach-omap2/display.c static struct platform_device omap_display_device = { · line 42
Quoted 7 lines
arch/arm/mach-omap2/display.c +4
-0@@ -36,10 +36,54 @@ static struct platform_device omap_display_device = { }, }; +static struct omap_device_pm_latency omap_dss_latency[] = { + [0] = { + .deactivate_func = omap_device_idle_hwmods, + .activate_func = omap_device_enable_hwmods,Without any latency numbers or
AUTO_ADJUSTyou're going to have noisy output fromomap_device.Quoted 8 lines
arch/arm/mach-omap2/display.c +3
-0+ }, +}; +int
__initomap_display_init(struct omap_dss_board_info *board_data){
int r = 0;
+ structomap_hwmod*oh;Quoted 8 lines
+ struct
omap_device*od;
+ int i;
+ structomap_display_platform_datapdata;
+ char *oh_name[] = { "dss_dss", /* omap2,3 */
+ "dss_dispc", /* omap2,3 */
+ "dss_rfbi", /* omap2,3 */
+ "dss_venc", /* omap2,3 */
+ "dss_dsi1" }; /* omap3 */Why all the extra whitespace before the strings?
Quoted 2 lines
+ char *dev_name[] = { "
omap_dss", "omap_dispc", "omap_rfbi",
+ "omap_venc", "omap_dsi1" };ditto
Quoted 8 lines
+ int
oh_count;
+
+ if (cpu_is_omap24xx()) {
+oh_count=ARRAY_SIZE(oh_name)- 1;
+ /* last hwmod dev inoh_nameis not available for omap2 */
+ } else {
+oh_count=ARRAY_SIZE(oh_name);
+ }braces not needed
Quoted 1 line
+ pdata.board_data =
board_data;extra whitespace not necessary
Quoted 1 line
+
pdata.board_data->get_last_off_on_transaction_id= NULL;instead, you should probably zero all of pdata before using it since it is on the stack
Quoted 5 lines
+ for (i = 0; i <
oh_count; i++) {
+ oh =omap_hwmod_lookup(oh_name[i]);
+ if (!oh) {
+pr_err("Could not look up %s\n", oh_name[i]);
+ return r;Quoted 8 lines
+ }
+ od = omap_device_build(dev_name[i], -1, oh, &pdata,
+sizeof(struct omap_display_platform_data),
+omap_dss_latency,
+ARRAY_SIZE(omap_dss_latency), 0); +
+ WARN((IS_ERR(od)), "Could not buildomap_devicefor %s\n",
+ oh_name[i]);yet code below will still try and register it?
arch/arm/plat-omap/include/plat/display.h line 29
Quoted 13 lines
+ }
omap_display_device.dev.platform_data =board_data;r =
platform_device_register(&omap_display_device);arch/arm/plat-omap/include/plat/display.h +1
-0@@ -26,6 +26,7 @@ #include <linux/platform_device.h> #include <asm/atomic.h> +stray whitespace change
Quoted 7 lines
arch/arm/plat-omap/include/plat/display.h +0
-0#define DISPC_IRQ_FRAMEDONE (1 << 0) #define DISPC_IRQ_VSYNC (1 << 1) #define DISPC_IRQ_EVSYNC_EVEN (1 << 2)@@ -224,6 +225,11 @@ struct omap_dss_board_info { /* Init with the board info */ extern int omap_display_init(struct omap_dss_board_info *board_data);
Quoted 9 lines
arch/arm/plat-omap/include/plat/display.h struct omap_dss_board_info { · line 235
Quoted 8 lines
arch/arm/plat-omap/include/plat/display.h +5
-0+struct omap_display_platform_data { + struct omap_dss_board_info *board_data; + /* TODO: Additional members to be added when PM is considered */ +}; + struct omap_video_timings { /* Unit: pixels */ u16 x_res;
Thanks for all your comments; will incorporate in the upcoming version.
Best regards,
~Sumit.
Quoted 2 lines
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 9/17 OMAP2,3: DSS2: DSS: create platform_driver, move init,exit to driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a platform_driver of DSS is created and init exit methods are moved from core.c to its driver probe,remove. pdev member has to be maintained by its own drivers.
DSS platform driver is registered from inside omap_dss_probe, in the order desired.
--- drivers/video/omap2/dss/core.c | 21 +++++++-------- drivers/video/omap2/dss/dss.c | 55 ++++++++++++++++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 4 +- 3 files changed, 65 insertions(+), 15 deletions(-)
drivers/video/omap2/dss/core.c +10 -11
@@ -497,9 +497,9 @@ static inline void dss_uninitialize_debugfs(void)static int omap_dss_probe (struct platform_device *pdev) {struct omap_dss_board_info *pdata = pdev->dev.platform_data; -int skip_init =0 ;int r;int i; +int skip_init =0 ; core.pdev = pdev;
@@ -517,15 +517,9 @@ static int omap_dss_probe(struct platform_device *pdev) core.ctx_id =dss_get_ctx_id ();DSSDBG ("initial ctx id %u\n" , core.ctx_id); -#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT -/* DISPC_CONTROL */ -if (omap_readl (0x48050440 ) &1 )/* LCD enabled? */ - skip_init =1 ; -#endif - - r =dss_init (skip_init); + r =dss_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize DSS\n" ); +DSSERR ("Failed to initialize DSS platform driver\n" ); goto err_dss; }
@@ -553,6 +547,11 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_venc; } +#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT +/* DISPC_CONTROL */ +if (omap_readl (0x48050440 ) &1 )/* LCD enabled? */ + skip_init =1 ; +#endif if (cpu_is_omap34xx ()) { r =sdi_init (skip_init);if (r) {
@@ -610,7 +609,7 @@ err_dispc: err_dpi:rfbi_exit (); err_rfbi: -dss_exit (); +dss_deinit_platform_driver (); err_dss:dss_clk_disable_all_no_ctx ();dss_put_clocks ();
@@ -636,7 +635,7 @@ static int omap_dss_remove(struct platform_device *pdev)sdi_exit (); } -dss_exit (); +dss_deinit_platform_driver ();/* these should be removed at some point */ c = core.dss_ick->usecount;
drivers/video/omap2/dss/dss.c +53 -2
76 lines not on this page · raw message
drivers/video/omap2/dss/dss.h +2 -2
@@ -214,8 +214,8 @@ void dss_overlay_setup_l4_manager(struct omap_overlay_manager *mgr);void dss_recheck_connections (struct omap_dss_device *dssdev,bool force);/* DSS */ -int dss_init (bool skip_init); -void dss_exit (void ); +int dss_init_platform_driver (void ); +void dss_deinit_platform_driver (void );void dss_save_context (void );void dss_restore_context (void );
Signature · 1 line
1.7.0.4
Re: [PATCH v5 09/17] OMAP2,3: DSS2: DSS: create platform_driver, move init,exit to driver
Quoted 21 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a
platform_driverof DSS is created and init exit methods are moved fromcore.cto its driver probe,remove. pdev member has to be maintained by its own drivers.DSS platform driver is registered from inside
omap_dss_probe, in the order desired.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>--- drivers/video/omap2/dss/core.c | 21 +++++++-------- drivers/video/omap2/dss/dss.c | 55 ++++++++++++++++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 4 +- 3 files changed, 65 insertions(+), 15 deletions(-)drivers/video/omap2/dss/core.c +0
-0
drivers/video/omap2/dss/core.c static inline void dss_uninitialize_debugfs(void) · line 502
Quoted 7 lines
drivers/video/omap2/dss/core.c +1
-1@@ -497,9 +497,9 @@ static inline void dss_uninitialize_debugfs(void)static int omap_dss_probe (struct platform_device *pdev) {struct omap_dss_board_info *pdata = pdev->dev.platform_data; -int skip_init =0 ;int r;int i; +int skip_init =0 ;
looks like unnessary move.
maybe you meant to remove this var since its usage was removed from this function?
Quoted 21 lines
drivers/video/omap2/dss/core.c +2
-8core.pdev = pdev;@@ -517,15 +517,9 @@ static int omap_dss_probe(struct platform_device *pdev) core.ctx_id =dss_get_ctx_id ();DSSDBG ("initial ctx id %u\n" , core.ctx_id); -#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT -/* DISPC_CONTROL */ -if (omap_readl (0x48050440 ) &1 )/* LCD enabled? */ - skip_init =1 ; -#endif - - r =dss_init (skip_init); + r =dss_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize DSS\n" ); +DSSERR ("Failed to initialize DSS platform driver\n" ); goto err_dss; }
drivers/video/omap2/dss/core.c static int omap_dss_probe(struct platform_device *pdev) · line 554
Quoted 8 lines
drivers/video/omap2/dss/core.c +5
-0@@ -553,6 +547,11 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_venc; } +#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT +/* DISPC_CONTROL */ +if (omap_readl (0x48050440 ) &1 )/* LCD enabled? */ + skip_init =1 ; +#endif
nope, you just moved it here.
But it's also duplicated in dsshw_probe below. Is that needed?
drivers/video/omap2/dss/core.c err_dispc: · line 612
Quoted 9 lines
drivers/video/omap2/dss/core.c +1
-1if (cpu_is_omap34xx ()) { r =sdi_init (skip_init);if (r) {@@ -610,7 +609,7 @@ err_dispc: err_dpi:rfbi_exit (); err_rfbi: -dss_exit (); +dss_deinit_platform_driver ();
s/deinit/uninit/ or uninitial
Quoted 86 lines
drivers/video/omap2/dss/core.c +1
-1err_dss:dss_clk_disable_all_no_ctx ();dss_put_clocks ();@@ -636,7 +635,7 @@ static int omap_dss_remove(struct platform_device *pdev)sdi_exit (); } -dss_exit (); +dss_deinit_platform_driver ();/* these should be removed at some point */ c = core.dss_ick->usecount;drivers/video/omap2/dss/dss.c +43
-2@@ -59,6 +59,7 @@ struct dss_reg { dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end)) static struct { + struct platform_device *pdev; void __iomem *base; struct clk *dpll4_m4_ck;@@ -549,7 +550,7 @@ void dss_set_dac_pwrdn_bgz(bool enable)REG_FLD_MOD (DSS_CONTROL , enable,5 ,5 );/* DAC Power-Down Control */ } -int dss_init (bool skip_init) +static int dss_init (bool skip_init) {int r;u32 rev;@@ -629,7 +630,7 @@ fail0:return r; } -void dss_exit (void ) +static void dss_exit (void ) {if (cpu_is_omap34xx ())clk_put (dss.dpll4_m4_ck);@@ -639,3 +640,53 @@ void dss_exit(void)iounmap (dss.base); } +/* DSS HW IP initialisation */ +static int omap_dsshw_probe (struct platform_device *pdev) +{ +int r; +int skip_init =0 ; + + dss.pdev = pdev; + +#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT +/* DISPC_CONTROL */ +if (omap_readl (0x48050440 ) &1 )/* LCD enabled? */ + skip_init =1 ; +#endif + + r =dss_init (skip_init); +if (r) { +DSSERR ("Failed to initialize DSS\n" ); + goto err_dss; + } + +err_dss: + +return r; +} + +static int omap_dsshw_remove (struct platform_device *pdev) +{ +dss_exit (); + +return 0 ; +} + +static struct platform_driver omap_dsshw_driver = { + .probe = omap_dsshw_probe, + .remove = omap_dsshw_remove, + .driver = { + .name ="omap_dss" , + .owner =THIS_MODULE , + }, +};
drivers/video/omap2/dss/dss.c void dss_exit(void) · line 692
Quoted 10 lines
drivers/video/omap2/dss/dss.c +10
-0+ +int dss_init_platform_driver (void ) +{ +return platform_driver_register (&omap_dsshw_driver); +} + +void dss_deinit_platform_driver (void ) +{ +return platform_driver_unregister (&omap_dsshw_driver); +}
Is there a reason for these extra functions?
Why can't the platform_driver APIs be called directly?
Quoted 15 lines
drivers/video/omap2/dss/dss.h +2
-2@@ -214,8 +214,8 @@ void dss_overlay_setup_l4_manager(struct omap_overlay_manager *mgr);void dss_recheck_connections (struct omap_dss_device *dssdev,bool force);/* DSS */ -int dss_init (bool skip_init); -void dss_exit (void ); +int dss_init_platform_driver (void ); +void dss_deinit_platform_driver (void );void dss_save_context (void );void dss_restore_context (void );
Re: [PATCH v5 09/17] OMAP2,3: DSS2: DSS: create platform_driver, move init,exit to driver
Hi Kevin,
Quoted 68 lines · Kevin Hilman
Quoted 21 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a
platform_driverof DSS is created and init exit methods are moved fromcore.cto its driver probe,remove. pdev member has to be maintained by its own drivers.DSS platform driver is registered from inside
omap_dss_probe, in the order desired.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
drivers/video/omap2/dss/core.c | 21 +++++++--------drivers/video/omap2/dss/dss.c| 55 ++++++++++++++++++++++++++++++++++++++-drivers/video/omap2/dss/dss.h| 4 +-3 files changed, 65 insertions(+), 15 deletions(-)drivers/video/omap2/dss/core.c +0
-0drivers/video/omap2/dss/core.c static inline void dss_uninitialize_debugfs(void) · line 502
Quoted 7 lines
drivers/video/omap2/dss/core.c +1
-1@@ -497,9 +497,9 @@ static inline void dss_uninitialize_debugfs(void) static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; - int skip_init = 0; int r; int i; + int skip_init = 0;looks like unnessary move.
maybe you meant to remove this var since its usage was removed from this function?
Quoted 21 lines
drivers/video/omap2/dss/core.c +2
-8core.pdev = pdev;@@ -517,15 +517,9 @@ static int omap_dss_probe(struct platform_device *pdev) core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); -#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT - /* DISPC_CONTROL */ - if (omap_readl(0x48050440) & 1) /* LCD enabled? */ - skip_init = 1; -#endif - - r = dss_init(skip_init); + r = dss_init_platform_driver(); if (r) { - DSSERR("Failed to initialize DSS\n"); + DSSERR("Failed to initialize DSS platform driver\n"); goto err_dss; }drivers/video/omap2/dss/core.c static int omap_dss_probe(struct platform_device *pdev) · line 554
Quoted 8 lines
drivers/video/omap2/dss/core.c +5
-0@@ -553,6 +547,11 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_venc; } +#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT + /* DISPC_CONTROL */ + if (omap_readl(0x48050440) & 1) /* LCD enabled? */ + skip_init = 1; +#endif nope, you just moved it here.
Quoted 1 line
But it's also duplicated in
dsshw_probebelow. Is that needed?
Yes; these two are needed as both dss_init() (which is replaced with dss_init_platform_driver() in this patch) and also by sdi_init(). sdi_init() is a software init, so it will not be moved to a platform_driver. That's why we need the #ifdef.. #endif in both dss_probe() and dsshw_probe().
Quoted 12 lines
Quoted 10 lines
drivers/video/omap2/dss/core.c +0
-0if (cpu_is_omap34xx()) { r = sdi_init(skip_init); if (r) {@@ -610,7 +609,7 @@ err_dispc:err_dpi:
rfbi_exit();
err_rfbi:
-dss_exit();
+dss_deinit_platform_driver();s/deinit/uninit/ or uninitial
Sure, will change.
Quoted 99 lines
Quoted 86 lines
err_dss:
dss_clk_disable_all_no_ctx();
dss_put_clocks();drivers/video/omap2/dss/core.c +1
-1@@ -636,7 +635,7 @@ static int omap_dss_remove(struct platform_device *pdev) sdi_exit(); } - dss_exit(); + dss_deinit_platform_driver(); /* these should be removed at some point */ c = core.dss_ick->usecount;drivers/video/omap2/dss/dss.c +1
-0@@ -59,6 +59,7 @@ struct dss_reg { dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end)) static struct { + struct platform_device *pdev; void __iomem *base; struct clk *dpll4_m4_ck;@@ -549,7 +550,7 @@ void dss_set_dac_pwrdn_bgz(bool enable)
REG_FLD_MOD(DSS_CONTROL, enable, 5, 5); /* DAC Power-Down Control */ }drivers/video/omap2/dss/dss.c +1
-1-int dss_init (bool skip_init) +static int dss_init (bool skip_init){
int r;
u32 rev;drivers/video/omap2/dss/dss.c +41
-1@@ -629,7 +630,7 @@ fail0: return r; } -void dss_exit (void ) +static void dss_exit (void ) { if (cpu_is_omap34xx()) clk_put(dss.dpll4_m4_ck);@@ -639,3 +640,53 @@ void dss_exit(void) iounmap(dss.base); } +/* DSS HW IP initialisation */ +static int omap_dsshw_probe (struct platform_device *pdev) +{ + int r; + int skip_init = 0; + + dss.pdev = pdev; + +#ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT + /* DISPC_CONTROL */ + if (omap_readl(0x48050440) & 1) /* LCD enabled? */ + skip_init = 1; +#endif + + r = dss_init(skip_init); + if (r) { + DSSERR("Failed to initialize DSS\n"); + goto err_dss; + } + +err_dss: + + return r; +} + +static int omap_dsshw_remove (struct platform_device *pdev) +{ + dss_exit(); + + return 0; +} + +static struct platform_driver omap_dsshw_driver = { + .probe = omap_dsshw_probe, + .remove = omap_dsshw_remove, + .driver = { + .name = "omap_dss", + .owner = THIS_MODULE, + }, +};drivers/video/omap2/dss/dss.c void dss_exit(void) · line 692
Quoted 10 lines
drivers/video/omap2/dss/dss.c +10
-0+ +int dss_init_platform_driver (void ) +{ + return platform_driver_register(&omap_dsshw_driver); +} + +void dss_deinit_platform_driver (void ) +{ + return platform_driver_unregister(&omap_dsshw_driver); +}Is there a reason for these extra functions?
Quoted 1 line
Why can't the
platform_driverAPIs be called directly?
Of all these platform devices (in this and later patches of this series), the initialization needs to be in a sequence. That's achieved by calling the init_platform_driver / uninit_platform_driver centrally from core.c's omap_dss_probe() in the required sequence. Since platform driver data for each platform device is static within each platform driver's file, these functions are required.
Best regards,
~Sumit.
Quoted 8 lines
Quoted 8 lines
drivers/video/omap2/dss/dss.h +0
-0@@ -214,8 +214,8 @@ void dss_overlay_setup_l4_manager(struct omap_overlay_manager *mgr); void dss_recheck_connections(struct omap_dss_device *dssdev, bool force);
Quoted 9 lines
drivers/video/omap2/dss/dss.h void dss_overlay_setup_l4_manager(struct omap_overlay_manager *mgr); · line 221
Quoted 8 lines
drivers/video/omap2/dss/dss.h +2
-2/* DSS */ -int dss_init (bool skip_init); -void dss_exit (void ); +int dss_init_platform_driver (void ); +void dss_deinit_platform_driver (void ); void dss_save_context(void); void dss_restore_context(void);
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 10/17 OMAP2,3: DSS2: Move clocks from core driver to dss driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
All clock management is moved to dss platform driver. clk_get/put APIs use dss device instead of core platform device.
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So the device name is changed from omap_display to omap_dss in 2420, 2430, 3xxx clock database files. Now the core driver "omap_display" only takes care of panel registration with the custom bus.
core driver also uses the clk_enable() / clk_disable() APIs exposed by DSS for clock management.
DSS driver would do clock management of clocks needed by DISPC, RFBI, DSI, VENC
TODO: The clock content would be adapted to omap_hwmod in a seperate series.
--- arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +- drivers/video/omap2/dss/core.c | 375 +--------------------------------- drivers/video/omap2/dss/dss.c | 366 +++++++++++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 13 +- 6 files changed, 392 insertions(+), 392 deletions(-)
arch/arm/mach-omap2/clock2420_data.c +4 -4
@@ -1786,10 +1786,10 @@ static struct omap_clk omap2420_clks[] = {CLK (NULL ,"gfx_2d_fck" , &gfx_2d_fck,CK_242X ),CLK (NULL ,"gfx_ick" , &gfx_ick,CK_242X ),/* DSS domain clocks */ -CLK ("omap_display" ,"ick" , &dss_ick,CK_242X ), -CLK ("omap_display" ,"dss1_fck" , &dss1_fck,CK_242X ), -CLK ("omap_display" ,"dss2_fck" , &dss2_fck,CK_242X ), -CLK ("omap_display" ,"tv_fck" , &dss_54m_fck,CK_242X ), +CLK ("omap_dss" ,"ick" , &dss_ick,CK_242X ), +CLK ("omap_dss" ,"dss1_fck" , &dss1_fck,CK_242X ), +CLK ("omap_dss" ,"dss2_fck" , &dss2_fck,CK_242X ), +CLK ("omap_dss" ,"tv_fck" , &dss_54m_fck,CK_242X ),/* L3 domain clocks */ CLK (NULL ,"core_l3_ck" , &core_l3_ck,CK_242X ), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
arch/arm/mach-omap2/clock2430_data.c +4 -4
@@ -1890,10 +1890,10 @@ static struct omap_clk omap2430_clks[] = {CLK (NULL ,"mdm_ick" , &mdm_ick,CK_243X ),CLK (NULL ,"mdm_osc_ck" , &mdm_osc_ck,CK_243X ),/* DSS domain clocks */ -CLK ("omap_display" ,"ick" , &dss_ick,CK_243X ), -CLK ("omap_display" ,"dss1_fck" , &dss1_fck,CK_243X ), -CLK ("omap_display" ,"dss2_fck" , &dss2_fck,CK_243X ), -CLK ("omap_display" ,"tv_fck" , &dss_54m_fck,CK_243X ), +CLK ("omap_dss" ,"ick" , &dss_ick,CK_243X ), +CLK ("omap_dss" ,"dss1_fck" , &dss1_fck,CK_243X ), +CLK ("omap_dss" ,"dss2_fck" , &dss2_fck,CK_243X ), +CLK ("omap_dss" ,"tv_fck" , &dss_54m_fck,CK_243X ),/* L3 domain clocks */ CLK (NULL ,"core_l3_ck" , &core_l3_ck,CK_243X ), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
arch/arm/mach-omap2/clock3xxx_data.c +7 -7
@@ -3355,13 +3355,13 @@ static struct omap_clk omap3xxx_clks[] = {CLK ("omap_rng" ,"ick" , &rng_ick,CK_34XX |CK_36XX ),CLK (NULL ,"sha11_ick" , &sha11_ick,CK_34XX |CK_36XX ),CLK (NULL ,"des1_ick" , &des1_ick,CK_34XX |CK_36XX ), -CLK ("omap_display" ,"dss1_fck" , &dss1_alwon_fck_3430es1,CK_3430ES1 ), -CLK ("omap_display" ,"dss1_fck" , &dss1_alwon_fck_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), -CLK ("omap_display" ,"tv_fck" , &dss_tv_fck,CK_3XXX ), -CLK ("omap_display" ,"video_fck" , &dss_96m_fck,CK_3XXX ), -CLK ("omap_display" ,"dss2_fck" , &dss2_alwon_fck,CK_3XXX ), -CLK ("omap_display" ,"ick" , &dss_ick_3430es1,CK_3430ES1 ), -CLK ("omap_display" ,"ick" , &dss_ick_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), +CLK ("omap_dss" ,"dss1_fck" , &dss1_alwon_fck_3430es1,CK_3430ES1 ), +CLK ("omap_dss" ,"dss1_fck" , &dss1_alwon_fck_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ), +CLK ("omap_dss" ,"tv_fck" , &dss_tv_fck,CK_3XXX ), +CLK ("omap_dss" ,"video_fck" , &dss_96m_fck,CK_3XXX ), +CLK ("omap_dss" ,"dss2_fck" , &dss2_alwon_fck,CK_3XXX ), +CLK ("omap_dss" ,"ick" , &dss_ick_3430es1,CK_3430ES1 ), +CLK ("omap_dss" ,"ick" , &dss_ick_3430es2,CK_3430ES2PLUS |CK_AM35XX |CK_36XX ),CLK (NULL ,"cam_mclk" , &cam_mclk,CK_34XX |CK_36XX ),CLK (NULL ,"cam_ick" , &cam_ick,CK_34XX |CK_36XX ), CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
drivers/video/omap2/dss/core.c +4 -371
442 lines not on this page · raw message
drivers/video/omap2/dss/dss.c +365 -1
412 lines not on this page · raw message
drivers/video/omap2/dss/dss.h +8 -5
@@ -169,11 +169,6 @@ struct seq_file;struct platform_device ;/* core */ -void dss_clk_enable (enum dss_clock clks); -void dss_clk_disable (enum dss_clock clks); -unsigned long dss_clk_get_rate (enum dss_clock clk); -int dss_need_ctx_restore (void ); -void dss_dump_clocks (struct seq_file *s);struct bus_type *dss_get_bus (void );struct regulator *dss_get_vdds_dsi (void );struct regulator *dss_get_vdds_sdi (void );
@@ -219,8 +214,16 @@ void dss_deinit_platform_driver(void);void dss_save_context (void );void dss_restore_context (void ); +void dss_clk_enable (enum dss_clock clks); +void dss_clk_disable (enum dss_clock clks); +unsigned long dss_clk_get_rate (enum dss_clock clk); +int dss_need_ctx_restore (void ); +void dss_dump_clocks (struct seq_file *s);void dss_dump_regs (struct seq_file *s); +#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT ) +void dss_debug_dump_clocks (struct seq_file *s); +#endif void dss_sdi_init (u8 datapairs);int dss_sdi_enable (void );
Signature · 1 line
1.7.0.4
Re: [PATCH v5 10/17] OMAP2,3: DSS2: Move clocks from core driver to dss driver
Quoted 21 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
All clock management is moved to dss platform driver. clk_get/put APIs use dss device instead of core platform device.
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So the device name is changed from
omap_displaytoomap_dssin 2420, 2430, 3xxx clock database files. Now the core driver "omap_display" only takes care of panel registration with the custom bus.
core driver also uses theclk_enable()/clk_disable()APIs exposed by DSS for clock management.
DSS driver would do clock management of clocks needed by DISPC, RFBI, DSI, VENCTODO: The clock content would be adapted to
omap_hwmodin a seperate series.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>--- arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +-
...
Quoted 10 lines
arch/arm/mach-omap2/clock2420_data.c +0
-1@@ -1786,10 +1786,10 @@ static struct omap_clk omap2420_clks[] = {CLK (NULL ,"gfx_2d_fck" , &gfx_2d_fck,CK_242X ), CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),/* DSS domain clocks */ - CLK("omap_display", "ick", &dss_ick, CK_242X),
arch/arm/mach-omap2/clock2420_data.c static struct omap_clk omap2420_clks[] = { · line 1795
Quoted 10 lines
arch/arm/mach-omap2/clock2420_data.c +4
-3-CLK ("omap_display" ,"dss1_fck" , &dss1_fck,CK_242X ), -CLK ("omap_display" ,"dss2_fck" , &dss2_fck,CK_242X ), -CLK ("omap_display" ,"tv_fck" , &dss_54m_fck,CK_242X ), +CLK ("omap_dss" ,"ick" , &dss_ick,CK_242X ), +CLK ("omap_dss" ,"dss1_fck" , &dss1_fck,CK_242X ), +CLK ("omap_dss" ,"dss2_fck" , &dss2_fck,CK_242X ), +CLK ("omap_dss" ,"tv_fck" , &dss_54m_fck,CK_242X ),/* L3 domain clocks */ CLK (NULL ,"core_l3_ck" , &core_l3_ck,CK_242X ), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
It would be nice if you could figure out some way to combine or restructure these changes with the patch 4 changes, to avoid changing these from "omapdss" to "omap_display" then to "omap_dss".
In any case,
- Paul
Re: [PATCH v5 10/17] OMAP2,3: DSS2: Move clocks from core driver to dss driver
Hi Paul,
Quoted 42 lines · Paul Walmsley
Quoted 21 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
All clock management is moved to dss platform driver. clk_get/put APIs use dss device instead of core platform device.
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So the device name is changed from
omap_displaytoomap_dssin 2420, 2430, 3xxx clock database files. Now the core driver "omap_display" only takes care of panel registration with the custom bus.
core driver also uses theclk_enable()/clk_disable()APIs exposed by DSS for clock management.
DSS driver would do clock management of clocks needed by DISPC, RFBI, DSI, VENCTODO: The clock content would be adapted to
omap_hwmodin a seperate series.Signed-off-by Senthilvadivu Guruswamy <[email protected]>Signed-off-by Sumit Semwal <[email protected]>---
arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +-...
Quoted 16 lines
arch/arm/mach-omap2/clock2420_data.c +3
-4@@ -1786,10 +1786,10 @@ static struct omap_clk omap2420_clks[] = { CLK(NULL, "gfx_2d_fck", &gfx_2d_fck, CK_242X), CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), /* DSS domain clocks */ - CLK("omap_display", "ick", &dss_ick, CK_242X), - CLK("omap_display", "dss1_fck", &dss1_fck, CK_242X), - CLK("omap_display", "dss2_fck", &dss2_fck, CK_242X), - CLK("omap_display", "tv_fck", &dss_54m_fck, CK_242X), + CLK("omap_dss", "ick", &dss_ick, CK_242X), + CLK("omap_dss", "dss1_fck", &dss1_fck, CK_242X), + CLK("omap_dss", "dss2_fck", &dss2_fck, CK_242X),
Quoted 8 lines
arch/arm/mach-omap2/clock2420_data.c static struct omap_clk omap2420_clks[] = { · line 1795
Quoted 4 lines
arch/arm/mach-omap2/clock2420_data.c +1
-0+ CLK("omap_dss", "tv_fck", &dss_54m_fck, CK_242X), /* L3 domain clocks */ CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),It would be nice if you could figure out some way to combine or restructure these changes with the patch 4 changes, to avoid changing these from "omapdss" to "
omap_display" then to "omap_dss".
I thought, and realized that this is done to make sure functionality's not broken after each patch; here's the logic.
patch 4 is the first step in re-defining role of core.c - this DSS file should not handle ALL clocks / regulators, but just some related to displays, hence the move to device name 'omap_display'. At this point, since all DSS clock handling is still in the same file, we changed the controlling device name also to 'omap_display'. patch 10 then is the second step, when all clock handling is moved to dss.c, and as a result, device_name for all clocks gets changed to 'omap_dss'; for display regulator supplies [like DVI], still the controlling device is 'omap_display'.
Quoted 4 lines
In any case,
Acked-by Paul Walmsley <[email protected]>
Thanks for the Ack! :)
~Sumit.
Quoted 5 lines
- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 11/17 OMAP2,3: DSS2: RFBI: create platform_driver, move init,exit to driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a platform_driver for RFBI is created and init exit methods are moved from core.c to its driver probe,remove. pdev member has to be maintained by its own drivers.
RFBI platform driver is registered from inside omap_dss_probe, in the order desired.
--- drivers/video/omap2/dss/core.c | 8 ++-- drivers/video/omap2/dss/dss.h | 8 ++-- drivers/video/omap2/dss/rfbi.c | 110 ++++++++++++++++++++++++---------------- 3 files changed, 74 insertions(+), 52 deletions(-)
drivers/video/omap2/dss/core.c +4 -4
@@ -201,9 +201,9 @@ static int omap_dss_probe(struct platform_device *pdev)/* keep clocks enabled to prevent context saves/restores during init */ dss_clk_enable (DSS_CLK_ICK |DSS_CLK_FCK1 ); - r =rfbi_init (); + r =rfbi_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize rfbi\n" ); +DSSERR ("Failed to initialize rfbi platform driver\n" ); goto err_rfbi; }
@@ -285,7 +285,7 @@ err_venc: err_dispc:dpi_exit (); err_dpi: -rfbi_exit (); +rfbi_deinit_platform_driver (); err_rfbi:dss_deinit_platform_driver (); err_dss:
@@ -303,7 +303,7 @@ static int omap_dss_remove(struct platform_device *pdev)venc_exit ();dispc_exit ();dpi_exit (); -rfbi_exit (); +rfbi_deinit_platform_driver ();if (cpu_is_omap34xx ()) {dsi_exit ();sdi_exit ();
drivers/video/omap2/dss/dss.h +4 -4
@@ -421,8 +421,8 @@ static inline void venc_exit(void)/* RFBI */ #ifdef CONFIG_OMAP2_DSS_RFBI -int rfbi_init (void ); -void rfbi_exit (void ); +int rfbi_init_platform_driver (void ); +void rfbi_deinit_platform_driver (void );void rfbi_dump_regs (struct seq_file *s);int rfbi_configure (int rfbi_module,int bpp,int lines);
@@ -433,11 +433,11 @@ void rfbi_set_timings(int rfbi_module, struct rfbi_timings *t);unsigned long rfbi_get_max_tx_rate (void );int rfbi_init_display (struct omap_dss_device *display);#else -static inline int rfbi_init (void ) +static inline int rfbi_init_platform_driver (void ) {return 0 ; } -static inline void rfbi_exit (void ) +static inline void rfbi_deinit_platform_driver (void ) { }#endif
drivers/video/omap2/dss/rfbi.c +66 -44
125 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v5 12/17 OMAP2,3: DSS2: DISPC: create platform_driver, move init,exit to driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a platform_driver for DISPC is created and init exit methods are moved from core.c to its driver probe,remove. pdev member has to be maintained by its own drivers.
DISPC platform driver is registered from inside omap_dss_probe, in the order desired.
--- drivers/video/omap2/dss/core.c | 8 ++-- drivers/video/omap2/dss/dispc.c | 105 ++++++++++++++++++++++++--------------- drivers/video/omap2/dss/dss.h | 4 +- 3 files changed, 70 insertions(+), 47 deletions(-)
drivers/video/omap2/dss/core.c +4 -4
@@ -213,9 +213,9 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_dpi; } - r =dispc_init (); + r =dispc_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize dispc\n" ); +DSSERR ("Failed to initialize dispc platform driver\n" ); goto err_dispc; }
@@ -281,7 +281,7 @@ err_dsi: err_sdi:venc_exit (); err_venc: -dispc_exit (); +dispc_deinit_platform_driver (); err_dispc:dpi_exit (); err_dpi:
@@ -301,7 +301,7 @@ static int omap_dss_remove(struct platform_device *pdev)dss_uninitialize_debugfs ();venc_exit (); -dispc_exit (); +dispc_deinit_platform_driver ();dpi_exit ();rfbi_deinit_platform_driver ();if (cpu_is_omap34xx ()) {
drivers/video/omap2/dss/dispc.c +64 -41
120 lines not on this page · raw message
drivers/video/omap2/dss/dss.h +2 -2
@@ -319,8 +319,8 @@ static inline void dpi_exit(void)#endif /* DISPC */ -int dispc_init (void ); -void dispc_exit (void ); +int dispc_init_platform_driver (void ); +void dispc_deinit_platform_driver (void );void dispc_dump_clocks (struct seq_file *s);void dispc_dump_irqs (struct seq_file *s);void dispc_dump_regs (struct seq_file *s);
Signature · 1 line
1.7.0.4
PATCH v5 13/17 OMAP2,3: DSS2: VENC: create platform_driver, move init,exit to driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a platform_driver for VENC is created and init exit methods are moved from core.c to its driver probe,remove. pdev member has to be maintained by its own drivers.
Also, venc_vdda_dac reading is moved to venc.c.
VENC platform driver is registered from inside omap_dss_probe, in the order desired.
--- arch/arm/mach-omap2/board-3430sdp.c | 2 +- drivers/video/omap2/dss/core.c | 28 +------- drivers/video/omap2/dss/dss.h | 9 +-- drivers/video/omap2/dss/venc.c | 116 +++++++++++++++++++++++------------ 4 files changed, 85 insertions(+), 70 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -1
@@ -302,7 +302,7 @@ static struct omap_dss_board_info sdp3430_dss_data = { };static struct regulator_consumer_supply sdp3430_vdda_dac_supply = -REGULATOR_SUPPLY ("vdda_dac" ,"omap_display" ); +REGULATOR_SUPPLY ("vdda_dac" ,"omap_venc" );static struct omap_board_config_kernel sdp3430_config[]__initdata = { };
drivers/video/omap2/dss/core.c +4 -24
@@ -43,7 +43,6 @@ static struct {struct regulator *vdds_dsi_reg;struct regulator *vdds_sdi_reg; -struct regulator *vdda_dac_reg; } core;static char *def_disp_name;
@@ -85,20 +84,6 @@ struct regulator *dss_get_vdds_sdi(void)return reg; } -struct regulator *dss_get_vdda_dac (void ) -{ -struct regulator *reg; - -if (core.vdda_dac_reg !=NULL ) -return core.vdda_dac_reg; - - reg =regulator_get (&core.pdev->dev,"vdda_dac" ); -if (!IS_ERR (reg)) - core.vdda_dac_reg = reg; - -return reg; -} -#if defined(CONFIG_DEBUG_FS ) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT )static int dss_debug_show (struct seq_file *s,void *unused) {
@@ -219,9 +204,9 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_dispc; } - r =venc_init (pdev); + r =venc_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize venc\n" ); +DSSERR ("Failed to initialize venc platform driver\n" ); goto err_venc; }
@@ -279,7 +264,7 @@ err_dsi:if (cpu_is_omap34xx ())sdi_exit (); err_sdi: -venc_exit (); +venc_deinit_platform_driver (); err_venc:dispc_deinit_platform_driver (); err_dispc:
@@ -300,7 +285,7 @@ static int omap_dss_remove(struct platform_device *pdev)dss_uninitialize_debugfs (); -venc_exit (); +venc_deinit_platform_driver ();dispc_deinit_platform_driver ();dpi_exit ();rfbi_deinit_platform_driver ();
@@ -597,11 +582,6 @@ static void __exit omap_dss_exit(void) core.vdds_sdi_reg =NULL ; } -if (core.vdda_dac_reg !=NULL ) { -regulator_put (core.vdda_dac_reg); - core.vdda_dac_reg =NULL ; - } -platform_driver_unregister (&omap_dss_driver);omap_dss_bus_unregister ();
drivers/video/omap2/dss/dss.h +4 -5
@@ -172,7 +172,6 @@ struct platform_device;struct bus_type *dss_get_bus (void );struct regulator *dss_get_vdds_dsi (void );struct regulator *dss_get_vdds_sdi (void ); -struct regulator *dss_get_vdda_dac (void );/* display */ int dss_suspend_all_devices (void );
@@ -405,16 +404,16 @@ int dispc_get_clock_div(struct dispc_clock_info *cinfo);/* VENC */ #ifdef CONFIG_OMAP2_DSS_VENC -int venc_init (struct platform_device *pdev); -void venc_exit (void ); +int venc_init_platform_driver (void ); +void venc_deinit_platform_driver (void );void venc_dump_regs (struct seq_file *s);int venc_init_display (struct omap_dss_device *display);#else -static inline int venc_init (struct platform_device *pdev) +static inline int venc_init_platform_driver (void ) {return 0 ; } -static inline void venc_exit (void ) +static inline void venc_deinit_platform_driver (void ) { }#endif
drivers/video/omap2/dss/venc.c +76 -40
137 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v5 14/17 OMAP2,3: DSS2: DSI: create platform_driver, move init,exit to driver
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. So a platform_driver for DSI is created and init exit methods are moved from core.c to its driver probe,remove. pdev member has to be maintained by its own drivers.
Also, vdds_dsi regulator handling is copied to dsi.c.
DSI platform driver is registered from inside omap_dss_probe, in the order desired.
--- arch/arm/mach-omap2/board-3430sdp.c | 1 + drivers/video/omap2/dss/core.c | 8 ++-- drivers/video/omap2/dss/dsi.c | 64 +++++++++++++++++++++++++++++++++-- drivers/video/omap2/dss/dss.h | 8 ++-- 4 files changed, 70 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +1 -0
@@ -527,6 +527,7 @@ static struct regulator_init_data sdp3430_vdac = {/* VPLL2 for digital video outputs */ static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {REGULATOR_SUPPLY ("vdds_dsi" ,"omap_display" ), +REGULATOR_SUPPLY ("vdds_dsi" ,"omap_dsi1" ), };static struct regulator_init_data sdp3430_vpll2 = {
drivers/video/omap2/dss/core.c +4 -4
@@ -222,9 +222,9 @@ static int omap_dss_probe(struct platform_device *pdev) goto err_sdi; } - r =dsi_init (pdev); + r =dsi_init_platform_driver ();if (r) { -DSSERR ("Failed to initialize DSI\n" ); +DSSERR ("Failed to initialize DSI platform driver\n" ); goto err_dsi; } }
@@ -259,7 +259,7 @@ err_register:dss_uninitialize_debugfs (); err_debugfs:if (cpu_is_omap34xx ()) -dsi_exit (); +dsi_deinit_platform_driver (); err_dsi:if (cpu_is_omap34xx ())sdi_exit ();
@@ -290,7 +290,7 @@ static int omap_dss_remove(struct platform_device *pdev)dpi_exit ();rfbi_deinit_platform_driver ();if (cpu_is_omap34xx ()) { -dsi_exit (); +dsi_deinit_platform_driver ();sdi_exit (); }
drivers/video/omap2/dss/dsi.c +61 -3
98 lines not on this page · raw message
drivers/video/omap2/dss/dss.h +4 -4
@@ -261,8 +261,8 @@ static inline void sdi_exit(void)/* DSI */ #ifdef CONFIG_OMAP2_DSS_DSI -int dsi_init (struct platform_device *pdev); -void dsi_exit (void ); +int dsi_init_platform_driver (void ); +void dsi_deinit_platform_driver (void );void dsi_dump_clocks (struct seq_file *s);void dsi_dump_irqs (struct seq_file *s);
@@ -287,11 +287,11 @@ void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,void dsi_wait_dsi1_pll_active (void );void dsi_wait_dsi2_pll_active (void );#else -static inline int dsi_init (struct platform_device *pdev) +static inline int dsi_init_platform_driver (void ) {return 0 ; } -static inline void dsi_exit (void ) +static inline void dsi_deinit_platform_driver (void ) { }static inline void dsi_wait_dsi1_pll_active (void )
Signature · 1 line
1.7.0.4
PATCH v5 15/17 OMAP2,3: DSS2: replace printk with dev_dbg in init
In reply to Sumit SemwalThis patch replaces printk's in the init/probe functions to dev_dbg for boot time optimization.
--- drivers/video/omap2/dss/dispc.c | 2 +- drivers/video/omap2/dss/dsi.c | 2 +- drivers/video/omap2/dss/rfbi.c | 2 +- drivers/video/omap2/dss/venc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/video/omap2/dss/dispc.c +1 -1
@@ -3158,7 +3158,7 @@ static int omap_dispchw_probe(struct platform_device *pdev)dispc_save_context (); rev =dispc_read_reg (DISPC_REVISION ); -printk (KERN_INFO "OMAP DISPC rev %d.%d\n" , +dev_dbg (&pdev->dev,"OMAP DISPC rev %d.%d\n" ,FLD_GET (rev,7 ,4 ),FLD_GET (rev,3 ,0 ));enable_clocks (0 );
drivers/video/omap2/dss/dsi.c +1 -1
@@ -3297,7 +3297,7 @@ static int dsi_init(struct platform_device *pdev)enable_clocks (1 ); rev =dsi_read_reg (DSI_REVISION ); -printk (KERN_INFO "OMAP DSI rev %d.%d\n" , +dev_dbg (&pdev->dev,"OMAP DSI rev %d.%d\n" ,FLD_GET (rev,7 ,4 ),FLD_GET (rev,3 ,0 ));enable_clocks (0 );
drivers/video/omap2/dss/rfbi.c +1 -1
@@ -1044,7 +1044,7 @@ static int omap_rfbihw_probe(struct platform_device *pdev)rfbi_write_reg (RFBI_SYSCONFIG , l); rev =rfbi_read_reg (RFBI_REVISION ); -printk (KERN_INFO "OMAP RFBI rev %d.%d\n" , +dev_dbg (&pdev->dev,"OMAP RFBI rev %d.%d\n" ,FLD_GET (rev,7 ,4 ),FLD_GET (rev,3 ,0 ));rfbi_enable_clocks (0 );
drivers/video/omap2/dss/venc.c +1 -1
@@ -739,7 +739,7 @@ static int omap_venchw_probe(struct platform_device *pdev)venc_enable_clocks (1 ); rev_id = (u8)(venc_read_reg (VENC_REV_ID ) &0xff ); -printk (KERN_INFO "OMAP VENC rev %d\n" , rev_id); +dev_dbg (&pdev->dev,"OMAP VENC rev %d\n" , rev_id);venc_enable_clocks (0 );
Signature · 1 line
1.7.0.4
PATCH v5 16/17 OMAP2,3: DSS2: Use platform device to get baseaddr
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
DSS, DISPC, DSI, RFBI, VENC baseaddr can be obtained from platform_get_resource(). This API in turn picks the right silicon baseaddr from the hwmod database. So hardcoding of base addr could be removed.
--- drivers/video/omap2/dss/dispc.c | 11 ++++++++--- drivers/video/omap2/dss/dsi.c | 12 +++++++++--- drivers/video/omap2/dss/dss.c | 11 ++++++++--- drivers/video/omap2/dss/rfbi.c | 10 +++++++--- drivers/video/omap2/dss/venc.c | 11 ++++++++--- 5 files changed, 40 insertions(+), 15 deletions(-)
drivers/video/omap2/dss/dispc.c +8 -3
@@ -42,8 +42,6 @@#include "dss_features.h" /* DISPC */ -#define DISPC_BASE 0x48050400 -#define DISPC_SZ_REGS SZ_1Kstruct dispc_reg {u16 idx; };
@@ -3132,6 +3130,8 @@ int dispc_setup_plane(enum omap_plane plane,static int omap_dispchw_probe (struct platform_device *pdev) {u32 rev; +struct resource *dispc_mem; + dispc.pdev = pdev;spin_lock_init (&dispc.irq_lock);
@@ -3143,7 +3143,12 @@ static int omap_dispchw_probe(struct platform_device *pdev)INIT_WORK (&dispc.error_work, dispc_error_worker); - dispc.base =ioremap (DISPC_BASE ,DISPC_SZ_REGS ); + dispc_mem =platform_get_resource (dispc.pdev,IORESOURCE_MEM ,0 ); +if (!dispc_mem) { +DSSERR ("can't get IORESOURCE_MEM DISPC\n" ); +return -EINVAL ; + } + dispc.base =ioremap (dispc_mem->start,resource_size (dispc_mem));if (!dispc.base) {DSSERR ("can't ioremap DISPC\n" );return -ENOMEM ;
drivers/video/omap2/dss/dsi.c +9 -3
@@ -42,8 +42,6 @@/*#define VERBOSE_IRQ*/ #define DSI_CATCH_MISSING_TE -#define DSI_BASE 0x4804FC00 -struct dsi_reg {u16 idx; };#define DSI_REG (idx) ((const struct dsi_reg) { idx })
@@ -3254,6 +3252,7 @@ static int dsi_init(struct platform_device *pdev) {u32 rev;int r; +struct resource *dsi_mem;spin_lock_init (&dsi.errors_lock); dsi.errors =0 ;
@@ -3280,7 +3279,13 @@ static int dsi_init(struct platform_device *pdev) dsi.te_timer.function = dsi_te_timeout; dsi.te_timer.data =0 ;#endif - dsi.base =ioremap (DSI_BASE ,DSI_SZ_REGS ); + dsi_mem =platform_get_resource (dsi.pdev,IORESOURCE_MEM ,0 ); +if (!dsi_mem) { +DSSERR ("can't get IORESOURCE_MEM DSI\n" ); + r = -EINVAL ; + goto err0; + } + dsi.base =ioremap (dsi_mem->start,resource_size (dsi_mem));if (!dsi.base) {DSSERR ("can't ioremap DSI\n" ); r = -ENOMEM ;
@@ -3307,6 +3312,7 @@ err2:iounmap (dsi.base); err1:destroy_workqueue (dsi.workqueue); +err0:return r; }
drivers/video/omap2/dss/dss.c +8 -3
@@ -34,8 +34,6 @@#include <plat/clock.h> #include "dss.h" -#define DSS_BASE 0x48050000 -#define DSS_SZ_REGS SZ_512struct dss_reg {
@@ -567,8 +565,15 @@ static int dss_init(bool skip_init) {int r;u32 rev; +struct resource *dss_mem; - dss.base =ioremap (DSS_BASE ,DSS_SZ_REGS ); + dss_mem =platform_get_resource (dss.pdev,IORESOURCE_MEM ,0 ); +if (!dss_mem) { +DSSERR ("can't get IORESOURCE_MEM DSS\n" ); + r = -EINVAL ; + goto fail0; + } + dss.base =ioremap (dss_mem->start,resource_size (dss_mem));if (!dss.base) {DSSERR ("can't ioremap DSS\n" ); r = -ENOMEM ;
drivers/video/omap2/dss/rfbi.c +7 -3
@@ -36,8 +36,6 @@#include <plat/display.h> #include "dss.h" -#define RFBI_BASE 0x48050800 -struct rfbi_reg {u16 idx; };#define RFBI_REG (idx) ((const struct rfbi_reg) { idx })
@@ -1017,6 +1015,7 @@ static int omap_rfbihw_probe(struct platform_device *pdev) {u32 rev;u32 l; +struct resource *rfbi_mem; rfbi.pdev = pdev;
@@ -1026,7 +1025,12 @@ static int omap_rfbihw_probe(struct platform_device *pdev)atomic_set (&rfbi.cmd_fifo_full,0 );atomic_set (&rfbi.cmd_pending,0 ); - rfbi.base =ioremap (RFBI_BASE ,SZ_256 ); + rfbi_mem =platform_get_resource (rfbi.pdev,IORESOURCE_MEM ,0 ); +if (!rfbi_mem) { +DSSERR ("can't get IORESOURCE_MEM RFBI\n" ); +return -EINVAL ; + } + rfbi.base =ioremap (rfbi_mem->start,resource_size (rfbi_mem));if (!rfbi.base) {DSSERR ("can't ioremap RFBI\n" );return -ENOMEM ;
drivers/video/omap2/dss/venc.c +8 -3
@@ -39,8 +39,6 @@#include "dss.h" -#define VENC_BASE 0x48050C00 -/* Venc registers */ #define VENC_REV_ID 0x00#define VENC_STATUS 0x04
@@ -717,13 +715,20 @@ void venc_dump_regs(struct seq_file *s)static int omap_venchw_probe (struct platform_device *pdev) {u8 rev_id; +struct resource *venc_mem; + venc.pdev = pdev;mutex_init (&venc.venc_lock); venc.wss_data =0 ; - venc.base =ioremap (VENC_BASE ,SZ_1K ); + venc_mem =platform_get_resource (venc.pdev,IORESOURCE_MEM ,0 ); +if (!venc_mem) { +DSSERR ("can't get IORESOURCE_MEM VENC\n" ); +return -EINVAL ; + } + venc.base =ioremap (venc_mem->start,resource_size (venc_mem));if (!venc.base) {DSSERR ("can't ioremap VENC\n" );return -ENOMEM ;
Signature · 1 line
1.7.0.4
PATCH v5 17/17 OMAP2,3: DSS2: Get DSS IRQ from platform device
In reply to Sumit SemwalFrom: Senthilvadivu Guruswamy <[email protected]>
DSS IRQ number can be obtained from platform_get_irq(). This API in turn picks the right IRQ number belonging to HW IP from the hwmod database. So hardcoding of IRQ number could be removed.
--- drivers/video/omap2/dss/dss.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-)
drivers/video/omap2/dss/dss.c +8 -5
@@ -563,7 +563,7 @@ void dss_set_dac_pwrdn_bgz(bool enable)static int dss_init (bool skip_init) { -int r; +int r, dss_irq;u32 rev;struct resource *dss_mem;
@@ -609,15 +609,18 @@ static int dss_init(bool skip_init)REG_FLD_MOD (DSS_CONTROL ,0 ,2 ,2 );/* venc clock mode = normal */ #endif - r =request_irq (INT_24XX_DSS_IRQ , + dss_irq =platform_get_irq (dss.pdev,0 ); +if (dss_irq != -ENXIO ) { + r =request_irq (dss_irq,cpu_is_omap24xx () ? dss_irq_handler_omap2 : dss_irq_handler_omap3,0 ,"OMAP DSS" ,NULL ); -if (r <0 ) { -DSSERR ("omap2 dss: request_irq failed\n" ); - goto fail1; +if (r <0 ) { +DSSERR ("omap2 dss: request_irq failed\n" ); + goto fail1; + } }if (cpu_is_omap34xx ()) {
Signature · 1 line
1.7.0.4
Re: [PATCH v5 17/17] OMAP2,3: DSS2: Get DSS IRQ from platform device
Quoted 7 lines · Sumit Semwal
From: Senthilvadivu Guruswamy <[email protected]>
DSS IRQ number can be obtained from
platform_get_irq(). This API in turn picks the right IRQ number belonging to HW IP from the hwmod database. So hardcoding of IRQ number could be removed.Signed-off-by Senthilvadivu Guruswamy <[email protected]>
- Paul
Hi Tony,
The patch set below is based on l-o tree, as it touches OMAP hwmod/clock/board stuff. It doesn't even apply to my mainline based tree.
I'm still in the process of reviewing the latest changes, but is it ok for you to apply these to your tree after I've acked the DSS parts? Or do you have a stable branch (going to Linus soon) that I can use as a base?
Tomi
Quoted 230 lines · ext Sumit Semwal
v4 of the DSS hwmod patch series focusses on fixing the review comments. OMAP4 hwmod support will be posted after the acceptance of this basic change in the dss2 design.
This patch series decouples the "Clocks for DSS in hwmod adaptation" changes from this series. Another series would be posted which could be discussed w.r.t clocks in DSS across omap2,3.
Removing the SYSCONFIG settings from DSS driver would also be part of these clock changes series and not covered in this series as it depends on some of the
omap_hwmodframework changes w.r.t opt clocks handling.Summary of the hwmod DSS design:
================================
DSS, DISPC, DSI, RFBI, VENC are made as platform drivers each corresponding to the hwmod class in the hwmod database.Each of these platform drivers' init / deinit are handled from core.c's
omap_dss_probe()in the exact sequence as required.No Hardcoding of silicon data:
hwmod database abstracts the SOC data like base addr, irq numbers and are implemented in this patch series.Continue to have custom bus for display panels:
"omapdss" driver continues to be a platform driver that registers the custom bus. It also continues to register the displaypanels(omap_dss_device)on the board to the panel drivers (omap_dss_driver)
For Eg: primary lcd device would be registered with lcd panel driver. lcd panel driver if it is on a parallel interface would use library functions exported from dpi.o. if it is on a dsi interface would use library functions exported from dsi platform driver(dsi.o).Clocks:
Handling of clocks in DSS only is one of the design approaches, that does not change the existing implementation. If each of the DSS HW IPs had to handle their own clocks, then corresponding clock changes can be requested in the hwmod database as well which is not the current design/implementation. As stated, this would be handled in another series seperately.
For Eg: VENC would need 54MCLK which is termed asdss_optclocks as of now apart for the dss main clocks. Currently VENC driver needs to be aware of this and has to use clk_get/put, clk_enable/disable, since VENC hwmod is not aware of 54MCLK.Current dss driver:
-------------------
1. Omapdss platform driver
- initialises necessary Ips dss, dispc.
- also initialises Ips like sdi, dsi, venc, rfbi
- creates a custom bus and registers the display devices/drivers connected on the board to the custom bus.2. Suspend/resume of omapdss
- in turn sends suspend/resume calls for each of the display devices registered to it.Modified change:
---------------
Platform driver for each DSS HW IP in addition to the software "omapdss" driver.Omapdss platform driver
- initialises necessary h/w IPs' platform drivers [dss, dispc, dsi, venc, rfbi] and software libraries like dpi, sdi.
- continues to have a custom bus and registers the display devices and drivers connected on the board to the custom bus.
- continues to handle suspend/resume of the display devices registered to the custom bus.DSS platform driver
- initialises DSS IP alone
- Handles the clocks related to the DSS and other DSSHW IPs like RFBI, DSI, VENC, DISPC. Previously this was a part of "omapdss" driver incore.c
- Continues to handle the DSS IRQs.
- No suspend/resume hooks.DISPC platform driver
- initialises DISPC IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DISPC library functions.DSI platform driver
- initialises DSI IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DSI library functions.RFBI, VENC platform drivers
- initialises DSI,VENC IPs
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide RFBI and VENC library functions.Testing:
---------
The patches are tested on 2420-n800, 2430sdp, 3630zoom, 3430sdp. Complete bootup with penguins on panel is done on 3430sdp.
For the rest of the mentioned platforms, kernel is built with "OMAP2_DSS" and bootup is tested so that base address andclk_getcalls are successful.DSS was built successfully as module, though not tested yet.
Changes since v4:
----------------
1) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41970.html
Corrected the clocks to be enabled inomap_dss_probe.
Changes since v3:
----------------
1.) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41705.htmlhttp://www.mail-archive.com/[email protected]/msg41683.html Created a new display.c file for dss driver registration related code.* http://www.mail-archive.com/[email protected]/msg41573.html
Changed the oh_name/dev_name handling in hwmod usage.* http://www.mail-archive.com/[email protected]/msg41753.html
http://www.mail-archive.com/[email protected]/msg41718.html removed device_initcall_sync(); init / deinit of each DSS h/w IP platform drivers are done from omap_dss_probe() in sequence.* http://www.mail-archive.com/[email protected]/msg41754.html
clock patches were cleaned up as per review comments.* http://www.mail-archive.com/[email protected]/msg41756.html
printk()=>dev_dbgchange was separated out.Changes since v2:
-------------------
1.) Following review comments incorporated:Split the device/driver name change and registration patches logically. http://www.mail-archive.com/[email protected]/msg41205.html http://www.mail-archive.com/[email protected]/msg41204.html http://www.mail-archive.com/[email protected]/msg41203.htmlChanges since v1:
------------------
1.) Dynamically register for OMAP2,3 specific DSS HW IPs indevices.c2.) Following review comments incorporated:
Updation of all the board files on l-o dss2 branch as per
http://www.mail-archive.com/[email protected]/msg36915.html
Comments incorporated indevices.canddisplay.has per
http://www.mail-archive.com/[email protected]/msg36919.html
Comments incorporated indispc.c,dss.c,dsi.c,venc.c,rfbi.cso thatplatform_deviceis just aboveplatform_driverregistrations as per
http://www.mail-archive.com/[email protected]/msg36963.html
3.) Squashed some of the patches to one patch.Changes since RFC:
-------------------
1) All the platform driver registration except DSS, were within the filecore.c. Registeration of these driver got seperated to its own file.
2) Usage of regulators by different drivers are implemented.
For Eg: Regulator used by VENC is moved to venc driver. Butvdda_dacwould be needed by DPI and DSI as well.
4) OMAP2420 and OMAP2430 hwmod database are generated in this v1.
5) Module support for omapdss driver can continue as the DSS HW IP specific platform drivers are decoupled from omapdss driver.
6) Following review comments incorporated:
Changed the hwmod device name from "dss" to "dss_dss"
Changed name of core driver from "omapdss" to "omap_display" as it deals with panels. Fixed comments on return values from platform_get_resource/irq functions.Patch Base:
===========
url =git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
branch "master"
Commit id:fa3b4e23ec20cfc944db7cc2b30b0d82c20e4472
Description: cbus: Fixretu_rtc_do_reset
----------------------------------------------------------------------------Senthilvadivu Guruswamy (15):
OMAP2420: hwmod data: add DSS DISPC RFBI VENC
OMAP2430: hwmod data: add DSS DISPC RFBI VENC
OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC
OMAP2,3 DSS2 Change driver name toomap_display
OMAP2,3 DSS2 Use Regulator init with driver name
OMAP2,3: DSS2: board files: replaceplatform_device_registerwith
omap_display_init()
OMAP2,3: DSS2: Buildomap_devicefor each DSS HWIP OMAP2,3: DSS2: DSS: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: Move clocks from core driver to dss driver OMAP2,3: DSS2: RFBI: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: DISPC: createplatform_driver, move init,exit to
driver
OMAP2,3: DSS2: VENC: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: DSI: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: Use platform device to get baseaddr OMAP2,3: DSS2: Get DSS IRQ from platform deviceSumit Semwal (2):
OMAP2,3: DSS2: Create new filedisplay.cfor central dss driver
registration.
OMAP2,3: DSS2: replace printk withdev_dbgin initarch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/board-3430sdp.c | 26 +-- arch/arm/mach-omap2/board-am3517evm.c | 16 +- arch/arm/mach-omap2/board-cm-t35.c | 22 +- arch/arm/mach-omap2/board-devkit8000.c | 14 +- arch/arm/mach-omap2/board-igep0020.c | 16 +- arch/arm/mach-omap2/board-omap3beagle.c | 14 +- arch/arm/mach-omap2/board-omap3evm.c | 22 +- arch/arm/mach-omap2/board-omap3pandora.c | 16 +- arch/arm/mach-omap2/board-omap3stalker.c | 16 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 +- arch/arm/mach-omap2/board-rx51-video.c | 15 +- arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +- arch/arm/mach-omap2/display.c | 101 ++++++ arch/arm/mach-omap2/omap_hwmod_2420_data.c | 283 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_2430_data.c | 282 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 339 +++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 10 + drivers/video/omap2/dss/core.c | 450 ++------------------------ drivers/video/omap2/dss/dispc.c | 114 ++++--- drivers/video/omap2/dss/dsi.c | 78 ++++- drivers/video/omap2/dss/dss.c | 443 +++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 46 ++-- drivers/video/omap2/dss/rfbi.c | 118 ++++--- drivers/video/omap2/dss/venc.c | 125 +++++--- 27 files changed, 1851 insertions(+), 751 deletions(-) create mode 100644 arch/arm/mach-omap2/display.c
Hi,
Ah, I just noticed (thanks Nishanth) that you've sent a pull request, and these patches apply fine on top of the omap-for-linus branch. I'll use that as a base.
Tomi
Quoted 245 lines · Tomi Valkeinen
Hi Tony,
The patch set below is based on l-o tree, as it touches OMAP hwmod/clock/board stuff. It doesn't even apply to my mainline based tree.
I'm still in the process of reviewing the latest changes, but is it ok for you to apply these to your tree after I've acked the DSS parts? Or do you have a stable branch (going to Linus soon) that I can use as a base?
Tomi
Quoted 230 lines · ext Sumit Semwal
v4 of the DSS hwmod patch series focusses on fixing the review comments. OMAP4 hwmod support will be posted after the acceptance of this basic change in the dss2 design.
This patch series decouples the "Clocks for DSS in hwmod adaptation" changes from this series. Another series would be posted which could be discussed w.r.t clocks in DSS across omap2,3.
Removing the SYSCONFIG settings from DSS driver would also be part of these clock changes series and not covered in this series as it depends on some of the
omap_hwmodframework changes w.r.t opt clocks handling.Summary of the hwmod DSS design:
================================
DSS, DISPC, DSI, RFBI, VENC are made as platform drivers each corresponding to the hwmod class in the hwmod database.Each of these platform drivers' init / deinit are handled from core.c's
omap_dss_probe()in the exact sequence as required.No Hardcoding of silicon data:
hwmod database abstracts the SOC data like base addr, irq numbers and are implemented in this patch series.Continue to have custom bus for display panels:
"omapdss" driver continues to be a platform driver that registers the custom bus. It also continues to register the displaypanels(omap_dss_device)on the board to the panel drivers (omap_dss_driver)
For Eg: primary lcd device would be registered with lcd panel driver. lcd panel driver if it is on a parallel interface would use library functions exported from dpi.o. if it is on a dsi interface would use library functions exported from dsi platform driver(dsi.o).Clocks:
Handling of clocks in DSS only is one of the design approaches, that does not change the existing implementation. If each of the DSS HW IPs had to handle their own clocks, then corresponding clock changes can be requested in the hwmod database as well which is not the current design/implementation. As stated, this would be handled in another series seperately.
For Eg: VENC would need 54MCLK which is termed asdss_optclocks as of now apart for the dss main clocks. Currently VENC driver needs to be aware of this and has to use clk_get/put, clk_enable/disable, since VENC hwmod is not aware of 54MCLK.Current dss driver:
-------------------
1. Omapdss platform driver
- initialises necessary Ips dss, dispc.
- also initialises Ips like sdi, dsi, venc, rfbi
- creates a custom bus and registers the display devices/drivers connected on the board to the custom bus.2. Suspend/resume of omapdss
- in turn sends suspend/resume calls for each of the display devices registered to it.Modified change:
---------------
Platform driver for each DSS HW IP in addition to the software "omapdss" driver.Omapdss platform driver
- initialises necessary h/w IPs' platform drivers [dss, dispc, dsi, venc, rfbi] and software libraries like dpi, sdi.
- continues to have a custom bus and registers the display devices and drivers connected on the board to the custom bus.
- continues to handle suspend/resume of the display devices registered to the custom bus.DSS platform driver
- initialises DSS IP alone
- Handles the clocks related to the DSS and other DSSHW IPs like RFBI, DSI, VENC, DISPC. Previously this was a part of "omapdss" driver incore.c
- Continues to handle the DSS IRQs.
- No suspend/resume hooks.DISPC platform driver
- initialises DISPC IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DISPC library functions.DSI platform driver
- initialises DSI IP alone
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide DSI library functions.RFBI, VENC platform drivers
- initialises DSI,VENC IPs
- Gets the required clock from DSS platform driver.
- No suspend/resume hooks.
- Continues to provide RFBI and VENC library functions.Testing:
---------
The patches are tested on 2420-n800, 2430sdp, 3630zoom, 3430sdp. Complete bootup with penguins on panel is done on 3430sdp.
For the rest of the mentioned platforms, kernel is built with "OMAP2_DSS" and bootup is tested so that base address andclk_getcalls are successful.DSS was built successfully as module, though not tested yet.
Changes since v4:
----------------
1) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41970.html
Corrected the clocks to be enabled inomap_dss_probe.
Changes since v3:
----------------
1.) Following review comments incorporated:
* http://www.mail-archive.com/[email protected]/msg41705.htmlhttp://www.mail-archive.com/[email protected]/msg41683.html Created a new display.c file for dss driver registration related code.* http://www.mail-archive.com/[email protected]/msg41573.html
Changed the oh_name/dev_name handling in hwmod usage.* http://www.mail-archive.com/[email protected]/msg41753.html
http://www.mail-archive.com/[email protected]/msg41718.html removed device_initcall_sync(); init / deinit of each DSS h/w IP platform drivers are done from omap_dss_probe() in sequence.* http://www.mail-archive.com/[email protected]/msg41754.html
clock patches were cleaned up as per review comments.* http://www.mail-archive.com/[email protected]/msg41756.html
printk()=>dev_dbgchange was separated out.Changes since v2:
-------------------
1.) Following review comments incorporated:Split the device/driver name change and registration patches logically. http://www.mail-archive.com/[email protected]/msg41205.html http://www.mail-archive.com/[email protected]/msg41204.html http://www.mail-archive.com/[email protected]/msg41203.htmlChanges since v1:
------------------
1.) Dynamically register for OMAP2,3 specific DSS HW IPs indevices.c2.) Following review comments incorporated:
Updation of all the board files on l-o dss2 branch as per
http://www.mail-archive.com/[email protected]/msg36915.html
Comments incorporated indevices.canddisplay.has per
http://www.mail-archive.com/[email protected]/msg36919.html
Comments incorporated indispc.c,dss.c,dsi.c,venc.c,rfbi.cso thatplatform_deviceis just aboveplatform_driverregistrations as per
http://www.mail-archive.com/[email protected]/msg36963.html
3.) Squashed some of the patches to one patch.Changes since RFC:
-------------------
1) All the platform driver registration except DSS, were within the filecore.c. Registeration of these driver got seperated to its own file.
2) Usage of regulators by different drivers are implemented.
For Eg: Regulator used by VENC is moved to venc driver. Butvdda_dacwould be needed by DPI and DSI as well.
4) OMAP2420 and OMAP2430 hwmod database are generated in this v1.
5) Module support for omapdss driver can continue as the DSS HW IP specific platform drivers are decoupled from omapdss driver.
6) Following review comments incorporated:
Changed the hwmod device name from "dss" to "dss_dss"
Changed name of core driver from "omapdss" to "omap_display" as it deals with panels. Fixed comments on return values from platform_get_resource/irq functions.Patch Base:
===========
url =git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
branch "master"
Commit id:fa3b4e23ec20cfc944db7cc2b30b0d82c20e4472
Description: cbus: Fixretu_rtc_do_reset
----------------------------------------------------------------------------Senthilvadivu Guruswamy (15):
OMAP2420: hwmod data: add DSS DISPC RFBI VENC
OMAP2430: hwmod data: add DSS DISPC RFBI VENC
OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC
OMAP2,3 DSS2 Change driver name toomap_display
OMAP2,3 DSS2 Use Regulator init with driver name
OMAP2,3: DSS2: board files: replaceplatform_device_registerwith
omap_display_init()
OMAP2,3: DSS2: Buildomap_devicefor each DSS HWIP OMAP2,3: DSS2: DSS: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: Move clocks from core driver to dss driver OMAP2,3: DSS2: RFBI: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: DISPC: createplatform_driver, move init,exit to
driver
OMAP2,3: DSS2: VENC: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: DSI: createplatform_driver, move init,exit to driver OMAP2,3: DSS2: Use platform device to get baseaddr OMAP2,3: DSS2: Get DSS IRQ from platform deviceSumit Semwal (2):
OMAP2,3: DSS2: Create new filedisplay.cfor central dss driver
registration.
OMAP2,3: DSS2: replace printk withdev_dbgin initarch/arm/mach-omap2/Makefile | 2 + arch/arm/mach-omap2/board-3430sdp.c | 26 +-- arch/arm/mach-omap2/board-am3517evm.c | 16 +- arch/arm/mach-omap2/board-cm-t35.c | 22 +- arch/arm/mach-omap2/board-devkit8000.c | 14 +- arch/arm/mach-omap2/board-igep0020.c | 16 +- arch/arm/mach-omap2/board-omap3beagle.c | 14 +- arch/arm/mach-omap2/board-omap3evm.c | 22 +- arch/arm/mach-omap2/board-omap3pandora.c | 16 +- arch/arm/mach-omap2/board-omap3stalker.c | 16 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 +- arch/arm/mach-omap2/board-rx51-video.c | 15 +- arch/arm/mach-omap2/clock2420_data.c | 8 +- arch/arm/mach-omap2/clock2430_data.c | 8 +- arch/arm/mach-omap2/clock3xxx_data.c | 14 +- arch/arm/mach-omap2/display.c | 101 ++++++ arch/arm/mach-omap2/omap_hwmod_2420_data.c | 283 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_2430_data.c | 282 ++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 339 +++++++++++++++++++ arch/arm/plat-omap/include/plat/display.h | 10 + drivers/video/omap2/dss/core.c | 450 ++------------------------ drivers/video/omap2/dss/dispc.c | 114 ++++--- drivers/video/omap2/dss/dsi.c | 78 ++++- drivers/video/omap2/dss/dss.c | 443 +++++++++++++++++++++++++- drivers/video/omap2/dss/dss.h | 46 ++-- drivers/video/omap2/dss/rfbi.c | 118 ++++--- drivers/video/omap2/dss/venc.c | 125 +++++--- 27 files changed, 1851 insertions(+), 751 deletions(-) create mode 100644 arch/arm/mach-omap2/display.c