diff options
| -rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap1/ams-delta-fiq.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | 8 | ||||
| -rw-r--r-- | arch/arm/mach-orion5x/mpp.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/headsmp.S | 56 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/smp-r8a7779.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/smp-sh73a0.c | 7 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/timer.c | 9 |
14 files changed, 90 insertions, 61 deletions
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 1c672d9e6656..f7fe1b9f3170 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
| 17 | #include <linux/kexec.h> | ||
| 17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
| 18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
| 19 | #include <mach/bridge-regs.h> | 20 | #include <mach/bridge-regs.h> |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index fcce7ff37630..cfd98b186fcc 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
| @@ -48,7 +48,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) | |||
| 48 | struct irq_chip *irq_chip = NULL; | 48 | struct irq_chip *irq_chip = NULL; |
| 49 | int gpio, irq_num, fiq_count; | 49 | int gpio, irq_num, fiq_count; |
| 50 | 50 | ||
| 51 | irq_desc = irq_to_desc(IH_GPIO_BASE); | 51 | irq_desc = irq_to_desc(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); |
| 52 | if (irq_desc) | 52 | if (irq_desc) |
| 53 | irq_chip = irq_desc->irq_data.chip; | 53 | irq_chip = irq_desc->irq_data.chip; |
| 54 | 54 | ||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 930c0d380435..740cee9369ba 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
| @@ -641,7 +641,7 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
| 641 | 641 | ||
| 642 | static void __init igep_init(void) | 642 | static void __init igep_init(void) |
| 643 | { | 643 | { |
| 644 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 644 | regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
| 645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 646 | 646 | ||
| 647 | /* Get IGEP2 hardware revision */ | 647 | /* Get IGEP2 hardware revision */ |
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h index 1e2d3322f33e..c88420de1151 100644 --- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | |||
| @@ -941,10 +941,10 @@ | |||
| 941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) | 941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) |
| 942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 | 942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 |
| 943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) | 943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) |
| 944 | #define OMAP4_DSI2_PIPD_SHIFT 19 | 944 | #define OMAP4_DSI1_PIPD_SHIFT 19 |
| 945 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 19) | 945 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 19) |
| 946 | #define OMAP4_DSI1_PIPD_SHIFT 14 | 946 | #define OMAP4_DSI2_PIPD_SHIFT 14 |
| 947 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 14) | 947 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 14) |
| 948 | 948 | ||
| 949 | /* CONTROL_MCBSPLP */ | 949 | /* CONTROL_MCBSPLP */ |
| 950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 | 950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 |
diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h index eac68978a2c2..db70e79a1198 100644 --- a/arch/arm/mach-orion5x/mpp.h +++ b/arch/arm/mach-orion5x/mpp.h | |||
| @@ -65,8 +65,8 @@ | |||
| 65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) | 65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) |
| 66 | 66 | ||
| 67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) | 67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) |
| 68 | #define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) | 68 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) |
| 69 | #define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) | 69 | #define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1) |
| 70 | 70 | ||
| 71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) | 71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) |
| 72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) | 72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index cb224a344af0..0891ec6e27f5 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
| @@ -365,23 +365,13 @@ static struct platform_device mipidsi0_device = { | |||
| 365 | }; | 365 | }; |
| 366 | 366 | ||
| 367 | /* SDHI0 */ | 367 | /* SDHI0 */ |
| 368 | static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg) | ||
| 369 | { | ||
| 370 | struct device *dev = arg; | ||
| 371 | struct sh_mobile_sdhi_info *info = dev->platform_data; | ||
| 372 | struct tmio_mmc_data *pdata = info->pdata; | ||
| 373 | |||
| 374 | tmio_mmc_cd_wakeup(pdata); | ||
| 375 | |||
| 376 | return IRQ_HANDLED; | ||
| 377 | } | ||
| 378 | |||
| 379 | static struct sh_mobile_sdhi_info sdhi0_info = { | 368 | static struct sh_mobile_sdhi_info sdhi0_info = { |
| 380 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 369 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
| 381 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 370 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
| 382 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | 371 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, |
| 383 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 372 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
| 384 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 373 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
| 374 | .cd_gpio = GPIO_PORT251, | ||
| 385 | }; | 375 | }; |
| 386 | 376 | ||
| 387 | static struct resource sdhi0_resources[] = { | 377 | static struct resource sdhi0_resources[] = { |
| @@ -557,7 +547,6 @@ static void __init ag5evm_init(void) | |||
| 557 | lcd_backlight_reset(); | 547 | lcd_backlight_reset(); |
| 558 | 548 | ||
| 559 | /* enable SDHI0 on CN15 [SD I/F] */ | 549 | /* enable SDHI0 on CN15 [SD I/F] */ |
| 560 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
| 561 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 550 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
| 562 | gpio_request(GPIO_FN_SDHICMD0, NULL); | 551 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
| 563 | gpio_request(GPIO_FN_SDHICLK0, NULL); | 552 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
| @@ -566,13 +555,6 @@ static void __init ag5evm_init(void) | |||
| 566 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 555 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
| 567 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 556 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
| 568 | 557 | ||
| 569 | if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd, | ||
| 570 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | ||
| 571 | "sdhi0 cd", &sdhi0_device.dev)) | ||
| 572 | sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; | ||
| 573 | else | ||
| 574 | pr_warn("Unable to setup SDHI0 GPIO IRQ\n"); | ||
| 575 | |||
| 576 | /* enable SDHI1 on CN4 [WLAN I/F] */ | 558 | /* enable SDHI1 on CN4 [WLAN I/F] */ |
| 577 | gpio_request(GPIO_FN_SDHICLK1, NULL); | 559 | gpio_request(GPIO_FN_SDHICLK1, NULL); |
| 578 | gpio_request(GPIO_FN_SDHICMD1_PU, NULL); | 560 | gpio_request(GPIO_FN_SDHICMD1_PU, NULL); |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index f49e28abe0ab..8c6202bb6aeb 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
| @@ -1011,21 +1011,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev) | |||
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | /* SDHI0 */ | 1013 | /* SDHI0 */ |
| 1014 | static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg) | ||
| 1015 | { | ||
| 1016 | struct device *dev = arg; | ||
| 1017 | struct sh_mobile_sdhi_info *info = dev->platform_data; | ||
| 1018 | struct tmio_mmc_data *pdata = info->pdata; | ||
| 1019 | |||
| 1020 | tmio_mmc_cd_wakeup(pdata); | ||
| 1021 | |||
| 1022 | return IRQ_HANDLED; | ||
| 1023 | } | ||
| 1024 | |||
| 1025 | static struct sh_mobile_sdhi_info sdhi0_info = { | 1014 | static struct sh_mobile_sdhi_info sdhi0_info = { |
| 1026 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 1015 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
| 1027 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 1016 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
| 1017 | .tmio_flags = TMIO_MMC_USE_GPIO_CD, | ||
| 1028 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, | 1018 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, |
| 1019 | .cd_gpio = GPIO_PORT172, | ||
| 1029 | }; | 1020 | }; |
| 1030 | 1021 | ||
| 1031 | static struct resource sdhi0_resources[] = { | 1022 | static struct resource sdhi0_resources[] = { |
| @@ -1384,7 +1375,6 @@ static void __init mackerel_init(void) | |||
| 1384 | { | 1375 | { |
| 1385 | u32 srcr4; | 1376 | u32 srcr4; |
| 1386 | struct clk *clk; | 1377 | struct clk *clk; |
| 1387 | int ret; | ||
| 1388 | 1378 | ||
| 1389 | /* External clock source */ | 1379 | /* External clock source */ |
| 1390 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | 1380 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
| @@ -1481,7 +1471,6 @@ static void __init mackerel_init(void) | |||
| 1481 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); | 1471 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); |
| 1482 | 1472 | ||
| 1483 | /* enable SDHI0 */ | 1473 | /* enable SDHI0 */ |
| 1484 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
| 1485 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 1474 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
| 1486 | gpio_request(GPIO_FN_SDHICMD0, NULL); | 1475 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
| 1487 | gpio_request(GPIO_FN_SDHICLK0, NULL); | 1476 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
| @@ -1490,13 +1479,6 @@ static void __init mackerel_init(void) | |||
| 1490 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 1479 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
| 1491 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 1480 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
| 1492 | 1481 | ||
| 1493 | ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd, | ||
| 1494 | IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev); | ||
| 1495 | if (!ret) | ||
| 1496 | sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; | ||
| 1497 | else | ||
| 1498 | pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret); | ||
| 1499 | |||
| 1500 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | 1482 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
| 1501 | /* enable SDHI1 */ | 1483 | /* enable SDHI1 */ |
| 1502 | gpio_request(GPIO_FN_SDHICMD1, NULL); | 1484 | gpio_request(GPIO_FN_SDHICMD1, NULL); |
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index 6ac015c89206..b202c1272526 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
| @@ -16,6 +16,59 @@ | |||
| 16 | 16 | ||
| 17 | __CPUINIT | 17 | __CPUINIT |
| 18 | 18 | ||
| 19 | /* Cache invalidation nicked from arch/arm/mach-imx/head-v7.S, thanks! | ||
| 20 | * | ||
| 21 | * The secondary kernel init calls v7_flush_dcache_all before it enables | ||
| 22 | * the L1; however, the L1 comes out of reset in an undefined state, so | ||
| 23 | * the clean + invalidate performed by v7_flush_dcache_all causes a bunch | ||
| 24 | * of cache lines with uninitialized data and uninitialized tags to get | ||
| 25 | * written out to memory, which does really unpleasant things to the main | ||
| 26 | * processor. We fix this by performing an invalidate, rather than a | ||
| 27 | * clean + invalidate, before jumping into the kernel. | ||
| 28 | * | ||
| 29 | * This funciton is cloned from arch/arm/mach-tegra/headsmp.S, and needs | ||
| 30 | * to be called for both secondary cores startup and primary core resume | ||
| 31 | * procedures. Ideally, it should be moved into arch/arm/mm/cache-v7.S. | ||
| 32 | */ | ||
| 33 | ENTRY(v7_invalidate_l1) | ||
| 34 | mov r0, #0 | ||
| 35 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache | ||
| 36 | mcr p15, 2, r0, c0, c0, 0 | ||
| 37 | mrc p15, 1, r0, c0, c0, 0 | ||
| 38 | |||
| 39 | ldr r1, =0x7fff | ||
| 40 | and r2, r1, r0, lsr #13 | ||
| 41 | |||
| 42 | ldr r1, =0x3ff | ||
| 43 | |||
| 44 | and r3, r1, r0, lsr #3 @ NumWays - 1 | ||
| 45 | add r2, r2, #1 @ NumSets | ||
| 46 | |||
| 47 | and r0, r0, #0x7 | ||
| 48 | add r0, r0, #4 @ SetShift | ||
| 49 | |||
| 50 | clz r1, r3 @ WayShift | ||
| 51 | add r4, r3, #1 @ NumWays | ||
| 52 | 1: sub r2, r2, #1 @ NumSets-- | ||
| 53 | mov r3, r4 @ Temp = NumWays | ||
| 54 | 2: subs r3, r3, #1 @ Temp-- | ||
| 55 | mov r5, r3, lsl r1 | ||
| 56 | mov r6, r2, lsl r0 | ||
| 57 | orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift) | ||
| 58 | mcr p15, 0, r5, c7, c6, 2 | ||
| 59 | bgt 2b | ||
| 60 | cmp r2, #0 | ||
| 61 | bgt 1b | ||
| 62 | dsb | ||
| 63 | isb | ||
| 64 | mov pc, lr | ||
| 65 | ENDPROC(v7_invalidate_l1) | ||
| 66 | |||
| 67 | ENTRY(shmobile_invalidate_start) | ||
| 68 | bl v7_invalidate_l1 | ||
| 69 | b secondary_startup | ||
| 70 | ENDPROC(shmobile_invalidate_start) | ||
| 71 | |||
| 19 | /* | 72 | /* |
| 20 | * Reset vector for secondary CPUs. | 73 | * Reset vector for secondary CPUs. |
| 21 | * This will be mapped at address 0 by SBAR register. | 74 | * This will be mapped at address 0 by SBAR register. |
| @@ -24,4 +77,5 @@ | |||
| 24 | .align 12 | 77 | .align 12 |
| 25 | ENTRY(shmobile_secondary_vector) | 78 | ENTRY(shmobile_secondary_vector) |
| 26 | ldr pc, 1f | 79 | ldr pc, 1f |
| 27 | 1: .long secondary_startup - PAGE_OFFSET + PLAT_PHYS_OFFSET | 80 | 1: .long shmobile_invalidate_start - PAGE_OFFSET + PLAT_PHYS_OFFSET |
| 81 | ENDPROC(shmobile_secondary_vector) | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 83ad3fe0a75f..c85e6ecda606 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
| 5 | extern struct sys_timer shmobile_timer; | 5 | extern struct sys_timer shmobile_timer; |
| 6 | struct twd_local_timer; | 6 | struct twd_local_timer; |
| 7 | void shmobile_twd_init(struct twd_local_timer *twd_local_timer); | ||
| 8 | extern void shmobile_setup_console(void); | 7 | extern void shmobile_setup_console(void); |
| 9 | extern void shmobile_secondary_vector(void); | 8 | extern void shmobile_secondary_vector(void); |
| 10 | extern int shmobile_platform_cpu_kill(unsigned int cpu); | 9 | extern int shmobile_platform_cpu_kill(unsigned int cpu); |
| @@ -82,5 +81,6 @@ extern int r8a7779_platform_cpu_kill(unsigned int cpu); | |||
| 82 | extern void r8a7779_secondary_init(unsigned int cpu); | 81 | extern void r8a7779_secondary_init(unsigned int cpu); |
| 83 | extern int r8a7779_boot_secondary(unsigned int cpu); | 82 | extern int r8a7779_boot_secondary(unsigned int cpu); |
| 84 | extern void r8a7779_smp_prepare_cpus(void); | 83 | extern void r8a7779_smp_prepare_cpus(void); |
| 84 | extern void r8a7779_register_twd(void); | ||
| 85 | 85 | ||
| 86 | #endif /* __ARCH_MACH_COMMON_H */ | 86 | #endif /* __ARCH_MACH_COMMON_H */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 12c6f529ab89..e98e46f6cf55 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
| @@ -262,10 +262,14 @@ void __init r8a7779_add_standard_devices(void) | |||
| 262 | ARRAY_SIZE(r8a7779_late_devices)); | 262 | ARRAY_SIZE(r8a7779_late_devices)); |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
| 266 | void __init __weak r8a7779_register_twd(void) { } | ||
| 267 | |||
| 265 | static void __init r8a7779_earlytimer_init(void) | 268 | static void __init r8a7779_earlytimer_init(void) |
| 266 | { | 269 | { |
| 267 | r8a7779_clock_init(); | 270 | r8a7779_clock_init(); |
| 268 | shmobile_earlytimer_init(); | 271 | shmobile_earlytimer_init(); |
| 272 | r8a7779_register_twd(); | ||
| 269 | } | 273 | } |
| 270 | 274 | ||
| 271 | void __init r8a7779_add_early_devices(void) | 275 | void __init r8a7779_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 5bebffc10455..04a0dfe75493 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
| @@ -688,10 +688,14 @@ void __init sh73a0_add_standard_devices(void) | |||
| 688 | ARRAY_SIZE(sh73a0_late_devices)); | 688 | ARRAY_SIZE(sh73a0_late_devices)); |
| 689 | } | 689 | } |
| 690 | 690 | ||
| 691 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
| 692 | void __init __weak sh73a0_register_twd(void) { } | ||
| 693 | |||
| 691 | static void __init sh73a0_earlytimer_init(void) | 694 | static void __init sh73a0_earlytimer_init(void) |
| 692 | { | 695 | { |
| 693 | sh73a0_clock_init(); | 696 | sh73a0_clock_init(); |
| 694 | shmobile_earlytimer_init(); | 697 | shmobile_earlytimer_init(); |
| 698 | sh73a0_register_twd(); | ||
| 695 | } | 699 | } |
| 696 | 700 | ||
| 697 | void __init sh73a0_add_early_devices(void) | 701 | void __init sh73a0_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index b62e19d4c9af..6d1d0238cbf7 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
| @@ -64,8 +64,15 @@ static void __iomem *scu_base_addr(void) | |||
| 64 | static DEFINE_SPINLOCK(scu_lock); | 64 | static DEFINE_SPINLOCK(scu_lock); |
| 65 | static unsigned long tmp; | 65 | static unsigned long tmp; |
| 66 | 66 | ||
| 67 | #ifdef CONFIG_HAVE_ARM_TWD | ||
| 67 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 68 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
| 68 | 69 | ||
| 70 | void __init r8a7779_register_twd(void) | ||
| 71 | { | ||
| 72 | twd_local_timer_register(&twd_local_timer); | ||
| 73 | } | ||
| 74 | #endif | ||
| 75 | |||
| 69 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | 76 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) |
| 70 | { | 77 | { |
| 71 | void __iomem *scu_base = scu_base_addr(); | 78 | void __iomem *scu_base = scu_base_addr(); |
| @@ -84,7 +91,6 @@ unsigned int __init r8a7779_get_core_count(void) | |||
| 84 | { | 91 | { |
| 85 | void __iomem *scu_base = scu_base_addr(); | 92 | void __iomem *scu_base = scu_base_addr(); |
| 86 | 93 | ||
| 87 | shmobile_twd_init(&twd_local_timer); | ||
| 88 | return scu_get_core_count(scu_base); | 94 | return scu_get_core_count(scu_base); |
| 89 | } | 95 | } |
| 90 | 96 | ||
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 14ad8b052f1a..e36c41c4ab40 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
| @@ -42,7 +42,13 @@ static void __iomem *scu_base_addr(void) | |||
| 42 | static DEFINE_SPINLOCK(scu_lock); | 42 | static DEFINE_SPINLOCK(scu_lock); |
| 43 | static unsigned long tmp; | 43 | static unsigned long tmp; |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_HAVE_ARM_TWD | ||
| 45 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 46 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
| 47 | void __init sh73a0_register_twd(void) | ||
| 48 | { | ||
| 49 | twd_local_timer_register(&twd_local_timer); | ||
| 50 | } | ||
| 51 | #endif | ||
| 46 | 52 | ||
| 47 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | 53 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) |
| 48 | { | 54 | { |
| @@ -62,7 +68,6 @@ unsigned int __init sh73a0_get_core_count(void) | |||
| 62 | { | 68 | { |
| 63 | void __iomem *scu_base = scu_base_addr(); | 69 | void __iomem *scu_base = scu_base_addr(); |
| 64 | 70 | ||
| 65 | shmobile_twd_init(&twd_local_timer); | ||
| 66 | return scu_get_core_count(scu_base); | 71 | return scu_get_core_count(scu_base); |
| 67 | } | 72 | } |
| 68 | 73 | ||
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 2fba5f3d1c8a..8b79e7917a23 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
| @@ -46,15 +46,6 @@ static void __init shmobile_timer_init(void) | |||
| 46 | { | 46 | { |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | void __init shmobile_twd_init(struct twd_local_timer *twd_local_timer) | ||
| 50 | { | ||
| 51 | #ifdef CONFIG_HAVE_ARM_TWD | ||
| 52 | int err = twd_local_timer_register(twd_local_timer); | ||
| 53 | if (err) | ||
| 54 | pr_err("twd_local_timer_register failed %d\n", err); | ||
| 55 | #endif | ||
| 56 | } | ||
| 57 | |||
| 58 | struct sys_timer shmobile_timer = { | 49 | struct sys_timer shmobile_timer = { |
| 59 | .init = shmobile_timer_init, | 50 | .init = shmobile_timer_init, |
| 60 | }; | 51 | }; |
