aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_2430_data.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-02-23 00:09:32 -0500
committerPaul Walmsley <paul@pwsan.com>2010-02-24 14:29:45 -0500
commit7359154e94623f6a5a68a77b9fcfbef40633c93f (patch)
treecf76ba61a911c693c5e7f8b50c7a523e7c531788 /arch/arm/mach-omap2/omap_hwmod_2430_data.c
parent50ebdac2ec9fb2de9c271cb2e0e13aae3b454166 (diff)
OMAP hwmod: convert header files with static allocations into C files
Code should be able to #include any header file without the fear that the header file will go allocating memory. This is a coding style issue, similar to commit 82e9bd588563c4e22ebb55b684ebec7e310cc715. Move the existing hwmod data from .h files to .c files. While here, convert "omap34xx" to "omap3xxx" in the hwmod files, since most of these structures should be reusable across all OMAP3 chips. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_2430_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c145
1 files changed, 145 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
new file mode 100644
index 00000000000..ed2de7936c1
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -0,0 +1,145 @@
1/*
2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 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 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
13 */
14#include <plat/omap_hwmod.h>
15#include <mach/irqs.h>
16#include <plat/cpu.h>
17#include <plat/dma.h>
18
19#include "prm-regbits-24xx.h"
20
21/*
22 * OMAP2430 hardware module integration data
23 *
24 * ALl of the data in this section should be autogeneratable from the
25 * TI hardware database or other technical documentation. Data that
26 * is driver-specific or driver-kernel integration-specific belongs
27 * elsewhere.
28 */
29
30static struct omap_hwmod omap2430_mpu_hwmod;
31static struct omap_hwmod omap2430_l3_hwmod;
32static struct omap_hwmod omap2430_l4_core_hwmod;
33
34/* L3 -> L4_CORE interface */
35static struct omap_hwmod_ocp_if omap2430_l3__l4_core = {
36 .master = &omap2430_l3_hwmod,
37 .slave = &omap2430_l4_core_hwmod,
38 .user = OCP_USER_MPU | OCP_USER_SDMA,
39};
40
41/* MPU -> L3 interface */
42static struct omap_hwmod_ocp_if omap2430_mpu__l3 = {
43 .master = &omap2430_mpu_hwmod,
44 .slave = &omap2430_l3_hwmod,
45 .user = OCP_USER_MPU,
46};
47
48/* Slave interfaces on the L3 interconnect */
49static struct omap_hwmod_ocp_if *omap2430_l3_slaves[] = {
50 &omap2430_mpu__l3,
51};
52
53/* Master interfaces on the L3 interconnect */
54static struct omap_hwmod_ocp_if *omap2430_l3_masters[] = {
55 &omap2430_l3__l4_core,
56};
57
58/* L3 */
59static struct omap_hwmod omap2430_l3_hwmod = {
60 .name = "l3_hwmod",
61 .masters = omap2430_l3_masters,
62 .masters_cnt = ARRAY_SIZE(omap2430_l3_masters),
63 .slaves = omap2430_l3_slaves,
64 .slaves_cnt = ARRAY_SIZE(omap2430_l3_slaves),
65 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
66};
67
68static struct omap_hwmod omap2430_l4_wkup_hwmod;
69static struct omap_hwmod omap2430_mmc1_hwmod;
70static struct omap_hwmod omap2430_mmc2_hwmod;
71
72/* L4_CORE -> L4_WKUP interface */
73static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
74 .master = &omap2430_l4_core_hwmod,
75 .slave = &omap2430_l4_wkup_hwmod,
76 .user = OCP_USER_MPU | OCP_USER_SDMA,
77};
78
79/* Slave interfaces on the L4_CORE interconnect */
80static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
81 &omap2430_l3__l4_core,
82};
83
84/* Master interfaces on the L4_CORE interconnect */
85static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
86 &omap2430_l4_core__l4_wkup,
87};
88
89/* L4 CORE */
90static struct omap_hwmod omap2430_l4_core_hwmod = {
91 .name = "l4_core_hwmod",
92 .masters = omap2430_l4_core_masters,
93 .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
94 .slaves = omap2430_l4_core_slaves,
95 .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
96 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
97};
98
99/* Slave interfaces on the L4_WKUP interconnect */
100static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
101 &omap2430_l4_core__l4_wkup,
102};
103
104/* Master interfaces on the L4_WKUP interconnect */
105static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
106};
107
108/* L4 WKUP */
109static struct omap_hwmod omap2430_l4_wkup_hwmod = {
110 .name = "l4_wkup_hwmod",
111 .masters = omap2430_l4_wkup_masters,
112 .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
113 .slaves = omap2430_l4_wkup_slaves,
114 .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
115 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
116};
117
118/* Master interfaces on the MPU device */
119static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
120 &omap2430_mpu__l3,
121};
122
123/* MPU */
124static struct omap_hwmod omap2430_mpu_hwmod = {
125 .name = "mpu_hwmod",
126 .main_clk = "mpu_ck",
127 .masters = omap2430_mpu_masters,
128 .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
129 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
130};
131
132static __initdata struct omap_hwmod *omap2430_hwmods[] = {
133 &omap2430_l3_hwmod,
134 &omap2430_l4_core_hwmod,
135 &omap2430_l4_wkup_hwmod,
136 &omap2430_mpu_hwmod,
137 NULL,
138};
139
140int __init omap2430_hwmod_init(void)
141{
142 return omap_hwmod_init(omap2430_hwmods);
143}
144
145