blob: 3cc768e8bc04f41a38ae335f941eb5577009037a [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;
Paul Walmsley08072ac2010-07-26 16:34:33 -060033static struct omap_hwmod omap2420_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060034static struct omap_hwmod omap2420_l3_main_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030035static struct omap_hwmod omap2420_l4_core_hwmod;
36
37/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060038static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
39 .master = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030040 .slave = &omap2420_l4_core_hwmod,
41 .user = OCP_USER_MPU | OCP_USER_SDMA,
42};
43
44/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060045static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
Paul Walmsley02bfc032009-09-03 20:14:05 +030046 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060047 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030048 .user = OCP_USER_MPU,
49};
50
51/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060052static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
53 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +030054};
55
56/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060057static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
58 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030059};
60
61/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060062static struct omap_hwmod omap2420_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060063 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -070064 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060065 .masters = omap2420_l3_main_masters,
66 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
67 .slaves = omap2420_l3_main_slaves,
68 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -060069 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
70 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +030071};
72
73static struct omap_hwmod omap2420_l4_wkup_hwmod;
74
75/* L4_CORE -> L4_WKUP interface */
76static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
77 .master = &omap2420_l4_core_hwmod,
78 .slave = &omap2420_l4_wkup_hwmod,
79 .user = OCP_USER_MPU | OCP_USER_SDMA,
80};
81
82/* Slave interfaces on the L4_CORE interconnect */
83static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -060084 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030085};
86
87/* Master interfaces on the L4_CORE interconnect */
88static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
89 &omap2420_l4_core__l4_wkup,
90};
91
92/* L4 CORE */
93static struct omap_hwmod omap2420_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060094 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -070095 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +030096 .masters = omap2420_l4_core_masters,
97 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
98 .slaves = omap2420_l4_core_slaves,
99 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600100 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
101 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300102};
103
104/* Slave interfaces on the L4_WKUP interconnect */
105static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
106 &omap2420_l4_core__l4_wkup,
107};
108
109/* Master interfaces on the L4_WKUP interconnect */
110static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
111};
112
113/* L4 WKUP */
114static struct omap_hwmod omap2420_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600115 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700116 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300117 .masters = omap2420_l4_wkup_masters,
118 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
119 .slaves = omap2420_l4_wkup_slaves,
120 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600121 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
122 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300123};
124
125/* Master interfaces on the MPU device */
126static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600127 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300128};
129
130/* MPU */
131static struct omap_hwmod omap2420_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600132 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700133 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700134 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300135 .masters = omap2420_mpu_masters,
136 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
137 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
138};
139
Paul Walmsley08072ac2010-07-26 16:34:33 -0600140/*
141 * IVA1 interface data
142 */
143
144/* IVA <- L3 interface */
145static struct omap_hwmod_ocp_if omap2420_l3__iva = {
146 .master = &omap2420_l3_main_hwmod,
147 .slave = &omap2420_iva_hwmod,
148 .clk = "iva1_ifck",
149 .user = OCP_USER_MPU | OCP_USER_SDMA,
150};
151
152static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
153 &omap2420_l3__iva,
154};
155
156/*
157 * IVA2 (IVA2)
158 */
159
160static struct omap_hwmod omap2420_iva_hwmod = {
161 .name = "iva",
162 .class = &iva_hwmod_class,
163 .masters = omap2420_iva_masters,
164 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
165 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
166};
167
Paul Walmsley02bfc032009-09-03 20:14:05 +0300168static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600169 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300170 &omap2420_l4_core_hwmod,
171 &omap2420_l4_wkup_hwmod,
172 &omap2420_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -0600173 &omap2420_iva_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300174 NULL,
175};
176
Paul Walmsley73591542010-02-22 22:09:32 -0700177int __init omap2420_hwmod_init(void)
178{
179 return omap_hwmod_init(omap2420_hwmods);
180}
Paul Walmsley02bfc032009-09-03 20:14:05 +0300181
182