diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 120 |
1 files changed, 113 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index afad69c6ba6e..35dcdb66a4e0 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -10,12 +10,10 @@ | |||
10 | */ | 10 | */ |
11 | #include <plat/omap_hwmod.h> | 11 | #include <plat/omap_hwmod.h> |
12 | #include <plat/serial.h> | 12 | #include <plat/serial.h> |
13 | #include <plat/gpio.h> | 13 | #include <linux/platform_data/gpio-omap.h> |
14 | #include <plat/dma.h> | 14 | #include <plat/dma.h> |
15 | #include <plat/dmtimer.h> | 15 | #include <plat/dmtimer.h> |
16 | #include <plat/mcspi.h> | 16 | #include <linux/platform_data/spi-omap2-mcspi.h> |
17 | |||
18 | #include <mach/irqs.h> | ||
19 | 17 | ||
20 | #include "omap_hwmod_common_data.h" | 18 | #include "omap_hwmod_common_data.h" |
21 | #include "cm-regbits-24xx.h" | 19 | #include "cm-regbits-24xx.h" |
@@ -23,8 +21,8 @@ | |||
23 | #include "wd_timer.h" | 21 | #include "wd_timer.h" |
24 | 22 | ||
25 | struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { | 23 | struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { |
26 | { .irq = 48, }, | 24 | { .irq = 48 + OMAP_INTC_START, }, |
27 | { .irq = -1 } | 25 | { .irq = -1 }, |
28 | }; | 26 | }; |
29 | 27 | ||
30 | struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { | 28 | struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { |
@@ -175,6 +173,26 @@ struct omap_hwmod_class omap2xxx_mcspi_class = { | |||
175 | }; | 173 | }; |
176 | 174 | ||
177 | /* | 175 | /* |
176 | * 'gpmc' class | ||
177 | * general purpose memory controller | ||
178 | */ | ||
179 | |||
180 | static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = { | ||
181 | .rev_offs = 0x0000, | ||
182 | .sysc_offs = 0x0010, | ||
183 | .syss_offs = 0x0014, | ||
184 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
185 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
186 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
187 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
188 | }; | ||
189 | |||
190 | static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = { | ||
191 | .name = "gpmc", | ||
192 | .sysc = &omap2xxx_gpmc_sysc, | ||
193 | }; | ||
194 | |||
195 | /* | ||
178 | * IP blocks | 196 | * IP blocks |
179 | */ | 197 | */ |
180 | 198 | ||
@@ -200,8 +218,14 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = { | |||
200 | }; | 218 | }; |
201 | 219 | ||
202 | /* MPU */ | 220 | /* MPU */ |
221 | static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = { | ||
222 | { .name = "pmu", .irq = 3 }, | ||
223 | { .irq = -1 } | ||
224 | }; | ||
225 | |||
203 | struct omap_hwmod omap2xxx_mpu_hwmod = { | 226 | struct omap_hwmod omap2xxx_mpu_hwmod = { |
204 | .name = "mpu", | 227 | .name = "mpu", |
228 | .mpu_irqs = omap2xxx_mpu_irqs, | ||
205 | .class = &mpu_hwmod_class, | 229 | .class = &mpu_hwmod_class, |
206 | .main_clk = "mpu_ck", | 230 | .main_clk = "mpu_ck", |
207 | }; | 231 | }; |
@@ -222,6 +246,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | |||
222 | .timer_capability = OMAP_TIMER_HAS_PWM, | 246 | .timer_capability = OMAP_TIMER_HAS_PWM, |
223 | }; | 247 | }; |
224 | 248 | ||
249 | /* timers with DSP interrupt dev attribute */ | ||
250 | static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = { | ||
251 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ, | ||
252 | }; | ||
253 | |||
225 | /* timer1 */ | 254 | /* timer1 */ |
226 | 255 | ||
227 | struct omap_hwmod omap2xxx_timer1_hwmod = { | 256 | struct omap_hwmod omap2xxx_timer1_hwmod = { |
@@ -310,6 +339,7 @@ struct omap_hwmod omap2xxx_timer5_hwmod = { | |||
310 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | 339 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, |
311 | }, | 340 | }, |
312 | }, | 341 | }, |
342 | .dev_attr = &capability_dsp_dev_attr, | ||
313 | .class = &omap2xxx_timer_hwmod_class, | 343 | .class = &omap2xxx_timer_hwmod_class, |
314 | }; | 344 | }; |
315 | 345 | ||
@@ -328,6 +358,7 @@ struct omap_hwmod omap2xxx_timer6_hwmod = { | |||
328 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | 358 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, |
329 | }, | 359 | }, |
330 | }, | 360 | }, |
361 | .dev_attr = &capability_dsp_dev_attr, | ||
331 | .class = &omap2xxx_timer_hwmod_class, | 362 | .class = &omap2xxx_timer_hwmod_class, |
332 | }; | 363 | }; |
333 | 364 | ||
@@ -346,6 +377,7 @@ struct omap_hwmod omap2xxx_timer7_hwmod = { | |||
346 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | 377 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, |
347 | }, | 378 | }, |
348 | }, | 379 | }, |
380 | .dev_attr = &capability_dsp_dev_attr, | ||
349 | .class = &omap2xxx_timer_hwmod_class, | 381 | .class = &omap2xxx_timer_hwmod_class, |
350 | }; | 382 | }; |
351 | 383 | ||
@@ -364,6 +396,7 @@ struct omap_hwmod omap2xxx_timer8_hwmod = { | |||
364 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | 396 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, |
365 | }, | 397 | }, |
366 | }, | 398 | }, |
399 | .dev_attr = &capability_dsp_dev_attr, | ||
367 | .class = &omap2xxx_timer_hwmod_class, | 400 | .class = &omap2xxx_timer_hwmod_class, |
368 | }; | 401 | }; |
369 | 402 | ||
@@ -726,7 +759,6 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = { | |||
726 | .dev_attr = &omap_mcspi2_dev_attr, | 759 | .dev_attr = &omap_mcspi2_dev_attr, |
727 | }; | 760 | }; |
728 | 761 | ||
729 | |||
730 | static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { | 762 | static struct omap_hwmod_class omap2xxx_counter_hwmod_class = { |
731 | .name = "counter", | 763 | .name = "counter", |
732 | }; | 764 | }; |
@@ -745,3 +777,77 @@ struct omap_hwmod omap2xxx_counter_32k_hwmod = { | |||
745 | }, | 777 | }, |
746 | .class = &omap2xxx_counter_hwmod_class, | 778 | .class = &omap2xxx_counter_hwmod_class, |
747 | }; | 779 | }; |
780 | |||
781 | /* gpmc */ | ||
782 | static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = { | ||
783 | { .irq = 20 }, | ||
784 | { .irq = -1 } | ||
785 | }; | ||
786 | |||
787 | struct omap_hwmod omap2xxx_gpmc_hwmod = { | ||
788 | .name = "gpmc", | ||
789 | .class = &omap2xxx_gpmc_hwmod_class, | ||
790 | .mpu_irqs = omap2xxx_gpmc_irqs, | ||
791 | .main_clk = "gpmc_fck", | ||
792 | /* | ||
793 | * XXX HWMOD_INIT_NO_RESET should not be needed for this IP | ||
794 | * block. It is not being added due to any known bugs with | ||
795 | * resetting the GPMC IP block, but rather because any timings | ||
796 | * set by the bootloader are not being correctly programmed by | ||
797 | * the kernel from the board file or DT data. | ||
798 | * HWMOD_INIT_NO_RESET should be removed ASAP. | ||
799 | */ | ||
800 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | | ||
801 | HWMOD_NO_IDLEST), | ||
802 | .prcm = { | ||
803 | .omap2 = { | ||
804 | .prcm_reg_id = 3, | ||
805 | .module_bit = OMAP24XX_EN_GPMC_MASK, | ||
806 | .module_offs = CORE_MOD, | ||
807 | }, | ||
808 | }, | ||
809 | }; | ||
810 | |||
811 | /* RNG */ | ||
812 | |||
813 | static struct omap_hwmod_class_sysconfig omap2_rng_sysc = { | ||
814 | .rev_offs = 0x3c, | ||
815 | .sysc_offs = 0x40, | ||
816 | .syss_offs = 0x44, | ||
817 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
818 | SYSS_HAS_RESET_STATUS), | ||
819 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
820 | }; | ||
821 | |||
822 | static struct omap_hwmod_class omap2_rng_hwmod_class = { | ||
823 | .name = "rng", | ||
824 | .sysc = &omap2_rng_sysc, | ||
825 | }; | ||
826 | |||
827 | static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = { | ||
828 | { .irq = 52 }, | ||
829 | { .irq = -1 } | ||
830 | }; | ||
831 | |||
832 | struct omap_hwmod omap2xxx_rng_hwmod = { | ||
833 | .name = "rng", | ||
834 | .mpu_irqs = omap2_rng_mpu_irqs, | ||
835 | .main_clk = "l4_ck", | ||
836 | .prcm = { | ||
837 | .omap2 = { | ||
838 | .module_offs = CORE_MOD, | ||
839 | .prcm_reg_id = 4, | ||
840 | .module_bit = OMAP24XX_EN_RNG_SHIFT, | ||
841 | .idlest_reg_id = 4, | ||
842 | .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT, | ||
843 | }, | ||
844 | }, | ||
845 | /* | ||
846 | * XXX The first read from the SYSSTATUS register of the RNG | ||
847 | * after the SYSCONFIG SOFTRESET bit is set triggers an | ||
848 | * imprecise external abort. It's unclear why this happens. | ||
849 | * Until this is analyzed, skip the IP block reset. | ||
850 | */ | ||
851 | .flags = HWMOD_INIT_NO_RESET, | ||
852 | .class = &omap2_rng_hwmod_class, | ||
853 | }; | ||