xref: /linux/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c (revision cc4589ebfae6f8dbb5cf880a0a67eedab3416492)
1 /*
2  * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3  *
4  * Copyright (C) 2009-2010 Nokia Corporation
5  * Paul Walmsley
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * The data in this file should be completely autogeneratable from
12  * the TI hardware database or other technical documentation.
13  *
14  * XXX these should be marked initdata for multi-OMAP kernels
15  */
16 #include <plat/omap_hwmod.h>
17 #include <mach/irqs.h>
18 #include <plat/cpu.h>
19 #include <plat/dma.h>
20 
21 #include "omap_hwmod_common_data.h"
22 
23 #include "prm-regbits-34xx.h"
24 
25 /*
26  * OMAP3xxx hardware module integration data
27  *
28  * ALl of the data in this section should be autogeneratable from the
29  * TI hardware database or other technical documentation.  Data that
30  * is driver-specific or driver-kernel integration-specific belongs
31  * elsewhere.
32  */
33 
34 static struct omap_hwmod omap3xxx_mpu_hwmod;
35 static struct omap_hwmod omap3xxx_iva_hwmod;
36 static struct omap_hwmod omap3xxx_l3_main_hwmod;
37 static struct omap_hwmod omap3xxx_l4_core_hwmod;
38 static struct omap_hwmod omap3xxx_l4_per_hwmod;
39 
40 /* L3 -> L4_CORE interface */
41 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
42 	.master	= &omap3xxx_l3_main_hwmod,
43 	.slave	= &omap3xxx_l4_core_hwmod,
44 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
45 };
46 
47 /* L3 -> L4_PER interface */
48 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
49 	.master = &omap3xxx_l3_main_hwmod,
50 	.slave	= &omap3xxx_l4_per_hwmod,
51 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
52 };
53 
54 /* MPU -> L3 interface */
55 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
56 	.master = &omap3xxx_mpu_hwmod,
57 	.slave	= &omap3xxx_l3_main_hwmod,
58 	.user	= OCP_USER_MPU,
59 };
60 
61 /* Slave interfaces on the L3 interconnect */
62 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
63 	&omap3xxx_mpu__l3_main,
64 };
65 
66 /* Master interfaces on the L3 interconnect */
67 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
68 	&omap3xxx_l3_main__l4_core,
69 	&omap3xxx_l3_main__l4_per,
70 };
71 
72 /* L3 */
73 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
74 	.name		= "l3_main",
75 	.class		= &l3_hwmod_class,
76 	.masters	= omap3xxx_l3_main_masters,
77 	.masters_cnt	= ARRAY_SIZE(omap3xxx_l3_main_masters),
78 	.slaves		= omap3xxx_l3_main_slaves,
79 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_l3_main_slaves),
80 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
81 	.flags		= HWMOD_NO_IDLEST,
82 };
83 
84 static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
85 
86 /* L4_CORE -> L4_WKUP interface */
87 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
88 	.master	= &omap3xxx_l4_core_hwmod,
89 	.slave	= &omap3xxx_l4_wkup_hwmod,
90 	.user	= OCP_USER_MPU | OCP_USER_SDMA,
91 };
92 
93 /* Slave interfaces on the L4_CORE interconnect */
94 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
95 	&omap3xxx_l3_main__l4_core,
96 };
97 
98 /* Master interfaces on the L4_CORE interconnect */
99 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
100 	&omap3xxx_l4_core__l4_wkup,
101 };
102 
103 /* L4 CORE */
104 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
105 	.name		= "l4_core",
106 	.class		= &l4_hwmod_class,
107 	.masters	= omap3xxx_l4_core_masters,
108 	.masters_cnt	= ARRAY_SIZE(omap3xxx_l4_core_masters),
109 	.slaves		= omap3xxx_l4_core_slaves,
110 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_l4_core_slaves),
111 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
112 	.flags		= HWMOD_NO_IDLEST,
113 };
114 
115 /* Slave interfaces on the L4_PER interconnect */
116 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
117 	&omap3xxx_l3_main__l4_per,
118 };
119 
120 /* Master interfaces on the L4_PER interconnect */
121 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
122 };
123 
124 /* L4 PER */
125 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
126 	.name		= "l4_per",
127 	.class		= &l4_hwmod_class,
128 	.masters	= omap3xxx_l4_per_masters,
129 	.masters_cnt	= ARRAY_SIZE(omap3xxx_l4_per_masters),
130 	.slaves		= omap3xxx_l4_per_slaves,
131 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_l4_per_slaves),
132 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
133 	.flags		= HWMOD_NO_IDLEST,
134 };
135 
136 /* Slave interfaces on the L4_WKUP interconnect */
137 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
138 	&omap3xxx_l4_core__l4_wkup,
139 };
140 
141 /* Master interfaces on the L4_WKUP interconnect */
142 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
143 };
144 
145 /* L4 WKUP */
146 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
147 	.name		= "l4_wkup",
148 	.class		= &l4_hwmod_class,
149 	.masters	= omap3xxx_l4_wkup_masters,
150 	.masters_cnt	= ARRAY_SIZE(omap3xxx_l4_wkup_masters),
151 	.slaves		= omap3xxx_l4_wkup_slaves,
152 	.slaves_cnt	= ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
153 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
154 	.flags		= HWMOD_NO_IDLEST,
155 };
156 
157 /* Master interfaces on the MPU device */
158 static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
159 	&omap3xxx_mpu__l3_main,
160 };
161 
162 /* MPU */
163 static struct omap_hwmod omap3xxx_mpu_hwmod = {
164 	.name		= "mpu",
165 	.class		= &mpu_hwmod_class,
166 	.main_clk	= "arm_fck",
167 	.masters	= omap3xxx_mpu_masters,
168 	.masters_cnt	= ARRAY_SIZE(omap3xxx_mpu_masters),
169 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
170 };
171 
172 /*
173  * IVA2_2 interface data
174  */
175 
176 /* IVA2 <- L3 interface */
177 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
178 	.master		= &omap3xxx_l3_main_hwmod,
179 	.slave		= &omap3xxx_iva_hwmod,
180 	.clk		= "iva2_ck",
181 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
182 };
183 
184 static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
185 	&omap3xxx_l3__iva,
186 };
187 
188 /*
189  * IVA2 (IVA2)
190  */
191 
192 static struct omap_hwmod omap3xxx_iva_hwmod = {
193 	.name		= "iva",
194 	.class		= &iva_hwmod_class,
195 	.masters	= omap3xxx_iva_masters,
196 	.masters_cnt	= ARRAY_SIZE(omap3xxx_iva_masters),
197 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
198 };
199 
200 static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
201 	&omap3xxx_l3_main_hwmod,
202 	&omap3xxx_l4_core_hwmod,
203 	&omap3xxx_l4_per_hwmod,
204 	&omap3xxx_l4_wkup_hwmod,
205 	&omap3xxx_mpu_hwmod,
206 	&omap3xxx_iva_hwmod,
207 	NULL,
208 };
209 
210 int __init omap3xxx_hwmod_init(void)
211 {
212 	return omap_hwmod_init(omap3xxx_hwmods);
213 }
214 
215 
216