diff options
author | Andy Green <andy.green@linaro.org> | 2011-11-11 18:39:23 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-11-11 18:39:23 +0800 |
commit | 8fa189f427c2850465c9e72e3e34f10819d89edc (patch) | |
tree | 48da28eeb7bfde132ac416644ec6503632f69e3a | |
parent | 3deedc867ff4a4b112ce48ee8b134720706dd328 (diff) | |
download | panda-8fa189f427c2850465c9e72e3e34f10819d89edc.tar.gz |
omap hwmod clean up gpu def
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 153 |
1 files changed, 75 insertions, 78 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 4ca4c08ee80..55f68efa3d2 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c @@ -2570,11 +2570,82 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX), }; -/* - * 'hsi' class - * mipi high-speed synchronous serial interface (multichannel and full-duplex - * serial if) +/* + * 'gpu' class + * 2d/3d graphics accelerator */ + +static struct omap_hwmod_class_sysconfig omap44xx_gpu_sysc = { + .rev_offs = 0xfe00, + .sysc_offs = 0xfe10, + .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class omap44xx_gpu_hwmod_class = { + .name = "gpu", + .sysc = &omap44xx_gpu_sysc, +}; + +/* gpu */ +static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = { + { .irq = 21 + OMAP44XX_IRQ_GIC_START }, +}; + +/* gpu master ports */ +static struct omap_hwmod_ocp_if *omap44xx_gpu_masters[] = { + &omap44xx_gpu__l3_main_2, +}; + +static struct omap_hwmod_addr_space omap44xx_gpu_addrs[] = { + { + .pa_start = 0x56000000, + .pa_end = 0x5600ffff, + .flags = ADDR_TYPE_RT + }, +}; + +/* l3_main_2 -> gpu */ +static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpu = { + .master = &omap44xx_l3_main_2_hwmod, + .slave = &omap44xx_gpu_hwmod, + .clk = "l3_div_ck", + .addr = omap44xx_gpu_addrs, + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* gpu slave ports */ +static struct omap_hwmod_ocp_if *omap44xx_gpu_slaves[] = { + &omap44xx_l3_main_2__gpu, +}; + +static struct omap_hwmod omap44xx_gpu_hwmod = { + .name = "gpu", + .class = &omap44xx_gpu_hwmod_class, + .mpu_irqs = omap44xx_gpu_irqs, + .flags = HWMOD_INIT_NO_RESET, + .main_clk = "gpu_fck", + .clkdm_name = "l3_gfx_clkdm", + /* .vdd_name = "core", */ + .prcm = { + .omap4 = { + .clkctrl_offs = OMAP4_CM_GFX_GFX_CLKCTRL_OFFSET, + }, + }, + .slaves = omap44xx_gpu_slaves, + .slaves_cnt = ARRAY_SIZE(omap44xx_gpu_slaves), + .masters = omap44xx_gpu_masters, + .masters_cnt = ARRAY_SIZE(omap44xx_gpu_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX), +}; + +/* + * * 'hsi' class + * * mipi high-speed synchronous serial interface (multichannel and full-duplex + * * serial if) + * */ static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = { .rev_offs = 0x0000, @@ -2616,45 +2687,6 @@ static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { { } }; -/* - * 'gpu' class - * 2d/3d graphics accelerator - */ - -static struct omap_hwmod_class_sysconfig omap44xx_gpu_sysc = { - .rev_offs = 0xfe00, - .sysc_offs = 0xfe10, - .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), - .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | - MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), - .sysc_fields = &omap_hwmod_sysc_type2, -}; - -static struct omap_hwmod_class omap44xx_gpu_hwmod_class = { - .name = "gpu", - .sysc = &omap44xx_gpu_sysc, -}; - -/* gpu */ -static struct omap_hwmod_irq_info omap44xx_gpu_irqs[] = { - { .irq = 21 + OMAP44XX_IRQ_GIC_START }, - { .irq = -1 } -}; - -/* gpu master ports */ -static struct omap_hwmod_ocp_if *omap44xx_gpu_masters[] = { - &omap44xx_gpu__l3_main_2, -}; - -static struct omap_hwmod_addr_space omap44xx_gpu_addrs[] = { - { - .pa_start = 0x56000000, - .pa_end = 0x5600ffff, - .flags = ADDR_TYPE_RT - }, - { } -}; - /* l4_cfg -> hsi */ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { .master = &omap44xx_l4_cfg_hwmod, @@ -2689,41 +2721,6 @@ static struct omap_hwmod omap44xx_hsi_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX), }; -/* l3_main_2 -> gpu */ -static struct omap_hwmod_ocp_if omap44xx_l3_main_2__gpu = { - .master = &omap44xx_l3_main_2_hwmod, - .slave = &omap44xx_gpu_hwmod, - .clk = "l3_div_ck", - .addr = omap44xx_gpu_addrs, - .user = OCP_USER_MPU | OCP_USER_SDMA, -}; - -/* gpu slave ports */ -static struct omap_hwmod_ocp_if *omap44xx_gpu_slaves[] = { - &omap44xx_l3_main_2__gpu, -}; - -static struct omap_hwmod omap44xx_gpu_hwmod = { - .name = "gpu", - .class = &omap44xx_gpu_hwmod_class, - .clkdm_name = "l3_init_clkdm", - .mpu_irqs = omap44xx_gpu_irqs, - .main_clk = "gpu_fck", -/* .vdd_name = "core", */ - .prcm = { - .omap4 = { - .clkctrl_offs = OMAP4_CM_GFX_GFX_CLKCTRL_OFFSET, - .context_offs = OMAP4_RM_GFX_GFX_CONTEXT_OFFSET, - .modulemode = MODULEMODE_HWCTRL, - }, - }, - .slaves = omap44xx_gpu_slaves, - .slaves_cnt = ARRAY_SIZE(omap44xx_gpu_slaves), - .masters = omap44xx_gpu_masters, - .masters_cnt = ARRAY_SIZE(omap44xx_gpu_masters), - .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX), -}; - /* * 'i2c' class * multimaster high-speed i2c controller |