diff options
Diffstat (limited to 'arch/arm/mach-shmobile/setup-sh73a0.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 95 |
1 files changed, 24 insertions, 71 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 9696f3646864..96e7ca1e4e11 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -288,12 +288,7 @@ static struct sh_timer_config tmu00_platform_data = { | |||
288 | }; | 288 | }; |
289 | 289 | ||
290 | static struct resource tmu00_resources[] = { | 290 | static struct resource tmu00_resources[] = { |
291 | [0] = { | 291 | [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"), |
292 | .name = "TMU00", | ||
293 | .start = 0xfff60008, | ||
294 | .end = 0xfff60013, | ||
295 | .flags = IORESOURCE_MEM, | ||
296 | }, | ||
297 | [1] = { | 292 | [1] = { |
298 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ | 293 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ |
299 | .flags = IORESOURCE_IRQ, | 294 | .flags = IORESOURCE_IRQ, |
@@ -318,12 +313,7 @@ static struct sh_timer_config tmu01_platform_data = { | |||
318 | }; | 313 | }; |
319 | 314 | ||
320 | static struct resource tmu01_resources[] = { | 315 | static struct resource tmu01_resources[] = { |
321 | [0] = { | 316 | [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"), |
322 | .name = "TMU01", | ||
323 | .start = 0xfff60014, | ||
324 | .end = 0xfff6001f, | ||
325 | .flags = IORESOURCE_MEM, | ||
326 | }, | ||
327 | [1] = { | 317 | [1] = { |
328 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ | 318 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ |
329 | .flags = IORESOURCE_IRQ, | 319 | .flags = IORESOURCE_IRQ, |
@@ -341,12 +331,7 @@ static struct platform_device tmu01_device = { | |||
341 | }; | 331 | }; |
342 | 332 | ||
343 | static struct resource i2c0_resources[] = { | 333 | static struct resource i2c0_resources[] = { |
344 | [0] = { | 334 | [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"), |
345 | .name = "IIC0", | ||
346 | .start = 0xe6820000, | ||
347 | .end = 0xe6820425 - 1, | ||
348 | .flags = IORESOURCE_MEM, | ||
349 | }, | ||
350 | [1] = { | 335 | [1] = { |
351 | .start = gic_spi(167), | 336 | .start = gic_spi(167), |
352 | .end = gic_spi(170), | 337 | .end = gic_spi(170), |
@@ -355,12 +340,7 @@ static struct resource i2c0_resources[] = { | |||
355 | }; | 340 | }; |
356 | 341 | ||
357 | static struct resource i2c1_resources[] = { | 342 | static struct resource i2c1_resources[] = { |
358 | [0] = { | 343 | [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"), |
359 | .name = "IIC1", | ||
360 | .start = 0xe6822000, | ||
361 | .end = 0xe6822425 - 1, | ||
362 | .flags = IORESOURCE_MEM, | ||
363 | }, | ||
364 | [1] = { | 344 | [1] = { |
365 | .start = gic_spi(51), | 345 | .start = gic_spi(51), |
366 | .end = gic_spi(54), | 346 | .end = gic_spi(54), |
@@ -369,12 +349,7 @@ static struct resource i2c1_resources[] = { | |||
369 | }; | 349 | }; |
370 | 350 | ||
371 | static struct resource i2c2_resources[] = { | 351 | static struct resource i2c2_resources[] = { |
372 | [0] = { | 352 | [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"), |
373 | .name = "IIC2", | ||
374 | .start = 0xe6824000, | ||
375 | .end = 0xe6824425 - 1, | ||
376 | .flags = IORESOURCE_MEM, | ||
377 | }, | ||
378 | [1] = { | 353 | [1] = { |
379 | .start = gic_spi(171), | 354 | .start = gic_spi(171), |
380 | .end = gic_spi(174), | 355 | .end = gic_spi(174), |
@@ -383,12 +358,7 @@ static struct resource i2c2_resources[] = { | |||
383 | }; | 358 | }; |
384 | 359 | ||
385 | static struct resource i2c3_resources[] = { | 360 | static struct resource i2c3_resources[] = { |
386 | [0] = { | 361 | [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"), |
387 | .name = "IIC3", | ||
388 | .start = 0xe6826000, | ||
389 | .end = 0xe6826425 - 1, | ||
390 | .flags = IORESOURCE_MEM, | ||
391 | }, | ||
392 | [1] = { | 362 | [1] = { |
393 | .start = gic_spi(183), | 363 | .start = gic_spi(183), |
394 | .end = gic_spi(186), | 364 | .end = gic_spi(186), |
@@ -397,12 +367,7 @@ static struct resource i2c3_resources[] = { | |||
397 | }; | 367 | }; |
398 | 368 | ||
399 | static struct resource i2c4_resources[] = { | 369 | static struct resource i2c4_resources[] = { |
400 | [0] = { | 370 | [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"), |
401 | .name = "IIC4", | ||
402 | .start = 0xe6828000, | ||
403 | .end = 0xe6828425 - 1, | ||
404 | .flags = IORESOURCE_MEM, | ||
405 | }, | ||
406 | [1] = { | 371 | [1] = { |
407 | .start = gic_spi(187), | 372 | .start = gic_spi(187), |
408 | .end = gic_spi(190), | 373 | .end = gic_spi(190), |
@@ -623,12 +588,7 @@ static struct sh_dmae_pdata sh73a0_dmae_platform_data = { | |||
623 | }; | 588 | }; |
624 | 589 | ||
625 | static struct resource sh73a0_dmae_resources[] = { | 590 | static struct resource sh73a0_dmae_resources[] = { |
626 | { | 591 | DEFINE_RES_MEM(0xfe000020, 0x89e0), |
627 | /* Registers including DMAOR and channels including DMARSx */ | ||
628 | .start = 0xfe000020, | ||
629 | .end = 0xfe008a00 - 1, | ||
630 | .flags = IORESOURCE_MEM, | ||
631 | }, | ||
632 | { | 592 | { |
633 | .name = "error_irq", | 593 | .name = "error_irq", |
634 | .start = gic_spi(129), | 594 | .start = gic_spi(129), |
@@ -727,18 +687,10 @@ static struct sh_dmae_pdata sh73a0_mpdma_platform_data = { | |||
727 | 687 | ||
728 | /* Resource order important! */ | 688 | /* Resource order important! */ |
729 | static struct resource sh73a0_mpdma_resources[] = { | 689 | static struct resource sh73a0_mpdma_resources[] = { |
730 | { | 690 | /* Channel registers and DMAOR */ |
731 | /* Channel registers and DMAOR */ | 691 | DEFINE_RES_MEM(0xec618020, 0x270), |
732 | .start = 0xec618020, | 692 | /* DMARSx */ |
733 | .end = 0xec61828f, | 693 | DEFINE_RES_MEM(0xec619000, 0xc), |
734 | .flags = IORESOURCE_MEM, | ||
735 | }, | ||
736 | { | ||
737 | /* DMARSx */ | ||
738 | .start = 0xec619000, | ||
739 | .end = 0xec61900b, | ||
740 | .flags = IORESOURCE_MEM, | ||
741 | }, | ||
742 | { | 694 | { |
743 | .name = "error_irq", | 695 | .name = "error_irq", |
744 | .start = gic_spi(181), | 696 | .start = gic_spi(181), |
@@ -785,12 +737,7 @@ static struct platform_device pmu_device = { | |||
785 | 737 | ||
786 | /* an IPMMU module for ICB */ | 738 | /* an IPMMU module for ICB */ |
787 | static struct resource ipmmu_resources[] = { | 739 | static struct resource ipmmu_resources[] = { |
788 | [0] = { | 740 | DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"), |
789 | .name = "IPMMU", | ||
790 | .start = 0xfe951000, | ||
791 | .end = 0xfe9510ff, | ||
792 | .flags = IORESOURCE_MEM, | ||
793 | }, | ||
794 | }; | 741 | }; |
795 | 742 | ||
796 | static const char * const ipmmu_dev_names[] = { | 743 | static const char * const ipmmu_dev_names[] = { |
@@ -982,11 +929,17 @@ void __init sh73a0_add_standard_devices(void) | |||
982 | ARRAY_SIZE(sh73a0_late_devices)); | 929 | ARRAY_SIZE(sh73a0_late_devices)); |
983 | } | 930 | } |
984 | 931 | ||
932 | void __init sh73a0_init_delay(void) | ||
933 | { | ||
934 | shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */ | ||
935 | } | ||
936 | |||
985 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 937 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
986 | void __init __weak sh73a0_register_twd(void) { } | 938 | void __init __weak sh73a0_register_twd(void) { } |
987 | 939 | ||
988 | void __init sh73a0_earlytimer_init(void) | 940 | void __init sh73a0_earlytimer_init(void) |
989 | { | 941 | { |
942 | sh73a0_init_delay(); | ||
990 | sh73a0_clock_init(); | 943 | sh73a0_clock_init(); |
991 | shmobile_earlytimer_init(); | 944 | shmobile_earlytimer_init(); |
992 | sh73a0_register_twd(); | 945 | sh73a0_register_twd(); |
@@ -1005,17 +958,14 @@ void __init sh73a0_add_early_devices(void) | |||
1005 | 958 | ||
1006 | #ifdef CONFIG_USE_OF | 959 | #ifdef CONFIG_USE_OF |
1007 | 960 | ||
1008 | void __init sh73a0_init_delay(void) | ||
1009 | { | ||
1010 | shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */ | ||
1011 | } | ||
1012 | |||
1013 | static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { | 961 | static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { |
1014 | {}, | 962 | {}, |
1015 | }; | 963 | }; |
1016 | 964 | ||
1017 | void __init sh73a0_add_standard_devices_dt(void) | 965 | void __init sh73a0_add_standard_devices_dt(void) |
1018 | { | 966 | { |
967 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; | ||
968 | |||
1019 | /* clocks are setup late during boot in the case of DT */ | 969 | /* clocks are setup late during boot in the case of DT */ |
1020 | sh73a0_clock_init(); | 970 | sh73a0_clock_init(); |
1021 | 971 | ||
@@ -1023,6 +973,9 @@ void __init sh73a0_add_standard_devices_dt(void) | |||
1023 | ARRAY_SIZE(sh73a0_devices_dt)); | 973 | ARRAY_SIZE(sh73a0_devices_dt)); |
1024 | of_platform_populate(NULL, of_default_bus_match_table, | 974 | of_platform_populate(NULL, of_default_bus_match_table, |
1025 | sh73a0_auxdata_lookup, NULL); | 975 | sh73a0_auxdata_lookup, NULL); |
976 | |||
977 | /* Instantiate cpufreq-cpu0 */ | ||
978 | platform_device_register_full(&devinfo); | ||
1026 | } | 979 | } |
1027 | 980 | ||
1028 | static const char *sh73a0_boards_compat_dt[] __initdata = { | 981 | static const char *sh73a0_boards_compat_dt[] __initdata = { |