Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 1 | /* |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 3 | * |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 4 | * Copyright (C) 2009-2010 Nokia Corporation |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 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? |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 12 | * XXX these should be marked initdata for multi-OMAP kernels |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 13 | */ |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 14 | #include <plat/omap_hwmod.h> |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 15 | #include <mach/irqs.h> |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 16 | #include <plat/cpu.h> |
| 17 | #include <plat/dma.h> |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 18 | |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 19 | #include "omap_hwmod_common_data.h" |
| 20 | |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 21 | #include "prm-regbits-24xx.h" |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame^] | 22 | #include "cm-regbits-24xx.h" |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 23 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 24 | /* |
| 25 | * OMAP2420 hardware module integration data |
| 26 | * |
| 27 | * ALl of the data in this section should be autogeneratable from the |
| 28 | * TI hardware database or other technical documentation. Data that |
| 29 | * is driver-specific or driver-kernel integration-specific belongs |
| 30 | * elsewhere. |
| 31 | */ |
| 32 | |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 33 | static struct omap_hwmod omap2420_mpu_hwmod; |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 34 | static struct omap_hwmod omap2420_iva_hwmod; |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 35 | static struct omap_hwmod omap2420_l3_main_hwmod; |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 36 | static struct omap_hwmod omap2420_l4_core_hwmod; |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame^] | 37 | static struct omap_hwmod omap2420_wd_timer2_hwmod; |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 38 | |
| 39 | /* L3 -> L4_CORE interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 40 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { |
| 41 | .master = &omap2420_l3_main_hwmod, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 42 | .slave = &omap2420_l4_core_hwmod, |
| 43 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 44 | }; |
| 45 | |
| 46 | /* MPU -> L3 interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 47 | static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = { |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 48 | .master = &omap2420_mpu_hwmod, |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 49 | .slave = &omap2420_l3_main_hwmod, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 50 | .user = OCP_USER_MPU, |
| 51 | }; |
| 52 | |
| 53 | /* Slave interfaces on the L3 interconnect */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 54 | static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { |
| 55 | &omap2420_mpu__l3_main, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | /* Master interfaces on the L3 interconnect */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 59 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { |
| 60 | &omap2420_l3_main__l4_core, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | /* L3 */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 64 | static struct omap_hwmod omap2420_l3_main_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 65 | .name = "l3_main", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 66 | .class = &l3_hwmod_class, |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 67 | .masters = omap2420_l3_main_masters, |
| 68 | .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters), |
| 69 | .slaves = omap2420_l3_main_slaves, |
| 70 | .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 71 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 72 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | static struct omap_hwmod omap2420_l4_wkup_hwmod; |
| 76 | |
| 77 | /* L4_CORE -> L4_WKUP interface */ |
| 78 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
| 79 | .master = &omap2420_l4_core_hwmod, |
| 80 | .slave = &omap2420_l4_wkup_hwmod, |
| 81 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 82 | }; |
| 83 | |
| 84 | /* Slave interfaces on the L4_CORE interconnect */ |
| 85 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 86 | &omap2420_l3_main__l4_core, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | /* Master interfaces on the L4_CORE interconnect */ |
| 90 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { |
| 91 | &omap2420_l4_core__l4_wkup, |
| 92 | }; |
| 93 | |
| 94 | /* L4 CORE */ |
| 95 | static struct omap_hwmod omap2420_l4_core_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 96 | .name = "l4_core", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 97 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 98 | .masters = omap2420_l4_core_masters, |
| 99 | .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters), |
| 100 | .slaves = omap2420_l4_core_slaves, |
| 101 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 102 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 103 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 104 | }; |
| 105 | |
| 106 | /* Slave interfaces on the L4_WKUP interconnect */ |
| 107 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = { |
| 108 | &omap2420_l4_core__l4_wkup, |
| 109 | }; |
| 110 | |
| 111 | /* Master interfaces on the L4_WKUP interconnect */ |
| 112 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = { |
| 113 | }; |
| 114 | |
| 115 | /* L4 WKUP */ |
| 116 | static struct omap_hwmod omap2420_l4_wkup_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 117 | .name = "l4_wkup", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 118 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 119 | .masters = omap2420_l4_wkup_masters, |
| 120 | .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters), |
| 121 | .slaves = omap2420_l4_wkup_slaves, |
| 122 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 123 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 124 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 125 | }; |
| 126 | |
| 127 | /* Master interfaces on the MPU device */ |
| 128 | static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = { |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 129 | &omap2420_mpu__l3_main, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 130 | }; |
| 131 | |
| 132 | /* MPU */ |
| 133 | static struct omap_hwmod omap2420_mpu_hwmod = { |
Benoit Cousson | 5c2c029 | 2010-05-20 12:31:10 -0600 | [diff] [blame] | 134 | .name = "mpu", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 135 | .class = &mpu_hwmod_class, |
Paul Walmsley | 50ebdac | 2010-02-22 22:09:31 -0700 | [diff] [blame] | 136 | .main_clk = "mpu_ck", |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 137 | .masters = omap2420_mpu_masters, |
| 138 | .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters), |
| 139 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 140 | }; |
| 141 | |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 142 | /* |
| 143 | * IVA1 interface data |
| 144 | */ |
| 145 | |
| 146 | /* IVA <- L3 interface */ |
| 147 | static struct omap_hwmod_ocp_if omap2420_l3__iva = { |
| 148 | .master = &omap2420_l3_main_hwmod, |
| 149 | .slave = &omap2420_iva_hwmod, |
| 150 | .clk = "iva1_ifck", |
| 151 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 152 | }; |
| 153 | |
| 154 | static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = { |
| 155 | &omap2420_l3__iva, |
| 156 | }; |
| 157 | |
| 158 | /* |
| 159 | * IVA2 (IVA2) |
| 160 | */ |
| 161 | |
| 162 | static struct omap_hwmod omap2420_iva_hwmod = { |
| 163 | .name = "iva", |
| 164 | .class = &iva_hwmod_class, |
| 165 | .masters = omap2420_iva_masters, |
| 166 | .masters_cnt = ARRAY_SIZE(omap2420_iva_masters), |
| 167 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
| 168 | }; |
| 169 | |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame^] | 170 | /* l4_wkup -> wd_timer2 */ |
| 171 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { |
| 172 | { |
| 173 | .pa_start = 0x48022000, |
| 174 | .pa_end = 0x4802207f, |
| 175 | .flags = ADDR_TYPE_RT |
| 176 | }, |
| 177 | }; |
| 178 | |
| 179 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { |
| 180 | .master = &omap2420_l4_wkup_hwmod, |
| 181 | .slave = &omap2420_wd_timer2_hwmod, |
| 182 | .clk = "mpu_wdt_ick", |
| 183 | .addr = omap2420_wd_timer2_addrs, |
| 184 | .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs), |
| 185 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 186 | }; |
| 187 | |
| 188 | /* |
| 189 | * 'wd_timer' class |
| 190 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
| 191 | * overflow condition |
| 192 | */ |
| 193 | |
| 194 | static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = { |
| 195 | .rev_offs = 0x0000, |
| 196 | .sysc_offs = 0x0010, |
| 197 | .syss_offs = 0x0014, |
| 198 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | |
| 199 | SYSC_HAS_AUTOIDLE), |
| 200 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 201 | }; |
| 202 | |
| 203 | static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = { |
| 204 | .name = "wd_timer", |
| 205 | .sysc = &omap2420_wd_timer_sysc, |
| 206 | }; |
| 207 | |
| 208 | /* wd_timer2 */ |
| 209 | static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { |
| 210 | &omap2420_l4_wkup__wd_timer2, |
| 211 | }; |
| 212 | |
| 213 | static struct omap_hwmod omap2420_wd_timer2_hwmod = { |
| 214 | .name = "wd_timer2", |
| 215 | .class = &omap2420_wd_timer_hwmod_class, |
| 216 | .main_clk = "mpu_wdt_fck", |
| 217 | .prcm = { |
| 218 | .omap2 = { |
| 219 | .prcm_reg_id = 1, |
| 220 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 221 | .module_offs = WKUP_MOD, |
| 222 | .idlest_reg_id = 1, |
| 223 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, |
| 224 | }, |
| 225 | }, |
| 226 | .slaves = omap2420_wd_timer2_slaves, |
| 227 | .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves), |
| 228 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 229 | }; |
| 230 | |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 231 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 232 | &omap2420_l3_main_hwmod, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 233 | &omap2420_l4_core_hwmod, |
| 234 | &omap2420_l4_wkup_hwmod, |
| 235 | &omap2420_mpu_hwmod, |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 236 | &omap2420_iva_hwmod, |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame^] | 237 | &omap2420_wd_timer2_hwmod, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 238 | NULL, |
| 239 | }; |
| 240 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 241 | int __init omap2420_hwmod_init(void) |
| 242 | { |
| 243 | return omap_hwmod_init(omap2420_hwmods); |
| 244 | } |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 245 | |
| 246 | |