aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2011-01-31 09:50:30 -0500
committerBenoit Cousson <b-cousson@ti.com>2011-02-17 12:25:36 -0500
commit4ddff4932b31b8f21d1c57155ca5d4088693ce4b (patch)
treeff391a93f482c96b9b5791840d2187b40a864f47 /arch/arm/mach-omap2/omap_hwmod_44xx_data.c
parent8ca476da04e452a01d984dd5b5333b3a562207a7 (diff)
OMAP4: hwmod data: Add McBSP
Add mcbsp data including a revision member in hwmod_class in order to provide mcbsp revision information in different omap. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Charulatha V <charu@ti.com> [b-cousson@ti.com: Remove the mcbsp4 memory name, re-order properly the structures]
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_44xx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c293
1 files changed, 289 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 1488438e4b03..f108614f02f6 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -530,10 +530,6 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
530 * iss 530 * iss
531 * kbd 531 * kbd
532 * mcasp 532 * mcasp
533 * mcbsp1
534 * mcbsp2
535 * mcbsp3
536 * mcbsp4
537 * mcpdm 533 * mcpdm
538 * mmc1 534 * mmc1
539 * mmc2 535 * mmc2
@@ -2158,6 +2154,289 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
2158}; 2154};
2159 2155
2160/* 2156/*
2157 * 'mcbsp' class
2158 * multi channel buffered serial port controller
2159 */
2160
2161static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2162 .sysc_offs = 0x008c,
2163 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2164 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2165 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2166 .sysc_fields = &omap_hwmod_sysc_type1,
2167};
2168
2169static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2170 .name = "mcbsp",
2171 .sysc = &omap44xx_mcbsp_sysc,
2172};
2173
2174/* mcbsp1 */
2175static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2176static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2177 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
2178};
2179
2180static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2181 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2182 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
2183};
2184
2185static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2186 {
2187 .pa_start = 0x40122000,
2188 .pa_end = 0x401220ff,
2189 .flags = ADDR_TYPE_RT
2190 },
2191};
2192
2193/* l4_abe -> mcbsp1 */
2194static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2195 .master = &omap44xx_l4_abe_hwmod,
2196 .slave = &omap44xx_mcbsp1_hwmod,
2197 .clk = "ocp_abe_iclk",
2198 .addr = omap44xx_mcbsp1_addrs,
2199 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs),
2200 .user = OCP_USER_MPU,
2201};
2202
2203static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2204 {
2205 .pa_start = 0x49022000,
2206 .pa_end = 0x490220ff,
2207 .flags = ADDR_TYPE_RT
2208 },
2209};
2210
2211/* l4_abe -> mcbsp1 (dma) */
2212static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2213 .master = &omap44xx_l4_abe_hwmod,
2214 .slave = &omap44xx_mcbsp1_hwmod,
2215 .clk = "ocp_abe_iclk",
2216 .addr = omap44xx_mcbsp1_dma_addrs,
2217 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs),
2218 .user = OCP_USER_SDMA,
2219};
2220
2221/* mcbsp1 slave ports */
2222static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2223 &omap44xx_l4_abe__mcbsp1,
2224 &omap44xx_l4_abe__mcbsp1_dma,
2225};
2226
2227static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2228 .name = "mcbsp1",
2229 .class = &omap44xx_mcbsp_hwmod_class,
2230 .mpu_irqs = omap44xx_mcbsp1_irqs,
2231 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs),
2232 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
2233 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs),
2234 .main_clk = "mcbsp1_fck",
2235 .prcm = {
2236 .omap4 = {
2237 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
2238 },
2239 },
2240 .slaves = omap44xx_mcbsp1_slaves,
2241 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
2242 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2243};
2244
2245/* mcbsp2 */
2246static struct omap_hwmod omap44xx_mcbsp2_hwmod;
2247static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
2248 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
2249};
2250
2251static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
2252 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
2253 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
2254};
2255
2256static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
2257 {
2258 .pa_start = 0x40124000,
2259 .pa_end = 0x401240ff,
2260 .flags = ADDR_TYPE_RT
2261 },
2262};
2263
2264/* l4_abe -> mcbsp2 */
2265static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
2266 .master = &omap44xx_l4_abe_hwmod,
2267 .slave = &omap44xx_mcbsp2_hwmod,
2268 .clk = "ocp_abe_iclk",
2269 .addr = omap44xx_mcbsp2_addrs,
2270 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs),
2271 .user = OCP_USER_MPU,
2272};
2273
2274static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
2275 {
2276 .pa_start = 0x49024000,
2277 .pa_end = 0x490240ff,
2278 .flags = ADDR_TYPE_RT
2279 },
2280};
2281
2282/* l4_abe -> mcbsp2 (dma) */
2283static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
2284 .master = &omap44xx_l4_abe_hwmod,
2285 .slave = &omap44xx_mcbsp2_hwmod,
2286 .clk = "ocp_abe_iclk",
2287 .addr = omap44xx_mcbsp2_dma_addrs,
2288 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs),
2289 .user = OCP_USER_SDMA,
2290};
2291
2292/* mcbsp2 slave ports */
2293static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
2294 &omap44xx_l4_abe__mcbsp2,
2295 &omap44xx_l4_abe__mcbsp2_dma,
2296};
2297
2298static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2299 .name = "mcbsp2",
2300 .class = &omap44xx_mcbsp_hwmod_class,
2301 .mpu_irqs = omap44xx_mcbsp2_irqs,
2302 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs),
2303 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
2304 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs),
2305 .main_clk = "mcbsp2_fck",
2306 .prcm = {
2307 .omap4 = {
2308 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
2309 },
2310 },
2311 .slaves = omap44xx_mcbsp2_slaves,
2312 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
2313 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2314};
2315
2316/* mcbsp3 */
2317static struct omap_hwmod omap44xx_mcbsp3_hwmod;
2318static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
2319 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
2320};
2321
2322static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
2323 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
2324 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
2325};
2326
2327static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
2328 {
2329 .pa_start = 0x40126000,
2330 .pa_end = 0x401260ff,
2331 .flags = ADDR_TYPE_RT
2332 },
2333};
2334
2335/* l4_abe -> mcbsp3 */
2336static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
2337 .master = &omap44xx_l4_abe_hwmod,
2338 .slave = &omap44xx_mcbsp3_hwmod,
2339 .clk = "ocp_abe_iclk",
2340 .addr = omap44xx_mcbsp3_addrs,
2341 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs),
2342 .user = OCP_USER_MPU,
2343};
2344
2345static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
2346 {
2347 .pa_start = 0x49026000,
2348 .pa_end = 0x490260ff,
2349 .flags = ADDR_TYPE_RT
2350 },
2351};
2352
2353/* l4_abe -> mcbsp3 (dma) */
2354static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
2355 .master = &omap44xx_l4_abe_hwmod,
2356 .slave = &omap44xx_mcbsp3_hwmod,
2357 .clk = "ocp_abe_iclk",
2358 .addr = omap44xx_mcbsp3_dma_addrs,
2359 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs),
2360 .user = OCP_USER_SDMA,
2361};
2362
2363/* mcbsp3 slave ports */
2364static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
2365 &omap44xx_l4_abe__mcbsp3,
2366 &omap44xx_l4_abe__mcbsp3_dma,
2367};
2368
2369static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
2370 .name = "mcbsp3",
2371 .class = &omap44xx_mcbsp_hwmod_class,
2372 .mpu_irqs = omap44xx_mcbsp3_irqs,
2373 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs),
2374 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
2375 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs),
2376 .main_clk = "mcbsp3_fck",
2377 .prcm = {
2378 .omap4 = {
2379 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
2380 },
2381 },
2382 .slaves = omap44xx_mcbsp3_slaves,
2383 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
2384 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2385};
2386
2387/* mcbsp4 */
2388static struct omap_hwmod omap44xx_mcbsp4_hwmod;
2389static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
2390 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
2391};
2392
2393static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
2394 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
2395 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
2396};
2397
2398static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
2399 {
2400 .pa_start = 0x48096000,
2401 .pa_end = 0x480960ff,
2402 .flags = ADDR_TYPE_RT
2403 },
2404};
2405
2406/* l4_per -> mcbsp4 */
2407static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
2408 .master = &omap44xx_l4_per_hwmod,
2409 .slave = &omap44xx_mcbsp4_hwmod,
2410 .clk = "l4_div_ck",
2411 .addr = omap44xx_mcbsp4_addrs,
2412 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs),
2413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2414};
2415
2416/* mcbsp4 slave ports */
2417static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
2418 &omap44xx_l4_per__mcbsp4,
2419};
2420
2421static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
2422 .name = "mcbsp4",
2423 .class = &omap44xx_mcbsp_hwmod_class,
2424 .mpu_irqs = omap44xx_mcbsp4_irqs,
2425 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs),
2426 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
2427 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs),
2428 .main_clk = "mcbsp4_fck",
2429 .prcm = {
2430 .omap4 = {
2431 .clkctrl_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2432 },
2433 },
2434 .slaves = omap44xx_mcbsp4_slaves,
2435 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
2436 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2437};
2438
2439/*
2161 * 'mcspi' class 2440 * 'mcspi' class
2162 * multichannel serial port interface (mcspi) / master/slave synchronous serial 2441 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2163 * bus 2442 * bus
@@ -3697,6 +3976,12 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
3697 /* mailbox class */ 3976 /* mailbox class */
3698 &omap44xx_mailbox_hwmod, 3977 &omap44xx_mailbox_hwmod,
3699 3978
3979 /* mcbsp class */
3980 &omap44xx_mcbsp1_hwmod,
3981 &omap44xx_mcbsp2_hwmod,
3982 &omap44xx_mcbsp3_hwmod,
3983 &omap44xx_mcbsp4_hwmod,
3984
3700 /* mcspi class */ 3985 /* mcspi class */
3701 &omap44xx_mcspi1_hwmod, 3986 &omap44xx_mcspi1_hwmod,
3702 &omap44xx_mcspi2_hwmod, 3987 &omap44xx_mcspi2_hwmod,