17359154eSPaul Walmsley /*
27359154eSPaul Walmsley  * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
37359154eSPaul Walmsley  *
47359154eSPaul Walmsley  * Copyright (C) 2009-2010 Nokia Corporation
57359154eSPaul Walmsley  * Paul Walmsley
67359154eSPaul Walmsley  *
77359154eSPaul Walmsley  * This program is free software; you can redistribute it and/or modify
87359154eSPaul Walmsley  * it under the terms of the GNU General Public License version 2 as
97359154eSPaul Walmsley  * published by the Free Software Foundation.
107359154eSPaul Walmsley  *
117359154eSPaul Walmsley  * XXX handle crossbar/shared link difference for L3?
127359154eSPaul Walmsley  * XXX these should be marked initdata for multi-OMAP kernels
137359154eSPaul Walmsley  */
147359154eSPaul Walmsley #include <plat/omap_hwmod.h>
157359154eSPaul Walmsley #include <mach/irqs.h>
167359154eSPaul Walmsley #include <plat/cpu.h>
177359154eSPaul Walmsley #include <plat/dma.h>
187359154eSPaul Walmsley 
1943b40992SPaul Walmsley #include "omap_hwmod_common_data.h"
2043b40992SPaul Walmsley 
217359154eSPaul Walmsley #include "prm-regbits-24xx.h"
227359154eSPaul Walmsley 
237359154eSPaul Walmsley /*
247359154eSPaul Walmsley  * OMAP2430 hardware module integration data
257359154eSPaul Walmsley  *
267359154eSPaul Walmsley  * ALl of the data in this section should be autogeneratable from the
277359154eSPaul Walmsley  * TI hardware database or other technical documentation.  Data that
287359154eSPaul Walmsley  * is driver-specific or driver-kernel integration-specific belongs
297359154eSPaul Walmsley  * elsewhere.
307359154eSPaul Walmsley  */
317359154eSPaul Walmsley 
327359154eSPaul Walmsley static struct omap_hwmod omap2430_mpu_hwmod;
334a7cf90aSKevin Hilman static struct omap_hwmod omap2430_l3_main_hwmod;
347359154eSPaul Walmsley static struct omap_hwmod omap2430_l4_core_hwmod;
357359154eSPaul Walmsley 
367359154eSPaul Walmsley /* L3 -> L4_CORE interface */
374a7cf90aSKevin Hilman static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
384a7cf90aSKevin Hilman 	.master	= &omap2430_l3_main_hwmod,
397359154eSPaul Walmsley 	.slave	= &omap2430_l4_core_hwmod,
407359154eSPaul Walmsley 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
417359154eSPaul Walmsley };
427359154eSPaul Walmsley 
437359154eSPaul Walmsley /* MPU -> L3 interface */
444a7cf90aSKevin Hilman static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
457359154eSPaul Walmsley 	.master = &omap2430_mpu_hwmod,
464a7cf90aSKevin Hilman 	.slave	= &omap2430_l3_main_hwmod,
477359154eSPaul Walmsley 	.user	= OCP_USER_MPU,
487359154eSPaul Walmsley };
497359154eSPaul Walmsley 
507359154eSPaul Walmsley /* Slave interfaces on the L3 interconnect */
514a7cf90aSKevin Hilman static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
524a7cf90aSKevin Hilman 	&omap2430_mpu__l3_main,
537359154eSPaul Walmsley };
547359154eSPaul Walmsley 
557359154eSPaul Walmsley /* Master interfaces on the L3 interconnect */
564a7cf90aSKevin Hilman static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
574a7cf90aSKevin Hilman 	&omap2430_l3_main__l4_core,
587359154eSPaul Walmsley };
597359154eSPaul Walmsley 
607359154eSPaul Walmsley /* L3 */
614a7cf90aSKevin Hilman static struct omap_hwmod omap2430_l3_main_hwmod = {
62fa98347eSBenoit Cousson 	.name		= "l3_main",
6343b40992SPaul Walmsley 	.class		= &l3_hwmod_class,
644a7cf90aSKevin Hilman 	.masters	= omap2430_l3_main_masters,
654a7cf90aSKevin Hilman 	.masters_cnt	= ARRAY_SIZE(omap2430_l3_main_masters),
664a7cf90aSKevin Hilman 	.slaves		= omap2430_l3_main_slaves,
674a7cf90aSKevin Hilman 	.slaves_cnt	= ARRAY_SIZE(omap2430_l3_main_slaves),
682eb1875dSKevin Hilman 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
692eb1875dSKevin Hilman 	.flags		= HWMOD_NO_IDLEST,
707359154eSPaul Walmsley };
717359154eSPaul Walmsley 
727359154eSPaul Walmsley static struct omap_hwmod omap2430_l4_wkup_hwmod;
737359154eSPaul Walmsley static struct omap_hwmod omap2430_mmc1_hwmod;
747359154eSPaul Walmsley static struct omap_hwmod omap2430_mmc2_hwmod;
757359154eSPaul Walmsley 
767359154eSPaul Walmsley /* L4_CORE -> L4_WKUP interface */
777359154eSPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
787359154eSPaul Walmsley 	.master	= &omap2430_l4_core_hwmod,
797359154eSPaul Walmsley 	.slave	= &omap2430_l4_wkup_hwmod,
807359154eSPaul Walmsley 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
817359154eSPaul Walmsley };
827359154eSPaul Walmsley 
837359154eSPaul Walmsley /* Slave interfaces on the L4_CORE interconnect */
847359154eSPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
854a7cf90aSKevin Hilman 	&omap2430_l3_main__l4_core,
867359154eSPaul Walmsley };
877359154eSPaul Walmsley 
887359154eSPaul Walmsley /* Master interfaces on the L4_CORE interconnect */
897359154eSPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
907359154eSPaul Walmsley 	&omap2430_l4_core__l4_wkup,
917359154eSPaul Walmsley };
927359154eSPaul Walmsley 
937359154eSPaul Walmsley /* L4 CORE */
947359154eSPaul Walmsley static struct omap_hwmod omap2430_l4_core_hwmod = {
95fa98347eSBenoit Cousson 	.name		= "l4_core",
9643b40992SPaul Walmsley 	.class		= &l4_hwmod_class,
977359154eSPaul Walmsley 	.masters	= omap2430_l4_core_masters,
987359154eSPaul Walmsley 	.masters_cnt	= ARRAY_SIZE(omap2430_l4_core_masters),
997359154eSPaul Walmsley 	.slaves		= omap2430_l4_core_slaves,
1007359154eSPaul Walmsley 	.slaves_cnt	= ARRAY_SIZE(omap2430_l4_core_slaves),
1012eb1875dSKevin Hilman 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1022eb1875dSKevin Hilman 	.flags		= HWMOD_NO_IDLEST,
1037359154eSPaul Walmsley };
1047359154eSPaul Walmsley 
1057359154eSPaul Walmsley /* Slave interfaces on the L4_WKUP interconnect */
1067359154eSPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
1077359154eSPaul Walmsley 	&omap2430_l4_core__l4_wkup,
1087359154eSPaul Walmsley };
1097359154eSPaul Walmsley 
1107359154eSPaul Walmsley /* Master interfaces on the L4_WKUP interconnect */
1117359154eSPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
1127359154eSPaul Walmsley };
1137359154eSPaul Walmsley 
1147359154eSPaul Walmsley /* L4 WKUP */
1157359154eSPaul Walmsley static struct omap_hwmod omap2430_l4_wkup_hwmod = {
116fa98347eSBenoit Cousson 	.name		= "l4_wkup",
11743b40992SPaul Walmsley 	.class		= &l4_hwmod_class,
1187359154eSPaul Walmsley 	.masters	= omap2430_l4_wkup_masters,
1197359154eSPaul Walmsley 	.masters_cnt	= ARRAY_SIZE(omap2430_l4_wkup_masters),
1207359154eSPaul Walmsley 	.slaves		= omap2430_l4_wkup_slaves,
1217359154eSPaul Walmsley 	.slaves_cnt	= ARRAY_SIZE(omap2430_l4_wkup_slaves),
1222eb1875dSKevin Hilman 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1232eb1875dSKevin Hilman 	.flags		= HWMOD_NO_IDLEST,
1247359154eSPaul Walmsley };
1257359154eSPaul Walmsley 
1267359154eSPaul Walmsley /* Master interfaces on the MPU device */
1277359154eSPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
1284a7cf90aSKevin Hilman 	&omap2430_mpu__l3_main,
1297359154eSPaul Walmsley };
1307359154eSPaul Walmsley 
1317359154eSPaul Walmsley /* MPU */
1327359154eSPaul Walmsley static struct omap_hwmod omap2430_mpu_hwmod = {
1335c2c0296SBenoit Cousson 	.name		= "mpu",
13443b40992SPaul Walmsley 	.class		= &mpu_hwmod_class,
1357359154eSPaul Walmsley 	.main_clk	= "mpu_ck",
1367359154eSPaul Walmsley 	.masters	= omap2430_mpu_masters,
1377359154eSPaul Walmsley 	.masters_cnt	= ARRAY_SIZE(omap2430_mpu_masters),
1387359154eSPaul Walmsley 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1397359154eSPaul Walmsley };
1407359154eSPaul Walmsley 
1417359154eSPaul Walmsley static __initdata struct omap_hwmod *omap2430_hwmods[] = {
1424a7cf90aSKevin Hilman 	&omap2430_l3_main_hwmod,
1437359154eSPaul Walmsley 	&omap2430_l4_core_hwmod,
1447359154eSPaul Walmsley 	&omap2430_l4_wkup_hwmod,
1457359154eSPaul Walmsley 	&omap2430_mpu_hwmod,
1467359154eSPaul Walmsley 	NULL,
1477359154eSPaul Walmsley };
1487359154eSPaul Walmsley 
1497359154eSPaul Walmsley int __init omap2430_hwmod_init(void)
1507359154eSPaul Walmsley {
1517359154eSPaul Walmsley 	return omap_hwmod_init(omap2430_hwmods);
1527359154eSPaul Walmsley }
1537359154eSPaul Walmsley 
1547359154eSPaul Walmsley 
155