blob: 8c90b27db2e74671f931f7beaf1c03d047ff0b7e [file] [log] [blame]
Paul Walmsley02bfc032009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
Paul Walmsley02bfc032009-09-03 20:14:05 +03003 *
Paul Walmsley73591542010-02-22 22:09:32 -07004 * Copyright (C) 2009-2010 Nokia Corporation
Paul Walmsley02bfc032009-09-03 20:14:05 +03005 * 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 * XXX handle crossbar/shared link difference for L3?
Paul Walmsley73591542010-02-22 22:09:32 -070012 * XXX these should be marked initdata for multi-OMAP kernels
Paul Walmsley02bfc032009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030015#include <mach/irqs.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070016#include <plat/cpu.h>
17#include <plat/dma.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030018
Paul Walmsley43b40992010-02-22 22:09:34 -070019#include "omap_hwmod_common_data.h"
20
Paul Walmsley02bfc032009-09-03 20:14:05 +030021#include "prm-regbits-24xx.h"
22
Paul Walmsley73591542010-02-22 22:09:32 -070023/*
24 * OMAP2420 hardware module integration data
25 *
26 * ALl of the data in this section should be autogeneratable from the
27 * TI hardware database or other technical documentation. Data that
28 * is driver-specific or driver-kernel integration-specific belongs
29 * elsewhere.
30 */
31
Paul Walmsley02bfc032009-09-03 20:14:05 +030032static struct omap_hwmod omap2420_mpu_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060033static struct omap_hwmod omap2420_l3_main_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030034static struct omap_hwmod omap2420_l4_core_hwmod;
35
36/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060037static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
38 .master = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030039 .slave = &omap2420_l4_core_hwmod,
40 .user = OCP_USER_MPU | OCP_USER_SDMA,
41};
42
43/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060044static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
Paul Walmsley02bfc032009-09-03 20:14:05 +030045 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060046 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030047 .user = OCP_USER_MPU,
48};
49
50/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060051static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
52 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +030053};
54
55/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060056static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
57 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030058};
59
60/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060061static struct omap_hwmod omap2420_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060062 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -070063 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060064 .masters = omap2420_l3_main_masters,
65 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
66 .slaves = omap2420_l3_main_slaves,
67 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -060068 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
69 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +030070};
71
72static struct omap_hwmod omap2420_l4_wkup_hwmod;
73
74/* L4_CORE -> L4_WKUP interface */
75static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
76 .master = &omap2420_l4_core_hwmod,
77 .slave = &omap2420_l4_wkup_hwmod,
78 .user = OCP_USER_MPU | OCP_USER_SDMA,
79};
80
81/* Slave interfaces on the L4_CORE interconnect */
82static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -060083 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030084};
85
86/* Master interfaces on the L4_CORE interconnect */
87static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
88 &omap2420_l4_core__l4_wkup,
89};
90
91/* L4 CORE */
92static struct omap_hwmod omap2420_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060093 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -070094 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +030095 .masters = omap2420_l4_core_masters,
96 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
97 .slaves = omap2420_l4_core_slaves,
98 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -060099 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
100 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300101};
102
103/* Slave interfaces on the L4_WKUP interconnect */
104static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
105 &omap2420_l4_core__l4_wkup,
106};
107
108/* Master interfaces on the L4_WKUP interconnect */
109static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
110};
111
112/* L4 WKUP */
113static struct omap_hwmod omap2420_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600114 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700115 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300116 .masters = omap2420_l4_wkup_masters,
117 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
118 .slaves = omap2420_l4_wkup_slaves,
119 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
121 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300122};
123
124/* Master interfaces on the MPU device */
125static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600126 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300127};
128
129/* MPU */
130static struct omap_hwmod omap2420_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600131 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700132 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700133 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300134 .masters = omap2420_mpu_masters,
135 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
136 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
137};
138
139static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600140 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300141 &omap2420_l4_core_hwmod,
142 &omap2420_l4_wkup_hwmod,
143 &omap2420_mpu_hwmod,
144 NULL,
145};
146
Paul Walmsley73591542010-02-22 22:09:32 -0700147int __init omap2420_hwmod_init(void)
148{
149 return omap_hwmod_init(omap2420_hwmods);
150}
Paul Walmsley02bfc032009-09-03 20:14:05 +0300151
152