aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/Kconfig4
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c3
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c3
-rw-r--r--arch/arm/mach-shmobile/board-g3evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-g4evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c3
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c72
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c1
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c4
-rw-r--r--arch/arm/mach-shmobile/cpuidle.c31
-rw-r--r--arch/arm/mach-shmobile/include/mach/io.h9
-rw-r--r--arch/arm/mach-shmobile/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-shmobile/intc-r8a7740.c1
-rw-r--r--arch/arm/mach-shmobile/intc-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/intc-sh7367.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh7372.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh7377.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh73a0.c5
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7367.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7377.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c1
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7779.c4
-rw-r--r--arch/arm/mach-shmobile/smp-sh73a0.c20
26 files changed, 123 insertions, 58 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 060e5644c49c..34560cab45d9 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -100,6 +100,10 @@ config MACH_MARZEN
100 100
101comment "SH-Mobile System Configuration" 101comment "SH-Mobile System Configuration"
102 102
103config CPU_HAS_INTEVT
104 bool
105 default y
106
103menu "Memory configuration" 107menu "Memory configuration"
104 108
105config MEMORY_START 109config MEMORY_START
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index f50d7c8b1221..cb224a344af0 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -43,6 +43,7 @@
43#include <video/sh_mipi_dsi.h> 43#include <video/sh_mipi_dsi.h>
44#include <sound/sh_fsi.h> 44#include <sound/sh_fsi.h>
45#include <mach/hardware.h> 45#include <mach/hardware.h>
46#include <mach/irqs.h>
46#include <mach/sh73a0.h> 47#include <mach/sh73a0.h>
47#include <mach/common.h> 48#include <mach/common.h>
48#include <asm/mach-types.h> 49#include <asm/mach-types.h>
@@ -584,7 +585,7 @@ static void __init ag5evm_init(void)
584 585
585#ifdef CONFIG_CACHE_L2X0 586#ifdef CONFIG_CACHE_L2X0
586 /* Shared attribute override enable, 64K*8way */ 587 /* Shared attribute override enable, 64K*8way */
587 l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); 588 l2x0_init(IOMEM(0xf0100000), 0x00460000, 0xc2000fff);
588#endif 589#endif
589 sh73a0_add_standard_devices(); 590 sh73a0_add_standard_devices();
590 platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); 591 platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices));
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index 8b2124da245d..81fd95f7f52a 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -35,6 +35,7 @@
35#include <asm/mach/time.h> 35#include <asm/mach/time.h>
36#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
37#include <mach/r8a7740.h> 37#include <mach/r8a7740.h>
38#include <mach/irqs.h>
38#include <video/sh_mobile_lcdc.h> 39#include <video/sh_mobile_lcdc.h>
39 40
40/* 41/*
@@ -370,7 +371,7 @@ static void __init bonito_init(void)
370 371
371#ifdef CONFIG_CACHE_L2X0 372#ifdef CONFIG_CACHE_L2X0
372 /* Early BRESP enable, Shared attribute override enable, 32K*8way */ 373 /* Early BRESP enable, Shared attribute override enable, 32K*8way */
373 l2x0_init(__io(0xf0002000), 0x40440000, 0x82000fff); 374 l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff);
374#endif 375#endif
375 376
376 r8a7740_add_standard_devices(); 377 r8a7740_add_standard_devices();
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index b627e89037f5..39b6cf85ced6 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -33,6 +33,7 @@
33#include <linux/input.h> 33#include <linux/input.h>
34#include <linux/input/sh_keysc.h> 34#include <linux/input/sh_keysc.h>
35#include <linux/dma-mapping.h> 35#include <linux/dma-mapping.h>
36#include <mach/irqs.h>
36#include <mach/sh7367.h> 37#include <mach/sh7367.h>
37#include <mach/common.h> 38#include <mach/common.h>
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
index 46d757d2759d..0e5a39c670bc 100644
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ b/arch/arm/mach-shmobile/board-g4evm.c
@@ -34,6 +34,7 @@
34#include <linux/mmc/sh_mobile_sdhi.h> 34#include <linux/mmc/sh_mobile_sdhi.h>
35#include <linux/gpio.h> 35#include <linux/gpio.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <mach/irqs.h>
37#include <mach/sh7377.h> 38#include <mach/sh7377.h>
38#include <mach/common.h> 39#include <mach/common.h>
39#include <asm/mach-types.h> 40#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index 61c067294660..200dcd42a3a0 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -39,6 +39,7 @@
39#include <linux/mfd/tmio.h> 39#include <linux/mfd/tmio.h>
40#include <linux/mmc/sh_mobile_sdhi.h> 40#include <linux/mmc/sh_mobile_sdhi.h>
41#include <mach/hardware.h> 41#include <mach/hardware.h>
42#include <mach/irqs.h>
42#include <mach/sh73a0.h> 43#include <mach/sh73a0.h>
43#include <mach/common.h> 44#include <mach/common.h>
44#include <asm/mach-types.h> 45#include <asm/mach-types.h>
@@ -507,7 +508,7 @@ static void __init kota2_init(void)
507 508
508#ifdef CONFIG_CACHE_L2X0 509#ifdef CONFIG_CACHE_L2X0
509 /* Early BRESP enable, Shared attribute override enable, 64K*8way */ 510 /* Early BRESP enable, Shared attribute override enable, 64K*8way */
510 l2x0_init(__io(0xf0100000), 0x40460000, 0x82000fff); 511 l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
511#endif 512#endif
512 sh73a0_add_standard_devices(); 513 sh73a0_add_standard_devices();
513 platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices)); 514 platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices));
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index ca609502d6cd..f49e28abe0ab 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -39,6 +39,7 @@
39#include <linux/mtd/mtd.h> 39#include <linux/mtd/mtd.h>
40#include <linux/mtd/partitions.h> 40#include <linux/mtd/partitions.h>
41#include <linux/mtd/physmap.h> 41#include <linux/mtd/physmap.h>
42#include <linux/mtd/sh_flctl.h>
42#include <linux/pm_clock.h> 43#include <linux/pm_clock.h>
43#include <linux/smsc911x.h> 44#include <linux/smsc911x.h>
44#include <linux/sh_intc.h> 45#include <linux/sh_intc.h>
@@ -54,6 +55,7 @@
54#include <sound/sh_fsi.h> 55#include <sound/sh_fsi.h>
55 56
56#include <mach/common.h> 57#include <mach/common.h>
58#include <mach/irqs.h>
57#include <mach/sh7372.h> 59#include <mach/sh7372.h>
58 60
59#include <asm/mach/arch.h> 61#include <asm/mach/arch.h>
@@ -955,6 +957,50 @@ static struct platform_device fsi_ak4643_device = {
955 }, 957 },
956}; 958};
957 959
960/* FLCTL */
961static struct mtd_partition nand_partition_info[] = {
962 {
963 .name = "system",
964 .offset = 0,
965 .size = 128 * 1024 * 1024,
966 },
967 {
968 .name = "userdata",
969 .offset = MTDPART_OFS_APPEND,
970 .size = 256 * 1024 * 1024,
971 },
972 {
973 .name = "cache",
974 .offset = MTDPART_OFS_APPEND,
975 .size = 128 * 1024 * 1024,
976 },
977};
978
979static struct resource nand_flash_resources[] = {
980 [0] = {
981 .start = 0xe6a30000,
982 .end = 0xe6a3009b,
983 .flags = IORESOURCE_MEM,
984 }
985};
986
987static struct sh_flctl_platform_data nand_flash_data = {
988 .parts = nand_partition_info,
989 .nr_parts = ARRAY_SIZE(nand_partition_info),
990 .flcmncr_val = CLK_16B_12L_4H | TYPESEL_SET
991 | SHBUSSEL | SEL_16BIT | SNAND_E,
992 .use_holden = 1,
993};
994
995static struct platform_device nand_flash_device = {
996 .name = "sh_flctl",
997 .resource = nand_flash_resources,
998 .num_resources = ARRAY_SIZE(nand_flash_resources),
999 .dev = {
1000 .platform_data = &nand_flash_data,
1001 },
1002};
1003
958/* 1004/*
959 * The card detect pin of the top SD/MMC slot (CN7) is active low and is 1005 * The card detect pin of the top SD/MMC slot (CN7) is active low and is
960 * connected to GPIO A22 of SH7372 (GPIO_PORT41). 1006 * connected to GPIO A22 of SH7372 (GPIO_PORT41).
@@ -1258,6 +1304,7 @@ static struct platform_device *mackerel_devices[] __initdata = {
1258 &fsi_device, 1304 &fsi_device,
1259 &fsi_ak4643_device, 1305 &fsi_ak4643_device,
1260 &fsi_hdmi_device, 1306 &fsi_hdmi_device,
1307 &nand_flash_device,
1261 &sdhi0_device, 1308 &sdhi0_device,
1262#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 1309#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
1263 &sdhi1_device, 1310 &sdhi1_device,
@@ -1487,6 +1534,30 @@ static void __init mackerel_init(void)
1487 gpio_request(GPIO_FN_MMCCMD0, NULL); 1534 gpio_request(GPIO_FN_MMCCMD0, NULL);
1488 gpio_request(GPIO_FN_MMCCLK0, NULL); 1535 gpio_request(GPIO_FN_MMCCLK0, NULL);
1489 1536
1537 /* FLCTL */
1538 gpio_request(GPIO_FN_D0_NAF0, NULL);
1539 gpio_request(GPIO_FN_D1_NAF1, NULL);
1540 gpio_request(GPIO_FN_D2_NAF2, NULL);
1541 gpio_request(GPIO_FN_D3_NAF3, NULL);
1542 gpio_request(GPIO_FN_D4_NAF4, NULL);
1543 gpio_request(GPIO_FN_D5_NAF5, NULL);
1544 gpio_request(GPIO_FN_D6_NAF6, NULL);
1545 gpio_request(GPIO_FN_D7_NAF7, NULL);
1546 gpio_request(GPIO_FN_D8_NAF8, NULL);
1547 gpio_request(GPIO_FN_D9_NAF9, NULL);
1548 gpio_request(GPIO_FN_D10_NAF10, NULL);
1549 gpio_request(GPIO_FN_D11_NAF11, NULL);
1550 gpio_request(GPIO_FN_D12_NAF12, NULL);
1551 gpio_request(GPIO_FN_D13_NAF13, NULL);
1552 gpio_request(GPIO_FN_D14_NAF14, NULL);
1553 gpio_request(GPIO_FN_D15_NAF15, NULL);
1554 gpio_request(GPIO_FN_FCE0, NULL);
1555 gpio_request(GPIO_FN_WE0_FWE, NULL);
1556 gpio_request(GPIO_FN_FRB, NULL);
1557 gpio_request(GPIO_FN_A4_FOE, NULL);
1558 gpio_request(GPIO_FN_A5_FCDE, NULL);
1559 gpio_request(GPIO_FN_RD_FSC, NULL);
1560
1490 /* enable GPS module (GT-720F) */ 1561 /* enable GPS module (GT-720F) */
1491 gpio_request(GPIO_FN_SCIFA2_TXD1, NULL); 1562 gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
1492 gpio_request(GPIO_FN_SCIFA2_RXD1, NULL); 1563 gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
@@ -1531,6 +1602,7 @@ static void __init mackerel_init(void)
1531 sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device); 1602 sh7372_add_device_to_domain(&sh7372_a4mp, &fsi_device);
1532 sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs0_device); 1603 sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs0_device);
1533 sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs1_device); 1604 sh7372_add_device_to_domain(&sh7372_a3sp, &usbhs1_device);
1605 sh7372_add_device_to_domain(&sh7372_a3sp, &nand_flash_device);
1534 sh7372_add_device_to_domain(&sh7372_a3sp, &sh_mmcif_device); 1606 sh7372_add_device_to_domain(&sh7372_a3sp, &sh_mmcif_device);
1535 sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi0_device); 1607 sh7372_add_device_to_domain(&sh7372_a3sp, &sdhi0_device);
1536#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) 1608#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index cbd5e4cd06d2..ef0e13bf0b3a 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -31,6 +31,7 @@
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/r8a7779.h> 32#include <mach/r8a7779.h>
33#include <mach/common.h> 33#include <mach/common.h>
34#include <mach/irqs.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/hardware/gic.h> 37#include <asm/hardware/gic.h>
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index de243e3c8392..94d1f88246d3 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -511,7 +511,7 @@ enum { MSTP001, MSTP000,
511 MSTP223, 511 MSTP223,
512 MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207, 512 MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207,
513 MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, 513 MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
514 MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, 514 MSTP328, MSTP323, MSTP322, MSTP315, MSTP314, MSTP313, MSTP312,
515 MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406, 515 MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406,
516 MSTP405, MSTP404, MSTP403, MSTP400, 516 MSTP405, MSTP404, MSTP403, MSTP400,
517 MSTP_NR }; 517 MSTP_NR };
@@ -553,6 +553,7 @@ static struct clk mstp_clks[MSTP_NR] = {
553 [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ 553 [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */
554 [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ 554 [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */
555 [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ 555 [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */
556 [MSTP315] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 15, 0), /* FLCTL*/
556 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ 557 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
557 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ 558 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
558 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ 559 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
@@ -653,6 +654,7 @@ static struct clk_lookup lookups[] = {
653 CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ 654 CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */
654 CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USB0 */ 655 CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USB0 */
655 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP322]), /* USB0 */ 656 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP322]), /* USB0 */
657 CLKDEV_DEV_ID("sh_flctl.0", &mstp_clks[MSTP315]), /* FLCTL */
656 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ 658 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
657 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ 659 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
658 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */ 660 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 21b09b6455e4..7e6559105d40 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -13,6 +13,7 @@
13#include <linux/suspend.h> 13#include <linux/suspend.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/err.h> 15#include <linux/err.h>
16#include <asm/cpuidle.h>
16#include <asm/io.h> 17#include <asm/io.h>
17 18
18static void shmobile_enter_wfi(void) 19static void shmobile_enter_wfi(void)
@@ -28,37 +29,19 @@ static int shmobile_cpuidle_enter(struct cpuidle_device *dev,
28 struct cpuidle_driver *drv, 29 struct cpuidle_driver *drv,
29 int index) 30 int index)
30{ 31{
31 ktime_t before, after;
32
33 before = ktime_get();
34
35 local_irq_disable();
36 local_fiq_disable();
37
38 shmobile_cpuidle_modes[index](); 32 shmobile_cpuidle_modes[index]();
39 33
40 local_irq_enable();
41 local_fiq_enable();
42
43 after = ktime_get();
44 dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10;
45
46 return index; 34 return index;
47} 35}
48 36
49static struct cpuidle_device shmobile_cpuidle_dev; 37static struct cpuidle_device shmobile_cpuidle_dev;
50static struct cpuidle_driver shmobile_cpuidle_driver = { 38static struct cpuidle_driver shmobile_cpuidle_driver = {
51 .name = "shmobile_cpuidle", 39 .name = "shmobile_cpuidle",
52 .owner = THIS_MODULE, 40 .owner = THIS_MODULE,
53 .states[0] = { 41 .en_core_tk_irqen = 1,
54 .name = "C1", 42 .states[0] = ARM_CPUIDLE_WFI_STATE,
55 .desc = "WFI", 43 .safe_state_index = 0, /* C1 */
56 .exit_latency = 1, 44 .state_count = 1,
57 .target_residency = 1 * 2,
58 .flags = CPUIDLE_FLAG_TIME_VALID,
59 },
60 .safe_state_index = 0, /* C1 */
61 .state_count = 1,
62}; 45};
63 46
64void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); 47void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
diff --git a/arch/arm/mach-shmobile/include/mach/io.h b/arch/arm/mach-shmobile/include/mach/io.h
deleted file mode 100644
index 7339fe46cb7c..000000000000
--- a/arch/arm/mach-shmobile/include/mach/io.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ASM_MACH_IO_H
2#define __ASM_MACH_IO_H
3
4#define IO_SPACE_LIMIT 0xffffffff
5
6#define __io(a) ((void __iomem *)(a))
7#define __mem_pci(a) (a)
8
9#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
index dcb714f4d75a..4e686cc201fc 100644
--- a/arch/arm/mach-shmobile/include/mach/irqs.h
+++ b/arch/arm/mach-shmobile/include/mach/irqs.h
@@ -1,15 +1,11 @@
1#ifndef __ASM_MACH_IRQS_H 1#ifndef __ASM_MACH_IRQS_H
2#define __ASM_MACH_IRQS_H 2#define __ASM_MACH_IRQS_H
3 3
4#define NR_IRQS 1024 4#include <linux/sh_intc.h>
5 5
6/* GIC */ 6/* GIC */
7#define gic_spi(nr) ((nr) + 32) 7#define gic_spi(nr) ((nr) + 32)
8 8
9/* INTCA */
10#define evt2irq(evt) (((evt) >> 5) - 16)
11#define irq2evt(irq) (((irq) + 16) << 5)
12
13/* INTCS */ 9/* INTCS */
14#define INTCS_VECT_BASE 0x2200 10#define INTCS_VECT_BASE 0x2200
15#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) 11#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
index 272c84c20c83..09c42afcb22d 100644
--- a/arch/arm/mach-shmobile/intc-r8a7740.c
+++ b/arch/arm/mach-shmobile/intc-r8a7740.c
@@ -25,6 +25,7 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/sh_intc.h> 26#include <linux/sh_intc.h>
27#include <mach/intc.h> 27#include <mach/intc.h>
28#include <mach/irqs.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
30 31
diff --git a/arch/arm/mach-shmobile/intc-r8a7779.c b/arch/arm/mach-shmobile/intc-r8a7779.c
index 5d92fcde2bc3..550b23df4fd4 100644
--- a/arch/arm/mach-shmobile/intc-r8a7779.c
+++ b/arch/arm/mach-shmobile/intc-r8a7779.c
@@ -42,8 +42,8 @@ static int r8a7779_set_wake(struct irq_data *data, unsigned int on)
42 42
43void __init r8a7779_init_irq(void) 43void __init r8a7779_init_irq(void)
44{ 44{
45 void __iomem *gic_dist_base = __io(0xf0001000); 45 void __iomem *gic_dist_base = IOMEM(0xf0001000);
46 void __iomem *gic_cpu_base = __io(0xf0000100); 46 void __iomem *gic_cpu_base = IOMEM(0xf0000100);
47 47
48 /* use GIC to handle interrupts */ 48 /* use GIC to handle interrupts */
49 gic_init(0, 29, gic_dist_base, gic_cpu_base); 49 gic_init(0, 29, gic_dist_base, gic_cpu_base);
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c
index cfde9bfc3669..5bf776495b75 100644
--- a/arch/arm/mach-shmobile/intc-sh7367.c
+++ b/arch/arm/mach-shmobile/intc-sh7367.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
index 89afcaba99a1..6447e0af52d4 100644
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ b/arch/arm/mach-shmobile/intc-sh7372.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c
index 2af4e6e9bc5b..b84a460a3405 100644
--- a/arch/arm/mach-shmobile/intc-sh7377.c
+++ b/arch/arm/mach-shmobile/intc-sh7377.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index 9857595eaa79..ee447404c857 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/sh_intc.h> 25#include <linux/sh_intc.h>
26#include <mach/intc.h> 26#include <mach/intc.h>
27#include <mach/irqs.h>
27#include <mach/sh73a0.h> 28#include <mach/sh73a0.h>
28#include <asm/hardware/gic.h> 29#include <asm/hardware/gic.h>
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
@@ -420,8 +421,8 @@ static irqreturn_t sh73a0_pint1_demux(int irq, void *dev_id)
420 421
421void __init sh73a0_init_irq(void) 422void __init sh73a0_init_irq(void)
422{ 423{
423 void __iomem *gic_dist_base = __io(0xf0001000); 424 void __iomem *gic_dist_base = IOMEM(0xf0001000);
424 void __iomem *gic_cpu_base = __io(0xf0000100); 425 void __iomem *gic_cpu_base = IOMEM(0xf0000100);
425 void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); 426 void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE);
426 int k, n; 427 int k, n;
427 428
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 74e52341dd1b..14edb5cffa7f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -26,6 +26,7 @@
26#include <linux/sh_timer.h> 26#include <linux/sh_timer.h>
27#include <mach/r8a7740.h> 27#include <mach/r8a7740.h>
28#include <mach/common.h> 28#include <mach/common.h>
29#include <mach/irqs.h>
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/map.h> 31#include <asm/mach/map.h>
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 6820d785493d..12c6f529ab89 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -29,6 +29,7 @@
29#include <linux/sh_intc.h> 29#include <linux/sh_intc.h>
30#include <linux/sh_timer.h> 30#include <linux/sh_timer.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/irqs.h>
32#include <mach/r8a7779.h> 33#include <mach/r8a7779.h>
33#include <mach/common.h> 34#include <mach/common.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c
index a51e1a1e6996..2e3074ab75b3 100644
--- a/arch/arm/mach-shmobile/setup-sh7367.c
+++ b/arch/arm/mach-shmobile/setup-sh7367.c
@@ -30,6 +30,7 @@
30#include <linux/sh_timer.h> 30#include <linux/sh_timer.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/common.h> 32#include <mach/common.h>
33#include <mach/irqs.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 36#include <asm/mach/map.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 4e818b7de781..2fe8f83ca124 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -33,6 +33,7 @@
33#include <linux/pm_domain.h> 33#include <linux/pm_domain.h>
34#include <linux/dma-mapping.h> 34#include <linux/dma-mapping.h>
35#include <mach/hardware.h> 35#include <mach/hardware.h>
36#include <mach/irqs.h>
36#include <mach/sh7372.h> 37#include <mach/sh7372.h>
37#include <mach/common.h> 38#include <mach/common.h>
38#include <asm/mach/map.h> 39#include <asm/mach/map.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c
index 9f146095098b..d576a6abbade 100644
--- a/arch/arm/mach-shmobile/setup-sh7377.c
+++ b/arch/arm/mach-shmobile/setup-sh7377.c
@@ -32,6 +32,7 @@
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/common.h> 33#include <mach/common.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <mach/irqs.h>
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
37#include <asm/mach/time.h> 38#include <asm/mach/time.h>
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index b6a0734a738e..5bebffc10455 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -31,6 +31,7 @@
31#include <linux/sh_intc.h> 31#include <linux/sh_intc.h>
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <mach/irqs.h>
34#include <mach/sh73a0.h> 35#include <mach/sh73a0.h>
35#include <mach/common.h> 36#include <mach/common.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 9bb7b8575a1f..b62e19d4c9af 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -30,7 +30,7 @@
30#include <asm/smp_twd.h> 30#include <asm/smp_twd.h>
31#include <asm/hardware/gic.h> 31#include <asm/hardware/gic.h>
32 32
33#define AVECR 0xfe700040 33#define AVECR IOMEM(0xfe700040)
34 34
35static struct r8a7779_pm_ch r8a7779_ch_cpu1 = { 35static struct r8a7779_pm_ch r8a7779_ch_cpu1 = {
36 .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */ 36 .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
@@ -138,7 +138,7 @@ void __init r8a7779_smp_prepare_cpus(void)
138 scu_enable(scu_base_addr()); 138 scu_enable(scu_base_addr());
139 139
140 /* Map the reset vector (in headsmp.S) */ 140 /* Map the reset vector (in headsmp.S) */
141 __raw_writel(__pa(shmobile_secondary_vector), __io(AVECR)); 141 __raw_writel(__pa(shmobile_secondary_vector), AVECR);
142 142
143 /* enable cache coherency on CPU0 */ 143 /* enable cache coherency on CPU0 */
144 modify_scu_cpu_psr(0, 3 << (cpu * 8)); 144 modify_scu_cpu_psr(0, 3 << (cpu * 8));
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index c0a9093ba3a8..14ad8b052f1a 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -28,11 +28,11 @@
28#include <asm/smp_twd.h> 28#include <asm/smp_twd.h>
29#include <asm/hardware/gic.h> 29#include <asm/hardware/gic.h>
30 30
31#define WUPCR 0xe6151010 31#define WUPCR IOMEM(0xe6151010)
32#define SRESCR 0xe6151018 32#define SRESCR IOMEM(0xe6151018)
33#define PSTR 0xe6151040 33#define PSTR IOMEM(0xe6151040)
34#define SBAR 0xe6180020 34#define SBAR IOMEM(0xe6180020)
35#define APARMBAREA 0xe6f10020 35#define APARMBAREA IOMEM(0xe6f10020)
36 36
37static void __iomem *scu_base_addr(void) 37static void __iomem *scu_base_addr(void)
38{ 38{
@@ -78,10 +78,10 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
78 /* enable cache coherency */ 78 /* enable cache coherency */
79 modify_scu_cpu_psr(0, 3 << (cpu * 8)); 79 modify_scu_cpu_psr(0, 3 << (cpu * 8));
80 80
81 if (((__raw_readl(__io(PSTR)) >> (4 * cpu)) & 3) == 3) 81 if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3)
82 __raw_writel(1 << cpu, __io(WUPCR)); /* wake up */ 82 __raw_writel(1 << cpu, WUPCR); /* wake up */
83 else 83 else
84 __raw_writel(1 << cpu, __io(SRESCR)); /* reset */ 84 __raw_writel(1 << cpu, SRESCR); /* reset */
85 85
86 return 0; 86 return 0;
87} 87}
@@ -93,8 +93,8 @@ void __init sh73a0_smp_prepare_cpus(void)
93 scu_enable(scu_base_addr()); 93 scu_enable(scu_base_addr());
94 94
95 /* Map the reset vector (in headsmp.S) */ 95 /* Map the reset vector (in headsmp.S) */
96 __raw_writel(0, __io(APARMBAREA)); /* 4k */ 96 __raw_writel(0, APARMBAREA); /* 4k */
97 __raw_writel(__pa(shmobile_secondary_vector), __io(SBAR)); 97 __raw_writel(__pa(shmobile_secondary_vector), SBAR);
98 98
99 /* enable cache coherency on CPU0 */ 99 /* enable cache coherency on CPU0 */
100 modify_scu_cpu_psr(0, 3 << (cpu * 8)); 100 modify_scu_cpu_psr(0, 3 << (cpu * 8));