diff options
author | Paul Walmsley <paul@pwsan.com> | 2011-03-01 16:12:56 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-01 16:12:56 -0500 |
commit | b163605e3f2051e0cbd378d46a91cab2563b7ebf (patch) | |
tree | 98f88fe55fa08d7051b3fa87959ff34060cd3c08 | |
parent | bce06f375644f8b28fbc1d261699fdfe459733ad (diff) |
OMAP3: hwmod data: Add HSMMC
Update the omap3 hwmod data with the HSMMC info.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 209 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prcm-common.h | 4 |
2 files changed, 213 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index fc1b2b963bb9..207ccfbac2e4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -69,6 +69,9 @@ static struct omap_hwmod omap34xx_mcspi1; | |||
69 | static struct omap_hwmod omap34xx_mcspi2; | 69 | static struct omap_hwmod omap34xx_mcspi2; |
70 | static struct omap_hwmod omap34xx_mcspi3; | 70 | static struct omap_hwmod omap34xx_mcspi3; |
71 | static struct omap_hwmod omap34xx_mcspi4; | 71 | static struct omap_hwmod omap34xx_mcspi4; |
72 | static struct omap_hwmod omap3xxx_mmc1_hwmod; | ||
73 | static struct omap_hwmod omap3xxx_mmc2_hwmod; | ||
74 | static struct omap_hwmod omap3xxx_mmc3_hwmod; | ||
72 | static struct omap_hwmod am35xx_usbhsotg_hwmod; | 75 | static struct omap_hwmod am35xx_usbhsotg_hwmod; |
73 | 76 | ||
74 | static struct omap_hwmod omap3xxx_dma_system_hwmod; | 77 | static struct omap_hwmod omap3xxx_dma_system_hwmod; |
@@ -159,6 +162,63 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | |||
159 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 162 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
160 | }; | 163 | }; |
161 | 164 | ||
165 | /* L4 CORE -> MMC1 interface */ | ||
166 | static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = { | ||
167 | { | ||
168 | .pa_start = 0x4809c000, | ||
169 | .pa_end = 0x4809c1ff, | ||
170 | .flags = ADDR_TYPE_RT, | ||
171 | }, | ||
172 | }; | ||
173 | |||
174 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { | ||
175 | .master = &omap3xxx_l4_core_hwmod, | ||
176 | .slave = &omap3xxx_mmc1_hwmod, | ||
177 | .clk = "mmchs1_ick", | ||
178 | .addr = omap3xxx_mmc1_addr_space, | ||
179 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space), | ||
180 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
181 | .flags = OMAP_FIREWALL_L4 | ||
182 | }; | ||
183 | |||
184 | /* L4 CORE -> MMC2 interface */ | ||
185 | static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = { | ||
186 | { | ||
187 | .pa_start = 0x480b4000, | ||
188 | .pa_end = 0x480b41ff, | ||
189 | .flags = ADDR_TYPE_RT, | ||
190 | }, | ||
191 | }; | ||
192 | |||
193 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { | ||
194 | .master = &omap3xxx_l4_core_hwmod, | ||
195 | .slave = &omap3xxx_mmc2_hwmod, | ||
196 | .clk = "mmchs2_ick", | ||
197 | .addr = omap3xxx_mmc2_addr_space, | ||
198 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space), | ||
199 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
200 | .flags = OMAP_FIREWALL_L4 | ||
201 | }; | ||
202 | |||
203 | /* L4 CORE -> MMC3 interface */ | ||
204 | static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { | ||
205 | { | ||
206 | .pa_start = 0x480ad000, | ||
207 | .pa_end = 0x480ad1ff, | ||
208 | .flags = ADDR_TYPE_RT, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | ||
213 | .master = &omap3xxx_l4_core_hwmod, | ||
214 | .slave = &omap3xxx_mmc3_hwmod, | ||
215 | .clk = "mmchs3_ick", | ||
216 | .addr = omap3xxx_mmc3_addr_space, | ||
217 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space), | ||
218 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
219 | .flags = OMAP_FIREWALL_L4 | ||
220 | }; | ||
221 | |||
162 | /* L4 CORE -> UART1 interface */ | 222 | /* L4 CORE -> UART1 interface */ |
163 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | 223 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { |
164 | { | 224 | { |
@@ -2847,11 +2907,160 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = { | |||
2847 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1) | 2907 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1) |
2848 | }; | 2908 | }; |
2849 | 2909 | ||
2910 | /* MMC/SD/SDIO common */ | ||
2911 | |||
2912 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { | ||
2913 | .rev_offs = 0x1fc, | ||
2914 | .sysc_offs = 0x10, | ||
2915 | .syss_offs = 0x14, | ||
2916 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2917 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2918 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
2919 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2920 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2921 | }; | ||
2922 | |||
2923 | static struct omap_hwmod_class omap34xx_mmc_class = { | ||
2924 | .name = "mmc", | ||
2925 | .sysc = &omap34xx_mmc_sysc, | ||
2926 | }; | ||
2927 | |||
2928 | /* MMC/SD/SDIO1 */ | ||
2929 | |||
2930 | static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { | ||
2931 | { .irq = 83, }, | ||
2932 | }; | ||
2933 | |||
2934 | static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { | ||
2935 | { .name = "tx", .dma_req = 61, }, | ||
2936 | { .name = "rx", .dma_req = 62, }, | ||
2937 | }; | ||
2938 | |||
2939 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { | ||
2940 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
2941 | }; | ||
2942 | |||
2943 | static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = { | ||
2944 | &omap3xxx_l4_core__mmc1, | ||
2945 | }; | ||
2946 | |||
2947 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { | ||
2948 | .name = "mmc1", | ||
2949 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, | ||
2950 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs), | ||
2951 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, | ||
2952 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs), | ||
2953 | .opt_clks = omap34xx_mmc1_opt_clks, | ||
2954 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), | ||
2955 | .main_clk = "mmchs1_fck", | ||
2956 | .prcm = { | ||
2957 | .omap2 = { | ||
2958 | .module_offs = CORE_MOD, | ||
2959 | .prcm_reg_id = 1, | ||
2960 | .module_bit = OMAP3430_EN_MMC1_SHIFT, | ||
2961 | .idlest_reg_id = 1, | ||
2962 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, | ||
2963 | }, | ||
2964 | }, | ||
2965 | .slaves = omap3xxx_mmc1_slaves, | ||
2966 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), | ||
2967 | .class = &omap34xx_mmc_class, | ||
2968 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
2969 | }; | ||
2970 | |||
2971 | /* MMC/SD/SDIO2 */ | ||
2972 | |||
2973 | static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { | ||
2974 | { .irq = INT_24XX_MMC2_IRQ, }, | ||
2975 | }; | ||
2976 | |||
2977 | static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { | ||
2978 | { .name = "tx", .dma_req = 47, }, | ||
2979 | { .name = "rx", .dma_req = 48, }, | ||
2980 | }; | ||
2981 | |||
2982 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { | ||
2983 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
2984 | }; | ||
2985 | |||
2986 | static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = { | ||
2987 | &omap3xxx_l4_core__mmc2, | ||
2988 | }; | ||
2989 | |||
2990 | static struct omap_hwmod omap3xxx_mmc2_hwmod = { | ||
2991 | .name = "mmc2", | ||
2992 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, | ||
2993 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs), | ||
2994 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, | ||
2995 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs), | ||
2996 | .opt_clks = omap34xx_mmc2_opt_clks, | ||
2997 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), | ||
2998 | .main_clk = "mmchs2_fck", | ||
2999 | .prcm = { | ||
3000 | .omap2 = { | ||
3001 | .module_offs = CORE_MOD, | ||
3002 | .prcm_reg_id = 1, | ||
3003 | .module_bit = OMAP3430_EN_MMC2_SHIFT, | ||
3004 | .idlest_reg_id = 1, | ||
3005 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, | ||
3006 | }, | ||
3007 | }, | ||
3008 | .slaves = omap3xxx_mmc2_slaves, | ||
3009 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves), | ||
3010 | .class = &omap34xx_mmc_class, | ||
3011 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
3012 | }; | ||
3013 | |||
3014 | /* MMC/SD/SDIO3 */ | ||
3015 | |||
3016 | static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { | ||
3017 | { .irq = 94, }, | ||
3018 | }; | ||
3019 | |||
3020 | static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { | ||
3021 | { .name = "tx", .dma_req = 77, }, | ||
3022 | { .name = "rx", .dma_req = 78, }, | ||
3023 | }; | ||
3024 | |||
3025 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { | ||
3026 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
3027 | }; | ||
3028 | |||
3029 | static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = { | ||
3030 | &omap3xxx_l4_core__mmc3, | ||
3031 | }; | ||
3032 | |||
3033 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { | ||
3034 | .name = "mmc3", | ||
3035 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, | ||
3036 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs), | ||
3037 | .sdma_reqs = omap34xx_mmc3_sdma_reqs, | ||
3038 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs), | ||
3039 | .opt_clks = omap34xx_mmc3_opt_clks, | ||
3040 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), | ||
3041 | .main_clk = "mmchs3_fck", | ||
3042 | .prcm = { | ||
3043 | .omap2 = { | ||
3044 | .prcm_reg_id = 1, | ||
3045 | .module_bit = OMAP3430_EN_MMC3_SHIFT, | ||
3046 | .idlest_reg_id = 1, | ||
3047 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, | ||
3048 | }, | ||
3049 | }, | ||
3050 | .slaves = omap3xxx_mmc3_slaves, | ||
3051 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves), | ||
3052 | .class = &omap34xx_mmc_class, | ||
3053 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
3054 | }; | ||
3055 | |||
2850 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 3056 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
2851 | &omap3xxx_l3_main_hwmod, | 3057 | &omap3xxx_l3_main_hwmod, |
2852 | &omap3xxx_l4_core_hwmod, | 3058 | &omap3xxx_l4_core_hwmod, |
2853 | &omap3xxx_l4_per_hwmod, | 3059 | &omap3xxx_l4_per_hwmod, |
2854 | &omap3xxx_l4_wkup_hwmod, | 3060 | &omap3xxx_l4_wkup_hwmod, |
3061 | &omap3xxx_mmc1_hwmod, | ||
3062 | &omap3xxx_mmc2_hwmod, | ||
3063 | &omap3xxx_mmc3_hwmod, | ||
2855 | &omap3xxx_mpu_hwmod, | 3064 | &omap3xxx_mpu_hwmod, |
2856 | &omap3xxx_iva_hwmod, | 3065 | &omap3xxx_iva_hwmod, |
2857 | 3066 | ||
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 87486f559784..098e65943a00 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
@@ -191,6 +191,8 @@ | |||
191 | #define OMAP3430_AUTOIDLE_MASK (1 << 0) | 191 | #define OMAP3430_AUTOIDLE_MASK (1 << 0) |
192 | 192 | ||
193 | /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */ | 193 | /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */ |
194 | #define OMAP3430_EN_MMC3_MASK (1 << 30) | ||
195 | #define OMAP3430_EN_MMC3_SHIFT 30 | ||
194 | #define OMAP3430_EN_MMC2_MASK (1 << 25) | 196 | #define OMAP3430_EN_MMC2_MASK (1 << 25) |
195 | #define OMAP3430_EN_MMC2_SHIFT 25 | 197 | #define OMAP3430_EN_MMC2_SHIFT 25 |
196 | #define OMAP3430_EN_MMC1_MASK (1 << 24) | 198 | #define OMAP3430_EN_MMC1_MASK (1 << 24) |
@@ -231,6 +233,8 @@ | |||
231 | #define OMAP3430_EN_HSOTGUSB_SHIFT 4 | 233 | #define OMAP3430_EN_HSOTGUSB_SHIFT 4 |
232 | 234 | ||
233 | /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */ | 235 | /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */ |
236 | #define OMAP3430_ST_MMC3_SHIFT 30 | ||
237 | #define OMAP3430_ST_MMC3_MASK (1 << 30) | ||
234 | #define OMAP3430_ST_MMC2_SHIFT 25 | 238 | #define OMAP3430_ST_MMC2_SHIFT 25 |
235 | #define OMAP3430_ST_MMC2_MASK (1 << 25) | 239 | #define OMAP3430_ST_MMC2_MASK (1 << 25) |
236 | #define OMAP3430_ST_MMC1_SHIFT 24 | 240 | #define OMAP3430_ST_MMC1_SHIFT 24 |