Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 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 | |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 21 | #include "omap_hwmod_common_data.h" |
| 22 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 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_l3_hwmod; |
| 36 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
| 37 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
| 38 | |
| 39 | /* L3 -> L4_CORE interface */ |
| 40 | static struct omap_hwmod_ocp_if omap3xxx_l3__l4_core = { |
| 41 | .master = &omap3xxx_l3_hwmod, |
| 42 | .slave = &omap3xxx_l4_core_hwmod, |
| 43 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 44 | }; |
| 45 | |
| 46 | /* L3 -> L4_PER interface */ |
| 47 | static struct omap_hwmod_ocp_if omap3xxx_l3__l4_per = { |
| 48 | .master = &omap3xxx_l3_hwmod, |
| 49 | .slave = &omap3xxx_l4_per_hwmod, |
| 50 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 51 | }; |
| 52 | |
| 53 | /* MPU -> L3 interface */ |
| 54 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3 = { |
| 55 | .master = &omap3xxx_mpu_hwmod, |
| 56 | .slave = &omap3xxx_l3_hwmod, |
| 57 | .user = OCP_USER_MPU, |
| 58 | }; |
| 59 | |
| 60 | /* Slave interfaces on the L3 interconnect */ |
| 61 | static struct omap_hwmod_ocp_if *omap3xxx_l3_slaves[] = { |
| 62 | &omap3xxx_mpu__l3, |
| 63 | }; |
| 64 | |
| 65 | /* Master interfaces on the L3 interconnect */ |
| 66 | static struct omap_hwmod_ocp_if *omap3xxx_l3_masters[] = { |
| 67 | &omap3xxx_l3__l4_core, |
| 68 | &omap3xxx_l3__l4_per, |
| 69 | }; |
| 70 | |
| 71 | /* L3 */ |
| 72 | static struct omap_hwmod omap3xxx_l3_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame^] | 73 | .name = "l3_main", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 74 | .class = &l3_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 75 | .masters = omap3xxx_l3_masters, |
| 76 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_masters), |
| 77 | .slaves = omap3xxx_l3_slaves, |
| 78 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 79 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 80 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 81 | }; |
| 82 | |
| 83 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; |
| 84 | |
| 85 | /* L4_CORE -> L4_WKUP interface */ |
| 86 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
| 87 | .master = &omap3xxx_l4_core_hwmod, |
| 88 | .slave = &omap3xxx_l4_wkup_hwmod, |
| 89 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 90 | }; |
| 91 | |
| 92 | /* Slave interfaces on the L4_CORE interconnect */ |
| 93 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { |
| 94 | &omap3xxx_l3__l4_core, |
| 95 | }; |
| 96 | |
| 97 | /* Master interfaces on the L4_CORE interconnect */ |
| 98 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = { |
| 99 | &omap3xxx_l4_core__l4_wkup, |
| 100 | }; |
| 101 | |
| 102 | /* L4 CORE */ |
| 103 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame^] | 104 | .name = "l4_core", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 105 | .class = &l4_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 106 | .masters = omap3xxx_l4_core_masters, |
| 107 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters), |
| 108 | .slaves = omap3xxx_l4_core_slaves, |
| 109 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 110 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 111 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 112 | }; |
| 113 | |
| 114 | /* Slave interfaces on the L4_PER interconnect */ |
| 115 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = { |
| 116 | &omap3xxx_l3__l4_per, |
| 117 | }; |
| 118 | |
| 119 | /* Master interfaces on the L4_PER interconnect */ |
| 120 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = { |
| 121 | }; |
| 122 | |
| 123 | /* L4 PER */ |
| 124 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame^] | 125 | .name = "l4_per", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 126 | .class = &l4_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 127 | .masters = omap3xxx_l4_per_masters, |
| 128 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters), |
| 129 | .slaves = omap3xxx_l4_per_slaves, |
| 130 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 131 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 132 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 133 | }; |
| 134 | |
| 135 | /* Slave interfaces on the L4_WKUP interconnect */ |
| 136 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = { |
| 137 | &omap3xxx_l4_core__l4_wkup, |
| 138 | }; |
| 139 | |
| 140 | /* Master interfaces on the L4_WKUP interconnect */ |
| 141 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = { |
| 142 | }; |
| 143 | |
| 144 | /* L4 WKUP */ |
| 145 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame^] | 146 | .name = "l4_wkup", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 147 | .class = &l4_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 148 | .masters = omap3xxx_l4_wkup_masters, |
| 149 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters), |
| 150 | .slaves = omap3xxx_l4_wkup_slaves, |
| 151 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 152 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 153 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 154 | }; |
| 155 | |
| 156 | /* Master interfaces on the MPU device */ |
| 157 | static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = { |
| 158 | &omap3xxx_mpu__l3, |
| 159 | }; |
| 160 | |
| 161 | /* MPU */ |
| 162 | static struct omap_hwmod omap3xxx_mpu_hwmod = { |
Benoit Cousson | 5c2c029 | 2010-05-20 12:31:10 -0600 | [diff] [blame] | 163 | .name = "mpu", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 164 | .class = &mpu_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 165 | .main_clk = "arm_fck", |
| 166 | .masters = omap3xxx_mpu_masters, |
| 167 | .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters), |
| 168 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 169 | }; |
| 170 | |
| 171 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
| 172 | &omap3xxx_l3_hwmod, |
| 173 | &omap3xxx_l4_core_hwmod, |
| 174 | &omap3xxx_l4_per_hwmod, |
| 175 | &omap3xxx_l4_wkup_hwmod, |
| 176 | &omap3xxx_mpu_hwmod, |
| 177 | NULL, |
| 178 | }; |
| 179 | |
| 180 | int __init omap3xxx_hwmod_init(void) |
| 181 | { |
| 182 | return omap_hwmod_init(omap3xxx_hwmods); |
| 183 | } |
| 184 | |
| 185 | |