Paul Walmsley | 02bfc030 | 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 | 02bfc030 | 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 | 02bfc030 | 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 | 02bfc030 | 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 | 02bfc030 | 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 | 02bfc030 | 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 | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 21 | #include "prm-regbits-24xx.h" |
| 22 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 23 | /* |
| 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 Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 32 | static struct omap_hwmod omap2420_mpu_hwmod; |
| 33 | static struct omap_hwmod omap2420_l3_hwmod; |
| 34 | static struct omap_hwmod omap2420_l4_core_hwmod; |
| 35 | |
| 36 | /* L3 -> L4_CORE interface */ |
| 37 | static struct omap_hwmod_ocp_if omap2420_l3__l4_core = { |
| 38 | .master = &omap2420_l3_hwmod, |
| 39 | .slave = &omap2420_l4_core_hwmod, |
| 40 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 41 | }; |
| 42 | |
| 43 | /* MPU -> L3 interface */ |
| 44 | static struct omap_hwmod_ocp_if omap2420_mpu__l3 = { |
| 45 | .master = &omap2420_mpu_hwmod, |
| 46 | .slave = &omap2420_l3_hwmod, |
| 47 | .user = OCP_USER_MPU, |
| 48 | }; |
| 49 | |
| 50 | /* Slave interfaces on the L3 interconnect */ |
| 51 | static struct omap_hwmod_ocp_if *omap2420_l3_slaves[] = { |
| 52 | &omap2420_mpu__l3, |
| 53 | }; |
| 54 | |
| 55 | /* Master interfaces on the L3 interconnect */ |
| 56 | static struct omap_hwmod_ocp_if *omap2420_l3_masters[] = { |
| 57 | &omap2420_l3__l4_core, |
| 58 | }; |
| 59 | |
| 60 | /* L3 */ |
| 61 | static struct omap_hwmod omap2420_l3_hwmod = { |
| 62 | .name = "l3_hwmod", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 63 | .class = &l3_hwmod_class, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 64 | .masters = omap2420_l3_masters, |
| 65 | .masters_cnt = ARRAY_SIZE(omap2420_l3_masters), |
| 66 | .slaves = omap2420_l3_slaves, |
| 67 | .slaves_cnt = ARRAY_SIZE(omap2420_l3_slaves), |
| 68 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
| 69 | }; |
| 70 | |
| 71 | static struct omap_hwmod omap2420_l4_wkup_hwmod; |
| 72 | |
| 73 | /* L4_CORE -> L4_WKUP interface */ |
| 74 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
| 75 | .master = &omap2420_l4_core_hwmod, |
| 76 | .slave = &omap2420_l4_wkup_hwmod, |
| 77 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 78 | }; |
| 79 | |
| 80 | /* Slave interfaces on the L4_CORE interconnect */ |
| 81 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { |
| 82 | &omap2420_l3__l4_core, |
| 83 | }; |
| 84 | |
| 85 | /* Master interfaces on the L4_CORE interconnect */ |
| 86 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { |
| 87 | &omap2420_l4_core__l4_wkup, |
| 88 | }; |
| 89 | |
| 90 | /* L4 CORE */ |
| 91 | static struct omap_hwmod omap2420_l4_core_hwmod = { |
| 92 | .name = "l4_core_hwmod", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 93 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 94 | .masters = omap2420_l4_core_masters, |
| 95 | .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters), |
| 96 | .slaves = omap2420_l4_core_slaves, |
| 97 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves), |
| 98 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
| 99 | }; |
| 100 | |
| 101 | /* Slave interfaces on the L4_WKUP interconnect */ |
| 102 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = { |
| 103 | &omap2420_l4_core__l4_wkup, |
| 104 | }; |
| 105 | |
| 106 | /* Master interfaces on the L4_WKUP interconnect */ |
| 107 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = { |
| 108 | }; |
| 109 | |
| 110 | /* L4 WKUP */ |
| 111 | static struct omap_hwmod omap2420_l4_wkup_hwmod = { |
| 112 | .name = "l4_wkup_hwmod", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 113 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 114 | .masters = omap2420_l4_wkup_masters, |
| 115 | .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters), |
| 116 | .slaves = omap2420_l4_wkup_slaves, |
| 117 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves), |
| 118 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
| 119 | }; |
| 120 | |
| 121 | /* Master interfaces on the MPU device */ |
| 122 | static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = { |
| 123 | &omap2420_mpu__l3, |
| 124 | }; |
| 125 | |
| 126 | /* MPU */ |
| 127 | static struct omap_hwmod omap2420_mpu_hwmod = { |
Benoit Cousson | 5c2c029 | 2010-05-20 12:31:10 -0600 | [diff] [blame^] | 128 | .name = "mpu", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 129 | .class = &mpu_hwmod_class, |
Paul Walmsley | 50ebdac | 2010-02-22 22:09:31 -0700 | [diff] [blame] | 130 | .main_clk = "mpu_ck", |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 131 | .masters = omap2420_mpu_masters, |
| 132 | .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters), |
| 133 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 134 | }; |
| 135 | |
| 136 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
| 137 | &omap2420_l3_hwmod, |
| 138 | &omap2420_l4_core_hwmod, |
| 139 | &omap2420_l4_wkup_hwmod, |
| 140 | &omap2420_mpu_hwmod, |
| 141 | NULL, |
| 142 | }; |
| 143 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 144 | int __init omap2420_hwmod_init(void) |
| 145 | { |
| 146 | return omap_hwmod_init(omap2420_hwmods); |
| 147 | } |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 148 | |
| 149 | |