diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 105 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh73a0.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/headsmp.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/head-mackerel.txt | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/intc-sh7372.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7367.c | 223 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 217 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7377.c | 239 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/smp-sh73a0.c | 9 |
13 files changed, 897 insertions, 66 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 3e6f0aab460b..7894cd125f94 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/input/sh_keysc.h> | 34 | #include <linux/input/sh_keysc.h> |
35 | #include <linux/mmc/host.h> | 35 | #include <linux/mmc/host.h> |
36 | #include <linux/mmc/sh_mmcif.h> | 36 | #include <linux/mmc/sh_mmcif.h> |
37 | #include <linux/mmc/sh_mobile_sdhi.h> | ||
38 | #include <linux/mfd/tmio.h> | ||
37 | #include <linux/sh_clk.h> | 39 | #include <linux/sh_clk.h> |
38 | #include <video/sh_mobile_lcdc.h> | 40 | #include <video/sh_mobile_lcdc.h> |
39 | #include <video/sh_mipi_dsi.h> | 41 | #include <video/sh_mipi_dsi.h> |
@@ -296,11 +298,13 @@ static struct platform_device lcdc0_device = { | |||
296 | /* MIPI-DSI */ | 298 | /* MIPI-DSI */ |
297 | static struct resource mipidsi0_resources[] = { | 299 | static struct resource mipidsi0_resources[] = { |
298 | [0] = { | 300 | [0] = { |
301 | .name = "DSI0", | ||
299 | .start = 0xfeab0000, | 302 | .start = 0xfeab0000, |
300 | .end = 0xfeab3fff, | 303 | .end = 0xfeab3fff, |
301 | .flags = IORESOURCE_MEM, | 304 | .flags = IORESOURCE_MEM, |
302 | }, | 305 | }, |
303 | [1] = { | 306 | [1] = { |
307 | .name = "DSI0", | ||
304 | .start = 0xfeab4000, | 308 | .start = 0xfeab4000, |
305 | .end = 0xfeab7fff, | 309 | .end = 0xfeab7fff, |
306 | .flags = IORESOURCE_MEM, | 310 | .flags = IORESOURCE_MEM, |
@@ -325,6 +329,85 @@ static struct platform_device mipidsi0_device = { | |||
325 | }, | 329 | }, |
326 | }; | 330 | }; |
327 | 331 | ||
332 | static struct sh_mobile_sdhi_info sdhi0_info = { | ||
333 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | ||
334 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | ||
335 | }; | ||
336 | |||
337 | static struct resource sdhi0_resources[] = { | ||
338 | [0] = { | ||
339 | .name = "SDHI0", | ||
340 | .start = 0xee100000, | ||
341 | .end = 0xee1000ff, | ||
342 | .flags = IORESOURCE_MEM, | ||
343 | }, | ||
344 | [1] = { | ||
345 | .start = gic_spi(83), | ||
346 | .flags = IORESOURCE_IRQ, | ||
347 | }, | ||
348 | [2] = { | ||
349 | .start = gic_spi(84), | ||
350 | .flags = IORESOURCE_IRQ, | ||
351 | }, | ||
352 | [3] = { | ||
353 | .start = gic_spi(85), | ||
354 | .flags = IORESOURCE_IRQ, | ||
355 | }, | ||
356 | }; | ||
357 | |||
358 | static struct platform_device sdhi0_device = { | ||
359 | .name = "sh_mobile_sdhi", | ||
360 | .id = 0, | ||
361 | .num_resources = ARRAY_SIZE(sdhi0_resources), | ||
362 | .resource = sdhi0_resources, | ||
363 | .dev = { | ||
364 | .platform_data = &sdhi0_info, | ||
365 | }, | ||
366 | }; | ||
367 | |||
368 | void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | ||
369 | { | ||
370 | gpio_set_value(GPIO_PORT114, state); | ||
371 | } | ||
372 | |||
373 | static struct sh_mobile_sdhi_info sh_sdhi1_platdata = { | ||
374 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | ||
375 | .tmio_caps = MMC_CAP_NONREMOVABLE, | ||
376 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
377 | .set_pwr = ag5evm_sdhi1_set_pwr, | ||
378 | }; | ||
379 | |||
380 | static struct resource sdhi1_resources[] = { | ||
381 | [0] = { | ||
382 | .name = "SDHI1", | ||
383 | .start = 0xee120000, | ||
384 | .end = 0xee1200ff, | ||
385 | .flags = IORESOURCE_MEM, | ||
386 | }, | ||
387 | [1] = { | ||
388 | .start = gic_spi(87), | ||
389 | .flags = IORESOURCE_IRQ, | ||
390 | }, | ||
391 | [2] = { | ||
392 | .start = gic_spi(88), | ||
393 | .flags = IORESOURCE_IRQ, | ||
394 | }, | ||
395 | [3] = { | ||
396 | .start = gic_spi(89), | ||
397 | .flags = IORESOURCE_IRQ, | ||
398 | }, | ||
399 | }; | ||
400 | |||
401 | static struct platform_device sdhi1_device = { | ||
402 | .name = "sh_mobile_sdhi", | ||
403 | .id = 1, | ||
404 | .dev = { | ||
405 | .platform_data = &sh_sdhi1_platdata, | ||
406 | }, | ||
407 | .num_resources = ARRAY_SIZE(sdhi1_resources), | ||
408 | .resource = sdhi1_resources, | ||
409 | }; | ||
410 | |||
328 | static struct platform_device *ag5evm_devices[] __initdata = { | 411 | static struct platform_device *ag5evm_devices[] __initdata = { |
329 | ð_device, | 412 | ð_device, |
330 | &keysc_device, | 413 | &keysc_device, |
@@ -333,6 +416,8 @@ static struct platform_device *ag5evm_devices[] __initdata = { | |||
333 | &irda_device, | 416 | &irda_device, |
334 | &lcdc0_device, | 417 | &lcdc0_device, |
335 | &mipidsi0_device, | 418 | &mipidsi0_device, |
419 | &sdhi0_device, | ||
420 | &sdhi1_device, | ||
336 | }; | 421 | }; |
337 | 422 | ||
338 | static struct map_desc ag5evm_io_desc[] __initdata = { | 423 | static struct map_desc ag5evm_io_desc[] __initdata = { |
@@ -454,6 +539,26 @@ static void __init ag5evm_init(void) | |||
454 | /* MIPI-DSI clock setup */ | 539 | /* MIPI-DSI clock setup */ |
455 | __raw_writel(0x2a809010, DSI0PHYCR); | 540 | __raw_writel(0x2a809010, DSI0PHYCR); |
456 | 541 | ||
542 | /* enable SDHI0 on CN15 [SD I/F] */ | ||
543 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
544 | gpio_request(GPIO_FN_SDHIWP0, NULL); | ||
545 | gpio_request(GPIO_FN_SDHICMD0, NULL); | ||
546 | gpio_request(GPIO_FN_SDHICLK0, NULL); | ||
547 | gpio_request(GPIO_FN_SDHID0_3, NULL); | ||
548 | gpio_request(GPIO_FN_SDHID0_2, NULL); | ||
549 | gpio_request(GPIO_FN_SDHID0_1, NULL); | ||
550 | gpio_request(GPIO_FN_SDHID0_0, NULL); | ||
551 | |||
552 | /* enable SDHI1 on CN4 [WLAN I/F] */ | ||
553 | gpio_request(GPIO_FN_SDHICLK1, NULL); | ||
554 | gpio_request(GPIO_FN_SDHICMD1_PU, NULL); | ||
555 | gpio_request(GPIO_FN_SDHID1_3_PU, NULL); | ||
556 | gpio_request(GPIO_FN_SDHID1_2_PU, NULL); | ||
557 | gpio_request(GPIO_FN_SDHID1_1_PU, NULL); | ||
558 | gpio_request(GPIO_FN_SDHID1_0_PU, NULL); | ||
559 | gpio_request(GPIO_PORT114, "sdhi1_power"); | ||
560 | gpio_direction_output(GPIO_PORT114, 0); | ||
561 | |||
457 | #ifdef CONFIG_CACHE_L2X0 | 562 | #ifdef CONFIG_CACHE_L2X0 |
458 | /* Shared attribute override enable, 64K*8way */ | 563 | /* Shared attribute override enable, 64K*8way */ |
459 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); | 564 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 1e35fa976d64..d82d5369e36d 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -316,8 +316,16 @@ static struct resource sdhi0_resources[] = { | |||
316 | .flags = IORESOURCE_MEM, | 316 | .flags = IORESOURCE_MEM, |
317 | }, | 317 | }, |
318 | [1] = { | 318 | [1] = { |
319 | .start = evt2irq(0x0e00) /* SDHI0 */, | 319 | .start = evt2irq(0x0e00) /* SDHI0_SDHI0I0 */, |
320 | .flags = IORESOURCE_IRQ, | 320 | .flags = IORESOURCE_IRQ, |
321 | }, | ||
322 | [2] = { | ||
323 | .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */, | ||
324 | .flags = IORESOURCE_IRQ, | ||
325 | }, | ||
326 | [3] = { | ||
327 | .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */, | ||
328 | .flags = IORESOURCE_IRQ, | ||
321 | }, | 329 | }, |
322 | }; | 330 | }; |
323 | 331 | ||
@@ -349,8 +357,16 @@ static struct resource sdhi1_resources[] = { | |||
349 | .flags = IORESOURCE_MEM, | 357 | .flags = IORESOURCE_MEM, |
350 | }, | 358 | }, |
351 | [1] = { | 359 | [1] = { |
352 | .start = evt2irq(0x0e80), | 360 | .start = evt2irq(0x0e80), /* SDHI1_SDHI1I0 */ |
353 | .flags = IORESOURCE_IRQ, | 361 | .flags = IORESOURCE_IRQ, |
362 | }, | ||
363 | [2] = { | ||
364 | .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */ | ||
365 | .flags = IORESOURCE_IRQ, | ||
366 | }, | ||
367 | [3] = { | ||
368 | .start = evt2irq(0x0ec0), /* SDHI1_SDHI1I2 */ | ||
369 | .flags = IORESOURCE_IRQ, | ||
354 | }, | 370 | }, |
355 | }; | 371 | }; |
356 | 372 | ||
@@ -980,11 +996,6 @@ static void __init hdmi_init_pm_clock(void) | |||
980 | goto out; | 996 | goto out; |
981 | } | 997 | } |
982 | 998 | ||
983 | ret = clk_enable(&sh7372_pllc2_clk); | ||
984 | if (ret < 0) { | ||
985 | pr_err("Cannot enable pllc2 clock\n"); | ||
986 | goto out; | ||
987 | } | ||
988 | pr_debug("PLLC2 set frequency %lu\n", rate); | 999 | pr_debug("PLLC2 set frequency %lu\n", rate); |
989 | 1000 | ||
990 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 1001 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 7da2ca24229d..ca5b35bd2466 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -458,12 +458,6 @@ static void __init hdmi_init_pm_clock(void) | |||
458 | goto out; | 458 | goto out; |
459 | } | 459 | } |
460 | 460 | ||
461 | ret = clk_enable(&sh7372_pllc2_clk); | ||
462 | if (ret < 0) { | ||
463 | pr_err("Cannot enable pllc2 clock\n"); | ||
464 | goto out; | ||
465 | } | ||
466 | |||
467 | pr_debug("PLLC2 set frequency %lu\n", rate); | 461 | pr_debug("PLLC2 set frequency %lu\n", rate); |
468 | 462 | ||
469 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 463 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
@@ -690,7 +684,15 @@ static struct resource sdhi0_resources[] = { | |||
690 | .flags = IORESOURCE_MEM, | 684 | .flags = IORESOURCE_MEM, |
691 | }, | 685 | }, |
692 | [1] = { | 686 | [1] = { |
693 | .start = evt2irq(0x0e00) /* SDHI0 */, | 687 | .start = evt2irq(0x0e00) /* SDHI0_SDHI0I0 */, |
688 | .flags = IORESOURCE_IRQ, | ||
689 | }, | ||
690 | [2] = { | ||
691 | .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */, | ||
692 | .flags = IORESOURCE_IRQ, | ||
693 | }, | ||
694 | [3] = { | ||
695 | .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */, | ||
694 | .flags = IORESOURCE_IRQ, | 696 | .flags = IORESOURCE_IRQ, |
695 | }, | 697 | }, |
696 | }; | 698 | }; |
@@ -705,7 +707,7 @@ static struct platform_device sdhi0_device = { | |||
705 | }, | 707 | }, |
706 | }; | 708 | }; |
707 | 709 | ||
708 | #if !defined(CONFIG_MMC_SH_MMCIF) | 710 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
709 | /* SDHI1 */ | 711 | /* SDHI1 */ |
710 | static struct sh_mobile_sdhi_info sdhi1_info = { | 712 | static struct sh_mobile_sdhi_info sdhi1_info = { |
711 | .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX, | 713 | .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX, |
@@ -725,7 +727,15 @@ static struct resource sdhi1_resources[] = { | |||
725 | .flags = IORESOURCE_MEM, | 727 | .flags = IORESOURCE_MEM, |
726 | }, | 728 | }, |
727 | [1] = { | 729 | [1] = { |
728 | .start = evt2irq(0x0e80), | 730 | .start = evt2irq(0x0e80), /* SDHI1_SDHI1I0 */ |
731 | .flags = IORESOURCE_IRQ, | ||
732 | }, | ||
733 | [2] = { | ||
734 | .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */ | ||
735 | .flags = IORESOURCE_IRQ, | ||
736 | }, | ||
737 | [3] = { | ||
738 | .start = evt2irq(0x0ec0), /* SDHI1_SDHI1I2 */ | ||
729 | .flags = IORESOURCE_IRQ, | 739 | .flags = IORESOURCE_IRQ, |
730 | }, | 740 | }, |
731 | }; | 741 | }; |
@@ -768,7 +778,15 @@ static struct resource sdhi2_resources[] = { | |||
768 | .flags = IORESOURCE_MEM, | 778 | .flags = IORESOURCE_MEM, |
769 | }, | 779 | }, |
770 | [1] = { | 780 | [1] = { |
771 | .start = evt2irq(0x1200), | 781 | .start = evt2irq(0x1200), /* SDHI2_SDHI2I0 */ |
782 | .flags = IORESOURCE_IRQ, | ||
783 | }, | ||
784 | [2] = { | ||
785 | .start = evt2irq(0x1220), /* SDHI2_SDHI2I1 */ | ||
786 | .flags = IORESOURCE_IRQ, | ||
787 | }, | ||
788 | [3] = { | ||
789 | .start = evt2irq(0x1240), /* SDHI2_SDHI2I2 */ | ||
772 | .flags = IORESOURCE_IRQ, | 790 | .flags = IORESOURCE_IRQ, |
773 | }, | 791 | }, |
774 | }; | 792 | }; |
@@ -803,6 +821,15 @@ static struct resource sh_mmcif_resources[] = { | |||
803 | }, | 821 | }, |
804 | }; | 822 | }; |
805 | 823 | ||
824 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
825 | .chan_priv_rx = { | ||
826 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
827 | }, | ||
828 | .chan_priv_tx = { | ||
829 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
830 | }, | ||
831 | }; | ||
832 | |||
806 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 833 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
807 | .sup_pclk = 0, | 834 | .sup_pclk = 0, |
808 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 835 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -810,6 +837,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
810 | MMC_CAP_8_BIT_DATA | | 837 | MMC_CAP_8_BIT_DATA | |
811 | MMC_CAP_NEEDS_POLL, | 838 | MMC_CAP_NEEDS_POLL, |
812 | .get_cd = slot_cn7_get_cd, | 839 | .get_cd = slot_cn7_get_cd, |
840 | .dma = &sh_mmcif_dma, | ||
813 | }; | 841 | }; |
814 | 842 | ||
815 | static struct platform_device sh_mmcif_device = { | 843 | static struct platform_device sh_mmcif_device = { |
@@ -940,7 +968,7 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
940 | &fsi_ak4643_device, | 968 | &fsi_ak4643_device, |
941 | &fsi_hdmi_device, | 969 | &fsi_hdmi_device, |
942 | &sdhi0_device, | 970 | &sdhi0_device, |
943 | #if !defined(CONFIG_MMC_SH_MMCIF) | 971 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
944 | &sdhi1_device, | 972 | &sdhi1_device, |
945 | #endif | 973 | #endif |
946 | &sdhi2_device, | 974 | &sdhi2_device, |
@@ -1140,7 +1168,7 @@ static void __init mackerel_init(void) | |||
1140 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 1168 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
1141 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 1169 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
1142 | 1170 | ||
1143 | #if !defined(CONFIG_MMC_SH_MMCIF) | 1171 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
1144 | /* enable SDHI1 */ | 1172 | /* enable SDHI1 */ |
1145 | gpio_request(GPIO_FN_SDHICMD1, NULL); | 1173 | gpio_request(GPIO_FN_SDHICMD1, NULL); |
1146 | gpio_request(GPIO_FN_SDHICLK1, NULL); | 1174 | gpio_request(GPIO_FN_SDHICLK1, NULL); |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index e9731b5a73ed..95b814aac556 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -44,6 +44,11 @@ | |||
44 | #define DSI1PCKCR 0xe6150098 | 44 | #define DSI1PCKCR 0xe6150098 |
45 | #define PLLC01CR 0xe6150028 | 45 | #define PLLC01CR 0xe6150028 |
46 | #define PLLC2CR 0xe615002c | 46 | #define PLLC2CR 0xe615002c |
47 | #define RMSTPCR0 0xe6150110 | ||
48 | #define RMSTPCR1 0xe6150114 | ||
49 | #define RMSTPCR2 0xe6150118 | ||
50 | #define RMSTPCR3 0xe615011c | ||
51 | #define RMSTPCR4 0xe6150120 | ||
47 | #define SMSTPCR0 0xe6150130 | 52 | #define SMSTPCR0 0xe6150130 |
48 | #define SMSTPCR1 0xe6150134 | 53 | #define SMSTPCR1 0xe6150134 |
49 | #define SMSTPCR2 0xe6150138 | 54 | #define SMSTPCR2 0xe6150138 |
@@ -421,9 +426,6 @@ static unsigned long fsidiv_recalc(struct clk *clk) | |||
421 | 426 | ||
422 | value = __raw_readl(clk->mapping->base); | 427 | value = __raw_readl(clk->mapping->base); |
423 | 428 | ||
424 | if ((value & 0x3) != 0x3) | ||
425 | return 0; | ||
426 | |||
427 | value >>= 16; | 429 | value >>= 16; |
428 | if (value < 2) | 430 | if (value < 2) |
429 | return 0; | 431 | return 0; |
@@ -504,7 +506,7 @@ static struct clk *late_main_clks[] = { | |||
504 | enum { MSTP001, | 506 | enum { MSTP001, |
505 | MSTP131, MSTP130, | 507 | MSTP131, MSTP130, |
506 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, | 508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, |
507 | MSTP118, MSTP117, MSTP116, | 509 | MSTP118, MSTP117, MSTP116, MSTP113, |
508 | MSTP106, MSTP101, MSTP100, | 510 | MSTP106, MSTP101, MSTP100, |
509 | MSTP223, | 511 | MSTP223, |
510 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 512 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
@@ -527,6 +529,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
527 | [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX */ | 529 | [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX */ |
528 | [MSTP117] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ | 530 | [MSTP117] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */ |
529 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ | 531 | [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */ |
532 | [MSTP113] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 13, 0), /* MERAM */ | ||
530 | [MSTP106] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 6, 0), /* JPU */ | 533 | [MSTP106] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 6, 0), /* JPU */ |
531 | [MSTP101] = MSTP(&div4_clks[DIV4_M1], SMSTPCR1, 1, 0), /* VPU */ | 534 | [MSTP101] = MSTP(&div4_clks[DIV4_M1], SMSTPCR1, 1, 0), /* VPU */ |
532 | [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ | 535 | [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ |
@@ -617,6 +620,7 @@ static struct clk_lookup lookups[] = { | |||
617 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */ | 620 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */ |
618 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ | 621 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ |
619 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ | 622 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ |
623 | CLKDEV_DEV_ID("sh_mobile_meram.0", &mstp_clks[MSTP113]), /* MERAM */ | ||
620 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ | 624 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ |
621 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[MSTP101]), /* VPU */ | 625 | CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[MSTP101]), /* VPU */ |
622 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ | 626 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ |
@@ -655,6 +659,13 @@ void __init sh7372_clock_init(void) | |||
655 | { | 659 | { |
656 | int k, ret = 0; | 660 | int k, ret = 0; |
657 | 661 | ||
662 | /* make sure MSTP bits on the RT/SH4AL-DSP side are off */ | ||
663 | __raw_writel(0xe4ef8087, RMSTPCR0); | ||
664 | __raw_writel(0xffffffff, RMSTPCR1); | ||
665 | __raw_writel(0x37c7f7ff, RMSTPCR2); | ||
666 | __raw_writel(0xffffffff, RMSTPCR3); | ||
667 | __raw_writel(0xffe0fffd, RMSTPCR4); | ||
668 | |||
658 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | 669 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) |
659 | ret = clk_register(main_clks[k]); | 670 | ret = clk_register(main_clks[k]); |
660 | 671 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 7e58904c1c8c..f86e463f174d 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -266,7 +266,7 @@ enum { MSTP001, | |||
266 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, | 266 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, |
267 | MSTP219, | 267 | MSTP219, |
268 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 268 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
269 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP312, | 269 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP314, MSTP313, MSTP312, MSTP311, |
270 | MSTP411, MSTP410, MSTP403, | 270 | MSTP411, MSTP410, MSTP403, |
271 | MSTP_NR }; | 271 | MSTP_NR }; |
272 | 272 | ||
@@ -295,7 +295,10 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
295 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | 295 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ |
296 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ | 296 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ |
297 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ | 297 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ |
298 | [MSTP314] = MSTP(&div6_clks[DIV6_SDHI0], SMSTPCR3, 14, 0), /* SDHI0 */ | ||
299 | [MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */ | ||
298 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ | 300 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ |
301 | [MSTP311] = MSTP(&div6_clks[DIV6_SDHI2], SMSTPCR3, 11, 0), /* SDHI2 */ | ||
299 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ | 302 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ |
300 | [MSTP410] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */ | 303 | [MSTP410] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */ |
301 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | 304 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ |
@@ -313,6 +316,9 @@ static struct clk_lookup lookups[] = { | |||
313 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), | 316 | CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]), |
314 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), | 317 | CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]), |
315 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), | 318 | CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]), |
319 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), | ||
320 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), | ||
321 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), | ||
316 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | 322 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), |
317 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | 323 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), |
318 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | 324 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), |
@@ -341,7 +347,10 @@ static struct clk_lookup lookups[] = { | |||
341 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | 347 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
342 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ | 348 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ |
343 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ | 349 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ |
350 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | ||
351 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | ||
344 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ | 352 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ |
353 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]), /* SDHI2 */ | ||
345 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ | 354 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ |
346 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ | 355 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ |
347 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 356 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
@@ -351,6 +360,11 @@ void __init sh73a0_clock_init(void) | |||
351 | { | 360 | { |
352 | int k, ret = 0; | 361 | int k, ret = 0; |
353 | 362 | ||
363 | /* Set SDHI clocks to a known state */ | ||
364 | __raw_writel(0x108, SD0CKCR); | ||
365 | __raw_writel(0x108, SD1CKCR); | ||
366 | __raw_writel(0x108, SD2CKCR); | ||
367 | |||
354 | /* detect main clock parent */ | 368 | /* detect main clock parent */ |
355 | switch ((__raw_readl(CKSCR) >> 24) & 0x03) { | 369 | switch ((__raw_readl(CKSCR) >> 24) & 0x03) { |
356 | case 0: | 370 | case 0: |
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index d4cec6b4c7d9..26079d933d91 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -24,4 +24,4 @@ | |||
24 | .align 12 | 24 | .align 12 |
25 | ENTRY(shmobile_secondary_vector) | 25 | ENTRY(shmobile_secondary_vector) |
26 | ldr pc, 1f | 26 | ldr pc, 1f |
27 | 1: .long secondary_startup - PAGE_OFFSET + PHYS_OFFSET | 27 | 1: .long secondary_startup - PAGE_OFFSET + PLAT_PHYS_OFFSET |
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt index 3029aba38688..9f134dfeffdc 100644 --- a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt +++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | |||
@@ -87,8 +87,7 @@ WAIT 1, 0xFE40009C | |||
87 | ED 0xFE400354, 0x01AD8002 | 87 | ED 0xFE400354, 0x01AD8002 |
88 | 88 | ||
89 | LIST "SCIF0 - Serial port for earlyprintk" | 89 | LIST "SCIF0 - Serial port for earlyprintk" |
90 | EB 0xE6053098, 0x11 | ||
91 | EB 0xE6053098, 0xe1 | 90 | EB 0xE6053098, 0xe1 |
92 | EW 0xE6C40000, 0x0000 | 91 | EW 0xE6C40000, 0x0000 |
93 | EB 0xE6C40004, 0x19 | 92 | EB 0xE6C40004, 0x19 |
94 | EW 0xE6C40008, 0x3000 | 93 | EW 0xE6C40008, 0x0030 |
diff --git a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt index 3029aba38688..9f134dfeffdc 100644 --- a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt +++ b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt | |||
@@ -87,8 +87,7 @@ WAIT 1, 0xFE40009C | |||
87 | ED 0xFE400354, 0x01AD8002 | 87 | ED 0xFE400354, 0x01AD8002 |
88 | 88 | ||
89 | LIST "SCIF0 - Serial port for earlyprintk" | 89 | LIST "SCIF0 - Serial port for earlyprintk" |
90 | EB 0xE6053098, 0x11 | ||
91 | EB 0xE6053098, 0xe1 | 90 | EB 0xE6053098, 0xe1 |
92 | EW 0xE6C40000, 0x0000 | 91 | EW 0xE6C40000, 0x0000 |
93 | EB 0xE6C40004, 0x19 | 92 | EB 0xE6C40004, 0x19 |
94 | EW 0xE6C40008, 0x3000 | 93 | EW 0xE6C40008, 0x0030 |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 7a4960f9c1e3..3b28743c77eb 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -27,8 +27,6 @@ | |||
27 | 27 | ||
28 | enum { | 28 | enum { |
29 | UNUSED_INTCA = 0, | 29 | UNUSED_INTCA = 0, |
30 | ENABLED, | ||
31 | DISABLED, | ||
32 | 30 | ||
33 | /* interrupt sources INTCA */ | 31 | /* interrupt sources INTCA */ |
34 | IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A, | 32 | IRQ0A, IRQ1A, IRQ2A, IRQ3A, IRQ4A, IRQ5A, IRQ6A, IRQ7A, |
@@ -49,14 +47,14 @@ enum { | |||
49 | MSIOF2, MSIOF1, | 47 | MSIOF2, MSIOF1, |
50 | SCIFA4, SCIFA5, SCIFB, | 48 | SCIFA4, SCIFA5, SCIFB, |
51 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, | 49 | FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I, |
52 | SDHI0, | 50 | SDHI0_SDHI0I0, SDHI0_SDHI0I1, SDHI0_SDHI0I2, SDHI0_SDHI0I3, |
53 | SDHI1, | 51 | SDHI1_SDHI1I0, SDHI1_SDHI1I1, SDHI1_SDHI1I2, |
54 | IRREM, | 52 | IRREM, |
55 | IRDA, | 53 | IRDA, |
56 | TPU0, | 54 | TPU0, |
57 | TTI20, | 55 | TTI20, |
58 | DDM, | 56 | DDM, |
59 | SDHI2, | 57 | SDHI2_SDHI2I0, SDHI2_SDHI2I1, SDHI2_SDHI2I2, SDHI2_SDHI2I3, |
60 | RWDT0, | 58 | RWDT0, |
61 | DMAC1_1_DEI0, DMAC1_1_DEI1, DMAC1_1_DEI2, DMAC1_1_DEI3, | 59 | DMAC1_1_DEI0, DMAC1_1_DEI1, DMAC1_1_DEI2, DMAC1_1_DEI3, |
62 | DMAC1_2_DEI4, DMAC1_2_DEI5, DMAC1_2_DADERR, | 60 | DMAC1_2_DEI4, DMAC1_2_DEI5, DMAC1_2_DADERR, |
@@ -84,7 +82,7 @@ enum { | |||
84 | 82 | ||
85 | /* interrupt groups INTCA */ | 83 | /* interrupt groups INTCA */ |
86 | DMAC1_1, DMAC1_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT, | 84 | DMAC1_1, DMAC1_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT, |
87 | AP_ARM1, AP_ARM2, SPU2, FLCTL, IIC1 | 85 | AP_ARM1, AP_ARM2, SPU2, FLCTL, IIC1, SDHI0, SDHI1, SDHI2 |
88 | }; | 86 | }; |
89 | 87 | ||
90 | static struct intc_vect intca_vectors[] __initdata = { | 88 | static struct intc_vect intca_vectors[] __initdata = { |
@@ -125,17 +123,17 @@ static struct intc_vect intca_vectors[] __initdata = { | |||
125 | INTC_VECT(SCIFB, 0x0d60), | 123 | INTC_VECT(SCIFB, 0x0d60), |
126 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), | 124 | INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0), |
127 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), | 125 | INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0), |
128 | INTC_VECT(SDHI0, 0x0e00), INTC_VECT(SDHI0, 0x0e20), | 126 | INTC_VECT(SDHI0_SDHI0I0, 0x0e00), INTC_VECT(SDHI0_SDHI0I1, 0x0e20), |
129 | INTC_VECT(SDHI0, 0x0e40), INTC_VECT(SDHI0, 0x0e60), | 127 | INTC_VECT(SDHI0_SDHI0I2, 0x0e40), INTC_VECT(SDHI0_SDHI0I3, 0x0e60), |
130 | INTC_VECT(SDHI1, 0x0e80), INTC_VECT(SDHI1, 0x0ea0), | 128 | INTC_VECT(SDHI1_SDHI1I0, 0x0e80), INTC_VECT(SDHI1_SDHI1I1, 0x0ea0), |
131 | INTC_VECT(SDHI1, 0x0ec0), | 129 | INTC_VECT(SDHI1_SDHI1I2, 0x0ec0), |
132 | INTC_VECT(IRREM, 0x0f60), | 130 | INTC_VECT(IRREM, 0x0f60), |
133 | INTC_VECT(IRDA, 0x0480), | 131 | INTC_VECT(IRDA, 0x0480), |
134 | INTC_VECT(TPU0, 0x04a0), | 132 | INTC_VECT(TPU0, 0x04a0), |
135 | INTC_VECT(TTI20, 0x1100), | 133 | INTC_VECT(TTI20, 0x1100), |
136 | INTC_VECT(DDM, 0x1140), | 134 | INTC_VECT(DDM, 0x1140), |
137 | INTC_VECT(SDHI2, 0x1200), INTC_VECT(SDHI2, 0x1220), | 135 | INTC_VECT(SDHI2_SDHI2I0, 0x1200), INTC_VECT(SDHI2_SDHI2I1, 0x1220), |
138 | INTC_VECT(SDHI2, 0x1240), INTC_VECT(SDHI2, 0x1260), | 136 | INTC_VECT(SDHI2_SDHI2I2, 0x1240), INTC_VECT(SDHI2_SDHI2I3, 0x1260), |
139 | INTC_VECT(RWDT0, 0x1280), | 137 | INTC_VECT(RWDT0, 0x1280), |
140 | INTC_VECT(DMAC1_1_DEI0, 0x2000), INTC_VECT(DMAC1_1_DEI1, 0x2020), | 138 | INTC_VECT(DMAC1_1_DEI0, 0x2000), INTC_VECT(DMAC1_1_DEI1, 0x2020), |
141 | INTC_VECT(DMAC1_1_DEI2, 0x2040), INTC_VECT(DMAC1_1_DEI3, 0x2060), | 139 | INTC_VECT(DMAC1_1_DEI2, 0x2040), INTC_VECT(DMAC1_1_DEI3, 0x2060), |
@@ -195,6 +193,12 @@ static struct intc_group intca_groups[] __initdata = { | |||
195 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, | 193 | INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI, |
196 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), | 194 | FLCTL_FLTREQ0I, FLCTL_FLTREQ1I), |
197 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), | 195 | INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1), |
196 | INTC_GROUP(SDHI0, SDHI0_SDHI0I0, SDHI0_SDHI0I1, | ||
197 | SDHI0_SDHI0I2, SDHI0_SDHI0I3), | ||
198 | INTC_GROUP(SDHI1, SDHI1_SDHI1I0, SDHI1_SDHI1I1, | ||
199 | SDHI1_SDHI1I2), | ||
200 | INTC_GROUP(SDHI2, SDHI2_SDHI2I0, SDHI2_SDHI2I1, | ||
201 | SDHI2_SDHI2I2, SDHI2_SDHI2I3), | ||
198 | INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM), | 202 | INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM), |
199 | }; | 203 | }; |
200 | 204 | ||
@@ -230,10 +234,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = { | |||
230 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, | 234 | { SCIFB, SCIFA5, SCIFA4, MSIOF1, |
231 | 0, 0, MSIOF2, 0 } }, | 235 | 0, 0, MSIOF2, 0 } }, |
232 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ | 236 | { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ |
233 | { DISABLED, ENABLED, ENABLED, ENABLED, | 237 | { SDHI0_SDHI0I3, SDHI0_SDHI0I2, SDHI0_SDHI0I1, SDHI0_SDHI0I0, |
234 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, | 238 | FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, |
235 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ | 239 | { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ |
236 | { 0, ENABLED, ENABLED, ENABLED, | 240 | { 0, SDHI1_SDHI1I2, SDHI1_SDHI1I1, SDHI1_SDHI1I0, |
237 | TTI20, USBHSDMAC0_USHDMI, 0, 0 } }, | 241 | TTI20, USBHSDMAC0_USHDMI, 0, 0 } }, |
238 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ | 242 | { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ |
239 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, | 243 | { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, |
@@ -248,7 +252,7 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = { | |||
248 | { 0, 0, TPU0, 0, | 252 | { 0, 0, TPU0, 0, |
249 | 0, 0, 0, 0 } }, | 253 | 0, 0, 0, 0 } }, |
250 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ | 254 | { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ |
251 | { DISABLED, DISABLED, ENABLED, ENABLED, | 255 | { SDHI2_SDHI2I3, SDHI2_SDHI2I2, SDHI2_SDHI2I1, SDHI2_SDHI2I0, |
252 | 0, CMT3, 0, RWDT0 } }, | 256 | 0, CMT3, 0, RWDT0 } }, |
253 | { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */ | 257 | { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */ |
254 | { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0, | 258 | { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0, |
@@ -354,14 +358,10 @@ static struct intc_mask_reg intca_ack_registers[] __initdata = { | |||
354 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, | 358 | { IRQ24A, IRQ25A, IRQ26A, IRQ27A, IRQ28A, IRQ29A, IRQ30A, IRQ31A } }, |
355 | }; | 359 | }; |
356 | 360 | ||
357 | static struct intc_desc intca_desc __initdata = { | 361 | static DECLARE_INTC_DESC_ACK(intca_desc, "sh7372-intca", |
358 | .name = "sh7372-intca", | 362 | intca_vectors, intca_groups, |
359 | .force_enable = ENABLED, | 363 | intca_mask_registers, intca_prio_registers, |
360 | .force_disable = DISABLED, | 364 | intca_sense_registers, intca_ack_registers); |
361 | .hw = INTC_HW_DESC(intca_vectors, intca_groups, | ||
362 | intca_mask_registers, intca_prio_registers, | ||
363 | intca_sense_registers, intca_ack_registers), | ||
364 | }; | ||
365 | 365 | ||
366 | enum { | 366 | enum { |
367 | UNUSED_INTCS = 0, | 367 | UNUSED_INTCS = 0, |
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index ce28141662da..2c10190dbb55 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/uio_driver.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/input.h> | 27 | #include <linux/input.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -195,6 +196,214 @@ static struct platform_device cmt10_device = { | |||
195 | .num_resources = ARRAY_SIZE(cmt10_resources), | 196 | .num_resources = ARRAY_SIZE(cmt10_resources), |
196 | }; | 197 | }; |
197 | 198 | ||
199 | /* VPU */ | ||
200 | static struct uio_info vpu_platform_data = { | ||
201 | .name = "VPU5", | ||
202 | .version = "0", | ||
203 | .irq = intcs_evt2irq(0x980), | ||
204 | }; | ||
205 | |||
206 | static struct resource vpu_resources[] = { | ||
207 | [0] = { | ||
208 | .name = "VPU", | ||
209 | .start = 0xfe900000, | ||
210 | .end = 0xfe902807, | ||
211 | .flags = IORESOURCE_MEM, | ||
212 | }, | ||
213 | }; | ||
214 | |||
215 | static struct platform_device vpu_device = { | ||
216 | .name = "uio_pdrv_genirq", | ||
217 | .id = 0, | ||
218 | .dev = { | ||
219 | .platform_data = &vpu_platform_data, | ||
220 | }, | ||
221 | .resource = vpu_resources, | ||
222 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
223 | }; | ||
224 | |||
225 | /* VEU0 */ | ||
226 | static struct uio_info veu0_platform_data = { | ||
227 | .name = "VEU0", | ||
228 | .version = "0", | ||
229 | .irq = intcs_evt2irq(0x700), | ||
230 | }; | ||
231 | |||
232 | static struct resource veu0_resources[] = { | ||
233 | [0] = { | ||
234 | .name = "VEU0", | ||
235 | .start = 0xfe920000, | ||
236 | .end = 0xfe9200b7, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, | ||
239 | }; | ||
240 | |||
241 | static struct platform_device veu0_device = { | ||
242 | .name = "uio_pdrv_genirq", | ||
243 | .id = 1, | ||
244 | .dev = { | ||
245 | .platform_data = &veu0_platform_data, | ||
246 | }, | ||
247 | .resource = veu0_resources, | ||
248 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
249 | }; | ||
250 | |||
251 | /* VEU1 */ | ||
252 | static struct uio_info veu1_platform_data = { | ||
253 | .name = "VEU1", | ||
254 | .version = "0", | ||
255 | .irq = intcs_evt2irq(0x720), | ||
256 | }; | ||
257 | |||
258 | static struct resource veu1_resources[] = { | ||
259 | [0] = { | ||
260 | .name = "VEU1", | ||
261 | .start = 0xfe924000, | ||
262 | .end = 0xfe9240b7, | ||
263 | .flags = IORESOURCE_MEM, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device veu1_device = { | ||
268 | .name = "uio_pdrv_genirq", | ||
269 | .id = 2, | ||
270 | .dev = { | ||
271 | .platform_data = &veu1_platform_data, | ||
272 | }, | ||
273 | .resource = veu1_resources, | ||
274 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
275 | }; | ||
276 | |||
277 | /* VEU2 */ | ||
278 | static struct uio_info veu2_platform_data = { | ||
279 | .name = "VEU2", | ||
280 | .version = "0", | ||
281 | .irq = intcs_evt2irq(0x740), | ||
282 | }; | ||
283 | |||
284 | static struct resource veu2_resources[] = { | ||
285 | [0] = { | ||
286 | .name = "VEU2", | ||
287 | .start = 0xfe928000, | ||
288 | .end = 0xfe9280b7, | ||
289 | .flags = IORESOURCE_MEM, | ||
290 | }, | ||
291 | }; | ||
292 | |||
293 | static struct platform_device veu2_device = { | ||
294 | .name = "uio_pdrv_genirq", | ||
295 | .id = 3, | ||
296 | .dev = { | ||
297 | .platform_data = &veu2_platform_data, | ||
298 | }, | ||
299 | .resource = veu2_resources, | ||
300 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
301 | }; | ||
302 | |||
303 | /* VEU3 */ | ||
304 | static struct uio_info veu3_platform_data = { | ||
305 | .name = "VEU3", | ||
306 | .version = "0", | ||
307 | .irq = intcs_evt2irq(0x760), | ||
308 | }; | ||
309 | |||
310 | static struct resource veu3_resources[] = { | ||
311 | [0] = { | ||
312 | .name = "VEU3", | ||
313 | .start = 0xfe92c000, | ||
314 | .end = 0xfe92c0b7, | ||
315 | .flags = IORESOURCE_MEM, | ||
316 | }, | ||
317 | }; | ||
318 | |||
319 | static struct platform_device veu3_device = { | ||
320 | .name = "uio_pdrv_genirq", | ||
321 | .id = 4, | ||
322 | .dev = { | ||
323 | .platform_data = &veu3_platform_data, | ||
324 | }, | ||
325 | .resource = veu3_resources, | ||
326 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
327 | }; | ||
328 | |||
329 | /* VEU2H */ | ||
330 | static struct uio_info veu2h_platform_data = { | ||
331 | .name = "VEU2H", | ||
332 | .version = "0", | ||
333 | .irq = intcs_evt2irq(0x520), | ||
334 | }; | ||
335 | |||
336 | static struct resource veu2h_resources[] = { | ||
337 | [0] = { | ||
338 | .name = "VEU2H", | ||
339 | .start = 0xfe93c000, | ||
340 | .end = 0xfe93c27b, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, | ||
343 | }; | ||
344 | |||
345 | static struct platform_device veu2h_device = { | ||
346 | .name = "uio_pdrv_genirq", | ||
347 | .id = 5, | ||
348 | .dev = { | ||
349 | .platform_data = &veu2h_platform_data, | ||
350 | }, | ||
351 | .resource = veu2h_resources, | ||
352 | .num_resources = ARRAY_SIZE(veu2h_resources), | ||
353 | }; | ||
354 | |||
355 | /* JPU */ | ||
356 | static struct uio_info jpu_platform_data = { | ||
357 | .name = "JPU", | ||
358 | .version = "0", | ||
359 | .irq = intcs_evt2irq(0x560), | ||
360 | }; | ||
361 | |||
362 | static struct resource jpu_resources[] = { | ||
363 | [0] = { | ||
364 | .name = "JPU", | ||
365 | .start = 0xfe980000, | ||
366 | .end = 0xfe9902d3, | ||
367 | .flags = IORESOURCE_MEM, | ||
368 | }, | ||
369 | }; | ||
370 | |||
371 | static struct platform_device jpu_device = { | ||
372 | .name = "uio_pdrv_genirq", | ||
373 | .id = 6, | ||
374 | .dev = { | ||
375 | .platform_data = &jpu_platform_data, | ||
376 | }, | ||
377 | .resource = jpu_resources, | ||
378 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
379 | }; | ||
380 | |||
381 | /* SPU1 */ | ||
382 | static struct uio_info spu1_platform_data = { | ||
383 | .name = "SPU1", | ||
384 | .version = "0", | ||
385 | .irq = evt2irq(0xfc0), | ||
386 | }; | ||
387 | |||
388 | static struct resource spu1_resources[] = { | ||
389 | [0] = { | ||
390 | .name = "SPU1", | ||
391 | .start = 0xfe300000, | ||
392 | .end = 0xfe3fffff, | ||
393 | .flags = IORESOURCE_MEM, | ||
394 | }, | ||
395 | }; | ||
396 | |||
397 | static struct platform_device spu1_device = { | ||
398 | .name = "uio_pdrv_genirq", | ||
399 | .id = 7, | ||
400 | .dev = { | ||
401 | .platform_data = &spu1_platform_data, | ||
402 | }, | ||
403 | .resource = spu1_resources, | ||
404 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
405 | }; | ||
406 | |||
198 | static struct platform_device *sh7367_early_devices[] __initdata = { | 407 | static struct platform_device *sh7367_early_devices[] __initdata = { |
199 | &scif0_device, | 408 | &scif0_device, |
200 | &scif1_device, | 409 | &scif1_device, |
@@ -206,10 +415,24 @@ static struct platform_device *sh7367_early_devices[] __initdata = { | |||
206 | &cmt10_device, | 415 | &cmt10_device, |
207 | }; | 416 | }; |
208 | 417 | ||
418 | static struct platform_device *sh7367_devices[] __initdata = { | ||
419 | &vpu_device, | ||
420 | &veu0_device, | ||
421 | &veu1_device, | ||
422 | &veu2_device, | ||
423 | &veu3_device, | ||
424 | &veu2h_device, | ||
425 | &jpu_device, | ||
426 | &spu1_device, | ||
427 | }; | ||
428 | |||
209 | void __init sh7367_add_standard_devices(void) | 429 | void __init sh7367_add_standard_devices(void) |
210 | { | 430 | { |
211 | platform_add_devices(sh7367_early_devices, | 431 | platform_add_devices(sh7367_early_devices, |
212 | ARRAY_SIZE(sh7367_early_devices)); | 432 | ARRAY_SIZE(sh7367_early_devices)); |
433 | |||
434 | platform_add_devices(sh7367_devices, | ||
435 | ARRAY_SIZE(sh7367_devices)); | ||
213 | } | 436 | } |
214 | 437 | ||
215 | #define SYMSTPCR2 0xe6158048 | 438 | #define SYMSTPCR2 0xe6158048 |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index ff0494f3d00c..cd807eea69e2 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/uio_driver.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/input.h> | 27 | #include <linux/input.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -601,6 +602,214 @@ static struct platform_device dma2_device = { | |||
601 | }, | 602 | }, |
602 | }; | 603 | }; |
603 | 604 | ||
605 | /* VPU */ | ||
606 | static struct uio_info vpu_platform_data = { | ||
607 | .name = "VPU5HG", | ||
608 | .version = "0", | ||
609 | .irq = intcs_evt2irq(0x980), | ||
610 | }; | ||
611 | |||
612 | static struct resource vpu_resources[] = { | ||
613 | [0] = { | ||
614 | .name = "VPU", | ||
615 | .start = 0xfe900000, | ||
616 | .end = 0xfe900157, | ||
617 | .flags = IORESOURCE_MEM, | ||
618 | }, | ||
619 | }; | ||
620 | |||
621 | static struct platform_device vpu_device = { | ||
622 | .name = "uio_pdrv_genirq", | ||
623 | .id = 0, | ||
624 | .dev = { | ||
625 | .platform_data = &vpu_platform_data, | ||
626 | }, | ||
627 | .resource = vpu_resources, | ||
628 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
629 | }; | ||
630 | |||
631 | /* VEU0 */ | ||
632 | static struct uio_info veu0_platform_data = { | ||
633 | .name = "VEU0", | ||
634 | .version = "0", | ||
635 | .irq = intcs_evt2irq(0x700), | ||
636 | }; | ||
637 | |||
638 | static struct resource veu0_resources[] = { | ||
639 | [0] = { | ||
640 | .name = "VEU0", | ||
641 | .start = 0xfe920000, | ||
642 | .end = 0xfe9200cb, | ||
643 | .flags = IORESOURCE_MEM, | ||
644 | }, | ||
645 | }; | ||
646 | |||
647 | static struct platform_device veu0_device = { | ||
648 | .name = "uio_pdrv_genirq", | ||
649 | .id = 1, | ||
650 | .dev = { | ||
651 | .platform_data = &veu0_platform_data, | ||
652 | }, | ||
653 | .resource = veu0_resources, | ||
654 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
655 | }; | ||
656 | |||
657 | /* VEU1 */ | ||
658 | static struct uio_info veu1_platform_data = { | ||
659 | .name = "VEU1", | ||
660 | .version = "0", | ||
661 | .irq = intcs_evt2irq(0x720), | ||
662 | }; | ||
663 | |||
664 | static struct resource veu1_resources[] = { | ||
665 | [0] = { | ||
666 | .name = "VEU1", | ||
667 | .start = 0xfe924000, | ||
668 | .end = 0xfe9240cb, | ||
669 | .flags = IORESOURCE_MEM, | ||
670 | }, | ||
671 | }; | ||
672 | |||
673 | static struct platform_device veu1_device = { | ||
674 | .name = "uio_pdrv_genirq", | ||
675 | .id = 2, | ||
676 | .dev = { | ||
677 | .platform_data = &veu1_platform_data, | ||
678 | }, | ||
679 | .resource = veu1_resources, | ||
680 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
681 | }; | ||
682 | |||
683 | /* VEU2 */ | ||
684 | static struct uio_info veu2_platform_data = { | ||
685 | .name = "VEU2", | ||
686 | .version = "0", | ||
687 | .irq = intcs_evt2irq(0x740), | ||
688 | }; | ||
689 | |||
690 | static struct resource veu2_resources[] = { | ||
691 | [0] = { | ||
692 | .name = "VEU2", | ||
693 | .start = 0xfe928000, | ||
694 | .end = 0xfe928307, | ||
695 | .flags = IORESOURCE_MEM, | ||
696 | }, | ||
697 | }; | ||
698 | |||
699 | static struct platform_device veu2_device = { | ||
700 | .name = "uio_pdrv_genirq", | ||
701 | .id = 3, | ||
702 | .dev = { | ||
703 | .platform_data = &veu2_platform_data, | ||
704 | }, | ||
705 | .resource = veu2_resources, | ||
706 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
707 | }; | ||
708 | |||
709 | /* VEU3 */ | ||
710 | static struct uio_info veu3_platform_data = { | ||
711 | .name = "VEU3", | ||
712 | .version = "0", | ||
713 | .irq = intcs_evt2irq(0x760), | ||
714 | }; | ||
715 | |||
716 | static struct resource veu3_resources[] = { | ||
717 | [0] = { | ||
718 | .name = "VEU3", | ||
719 | .start = 0xfe92c000, | ||
720 | .end = 0xfe92c307, | ||
721 | .flags = IORESOURCE_MEM, | ||
722 | }, | ||
723 | }; | ||
724 | |||
725 | static struct platform_device veu3_device = { | ||
726 | .name = "uio_pdrv_genirq", | ||
727 | .id = 4, | ||
728 | .dev = { | ||
729 | .platform_data = &veu3_platform_data, | ||
730 | }, | ||
731 | .resource = veu3_resources, | ||
732 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
733 | }; | ||
734 | |||
735 | /* JPU */ | ||
736 | static struct uio_info jpu_platform_data = { | ||
737 | .name = "JPU", | ||
738 | .version = "0", | ||
739 | .irq = intcs_evt2irq(0x560), | ||
740 | }; | ||
741 | |||
742 | static struct resource jpu_resources[] = { | ||
743 | [0] = { | ||
744 | .name = "JPU", | ||
745 | .start = 0xfe980000, | ||
746 | .end = 0xfe9902d3, | ||
747 | .flags = IORESOURCE_MEM, | ||
748 | }, | ||
749 | }; | ||
750 | |||
751 | static struct platform_device jpu_device = { | ||
752 | .name = "uio_pdrv_genirq", | ||
753 | .id = 5, | ||
754 | .dev = { | ||
755 | .platform_data = &jpu_platform_data, | ||
756 | }, | ||
757 | .resource = jpu_resources, | ||
758 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
759 | }; | ||
760 | |||
761 | /* SPU2DSP0 */ | ||
762 | static struct uio_info spu0_platform_data = { | ||
763 | .name = "SPU2DSP0", | ||
764 | .version = "0", | ||
765 | .irq = evt2irq(0x1800), | ||
766 | }; | ||
767 | |||
768 | static struct resource spu0_resources[] = { | ||
769 | [0] = { | ||
770 | .name = "SPU2DSP0", | ||
771 | .start = 0xfe200000, | ||
772 | .end = 0xfe2fffff, | ||
773 | .flags = IORESOURCE_MEM, | ||
774 | }, | ||
775 | }; | ||
776 | |||
777 | static struct platform_device spu0_device = { | ||
778 | .name = "uio_pdrv_genirq", | ||
779 | .id = 6, | ||
780 | .dev = { | ||
781 | .platform_data = &spu0_platform_data, | ||
782 | }, | ||
783 | .resource = spu0_resources, | ||
784 | .num_resources = ARRAY_SIZE(spu0_resources), | ||
785 | }; | ||
786 | |||
787 | /* SPU2DSP1 */ | ||
788 | static struct uio_info spu1_platform_data = { | ||
789 | .name = "SPU2DSP1", | ||
790 | .version = "0", | ||
791 | .irq = evt2irq(0x1820), | ||
792 | }; | ||
793 | |||
794 | static struct resource spu1_resources[] = { | ||
795 | [0] = { | ||
796 | .name = "SPU2DSP1", | ||
797 | .start = 0xfe300000, | ||
798 | .end = 0xfe3fffff, | ||
799 | .flags = IORESOURCE_MEM, | ||
800 | }, | ||
801 | }; | ||
802 | |||
803 | static struct platform_device spu1_device = { | ||
804 | .name = "uio_pdrv_genirq", | ||
805 | .id = 7, | ||
806 | .dev = { | ||
807 | .platform_data = &spu1_platform_data, | ||
808 | }, | ||
809 | .resource = spu1_resources, | ||
810 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
811 | }; | ||
812 | |||
604 | static struct platform_device *sh7372_early_devices[] __initdata = { | 813 | static struct platform_device *sh7372_early_devices[] __initdata = { |
605 | &scif0_device, | 814 | &scif0_device, |
606 | &scif1_device, | 815 | &scif1_device, |
@@ -620,6 +829,14 @@ static struct platform_device *sh7372_late_devices[] __initdata = { | |||
620 | &dma0_device, | 829 | &dma0_device, |
621 | &dma1_device, | 830 | &dma1_device, |
622 | &dma2_device, | 831 | &dma2_device, |
832 | &vpu_device, | ||
833 | &veu0_device, | ||
834 | &veu1_device, | ||
835 | &veu2_device, | ||
836 | &veu3_device, | ||
837 | &jpu_device, | ||
838 | &spu0_device, | ||
839 | &spu1_device, | ||
623 | }; | 840 | }; |
624 | 841 | ||
625 | void __init sh7372_add_standard_devices(void) | 842 | void __init sh7372_add_standard_devices(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c index 8099b0b8a934..bb405b8e459b 100644 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ b/arch/arm/mach-shmobile/setup-sh7377.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/uio_driver.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/input.h> | 27 | #include <linux/input.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -38,7 +39,7 @@ static struct plat_sci_port scif0_platform_data = { | |||
38 | .flags = UPF_BOOT_AUTOCONF, | 39 | .flags = UPF_BOOT_AUTOCONF, |
39 | .scscr = SCSCR_RE | SCSCR_TE, | 40 | .scscr = SCSCR_RE | SCSCR_TE, |
40 | .scbrr_algo_id = SCBRR_ALGO_4, | 41 | .scbrr_algo_id = SCBRR_ALGO_4, |
41 | .type = PORT_SCIF, | 42 | .type = PORT_SCIFA, |
42 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | 43 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), |
43 | evt2irq(0xc00), evt2irq(0xc00) }, | 44 | evt2irq(0xc00), evt2irq(0xc00) }, |
44 | }; | 45 | }; |
@@ -57,7 +58,7 @@ static struct plat_sci_port scif1_platform_data = { | |||
57 | .flags = UPF_BOOT_AUTOCONF, | 58 | .flags = UPF_BOOT_AUTOCONF, |
58 | .scscr = SCSCR_RE | SCSCR_TE, | 59 | .scscr = SCSCR_RE | SCSCR_TE, |
59 | .scbrr_algo_id = SCBRR_ALGO_4, | 60 | .scbrr_algo_id = SCBRR_ALGO_4, |
60 | .type = PORT_SCIF, | 61 | .type = PORT_SCIFA, |
61 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | 62 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), |
62 | evt2irq(0xc20), evt2irq(0xc20) }, | 63 | evt2irq(0xc20), evt2irq(0xc20) }, |
63 | }; | 64 | }; |
@@ -76,7 +77,7 @@ static struct plat_sci_port scif2_platform_data = { | |||
76 | .flags = UPF_BOOT_AUTOCONF, | 77 | .flags = UPF_BOOT_AUTOCONF, |
77 | .scscr = SCSCR_RE | SCSCR_TE, | 78 | .scscr = SCSCR_RE | SCSCR_TE, |
78 | .scbrr_algo_id = SCBRR_ALGO_4, | 79 | .scbrr_algo_id = SCBRR_ALGO_4, |
79 | .type = PORT_SCIF, | 80 | .type = PORT_SCIFA, |
80 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | 81 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), |
81 | evt2irq(0xc40), evt2irq(0xc40) }, | 82 | evt2irq(0xc40), evt2irq(0xc40) }, |
82 | }; | 83 | }; |
@@ -95,7 +96,7 @@ static struct plat_sci_port scif3_platform_data = { | |||
95 | .flags = UPF_BOOT_AUTOCONF, | 96 | .flags = UPF_BOOT_AUTOCONF, |
96 | .scscr = SCSCR_RE | SCSCR_TE, | 97 | .scscr = SCSCR_RE | SCSCR_TE, |
97 | .scbrr_algo_id = SCBRR_ALGO_4, | 98 | .scbrr_algo_id = SCBRR_ALGO_4, |
98 | .type = PORT_SCIF, | 99 | .type = PORT_SCIFA, |
99 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | 100 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), |
100 | evt2irq(0xc60), evt2irq(0xc60) }, | 101 | evt2irq(0xc60), evt2irq(0xc60) }, |
101 | }; | 102 | }; |
@@ -114,7 +115,7 @@ static struct plat_sci_port scif4_platform_data = { | |||
114 | .flags = UPF_BOOT_AUTOCONF, | 115 | .flags = UPF_BOOT_AUTOCONF, |
115 | .scscr = SCSCR_RE | SCSCR_TE, | 116 | .scscr = SCSCR_RE | SCSCR_TE, |
116 | .scbrr_algo_id = SCBRR_ALGO_4, | 117 | .scbrr_algo_id = SCBRR_ALGO_4, |
117 | .type = PORT_SCIF, | 118 | .type = PORT_SCIFA, |
118 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | 119 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), |
119 | evt2irq(0xd20), evt2irq(0xd20) }, | 120 | evt2irq(0xd20), evt2irq(0xd20) }, |
120 | }; | 121 | }; |
@@ -133,7 +134,7 @@ static struct plat_sci_port scif5_platform_data = { | |||
133 | .flags = UPF_BOOT_AUTOCONF, | 134 | .flags = UPF_BOOT_AUTOCONF, |
134 | .scscr = SCSCR_RE | SCSCR_TE, | 135 | .scscr = SCSCR_RE | SCSCR_TE, |
135 | .scbrr_algo_id = SCBRR_ALGO_4, | 136 | .scbrr_algo_id = SCBRR_ALGO_4, |
136 | .type = PORT_SCIF, | 137 | .type = PORT_SCIFA, |
137 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | 138 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), |
138 | evt2irq(0xd40), evt2irq(0xd40) }, | 139 | evt2irq(0xd40), evt2irq(0xd40) }, |
139 | }; | 140 | }; |
@@ -152,7 +153,7 @@ static struct plat_sci_port scif6_platform_data = { | |||
152 | .flags = UPF_BOOT_AUTOCONF, | 153 | .flags = UPF_BOOT_AUTOCONF, |
153 | .scscr = SCSCR_RE | SCSCR_TE, | 154 | .scscr = SCSCR_RE | SCSCR_TE, |
154 | .scbrr_algo_id = SCBRR_ALGO_4, | 155 | .scbrr_algo_id = SCBRR_ALGO_4, |
155 | .type = PORT_SCIF, | 156 | .type = PORT_SCIFA, |
156 | .irqs = { intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80), | 157 | .irqs = { intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80), |
157 | intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80) }, | 158 | intcs_evt2irq(0x1a80), intcs_evt2irq(0x1a80) }, |
158 | }; | 159 | }; |
@@ -171,7 +172,7 @@ static struct plat_sci_port scif7_platform_data = { | |||
171 | .flags = UPF_BOOT_AUTOCONF, | 172 | .flags = UPF_BOOT_AUTOCONF, |
172 | .scscr = SCSCR_RE | SCSCR_TE, | 173 | .scscr = SCSCR_RE | SCSCR_TE, |
173 | .scbrr_algo_id = SCBRR_ALGO_4, | 174 | .scbrr_algo_id = SCBRR_ALGO_4, |
174 | .type = PORT_SCIF, | 175 | .type = PORT_SCIFB, |
175 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | 176 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), |
176 | evt2irq(0xd60), evt2irq(0xd60) }, | 177 | evt2irq(0xd60), evt2irq(0xd60) }, |
177 | }; | 178 | }; |
@@ -215,6 +216,214 @@ static struct platform_device cmt10_device = { | |||
215 | .num_resources = ARRAY_SIZE(cmt10_resources), | 216 | .num_resources = ARRAY_SIZE(cmt10_resources), |
216 | }; | 217 | }; |
217 | 218 | ||
219 | /* VPU */ | ||
220 | static struct uio_info vpu_platform_data = { | ||
221 | .name = "VPU5HG", | ||
222 | .version = "0", | ||
223 | .irq = intcs_evt2irq(0x980), | ||
224 | }; | ||
225 | |||
226 | static struct resource vpu_resources[] = { | ||
227 | [0] = { | ||
228 | .name = "VPU", | ||
229 | .start = 0xfe900000, | ||
230 | .end = 0xfe900157, | ||
231 | .flags = IORESOURCE_MEM, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | static struct platform_device vpu_device = { | ||
236 | .name = "uio_pdrv_genirq", | ||
237 | .id = 0, | ||
238 | .dev = { | ||
239 | .platform_data = &vpu_platform_data, | ||
240 | }, | ||
241 | .resource = vpu_resources, | ||
242 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
243 | }; | ||
244 | |||
245 | /* VEU0 */ | ||
246 | static struct uio_info veu0_platform_data = { | ||
247 | .name = "VEU0", | ||
248 | .version = "0", | ||
249 | .irq = intcs_evt2irq(0x700), | ||
250 | }; | ||
251 | |||
252 | static struct resource veu0_resources[] = { | ||
253 | [0] = { | ||
254 | .name = "VEU0", | ||
255 | .start = 0xfe920000, | ||
256 | .end = 0xfe9200cb, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, | ||
259 | }; | ||
260 | |||
261 | static struct platform_device veu0_device = { | ||
262 | .name = "uio_pdrv_genirq", | ||
263 | .id = 1, | ||
264 | .dev = { | ||
265 | .platform_data = &veu0_platform_data, | ||
266 | }, | ||
267 | .resource = veu0_resources, | ||
268 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
269 | }; | ||
270 | |||
271 | /* VEU1 */ | ||
272 | static struct uio_info veu1_platform_data = { | ||
273 | .name = "VEU1", | ||
274 | .version = "0", | ||
275 | .irq = intcs_evt2irq(0x720), | ||
276 | }; | ||
277 | |||
278 | static struct resource veu1_resources[] = { | ||
279 | [0] = { | ||
280 | .name = "VEU1", | ||
281 | .start = 0xfe924000, | ||
282 | .end = 0xfe9240cb, | ||
283 | .flags = IORESOURCE_MEM, | ||
284 | }, | ||
285 | }; | ||
286 | |||
287 | static struct platform_device veu1_device = { | ||
288 | .name = "uio_pdrv_genirq", | ||
289 | .id = 2, | ||
290 | .dev = { | ||
291 | .platform_data = &veu1_platform_data, | ||
292 | }, | ||
293 | .resource = veu1_resources, | ||
294 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
295 | }; | ||
296 | |||
297 | /* VEU2 */ | ||
298 | static struct uio_info veu2_platform_data = { | ||
299 | .name = "VEU2", | ||
300 | .version = "0", | ||
301 | .irq = intcs_evt2irq(0x740), | ||
302 | }; | ||
303 | |||
304 | static struct resource veu2_resources[] = { | ||
305 | [0] = { | ||
306 | .name = "VEU2", | ||
307 | .start = 0xfe928000, | ||
308 | .end = 0xfe928307, | ||
309 | .flags = IORESOURCE_MEM, | ||
310 | }, | ||
311 | }; | ||
312 | |||
313 | static struct platform_device veu2_device = { | ||
314 | .name = "uio_pdrv_genirq", | ||
315 | .id = 3, | ||
316 | .dev = { | ||
317 | .platform_data = &veu2_platform_data, | ||
318 | }, | ||
319 | .resource = veu2_resources, | ||
320 | .num_resources = ARRAY_SIZE(veu2_resources), | ||
321 | }; | ||
322 | |||
323 | /* VEU3 */ | ||
324 | static struct uio_info veu3_platform_data = { | ||
325 | .name = "VEU3", | ||
326 | .version = "0", | ||
327 | .irq = intcs_evt2irq(0x760), | ||
328 | }; | ||
329 | |||
330 | static struct resource veu3_resources[] = { | ||
331 | [0] = { | ||
332 | .name = "VEU3", | ||
333 | .start = 0xfe92c000, | ||
334 | .end = 0xfe92c307, | ||
335 | .flags = IORESOURCE_MEM, | ||
336 | }, | ||
337 | }; | ||
338 | |||
339 | static struct platform_device veu3_device = { | ||
340 | .name = "uio_pdrv_genirq", | ||
341 | .id = 4, | ||
342 | .dev = { | ||
343 | .platform_data = &veu3_platform_data, | ||
344 | }, | ||
345 | .resource = veu3_resources, | ||
346 | .num_resources = ARRAY_SIZE(veu3_resources), | ||
347 | }; | ||
348 | |||
349 | /* JPU */ | ||
350 | static struct uio_info jpu_platform_data = { | ||
351 | .name = "JPU", | ||
352 | .version = "0", | ||
353 | .irq = intcs_evt2irq(0x560), | ||
354 | }; | ||
355 | |||
356 | static struct resource jpu_resources[] = { | ||
357 | [0] = { | ||
358 | .name = "JPU", | ||
359 | .start = 0xfe980000, | ||
360 | .end = 0xfe9902d3, | ||
361 | .flags = IORESOURCE_MEM, | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | static struct platform_device jpu_device = { | ||
366 | .name = "uio_pdrv_genirq", | ||
367 | .id = 5, | ||
368 | .dev = { | ||
369 | .platform_data = &jpu_platform_data, | ||
370 | }, | ||
371 | .resource = jpu_resources, | ||
372 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
373 | }; | ||
374 | |||
375 | /* SPU2DSP0 */ | ||
376 | static struct uio_info spu0_platform_data = { | ||
377 | .name = "SPU2DSP0", | ||
378 | .version = "0", | ||
379 | .irq = evt2irq(0x1800), | ||
380 | }; | ||
381 | |||
382 | static struct resource spu0_resources[] = { | ||
383 | [0] = { | ||
384 | .name = "SPU2DSP0", | ||
385 | .start = 0xfe200000, | ||
386 | .end = 0xfe2fffff, | ||
387 | .flags = IORESOURCE_MEM, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | static struct platform_device spu0_device = { | ||
392 | .name = "uio_pdrv_genirq", | ||
393 | .id = 6, | ||
394 | .dev = { | ||
395 | .platform_data = &spu0_platform_data, | ||
396 | }, | ||
397 | .resource = spu0_resources, | ||
398 | .num_resources = ARRAY_SIZE(spu0_resources), | ||
399 | }; | ||
400 | |||
401 | /* SPU2DSP1 */ | ||
402 | static struct uio_info spu1_platform_data = { | ||
403 | .name = "SPU2DSP1", | ||
404 | .version = "0", | ||
405 | .irq = evt2irq(0x1820), | ||
406 | }; | ||
407 | |||
408 | static struct resource spu1_resources[] = { | ||
409 | [0] = { | ||
410 | .name = "SPU2DSP1", | ||
411 | .start = 0xfe300000, | ||
412 | .end = 0xfe3fffff, | ||
413 | .flags = IORESOURCE_MEM, | ||
414 | }, | ||
415 | }; | ||
416 | |||
417 | static struct platform_device spu1_device = { | ||
418 | .name = "uio_pdrv_genirq", | ||
419 | .id = 7, | ||
420 | .dev = { | ||
421 | .platform_data = &spu1_platform_data, | ||
422 | }, | ||
423 | .resource = spu1_resources, | ||
424 | .num_resources = ARRAY_SIZE(spu1_resources), | ||
425 | }; | ||
426 | |||
218 | static struct platform_device *sh7377_early_devices[] __initdata = { | 427 | static struct platform_device *sh7377_early_devices[] __initdata = { |
219 | &scif0_device, | 428 | &scif0_device, |
220 | &scif1_device, | 429 | &scif1_device, |
@@ -227,10 +436,24 @@ static struct platform_device *sh7377_early_devices[] __initdata = { | |||
227 | &cmt10_device, | 436 | &cmt10_device, |
228 | }; | 437 | }; |
229 | 438 | ||
439 | static struct platform_device *sh7377_devices[] __initdata = { | ||
440 | &vpu_device, | ||
441 | &veu0_device, | ||
442 | &veu1_device, | ||
443 | &veu2_device, | ||
444 | &veu3_device, | ||
445 | &jpu_device, | ||
446 | &spu0_device, | ||
447 | &spu1_device, | ||
448 | }; | ||
449 | |||
230 | void __init sh7377_add_standard_devices(void) | 450 | void __init sh7377_add_standard_devices(void) |
231 | { | 451 | { |
232 | platform_add_devices(sh7377_early_devices, | 452 | platform_add_devices(sh7377_early_devices, |
233 | ARRAY_SIZE(sh7377_early_devices)); | 453 | ARRAY_SIZE(sh7377_early_devices)); |
454 | |||
455 | platform_add_devices(sh7377_devices, | ||
456 | ARRAY_SIZE(sh7377_devices)); | ||
234 | } | 457 | } |
235 | 458 | ||
236 | #define SMSTPCR3 0xe615013c | 459 | #define SMSTPCR3 0xe615013c |
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index a156d2108df1..3ffdbc92ba82 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -59,6 +59,11 @@ unsigned int __init sh73a0_get_core_count(void) | |||
59 | { | 59 | { |
60 | void __iomem *scu_base = scu_base_addr(); | 60 | void __iomem *scu_base = scu_base_addr(); |
61 | 61 | ||
62 | #ifdef CONFIG_HAVE_ARM_TWD | ||
63 | /* twd_base needs to be initialized before percpu_timer_setup() */ | ||
64 | twd_base = (void __iomem *)0xf0000600; | ||
65 | #endif | ||
66 | |||
62 | return scu_get_core_count(scu_base); | 67 | return scu_get_core_count(scu_base); |
63 | } | 68 | } |
64 | 69 | ||
@@ -82,10 +87,6 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu) | |||
82 | 87 | ||
83 | void __init sh73a0_smp_prepare_cpus(void) | 88 | void __init sh73a0_smp_prepare_cpus(void) |
84 | { | 89 | { |
85 | #ifdef CONFIG_HAVE_ARM_TWD | ||
86 | twd_base = (void __iomem *)0xf0000600; | ||
87 | #endif | ||
88 | |||
89 | scu_enable(scu_base_addr()); | 90 | scu_enable(scu_base_addr()); |
90 | 91 | ||
91 | /* Map the reset vector (in headsmp.S) */ | 92 | /* Map the reset vector (in headsmp.S) */ |