Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Hardware modules present on the OMAP44xx chips |
| 3 | * |
| 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2009-2010 Nokia Corporation |
| 6 | * |
| 7 | * Paul Walmsley |
| 8 | * Benoit Cousson |
| 9 | * |
| 10 | * This file is automatically generated from the OMAP hardware databases. |
| 11 | * We respectfully ask that any modifications to this file be coordinated |
| 12 | * with the public linux-omap@vger.kernel.org mailing list and the |
| 13 | * authors above to ensure that the autogeneration scripts are kept |
| 14 | * up-to-date with the file contents. |
| 15 | * |
| 16 | * This program is free software; you can redistribute it and/or modify |
| 17 | * it under the terms of the GNU General Public License version 2 as |
| 18 | * published by the Free Software Foundation. |
| 19 | */ |
| 20 | |
| 21 | #include <linux/io.h> |
| 22 | |
| 23 | #include <plat/omap_hwmod.h> |
| 24 | #include <plat/cpu.h> |
Benoit Cousson | 9780a9c | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 25 | #include <plat/gpio.h> |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 26 | #include <plat/dma.h> |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 27 | |
| 28 | #include "omap_hwmod_common_data.h" |
| 29 | |
| 30 | #include "cm.h" |
| 31 | #include "prm-regbits-44xx.h" |
| 32 | |
| 33 | /* Base offset for all OMAP4 interrupts external to MPUSS */ |
| 34 | #define OMAP44XX_IRQ_GIC_START 32 |
| 35 | |
| 36 | /* Base offset for all OMAP4 dma requests */ |
| 37 | #define OMAP44XX_DMA_REQ_START 1 |
| 38 | |
| 39 | /* Backward references (IPs with Bus Master capability) */ |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 40 | static struct omap_hwmod omap44xx_dma_system_hwmod; |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 41 | static struct omap_hwmod omap44xx_dmm_hwmod; |
| 42 | static struct omap_hwmod omap44xx_emif_fw_hwmod; |
| 43 | static struct omap_hwmod omap44xx_l3_instr_hwmod; |
| 44 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; |
| 45 | static struct omap_hwmod omap44xx_l3_main_2_hwmod; |
| 46 | static struct omap_hwmod omap44xx_l3_main_3_hwmod; |
| 47 | static struct omap_hwmod omap44xx_l4_abe_hwmod; |
| 48 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; |
| 49 | static struct omap_hwmod omap44xx_l4_per_hwmod; |
| 50 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; |
| 51 | static struct omap_hwmod omap44xx_mpu_hwmod; |
| 52 | static struct omap_hwmod omap44xx_mpu_private_hwmod; |
| 53 | |
| 54 | /* |
| 55 | * Interconnects omap_hwmod structures |
| 56 | * hwmods that compose the global OMAP interconnect |
| 57 | */ |
| 58 | |
| 59 | /* |
| 60 | * 'dmm' class |
| 61 | * instance(s): dmm |
| 62 | */ |
| 63 | static struct omap_hwmod_class omap44xx_dmm_hwmod_class = { |
| 64 | .name = "dmm", |
| 65 | }; |
| 66 | |
| 67 | /* dmm interface data */ |
| 68 | /* l3_main_1 -> dmm */ |
| 69 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { |
| 70 | .master = &omap44xx_l3_main_1_hwmod, |
| 71 | .slave = &omap44xx_dmm_hwmod, |
| 72 | .clk = "l3_div_ck", |
| 73 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 74 | }; |
| 75 | |
| 76 | /* mpu -> dmm */ |
| 77 | static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { |
| 78 | .master = &omap44xx_mpu_hwmod, |
| 79 | .slave = &omap44xx_dmm_hwmod, |
| 80 | .clk = "l3_div_ck", |
| 81 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 82 | }; |
| 83 | |
| 84 | /* dmm slave ports */ |
| 85 | static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = { |
| 86 | &omap44xx_l3_main_1__dmm, |
| 87 | &omap44xx_mpu__dmm, |
| 88 | }; |
| 89 | |
| 90 | static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = { |
| 91 | { .irq = 113 + OMAP44XX_IRQ_GIC_START }, |
| 92 | }; |
| 93 | |
| 94 | static struct omap_hwmod omap44xx_dmm_hwmod = { |
| 95 | .name = "dmm", |
| 96 | .class = &omap44xx_dmm_hwmod_class, |
| 97 | .slaves = omap44xx_dmm_slaves, |
| 98 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), |
| 99 | .mpu_irqs = omap44xx_dmm_irqs, |
| 100 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs), |
| 101 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 102 | }; |
| 103 | |
| 104 | /* |
| 105 | * 'emif_fw' class |
| 106 | * instance(s): emif_fw |
| 107 | */ |
| 108 | static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = { |
| 109 | .name = "emif_fw", |
| 110 | }; |
| 111 | |
| 112 | /* emif_fw interface data */ |
| 113 | /* dmm -> emif_fw */ |
| 114 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { |
| 115 | .master = &omap44xx_dmm_hwmod, |
| 116 | .slave = &omap44xx_emif_fw_hwmod, |
| 117 | .clk = "l3_div_ck", |
| 118 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 119 | }; |
| 120 | |
| 121 | /* l4_cfg -> emif_fw */ |
| 122 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = { |
| 123 | .master = &omap44xx_l4_cfg_hwmod, |
| 124 | .slave = &omap44xx_emif_fw_hwmod, |
| 125 | .clk = "l4_div_ck", |
| 126 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 127 | }; |
| 128 | |
| 129 | /* emif_fw slave ports */ |
| 130 | static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = { |
| 131 | &omap44xx_dmm__emif_fw, |
| 132 | &omap44xx_l4_cfg__emif_fw, |
| 133 | }; |
| 134 | |
| 135 | static struct omap_hwmod omap44xx_emif_fw_hwmod = { |
| 136 | .name = "emif_fw", |
| 137 | .class = &omap44xx_emif_fw_hwmod_class, |
| 138 | .slaves = omap44xx_emif_fw_slaves, |
| 139 | .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves), |
| 140 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 141 | }; |
| 142 | |
| 143 | /* |
| 144 | * 'l3' class |
| 145 | * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3 |
| 146 | */ |
| 147 | static struct omap_hwmod_class omap44xx_l3_hwmod_class = { |
| 148 | .name = "l3", |
| 149 | }; |
| 150 | |
| 151 | /* l3_instr interface data */ |
| 152 | /* l3_main_3 -> l3_instr */ |
| 153 | static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = { |
| 154 | .master = &omap44xx_l3_main_3_hwmod, |
| 155 | .slave = &omap44xx_l3_instr_hwmod, |
| 156 | .clk = "l3_div_ck", |
| 157 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 158 | }; |
| 159 | |
| 160 | /* l3_instr slave ports */ |
| 161 | static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = { |
| 162 | &omap44xx_l3_main_3__l3_instr, |
| 163 | }; |
| 164 | |
| 165 | static struct omap_hwmod omap44xx_l3_instr_hwmod = { |
| 166 | .name = "l3_instr", |
| 167 | .class = &omap44xx_l3_hwmod_class, |
| 168 | .slaves = omap44xx_l3_instr_slaves, |
| 169 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves), |
| 170 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 171 | }; |
| 172 | |
| 173 | /* l3_main_2 -> l3_main_1 */ |
| 174 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { |
| 175 | .master = &omap44xx_l3_main_2_hwmod, |
| 176 | .slave = &omap44xx_l3_main_1_hwmod, |
| 177 | .clk = "l3_div_ck", |
| 178 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 179 | }; |
| 180 | |
| 181 | /* l4_cfg -> l3_main_1 */ |
| 182 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { |
| 183 | .master = &omap44xx_l4_cfg_hwmod, |
| 184 | .slave = &omap44xx_l3_main_1_hwmod, |
| 185 | .clk = "l4_div_ck", |
| 186 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 187 | }; |
| 188 | |
| 189 | /* mpu -> l3_main_1 */ |
| 190 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { |
| 191 | .master = &omap44xx_mpu_hwmod, |
| 192 | .slave = &omap44xx_l3_main_1_hwmod, |
| 193 | .clk = "l3_div_ck", |
| 194 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 195 | }; |
| 196 | |
| 197 | /* l3_main_1 slave ports */ |
| 198 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { |
| 199 | &omap44xx_l3_main_2__l3_main_1, |
| 200 | &omap44xx_l4_cfg__l3_main_1, |
| 201 | &omap44xx_mpu__l3_main_1, |
| 202 | }; |
| 203 | |
| 204 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { |
| 205 | .name = "l3_main_1", |
| 206 | .class = &omap44xx_l3_hwmod_class, |
| 207 | .slaves = omap44xx_l3_main_1_slaves, |
| 208 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), |
| 209 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 210 | }; |
| 211 | |
| 212 | /* l3_main_2 interface data */ |
| 213 | /* l3_main_1 -> l3_main_2 */ |
| 214 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { |
| 215 | .master = &omap44xx_l3_main_1_hwmod, |
| 216 | .slave = &omap44xx_l3_main_2_hwmod, |
| 217 | .clk = "l3_div_ck", |
| 218 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 219 | }; |
| 220 | |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 221 | /* dma_system -> l3_main_2 */ |
| 222 | static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { |
| 223 | .master = &omap44xx_dma_system_hwmod, |
| 224 | .slave = &omap44xx_l3_main_2_hwmod, |
| 225 | .clk = "l3_div_ck", |
| 226 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 227 | }; |
| 228 | |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 229 | /* l4_cfg -> l3_main_2 */ |
| 230 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { |
| 231 | .master = &omap44xx_l4_cfg_hwmod, |
| 232 | .slave = &omap44xx_l3_main_2_hwmod, |
| 233 | .clk = "l4_div_ck", |
| 234 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 235 | }; |
| 236 | |
| 237 | /* l3_main_2 slave ports */ |
| 238 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 239 | &omap44xx_dma_system__l3_main_2, |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 240 | &omap44xx_l3_main_1__l3_main_2, |
| 241 | &omap44xx_l4_cfg__l3_main_2, |
| 242 | }; |
| 243 | |
| 244 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { |
| 245 | .name = "l3_main_2", |
| 246 | .class = &omap44xx_l3_hwmod_class, |
| 247 | .slaves = omap44xx_l3_main_2_slaves, |
| 248 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves), |
| 249 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 250 | }; |
| 251 | |
| 252 | /* l3_main_3 interface data */ |
| 253 | /* l3_main_1 -> l3_main_3 */ |
| 254 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { |
| 255 | .master = &omap44xx_l3_main_1_hwmod, |
| 256 | .slave = &omap44xx_l3_main_3_hwmod, |
| 257 | .clk = "l3_div_ck", |
| 258 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 259 | }; |
| 260 | |
| 261 | /* l3_main_2 -> l3_main_3 */ |
| 262 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = { |
| 263 | .master = &omap44xx_l3_main_2_hwmod, |
| 264 | .slave = &omap44xx_l3_main_3_hwmod, |
| 265 | .clk = "l3_div_ck", |
| 266 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 267 | }; |
| 268 | |
| 269 | /* l4_cfg -> l3_main_3 */ |
| 270 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { |
| 271 | .master = &omap44xx_l4_cfg_hwmod, |
| 272 | .slave = &omap44xx_l3_main_3_hwmod, |
| 273 | .clk = "l4_div_ck", |
| 274 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 275 | }; |
| 276 | |
| 277 | /* l3_main_3 slave ports */ |
| 278 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = { |
| 279 | &omap44xx_l3_main_1__l3_main_3, |
| 280 | &omap44xx_l3_main_2__l3_main_3, |
| 281 | &omap44xx_l4_cfg__l3_main_3, |
| 282 | }; |
| 283 | |
| 284 | static struct omap_hwmod omap44xx_l3_main_3_hwmod = { |
| 285 | .name = "l3_main_3", |
| 286 | .class = &omap44xx_l3_hwmod_class, |
| 287 | .slaves = omap44xx_l3_main_3_slaves, |
| 288 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves), |
| 289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 290 | }; |
| 291 | |
| 292 | /* |
| 293 | * 'l4' class |
| 294 | * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup |
| 295 | */ |
| 296 | static struct omap_hwmod_class omap44xx_l4_hwmod_class = { |
| 297 | .name = "l4", |
| 298 | }; |
| 299 | |
| 300 | /* l4_abe interface data */ |
| 301 | /* l3_main_1 -> l4_abe */ |
| 302 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = { |
| 303 | .master = &omap44xx_l3_main_1_hwmod, |
| 304 | .slave = &omap44xx_l4_abe_hwmod, |
| 305 | .clk = "l3_div_ck", |
| 306 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 307 | }; |
| 308 | |
| 309 | /* mpu -> l4_abe */ |
| 310 | static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { |
| 311 | .master = &omap44xx_mpu_hwmod, |
| 312 | .slave = &omap44xx_l4_abe_hwmod, |
| 313 | .clk = "ocp_abe_iclk", |
| 314 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 315 | }; |
| 316 | |
| 317 | /* l4_abe slave ports */ |
| 318 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { |
| 319 | &omap44xx_l3_main_1__l4_abe, |
| 320 | &omap44xx_mpu__l4_abe, |
| 321 | }; |
| 322 | |
| 323 | static struct omap_hwmod omap44xx_l4_abe_hwmod = { |
| 324 | .name = "l4_abe", |
| 325 | .class = &omap44xx_l4_hwmod_class, |
| 326 | .slaves = omap44xx_l4_abe_slaves, |
| 327 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves), |
| 328 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 329 | }; |
| 330 | |
| 331 | /* l4_cfg interface data */ |
| 332 | /* l3_main_1 -> l4_cfg */ |
| 333 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { |
| 334 | .master = &omap44xx_l3_main_1_hwmod, |
| 335 | .slave = &omap44xx_l4_cfg_hwmod, |
| 336 | .clk = "l3_div_ck", |
| 337 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 338 | }; |
| 339 | |
| 340 | /* l4_cfg slave ports */ |
| 341 | static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = { |
| 342 | &omap44xx_l3_main_1__l4_cfg, |
| 343 | }; |
| 344 | |
| 345 | static struct omap_hwmod omap44xx_l4_cfg_hwmod = { |
| 346 | .name = "l4_cfg", |
| 347 | .class = &omap44xx_l4_hwmod_class, |
| 348 | .slaves = omap44xx_l4_cfg_slaves, |
| 349 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves), |
| 350 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 351 | }; |
| 352 | |
| 353 | /* l4_per interface data */ |
| 354 | /* l3_main_2 -> l4_per */ |
| 355 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { |
| 356 | .master = &omap44xx_l3_main_2_hwmod, |
| 357 | .slave = &omap44xx_l4_per_hwmod, |
| 358 | .clk = "l3_div_ck", |
| 359 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 360 | }; |
| 361 | |
| 362 | /* l4_per slave ports */ |
| 363 | static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = { |
| 364 | &omap44xx_l3_main_2__l4_per, |
| 365 | }; |
| 366 | |
| 367 | static struct omap_hwmod omap44xx_l4_per_hwmod = { |
| 368 | .name = "l4_per", |
| 369 | .class = &omap44xx_l4_hwmod_class, |
| 370 | .slaves = omap44xx_l4_per_slaves, |
| 371 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves), |
| 372 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 373 | }; |
| 374 | |
| 375 | /* l4_wkup interface data */ |
| 376 | /* l4_cfg -> l4_wkup */ |
| 377 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { |
| 378 | .master = &omap44xx_l4_cfg_hwmod, |
| 379 | .slave = &omap44xx_l4_wkup_hwmod, |
| 380 | .clk = "l4_div_ck", |
| 381 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 382 | }; |
| 383 | |
| 384 | /* l4_wkup slave ports */ |
| 385 | static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = { |
| 386 | &omap44xx_l4_cfg__l4_wkup, |
| 387 | }; |
| 388 | |
| 389 | static struct omap_hwmod omap44xx_l4_wkup_hwmod = { |
| 390 | .name = "l4_wkup", |
| 391 | .class = &omap44xx_l4_hwmod_class, |
| 392 | .slaves = omap44xx_l4_wkup_slaves, |
| 393 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves), |
| 394 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 395 | }; |
| 396 | |
| 397 | /* |
Benoit Cousson | f776471 | 2010-09-21 19:37:14 +0530 | [diff] [blame] | 398 | * 'i2c' class |
| 399 | * multimaster high-speed i2c controller |
| 400 | */ |
| 401 | |
| 402 | static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = { |
| 403 | .sysc_offs = 0x0010, |
| 404 | .syss_offs = 0x0090, |
| 405 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
| 406 | SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SOFTRESET | |
| 407 | SYSC_HAS_AUTOIDLE), |
| 408 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 409 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 410 | }; |
| 411 | |
| 412 | static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { |
| 413 | .name = "i2c", |
| 414 | .sysc = &omap44xx_i2c_sysc, |
| 415 | }; |
| 416 | |
| 417 | /* i2c1 */ |
| 418 | static struct omap_hwmod omap44xx_i2c1_hwmod; |
| 419 | static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { |
| 420 | { .irq = 56 + OMAP44XX_IRQ_GIC_START }, |
| 421 | }; |
| 422 | |
| 423 | static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = { |
| 424 | { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START }, |
| 425 | { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START }, |
| 426 | }; |
| 427 | |
| 428 | static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { |
| 429 | { |
| 430 | .pa_start = 0x48070000, |
| 431 | .pa_end = 0x480700ff, |
| 432 | .flags = ADDR_TYPE_RT |
| 433 | }, |
| 434 | }; |
| 435 | |
| 436 | /* l4_per -> i2c1 */ |
| 437 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = { |
| 438 | .master = &omap44xx_l4_per_hwmod, |
| 439 | .slave = &omap44xx_i2c1_hwmod, |
| 440 | .clk = "l4_div_ck", |
| 441 | .addr = omap44xx_i2c1_addrs, |
| 442 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs), |
| 443 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 444 | }; |
| 445 | |
| 446 | /* i2c1 slave ports */ |
| 447 | static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = { |
| 448 | &omap44xx_l4_per__i2c1, |
| 449 | }; |
| 450 | |
| 451 | static struct omap_hwmod omap44xx_i2c1_hwmod = { |
| 452 | .name = "i2c1", |
| 453 | .class = &omap44xx_i2c_hwmod_class, |
| 454 | .flags = HWMOD_INIT_NO_RESET, |
| 455 | .mpu_irqs = omap44xx_i2c1_irqs, |
| 456 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs), |
| 457 | .sdma_reqs = omap44xx_i2c1_sdma_reqs, |
| 458 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs), |
| 459 | .main_clk = "i2c1_fck", |
| 460 | .prcm = { |
| 461 | .omap4 = { |
| 462 | .clkctrl_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL, |
| 463 | }, |
| 464 | }, |
| 465 | .slaves = omap44xx_i2c1_slaves, |
| 466 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves), |
| 467 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 468 | }; |
| 469 | |
| 470 | /* i2c2 */ |
| 471 | static struct omap_hwmod omap44xx_i2c2_hwmod; |
| 472 | static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { |
| 473 | { .irq = 57 + OMAP44XX_IRQ_GIC_START }, |
| 474 | }; |
| 475 | |
| 476 | static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = { |
| 477 | { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START }, |
| 478 | { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START }, |
| 479 | }; |
| 480 | |
| 481 | static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { |
| 482 | { |
| 483 | .pa_start = 0x48072000, |
| 484 | .pa_end = 0x480720ff, |
| 485 | .flags = ADDR_TYPE_RT |
| 486 | }, |
| 487 | }; |
| 488 | |
| 489 | /* l4_per -> i2c2 */ |
| 490 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = { |
| 491 | .master = &omap44xx_l4_per_hwmod, |
| 492 | .slave = &omap44xx_i2c2_hwmod, |
| 493 | .clk = "l4_div_ck", |
| 494 | .addr = omap44xx_i2c2_addrs, |
| 495 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs), |
| 496 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 497 | }; |
| 498 | |
| 499 | /* i2c2 slave ports */ |
| 500 | static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = { |
| 501 | &omap44xx_l4_per__i2c2, |
| 502 | }; |
| 503 | |
| 504 | static struct omap_hwmod omap44xx_i2c2_hwmod = { |
| 505 | .name = "i2c2", |
| 506 | .class = &omap44xx_i2c_hwmod_class, |
| 507 | .flags = HWMOD_INIT_NO_RESET, |
| 508 | .mpu_irqs = omap44xx_i2c2_irqs, |
| 509 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs), |
| 510 | .sdma_reqs = omap44xx_i2c2_sdma_reqs, |
| 511 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs), |
| 512 | .main_clk = "i2c2_fck", |
| 513 | .prcm = { |
| 514 | .omap4 = { |
| 515 | .clkctrl_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL, |
| 516 | }, |
| 517 | }, |
| 518 | .slaves = omap44xx_i2c2_slaves, |
| 519 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves), |
| 520 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 521 | }; |
| 522 | |
| 523 | /* i2c3 */ |
| 524 | static struct omap_hwmod omap44xx_i2c3_hwmod; |
| 525 | static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { |
| 526 | { .irq = 61 + OMAP44XX_IRQ_GIC_START }, |
| 527 | }; |
| 528 | |
| 529 | static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = { |
| 530 | { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START }, |
| 531 | { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START }, |
| 532 | }; |
| 533 | |
| 534 | static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { |
| 535 | { |
| 536 | .pa_start = 0x48060000, |
| 537 | .pa_end = 0x480600ff, |
| 538 | .flags = ADDR_TYPE_RT |
| 539 | }, |
| 540 | }; |
| 541 | |
| 542 | /* l4_per -> i2c3 */ |
| 543 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = { |
| 544 | .master = &omap44xx_l4_per_hwmod, |
| 545 | .slave = &omap44xx_i2c3_hwmod, |
| 546 | .clk = "l4_div_ck", |
| 547 | .addr = omap44xx_i2c3_addrs, |
| 548 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs), |
| 549 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 550 | }; |
| 551 | |
| 552 | /* i2c3 slave ports */ |
| 553 | static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = { |
| 554 | &omap44xx_l4_per__i2c3, |
| 555 | }; |
| 556 | |
| 557 | static struct omap_hwmod omap44xx_i2c3_hwmod = { |
| 558 | .name = "i2c3", |
| 559 | .class = &omap44xx_i2c_hwmod_class, |
| 560 | .flags = HWMOD_INIT_NO_RESET, |
| 561 | .mpu_irqs = omap44xx_i2c3_irqs, |
| 562 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs), |
| 563 | .sdma_reqs = omap44xx_i2c3_sdma_reqs, |
| 564 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs), |
| 565 | .main_clk = "i2c3_fck", |
| 566 | .prcm = { |
| 567 | .omap4 = { |
| 568 | .clkctrl_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL, |
| 569 | }, |
| 570 | }, |
| 571 | .slaves = omap44xx_i2c3_slaves, |
| 572 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves), |
| 573 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 574 | }; |
| 575 | |
| 576 | /* i2c4 */ |
| 577 | static struct omap_hwmod omap44xx_i2c4_hwmod; |
| 578 | static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { |
| 579 | { .irq = 62 + OMAP44XX_IRQ_GIC_START }, |
| 580 | }; |
| 581 | |
| 582 | static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = { |
| 583 | { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START }, |
| 584 | { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START }, |
| 585 | }; |
| 586 | |
| 587 | static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { |
| 588 | { |
| 589 | .pa_start = 0x48350000, |
| 590 | .pa_end = 0x483500ff, |
| 591 | .flags = ADDR_TYPE_RT |
| 592 | }, |
| 593 | }; |
| 594 | |
| 595 | /* l4_per -> i2c4 */ |
| 596 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = { |
| 597 | .master = &omap44xx_l4_per_hwmod, |
| 598 | .slave = &omap44xx_i2c4_hwmod, |
| 599 | .clk = "l4_div_ck", |
| 600 | .addr = omap44xx_i2c4_addrs, |
| 601 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs), |
| 602 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 603 | }; |
| 604 | |
| 605 | /* i2c4 slave ports */ |
| 606 | static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = { |
| 607 | &omap44xx_l4_per__i2c4, |
| 608 | }; |
| 609 | |
| 610 | static struct omap_hwmod omap44xx_i2c4_hwmod = { |
| 611 | .name = "i2c4", |
| 612 | .class = &omap44xx_i2c_hwmod_class, |
| 613 | .flags = HWMOD_INIT_NO_RESET, |
| 614 | .mpu_irqs = omap44xx_i2c4_irqs, |
| 615 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs), |
| 616 | .sdma_reqs = omap44xx_i2c4_sdma_reqs, |
| 617 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs), |
| 618 | .main_clk = "i2c4_fck", |
| 619 | .prcm = { |
| 620 | .omap4 = { |
| 621 | .clkctrl_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL, |
| 622 | }, |
| 623 | }, |
| 624 | .slaves = omap44xx_i2c4_slaves, |
| 625 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves), |
| 626 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 627 | }; |
| 628 | |
| 629 | /* |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 630 | * 'mpu_bus' class |
| 631 | * instance(s): mpu_private |
| 632 | */ |
| 633 | static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = { |
| 634 | .name = "mpu_bus", |
| 635 | }; |
| 636 | |
| 637 | /* mpu_private interface data */ |
| 638 | /* mpu -> mpu_private */ |
| 639 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { |
| 640 | .master = &omap44xx_mpu_hwmod, |
| 641 | .slave = &omap44xx_mpu_private_hwmod, |
| 642 | .clk = "l3_div_ck", |
| 643 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 644 | }; |
| 645 | |
| 646 | /* mpu_private slave ports */ |
| 647 | static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = { |
| 648 | &omap44xx_mpu__mpu_private, |
| 649 | }; |
| 650 | |
| 651 | static struct omap_hwmod omap44xx_mpu_private_hwmod = { |
| 652 | .name = "mpu_private", |
| 653 | .class = &omap44xx_mpu_bus_hwmod_class, |
| 654 | .slaves = omap44xx_mpu_private_slaves, |
| 655 | .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves), |
| 656 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 657 | }; |
| 658 | |
| 659 | /* |
| 660 | * 'mpu' class |
| 661 | * mpu sub-system |
| 662 | */ |
| 663 | |
| 664 | static struct omap_hwmod_class omap44xx_mpu_hwmod_class = { |
| 665 | .name = "mpu", |
| 666 | }; |
| 667 | |
| 668 | /* mpu */ |
| 669 | static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { |
| 670 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, |
| 671 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, |
| 672 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, |
| 673 | }; |
| 674 | |
| 675 | /* mpu master ports */ |
| 676 | static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = { |
| 677 | &omap44xx_mpu__l3_main_1, |
| 678 | &omap44xx_mpu__l4_abe, |
| 679 | &omap44xx_mpu__dmm, |
| 680 | }; |
| 681 | |
| 682 | static struct omap_hwmod omap44xx_mpu_hwmod = { |
| 683 | .name = "mpu", |
| 684 | .class = &omap44xx_mpu_hwmod_class, |
| 685 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
| 686 | .mpu_irqs = omap44xx_mpu_irqs, |
| 687 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs), |
| 688 | .main_clk = "dpll_mpu_m2_ck", |
| 689 | .prcm = { |
| 690 | .omap4 = { |
| 691 | .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL, |
| 692 | }, |
| 693 | }, |
| 694 | .masters = omap44xx_mpu_masters, |
| 695 | .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters), |
| 696 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 697 | }; |
| 698 | |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 699 | /* |
| 700 | * 'wd_timer' class |
| 701 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
| 702 | * overflow condition |
| 703 | */ |
| 704 | |
| 705 | static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = { |
| 706 | .rev_offs = 0x0000, |
| 707 | .sysc_offs = 0x0010, |
| 708 | .syss_offs = 0x0014, |
| 709 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | |
| 710 | SYSC_HAS_SOFTRESET), |
| 711 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 712 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 713 | }; |
| 714 | |
Kevin Hilman | 69758ab | 2010-10-01 13:24:10 -0700 | [diff] [blame] | 715 | /* |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 716 | * 'uart' class |
| 717 | * universal asynchronous receiver/transmitter (uart) |
| 718 | */ |
| 719 | |
| 720 | static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = { |
| 721 | .rev_offs = 0x0050, |
| 722 | .sysc_offs = 0x0054, |
| 723 | .syss_offs = 0x0058, |
| 724 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
| 725 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 726 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 727 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 728 | }; |
| 729 | |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 730 | static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { |
| 731 | .name = "wd_timer", |
| 732 | .sysc = &omap44xx_wd_timer_sysc, |
| 733 | }; |
| 734 | |
| 735 | /* wd_timer2 */ |
| 736 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; |
| 737 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { |
| 738 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, |
| 739 | }; |
| 740 | |
| 741 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { |
| 742 | { |
| 743 | .pa_start = 0x4a314000, |
| 744 | .pa_end = 0x4a31407f, |
| 745 | .flags = ADDR_TYPE_RT |
| 746 | }, |
| 747 | }; |
| 748 | |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 749 | static struct omap_hwmod_class omap44xx_uart_hwmod_class = { |
| 750 | .name = "uart", |
| 751 | .sysc = &omap44xx_uart_sysc, |
| 752 | }; |
| 753 | |
| 754 | /* uart1 */ |
| 755 | static struct omap_hwmod omap44xx_uart1_hwmod; |
| 756 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { |
| 757 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, |
| 758 | }; |
| 759 | |
| 760 | static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { |
| 761 | { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START }, |
| 762 | { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START }, |
| 763 | }; |
| 764 | |
| 765 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { |
| 766 | { |
| 767 | .pa_start = 0x4806a000, |
| 768 | .pa_end = 0x4806a0ff, |
| 769 | .flags = ADDR_TYPE_RT |
| 770 | }, |
| 771 | }; |
| 772 | |
| 773 | /* l4_per -> uart1 */ |
| 774 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { |
| 775 | .master = &omap44xx_l4_per_hwmod, |
| 776 | .slave = &omap44xx_uart1_hwmod, |
| 777 | .clk = "l4_div_ck", |
| 778 | .addr = omap44xx_uart1_addrs, |
| 779 | .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs), |
| 780 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 781 | }; |
| 782 | |
| 783 | /* uart1 slave ports */ |
| 784 | static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = { |
| 785 | &omap44xx_l4_per__uart1, |
| 786 | }; |
| 787 | |
| 788 | static struct omap_hwmod omap44xx_uart1_hwmod = { |
| 789 | .name = "uart1", |
| 790 | .class = &omap44xx_uart_hwmod_class, |
| 791 | .mpu_irqs = omap44xx_uart1_irqs, |
| 792 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs), |
| 793 | .sdma_reqs = omap44xx_uart1_sdma_reqs, |
| 794 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs), |
| 795 | .main_clk = "uart1_fck", |
| 796 | .prcm = { |
| 797 | .omap4 = { |
| 798 | .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL, |
| 799 | }, |
| 800 | }, |
| 801 | .slaves = omap44xx_uart1_slaves, |
| 802 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves), |
| 803 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 804 | }; |
| 805 | |
| 806 | /* uart2 */ |
| 807 | static struct omap_hwmod omap44xx_uart2_hwmod; |
| 808 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { |
| 809 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, |
| 810 | }; |
| 811 | |
| 812 | static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { |
| 813 | { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START }, |
| 814 | { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START }, |
| 815 | }; |
| 816 | |
| 817 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { |
| 818 | { |
| 819 | .pa_start = 0x4806c000, |
| 820 | .pa_end = 0x4806c0ff, |
| 821 | .flags = ADDR_TYPE_RT |
| 822 | }, |
| 823 | }; |
| 824 | |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 825 | /* l4_wkup -> wd_timer2 */ |
| 826 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { |
| 827 | .master = &omap44xx_l4_wkup_hwmod, |
| 828 | .slave = &omap44xx_wd_timer2_hwmod, |
| 829 | .clk = "l4_wkup_clk_mux_ck", |
| 830 | .addr = omap44xx_wd_timer2_addrs, |
| 831 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs), |
| 832 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 833 | }; |
| 834 | |
| 835 | /* wd_timer2 slave ports */ |
| 836 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = { |
| 837 | &omap44xx_l4_wkup__wd_timer2, |
| 838 | }; |
| 839 | |
| 840 | static struct omap_hwmod omap44xx_wd_timer2_hwmod = { |
| 841 | .name = "wd_timer2", |
| 842 | .class = &omap44xx_wd_timer_hwmod_class, |
| 843 | .mpu_irqs = omap44xx_wd_timer2_irqs, |
| 844 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs), |
| 845 | .main_clk = "wd_timer2_fck", |
| 846 | .prcm = { |
| 847 | .omap4 = { |
| 848 | .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, |
| 849 | }, |
| 850 | }, |
| 851 | .slaves = omap44xx_wd_timer2_slaves, |
| 852 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves), |
| 853 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 854 | }; |
| 855 | |
| 856 | /* wd_timer3 */ |
| 857 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; |
| 858 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { |
| 859 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, |
| 860 | }; |
| 861 | |
| 862 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { |
| 863 | { |
| 864 | .pa_start = 0x40130000, |
| 865 | .pa_end = 0x4013007f, |
| 866 | .flags = ADDR_TYPE_RT |
| 867 | }, |
| 868 | }; |
| 869 | |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 870 | /* l4_per -> uart2 */ |
| 871 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { |
| 872 | .master = &omap44xx_l4_per_hwmod, |
| 873 | .slave = &omap44xx_uart2_hwmod, |
| 874 | .clk = "l4_div_ck", |
| 875 | .addr = omap44xx_uart2_addrs, |
| 876 | .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs), |
| 877 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 878 | }; |
| 879 | |
| 880 | /* uart2 slave ports */ |
| 881 | static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = { |
| 882 | &omap44xx_l4_per__uart2, |
| 883 | }; |
| 884 | |
| 885 | static struct omap_hwmod omap44xx_uart2_hwmod = { |
| 886 | .name = "uart2", |
| 887 | .class = &omap44xx_uart_hwmod_class, |
| 888 | .mpu_irqs = omap44xx_uart2_irqs, |
| 889 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs), |
| 890 | .sdma_reqs = omap44xx_uart2_sdma_reqs, |
| 891 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs), |
| 892 | .main_clk = "uart2_fck", |
| 893 | .prcm = { |
| 894 | .omap4 = { |
| 895 | .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL, |
| 896 | }, |
| 897 | }, |
| 898 | .slaves = omap44xx_uart2_slaves, |
| 899 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves), |
| 900 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 901 | }; |
| 902 | |
| 903 | /* uart3 */ |
| 904 | static struct omap_hwmod omap44xx_uart3_hwmod; |
| 905 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { |
| 906 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, |
| 907 | }; |
| 908 | |
| 909 | static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { |
| 910 | { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START }, |
| 911 | { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START }, |
| 912 | }; |
| 913 | |
| 914 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { |
| 915 | { |
| 916 | .pa_start = 0x48020000, |
| 917 | .pa_end = 0x480200ff, |
| 918 | .flags = ADDR_TYPE_RT |
| 919 | }, |
| 920 | }; |
| 921 | |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 922 | /* l4_abe -> wd_timer3 */ |
| 923 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { |
| 924 | .master = &omap44xx_l4_abe_hwmod, |
| 925 | .slave = &omap44xx_wd_timer3_hwmod, |
| 926 | .clk = "ocp_abe_iclk", |
| 927 | .addr = omap44xx_wd_timer3_addrs, |
| 928 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs), |
| 929 | .user = OCP_USER_MPU, |
| 930 | }; |
| 931 | |
| 932 | /* l4_abe -> wd_timer3 (dma) */ |
| 933 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { |
| 934 | { |
| 935 | .pa_start = 0x49030000, |
| 936 | .pa_end = 0x4903007f, |
| 937 | .flags = ADDR_TYPE_RT |
| 938 | }, |
| 939 | }; |
| 940 | |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 941 | /* l4_per -> uart3 */ |
| 942 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { |
| 943 | .master = &omap44xx_l4_per_hwmod, |
| 944 | .slave = &omap44xx_uart3_hwmod, |
| 945 | .clk = "l4_div_ck", |
| 946 | .addr = omap44xx_uart3_addrs, |
| 947 | .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs), |
| 948 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 949 | }; |
| 950 | |
| 951 | /* uart3 slave ports */ |
| 952 | static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = { |
| 953 | &omap44xx_l4_per__uart3, |
| 954 | }; |
| 955 | |
| 956 | static struct omap_hwmod omap44xx_uart3_hwmod = { |
| 957 | .name = "uart3", |
| 958 | .class = &omap44xx_uart_hwmod_class, |
| 959 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), |
| 960 | .mpu_irqs = omap44xx_uart3_irqs, |
| 961 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs), |
| 962 | .sdma_reqs = omap44xx_uart3_sdma_reqs, |
| 963 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs), |
| 964 | .main_clk = "uart3_fck", |
| 965 | .prcm = { |
| 966 | .omap4 = { |
| 967 | .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL, |
| 968 | }, |
| 969 | }, |
| 970 | .slaves = omap44xx_uart3_slaves, |
| 971 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves), |
| 972 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 973 | }; |
| 974 | |
| 975 | /* uart4 */ |
| 976 | static struct omap_hwmod omap44xx_uart4_hwmod; |
| 977 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { |
| 978 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, |
| 979 | }; |
| 980 | |
| 981 | static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { |
| 982 | { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START }, |
| 983 | { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START }, |
| 984 | }; |
| 985 | |
| 986 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { |
| 987 | { |
| 988 | .pa_start = 0x4806e000, |
| 989 | .pa_end = 0x4806e0ff, |
| 990 | .flags = ADDR_TYPE_RT |
| 991 | }, |
| 992 | }; |
| 993 | |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 994 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { |
| 995 | .master = &omap44xx_l4_abe_hwmod, |
| 996 | .slave = &omap44xx_wd_timer3_hwmod, |
| 997 | .clk = "ocp_abe_iclk", |
| 998 | .addr = omap44xx_wd_timer3_dma_addrs, |
| 999 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs), |
| 1000 | .user = OCP_USER_SDMA, |
| 1001 | }; |
| 1002 | |
| 1003 | /* wd_timer3 slave ports */ |
| 1004 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { |
| 1005 | &omap44xx_l4_abe__wd_timer3, |
| 1006 | &omap44xx_l4_abe__wd_timer3_dma, |
| 1007 | }; |
| 1008 | |
| 1009 | static struct omap_hwmod omap44xx_wd_timer3_hwmod = { |
| 1010 | .name = "wd_timer3", |
| 1011 | .class = &omap44xx_wd_timer_hwmod_class, |
| 1012 | .mpu_irqs = omap44xx_wd_timer3_irqs, |
| 1013 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs), |
| 1014 | .main_clk = "wd_timer3_fck", |
| 1015 | .prcm = { |
| 1016 | .omap4 = { |
| 1017 | .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, |
| 1018 | }, |
| 1019 | }, |
| 1020 | .slaves = omap44xx_wd_timer3_slaves, |
| 1021 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves), |
| 1022 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1023 | }; |
| 1024 | |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 1025 | /* l4_per -> uart4 */ |
| 1026 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { |
| 1027 | .master = &omap44xx_l4_per_hwmod, |
| 1028 | .slave = &omap44xx_uart4_hwmod, |
| 1029 | .clk = "l4_div_ck", |
| 1030 | .addr = omap44xx_uart4_addrs, |
| 1031 | .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs), |
| 1032 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1033 | }; |
| 1034 | |
| 1035 | /* uart4 slave ports */ |
| 1036 | static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = { |
| 1037 | &omap44xx_l4_per__uart4, |
| 1038 | }; |
| 1039 | |
| 1040 | static struct omap_hwmod omap44xx_uart4_hwmod = { |
| 1041 | .name = "uart4", |
| 1042 | .class = &omap44xx_uart_hwmod_class, |
| 1043 | .mpu_irqs = omap44xx_uart4_irqs, |
| 1044 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs), |
| 1045 | .sdma_reqs = omap44xx_uart4_sdma_reqs, |
| 1046 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs), |
| 1047 | .main_clk = "uart4_fck", |
| 1048 | .prcm = { |
| 1049 | .omap4 = { |
| 1050 | .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL, |
| 1051 | }, |
| 1052 | }, |
| 1053 | .slaves = omap44xx_uart4_slaves, |
| 1054 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves), |
| 1055 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1056 | }; |
| 1057 | |
Benoit Cousson | 9780a9c | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1058 | /* |
| 1059 | * 'gpio' class |
| 1060 | * general purpose io module |
| 1061 | */ |
| 1062 | |
| 1063 | static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = { |
| 1064 | .rev_offs = 0x0000, |
| 1065 | .sysc_offs = 0x0010, |
| 1066 | .syss_offs = 0x0114, |
| 1067 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
| 1068 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 1069 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1070 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1071 | }; |
| 1072 | |
| 1073 | static struct omap_hwmod_class omap44xx_gpio_hwmod_class = { |
| 1074 | .name = "gpio", |
| 1075 | .sysc = &omap44xx_gpio_sysc, |
| 1076 | .rev = 2, |
| 1077 | }; |
| 1078 | |
| 1079 | /* gpio dev_attr */ |
| 1080 | static struct omap_gpio_dev_attr gpio_dev_attr = { |
| 1081 | .bank_width = 32, |
| 1082 | .dbck_flag = true, |
| 1083 | }; |
| 1084 | |
| 1085 | /* gpio1 */ |
| 1086 | static struct omap_hwmod omap44xx_gpio1_hwmod; |
| 1087 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { |
| 1088 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, |
| 1089 | }; |
| 1090 | |
| 1091 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { |
| 1092 | { |
| 1093 | .pa_start = 0x4a310000, |
| 1094 | .pa_end = 0x4a3101ff, |
| 1095 | .flags = ADDR_TYPE_RT |
| 1096 | }, |
| 1097 | }; |
| 1098 | |
| 1099 | /* l4_wkup -> gpio1 */ |
| 1100 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { |
| 1101 | .master = &omap44xx_l4_wkup_hwmod, |
| 1102 | .slave = &omap44xx_gpio1_hwmod, |
| 1103 | .addr = omap44xx_gpio1_addrs, |
| 1104 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs), |
| 1105 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1106 | }; |
| 1107 | |
| 1108 | /* gpio1 slave ports */ |
| 1109 | static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = { |
| 1110 | &omap44xx_l4_wkup__gpio1, |
| 1111 | }; |
| 1112 | |
| 1113 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
| 1114 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1115 | }; |
| 1116 | |
| 1117 | static struct omap_hwmod omap44xx_gpio1_hwmod = { |
| 1118 | .name = "gpio1", |
| 1119 | .class = &omap44xx_gpio_hwmod_class, |
| 1120 | .mpu_irqs = omap44xx_gpio1_irqs, |
| 1121 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs), |
| 1122 | .main_clk = "gpio1_ick", |
| 1123 | .prcm = { |
| 1124 | .omap4 = { |
| 1125 | .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, |
| 1126 | }, |
| 1127 | }, |
| 1128 | .opt_clks = gpio1_opt_clks, |
| 1129 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
| 1130 | .dev_attr = &gpio_dev_attr, |
| 1131 | .slaves = omap44xx_gpio1_slaves, |
| 1132 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves), |
| 1133 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1134 | }; |
| 1135 | |
| 1136 | /* gpio2 */ |
| 1137 | static struct omap_hwmod omap44xx_gpio2_hwmod; |
| 1138 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { |
| 1139 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, |
| 1140 | }; |
| 1141 | |
| 1142 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { |
| 1143 | { |
| 1144 | .pa_start = 0x48055000, |
| 1145 | .pa_end = 0x480551ff, |
| 1146 | .flags = ADDR_TYPE_RT |
| 1147 | }, |
| 1148 | }; |
| 1149 | |
| 1150 | /* l4_per -> gpio2 */ |
| 1151 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { |
| 1152 | .master = &omap44xx_l4_per_hwmod, |
| 1153 | .slave = &omap44xx_gpio2_hwmod, |
| 1154 | .addr = omap44xx_gpio2_addrs, |
| 1155 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs), |
| 1156 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1157 | }; |
| 1158 | |
| 1159 | /* gpio2 slave ports */ |
| 1160 | static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = { |
| 1161 | &omap44xx_l4_per__gpio2, |
| 1162 | }; |
| 1163 | |
| 1164 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
| 1165 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1166 | }; |
| 1167 | |
| 1168 | static struct omap_hwmod omap44xx_gpio2_hwmod = { |
| 1169 | .name = "gpio2", |
| 1170 | .class = &omap44xx_gpio_hwmod_class, |
| 1171 | .mpu_irqs = omap44xx_gpio2_irqs, |
| 1172 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs), |
| 1173 | .main_clk = "gpio2_ick", |
| 1174 | .prcm = { |
| 1175 | .omap4 = { |
| 1176 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, |
| 1177 | }, |
| 1178 | }, |
| 1179 | .opt_clks = gpio2_opt_clks, |
| 1180 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
| 1181 | .dev_attr = &gpio_dev_attr, |
| 1182 | .slaves = omap44xx_gpio2_slaves, |
| 1183 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves), |
| 1184 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1185 | }; |
| 1186 | |
| 1187 | /* gpio3 */ |
| 1188 | static struct omap_hwmod omap44xx_gpio3_hwmod; |
| 1189 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { |
| 1190 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, |
| 1191 | }; |
| 1192 | |
| 1193 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { |
| 1194 | { |
| 1195 | .pa_start = 0x48057000, |
| 1196 | .pa_end = 0x480571ff, |
| 1197 | .flags = ADDR_TYPE_RT |
| 1198 | }, |
| 1199 | }; |
| 1200 | |
| 1201 | /* l4_per -> gpio3 */ |
| 1202 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { |
| 1203 | .master = &omap44xx_l4_per_hwmod, |
| 1204 | .slave = &omap44xx_gpio3_hwmod, |
| 1205 | .addr = omap44xx_gpio3_addrs, |
| 1206 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs), |
| 1207 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1208 | }; |
| 1209 | |
| 1210 | /* gpio3 slave ports */ |
| 1211 | static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = { |
| 1212 | &omap44xx_l4_per__gpio3, |
| 1213 | }; |
| 1214 | |
| 1215 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
| 1216 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1217 | }; |
| 1218 | |
| 1219 | static struct omap_hwmod omap44xx_gpio3_hwmod = { |
| 1220 | .name = "gpio3", |
| 1221 | .class = &omap44xx_gpio_hwmod_class, |
| 1222 | .mpu_irqs = omap44xx_gpio3_irqs, |
| 1223 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs), |
| 1224 | .main_clk = "gpio3_ick", |
| 1225 | .prcm = { |
| 1226 | .omap4 = { |
| 1227 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, |
| 1228 | }, |
| 1229 | }, |
| 1230 | .opt_clks = gpio3_opt_clks, |
| 1231 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
| 1232 | .dev_attr = &gpio_dev_attr, |
| 1233 | .slaves = omap44xx_gpio3_slaves, |
| 1234 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves), |
| 1235 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1236 | }; |
| 1237 | |
| 1238 | /* gpio4 */ |
| 1239 | static struct omap_hwmod omap44xx_gpio4_hwmod; |
| 1240 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { |
| 1241 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, |
| 1242 | }; |
| 1243 | |
| 1244 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { |
| 1245 | { |
| 1246 | .pa_start = 0x48059000, |
| 1247 | .pa_end = 0x480591ff, |
| 1248 | .flags = ADDR_TYPE_RT |
| 1249 | }, |
| 1250 | }; |
| 1251 | |
| 1252 | /* l4_per -> gpio4 */ |
| 1253 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { |
| 1254 | .master = &omap44xx_l4_per_hwmod, |
| 1255 | .slave = &omap44xx_gpio4_hwmod, |
| 1256 | .addr = omap44xx_gpio4_addrs, |
| 1257 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs), |
| 1258 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1259 | }; |
| 1260 | |
| 1261 | /* gpio4 slave ports */ |
| 1262 | static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = { |
| 1263 | &omap44xx_l4_per__gpio4, |
| 1264 | }; |
| 1265 | |
| 1266 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { |
| 1267 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1268 | }; |
| 1269 | |
| 1270 | static struct omap_hwmod omap44xx_gpio4_hwmod = { |
| 1271 | .name = "gpio4", |
| 1272 | .class = &omap44xx_gpio_hwmod_class, |
| 1273 | .mpu_irqs = omap44xx_gpio4_irqs, |
| 1274 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs), |
| 1275 | .main_clk = "gpio4_ick", |
| 1276 | .prcm = { |
| 1277 | .omap4 = { |
| 1278 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, |
| 1279 | }, |
| 1280 | }, |
| 1281 | .opt_clks = gpio4_opt_clks, |
| 1282 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), |
| 1283 | .dev_attr = &gpio_dev_attr, |
| 1284 | .slaves = omap44xx_gpio4_slaves, |
| 1285 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves), |
| 1286 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1287 | }; |
| 1288 | |
| 1289 | /* gpio5 */ |
| 1290 | static struct omap_hwmod omap44xx_gpio5_hwmod; |
| 1291 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { |
| 1292 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, |
| 1293 | }; |
| 1294 | |
| 1295 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { |
| 1296 | { |
| 1297 | .pa_start = 0x4805b000, |
| 1298 | .pa_end = 0x4805b1ff, |
| 1299 | .flags = ADDR_TYPE_RT |
| 1300 | }, |
| 1301 | }; |
| 1302 | |
| 1303 | /* l4_per -> gpio5 */ |
| 1304 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { |
| 1305 | .master = &omap44xx_l4_per_hwmod, |
| 1306 | .slave = &omap44xx_gpio5_hwmod, |
| 1307 | .addr = omap44xx_gpio5_addrs, |
| 1308 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs), |
| 1309 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1310 | }; |
| 1311 | |
| 1312 | /* gpio5 slave ports */ |
| 1313 | static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = { |
| 1314 | &omap44xx_l4_per__gpio5, |
| 1315 | }; |
| 1316 | |
| 1317 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { |
| 1318 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1319 | }; |
| 1320 | |
| 1321 | static struct omap_hwmod omap44xx_gpio5_hwmod = { |
| 1322 | .name = "gpio5", |
| 1323 | .class = &omap44xx_gpio_hwmod_class, |
| 1324 | .mpu_irqs = omap44xx_gpio5_irqs, |
| 1325 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs), |
| 1326 | .main_clk = "gpio5_ick", |
| 1327 | .prcm = { |
| 1328 | .omap4 = { |
| 1329 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, |
| 1330 | }, |
| 1331 | }, |
| 1332 | .opt_clks = gpio5_opt_clks, |
| 1333 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), |
| 1334 | .dev_attr = &gpio_dev_attr, |
| 1335 | .slaves = omap44xx_gpio5_slaves, |
| 1336 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves), |
| 1337 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1338 | }; |
| 1339 | |
| 1340 | /* gpio6 */ |
| 1341 | static struct omap_hwmod omap44xx_gpio6_hwmod; |
| 1342 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { |
| 1343 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, |
| 1344 | }; |
| 1345 | |
| 1346 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { |
| 1347 | { |
| 1348 | .pa_start = 0x4805d000, |
| 1349 | .pa_end = 0x4805d1ff, |
| 1350 | .flags = ADDR_TYPE_RT |
| 1351 | }, |
| 1352 | }; |
| 1353 | |
| 1354 | /* l4_per -> gpio6 */ |
| 1355 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { |
| 1356 | .master = &omap44xx_l4_per_hwmod, |
| 1357 | .slave = &omap44xx_gpio6_hwmod, |
| 1358 | .addr = omap44xx_gpio6_addrs, |
| 1359 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs), |
| 1360 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1361 | }; |
| 1362 | |
| 1363 | /* gpio6 slave ports */ |
| 1364 | static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = { |
| 1365 | &omap44xx_l4_per__gpio6, |
| 1366 | }; |
| 1367 | |
| 1368 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { |
| 1369 | { .role = "dbclk", .clk = "sys_32k_ck" }, |
| 1370 | }; |
| 1371 | |
| 1372 | static struct omap_hwmod omap44xx_gpio6_hwmod = { |
| 1373 | .name = "gpio6", |
| 1374 | .class = &omap44xx_gpio_hwmod_class, |
| 1375 | .mpu_irqs = omap44xx_gpio6_irqs, |
| 1376 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs), |
| 1377 | .main_clk = "gpio6_ick", |
| 1378 | .prcm = { |
| 1379 | .omap4 = { |
| 1380 | .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, |
| 1381 | }, |
| 1382 | }, |
| 1383 | .opt_clks = gpio6_opt_clks, |
| 1384 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), |
| 1385 | .dev_attr = &gpio_dev_attr, |
| 1386 | .slaves = omap44xx_gpio6_slaves, |
| 1387 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves), |
| 1388 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1389 | }; |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1390 | |
| 1391 | /* |
| 1392 | * 'dma' class |
| 1393 | * dma controller for data exchange between memory to memory (i.e. internal or |
| 1394 | * external memory) and gp peripherals to memory or memory to gp peripherals |
| 1395 | */ |
| 1396 | |
| 1397 | static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = { |
| 1398 | .rev_offs = 0x0000, |
| 1399 | .sysc_offs = 0x002c, |
| 1400 | .syss_offs = 0x0028, |
| 1401 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | |
| 1402 | SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE | |
| 1403 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 1404 | SYSS_HAS_RESET_STATUS), |
| 1405 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1406 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1407 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1408 | }; |
| 1409 | |
| 1410 | /* dma attributes */ |
| 1411 | static struct omap_dma_dev_attr dma_dev_attr = { |
| 1412 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
| 1413 | IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY, |
| 1414 | .lch_count = 32, |
| 1415 | }; |
| 1416 | |
| 1417 | static struct omap_hwmod_class omap44xx_dma_hwmod_class = { |
| 1418 | .name = "dma", |
| 1419 | .sysc = &omap44xx_dma_sysc, |
| 1420 | }; |
| 1421 | |
| 1422 | /* dma_system */ |
| 1423 | static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = { |
| 1424 | { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START }, |
| 1425 | { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START }, |
| 1426 | { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START }, |
| 1427 | { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START }, |
| 1428 | }; |
| 1429 | |
| 1430 | /* dma_system master ports */ |
| 1431 | static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = { |
| 1432 | &omap44xx_dma_system__l3_main_2, |
| 1433 | }; |
| 1434 | |
| 1435 | static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { |
| 1436 | { |
| 1437 | .pa_start = 0x4a056000, |
| 1438 | .pa_end = 0x4a0560ff, |
| 1439 | .flags = ADDR_TYPE_RT |
| 1440 | }, |
| 1441 | }; |
| 1442 | |
| 1443 | /* l4_cfg -> dma_system */ |
| 1444 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = { |
| 1445 | .master = &omap44xx_l4_cfg_hwmod, |
| 1446 | .slave = &omap44xx_dma_system_hwmod, |
| 1447 | .clk = "l4_div_ck", |
| 1448 | .addr = omap44xx_dma_system_addrs, |
| 1449 | .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs), |
| 1450 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1451 | }; |
| 1452 | |
| 1453 | /* dma_system slave ports */ |
| 1454 | static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = { |
| 1455 | &omap44xx_l4_cfg__dma_system, |
| 1456 | }; |
| 1457 | |
| 1458 | static struct omap_hwmod omap44xx_dma_system_hwmod = { |
| 1459 | .name = "dma_system", |
| 1460 | .class = &omap44xx_dma_hwmod_class, |
| 1461 | .mpu_irqs = omap44xx_dma_system_irqs, |
| 1462 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs), |
| 1463 | .main_clk = "l3_div_ck", |
| 1464 | .prcm = { |
| 1465 | .omap4 = { |
| 1466 | .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL, |
| 1467 | }, |
| 1468 | }, |
| 1469 | .slaves = omap44xx_dma_system_slaves, |
| 1470 | .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves), |
| 1471 | .masters = omap44xx_dma_system_masters, |
| 1472 | .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters), |
| 1473 | .dev_attr = &dma_dev_attr, |
| 1474 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 1475 | }; |
| 1476 | |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 1477 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { |
| 1478 | /* dmm class */ |
| 1479 | &omap44xx_dmm_hwmod, |
| 1480 | /* emif_fw class */ |
| 1481 | &omap44xx_emif_fw_hwmod, |
| 1482 | /* l3 class */ |
| 1483 | &omap44xx_l3_instr_hwmod, |
| 1484 | &omap44xx_l3_main_1_hwmod, |
| 1485 | &omap44xx_l3_main_2_hwmod, |
| 1486 | &omap44xx_l3_main_3_hwmod, |
| 1487 | /* l4 class */ |
| 1488 | &omap44xx_l4_abe_hwmod, |
| 1489 | &omap44xx_l4_cfg_hwmod, |
| 1490 | &omap44xx_l4_per_hwmod, |
| 1491 | &omap44xx_l4_wkup_hwmod, |
Benoit Cousson | 531ce0d | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1492 | |
| 1493 | /* dma class */ |
| 1494 | &omap44xx_dma_system_hwmod, |
| 1495 | |
Benoit Cousson | f776471 | 2010-09-21 19:37:14 +0530 | [diff] [blame] | 1496 | /* i2c class */ |
| 1497 | &omap44xx_i2c1_hwmod, |
| 1498 | &omap44xx_i2c2_hwmod, |
| 1499 | &omap44xx_i2c3_hwmod, |
| 1500 | &omap44xx_i2c4_hwmod, |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 1501 | /* mpu_bus class */ |
| 1502 | &omap44xx_mpu_private_hwmod, |
| 1503 | |
Benoit Cousson | 9780a9c | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1504 | /* gpio class */ |
| 1505 | &omap44xx_gpio1_hwmod, |
| 1506 | &omap44xx_gpio2_hwmod, |
| 1507 | &omap44xx_gpio3_hwmod, |
| 1508 | &omap44xx_gpio4_hwmod, |
| 1509 | &omap44xx_gpio5_hwmod, |
| 1510 | &omap44xx_gpio6_hwmod, |
| 1511 | |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 1512 | /* mpu class */ |
| 1513 | &omap44xx_mpu_hwmod, |
Benoit Cousson | 92b18d1 | 2010-09-23 20:02:41 +0530 | [diff] [blame] | 1514 | /* wd_timer class */ |
| 1515 | &omap44xx_wd_timer2_hwmod, |
| 1516 | &omap44xx_wd_timer3_hwmod, |
Benoit Cousson | db12ba5 | 2010-09-27 20:19:19 +0530 | [diff] [blame] | 1517 | |
| 1518 | /* uart class */ |
| 1519 | &omap44xx_uart1_hwmod, |
| 1520 | &omap44xx_uart2_hwmod, |
| 1521 | &omap44xx_uart3_hwmod, |
| 1522 | &omap44xx_uart4_hwmod, |
Benoit Cousson | 55d2cb0 | 2010-05-12 17:54:36 +0200 | [diff] [blame] | 1523 | NULL, |
| 1524 | }; |
| 1525 | |
| 1526 | int __init omap44xx_hwmod_init(void) |
| 1527 | { |
| 1528 | return omap_hwmod_init(omap44xx_hwmods); |
| 1529 | } |
| 1530 | |