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), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame^] | 68 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 69 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 70 | }; |
| 71 | |
| 72 | static struct omap_hwmod omap2420_l4_wkup_hwmod; |
| 73 | |
| 74 | /* L4_CORE -> L4_WKUP interface */ |
| 75 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
| 76 | .master = &omap2420_l4_core_hwmod, |
| 77 | .slave = &omap2420_l4_wkup_hwmod, |
| 78 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 79 | }; |
| 80 | |
| 81 | /* Slave interfaces on the L4_CORE interconnect */ |
| 82 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { |
| 83 | &omap2420_l3__l4_core, |
| 84 | }; |
| 85 | |
| 86 | /* Master interfaces on the L4_CORE interconnect */ |
| 87 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { |
| 88 | &omap2420_l4_core__l4_wkup, |
| 89 | }; |
| 90 | |
| 91 | /* L4 CORE */ |
| 92 | static struct omap_hwmod omap2420_l4_core_hwmod = { |
| 93 | .name = "l4_core_hwmod", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 94 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 95 | .masters = omap2420_l4_core_masters, |
| 96 | .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters), |
| 97 | .slaves = omap2420_l4_core_slaves, |
| 98 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame^] | 99 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 100 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | /* Slave interfaces on the L4_WKUP interconnect */ |
| 104 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = { |
| 105 | &omap2420_l4_core__l4_wkup, |
| 106 | }; |
| 107 | |
| 108 | /* Master interfaces on the L4_WKUP interconnect */ |
| 109 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = { |
| 110 | }; |
| 111 | |
| 112 | /* L4 WKUP */ |
| 113 | static struct omap_hwmod omap2420_l4_wkup_hwmod = { |
| 114 | .name = "l4_wkup_hwmod", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 115 | .class = &l4_hwmod_class, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 116 | .masters = omap2420_l4_wkup_masters, |
| 117 | .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters), |
| 118 | .slaves = omap2420_l4_wkup_slaves, |
| 119 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves), |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame^] | 120 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 121 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | /* Master interfaces on the MPU device */ |
| 125 | static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = { |
| 126 | &omap2420_mpu__l3, |
| 127 | }; |
| 128 | |
| 129 | /* MPU */ |
| 130 | static struct omap_hwmod omap2420_mpu_hwmod = { |
Benoit Cousson | 5c2c029 | 2010-05-20 12:31:10 -0600 | [diff] [blame] | 131 | .name = "mpu", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 132 | .class = &mpu_hwmod_class, |
Paul Walmsley | 50ebdac | 2010-02-22 22:09:31 -0700 | [diff] [blame] | 133 | .main_clk = "mpu_ck", |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 134 | .masters = omap2420_mpu_masters, |
| 135 | .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters), |
| 136 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 137 | }; |
| 138 | |
| 139 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
| 140 | &omap2420_l3_hwmod, |
| 141 | &omap2420_l4_core_hwmod, |
| 142 | &omap2420_l4_wkup_hwmod, |
| 143 | &omap2420_mpu_hwmod, |
| 144 | NULL, |
| 145 | }; |
| 146 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 147 | int __init omap2420_hwmod_init(void) |
| 148 | { |
| 149 | return omap_hwmod_init(omap2420_hwmods); |
| 150 | } |
Paul Walmsley | 02bfc030 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 151 | |
| 152 | |