aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig2
-rw-r--r--arch/sh/Kconfig.debug2
-rw-r--r--arch/sh/boards/board-magicpanelr2.c12
-rw-r--r--arch/sh/boards/board-sh7757lcr.c2
-rw-r--r--arch/sh/boards/mach-ap325rxa/setup.c38
-rw-r--r--arch/sh/boards/mach-cayman/irq.c4
-rw-r--r--arch/sh/boards/mach-dreamcast/irq.c5
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c46
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c4
-rw-r--r--arch/sh/boards/mach-landisk/setup.c5
-rw-r--r--arch/sh/boards/mach-microdev/irq.c2
-rw-r--r--arch/sh/boards/mach-migor/setup.c4
-rw-r--r--arch/sh/boards/mach-se/7206/irq.c5
-rw-r--r--arch/sh/boards/mach-se/7343/irq.c23
-rw-r--r--arch/sh/boards/mach-se/7722/irq.c15
-rw-r--r--arch/sh/boards/mach-se/7724/irq.c15
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c6
-rw-r--r--arch/sh/boards/mach-x3proto/gpio.c8
-rw-r--r--arch/sh/cchips/hd6446x/hd64461.c6
-rw-r--r--arch/sh/configs/apsh4ad0a_defconfig1
-rw-r--r--arch/sh/configs/ecovec24_defconfig2
-rw-r--r--arch/sh/configs/sdk7786_defconfig1
-rw-r--r--arch/sh/configs/sh7757lcr_defconfig2
-rw-r--r--arch/sh/drivers/pci/fixups-se7751.c2
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.h2
-rw-r--r--arch/sh/drivers/pci/pci.c2
-rw-r--r--arch/sh/include/asm/page.h2
-rw-r--r--arch/sh/include/asm/pgtable_32.h2
-rw-r--r--arch/sh/include/asm/stacktrace.h3
-rw-r--r--arch/sh/include/asm/unaligned-sh4a.h2
-rw-r--r--arch/sh/include/asm/unistd_32.h3
-rw-r--r--arch/sh/include/asm/unistd_64.h3
-rw-r--r--arch/sh/include/mach-common/mach/highlander.h4
-rw-r--r--arch/sh/include/mach-common/mach/r2d.h6
-rw-r--r--arch/sh/kernel/cpu/Makefile4
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c2
-rw-r--r--arch/sh/kernel/cpu/irq/imask.c4
-rw-r--r--arch/sh/kernel/cpu/irq/intc-sh5.c2
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c6
-rw-r--r--arch/sh/kernel/cpu/sh4/sq.c1
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c2
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm_runtime.c39
-rw-r--r--arch/sh/kernel/dumpstack.c15
-rw-r--r--arch/sh/kernel/irq.c2
-rw-r--r--arch/sh/kernel/module.c2
-rw-r--r--arch/sh/kernel/perf_callchain.c12
-rw-r--r--arch/sh/kernel/ptrace_32.c4
-rw-r--r--arch/sh/kernel/setup.c2
-rw-r--r--arch/sh/kernel/smp.c2
-rw-r--r--arch/sh/kernel/stacktrace.c13
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sh/kernel/traps_32.c1
-rw-r--r--arch/sh/lib64/copy_user_memcpy.S2
-rw-r--r--arch/sh/lib64/memcpy.S2
-rw-r--r--arch/sh/oprofile/backtrace.c13
56 files changed, 184 insertions, 189 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 9af3c8d0776b..b44e37753b9a 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -21,9 +21,9 @@ config SUPERH
21 select HAVE_REGS_AND_STACK_ACCESS_API 21 select HAVE_REGS_AND_STACK_ACCESS_API
22 select HAVE_GENERIC_HARDIRQS 22 select HAVE_GENERIC_HARDIRQS
23 select HAVE_SPARSE_IRQ 23 select HAVE_SPARSE_IRQ
24 select IRQ_FORCED_THREADING
24 select RTC_LIB 25 select RTC_LIB
25 select GENERIC_ATOMIC64 26 select GENERIC_ATOMIC64
26 select GENERIC_HARDIRQS_NO_DEPRECATED
27 select GENERIC_IRQ_SHOW 27 select GENERIC_IRQ_SHOW
28 help 28 help
29 The SuperH is a RISC processor targeted for use in embedded systems 29 The SuperH is a RISC processor targeted for use in embedded systems
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 12fec72fec5f..1553d56cf4e0 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -82,7 +82,7 @@ config SH_NO_BSS_INIT
82 help 82 help
83 If running in painfully slow environments, such as an RTL 83 If running in painfully slow environments, such as an RTL
84 simulation or from remote memory via SHdebug, where the memory 84 simulation or from remote memory via SHdebug, where the memory
85 can already be gauranteed to ber zeroed on boot, say Y. 85 can already be guaranteed to ber zeroed on boot, say Y.
86 86
87 For all other cases, say N. If this option seems perplexing, or 87 For all other cases, say N. If this option seems perplexing, or
88 you aren't sure, say N. 88 you aren't sure, say N.
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c
index efba450a0518..93f5039099b7 100644
--- a/arch/sh/boards/board-magicpanelr2.c
+++ b/arch/sh/boards/board-magicpanelr2.c
@@ -388,12 +388,12 @@ static void __init init_mpr2_IRQ(void)
388{ 388{
389 plat_irq_setup_pins(IRQ_MODE_IRQ); /* install handlers for IRQ0-5 */ 389 plat_irq_setup_pins(IRQ_MODE_IRQ); /* install handlers for IRQ0-5 */
390 390
391 set_irq_type(32, IRQ_TYPE_LEVEL_LOW); /* IRQ0 CAN1 */ 391 irq_set_irq_type(32, IRQ_TYPE_LEVEL_LOW); /* IRQ0 CAN1 */
392 set_irq_type(33, IRQ_TYPE_LEVEL_LOW); /* IRQ1 CAN2 */ 392 irq_set_irq_type(33, IRQ_TYPE_LEVEL_LOW); /* IRQ1 CAN2 */
393 set_irq_type(34, IRQ_TYPE_LEVEL_LOW); /* IRQ2 CAN3 */ 393 irq_set_irq_type(34, IRQ_TYPE_LEVEL_LOW); /* IRQ2 CAN3 */
394 set_irq_type(35, IRQ_TYPE_LEVEL_LOW); /* IRQ3 SMSC9115 */ 394 irq_set_irq_type(35, IRQ_TYPE_LEVEL_LOW); /* IRQ3 SMSC9115 */
395 set_irq_type(36, IRQ_TYPE_EDGE_RISING); /* IRQ4 touchscreen */ 395 irq_set_irq_type(36, IRQ_TYPE_EDGE_RISING); /* IRQ4 touchscreen */
396 set_irq_type(37, IRQ_TYPE_EDGE_FALLING); /* IRQ5 touchscreen */ 396 irq_set_irq_type(37, IRQ_TYPE_EDGE_FALLING); /* IRQ5 touchscreen */
397 397
398 intc_set_priority(32, 13); /* IRQ0 CAN1 */ 398 intc_set_priority(32, 13); /* IRQ0 CAN1 */
399 intc_set_priority(33, 13); /* IRQ0 CAN2 */ 399 intc_set_priority(33, 13); /* IRQ0 CAN2 */
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c
index a9e33569ad38..fa2a208ec6cb 100644
--- a/arch/sh/boards/board-sh7757lcr.c
+++ b/arch/sh/boards/board-sh7757lcr.c
@@ -17,7 +17,7 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/mmc/host.h> 18#include <linux/mmc/host.h>
19#include <linux/mmc/sh_mmcif.h> 19#include <linux/mmc/sh_mmcif.h>
20#include <linux/mfd/sh_mobile_sdhi.h> 20#include <linux/mmc/sh_mobile_sdhi.h>
21#include <cpu/sh7757.h> 21#include <cpu/sh7757.h>
22#include <asm/sh_eth.h> 22#include <asm/sh_eth.h>
23#include <asm/heartbeat.h> 23#include <asm/heartbeat.h>
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index 3e5fc3bbf3ed..618bd566cf53 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -14,8 +14,8 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/mfd/sh_mobile_sdhi.h>
18#include <linux/mmc/host.h> 17#include <linux/mmc/host.h>
18#include <linux/mmc/sh_mobile_sdhi.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/mtd/sh_flctl.h> 20#include <linux/mtd/sh_flctl.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
@@ -156,24 +156,34 @@ static struct platform_device nand_flash_device = {
156#define PORT_DRVCRA 0xA405018A 156#define PORT_DRVCRA 0xA405018A
157#define PORT_DRVCRB 0xA405018C 157#define PORT_DRVCRB 0xA405018C
158 158
159static int ap320_wvga_set_brightness(void *board_data, int brightness)
160{
161 if (brightness) {
162 gpio_set_value(GPIO_PTS3, 0);
163 __raw_writew(0x100, FPGA_BKLREG);
164 } else {
165 __raw_writew(0, FPGA_BKLREG);
166 gpio_set_value(GPIO_PTS3, 1);
167 }
168
169 return 0;
170}
171
172static int ap320_wvga_get_brightness(void *board_data)
173{
174 return gpio_get_value(GPIO_PTS3);
175}
176
159static void ap320_wvga_power_on(void *board_data, struct fb_info *info) 177static void ap320_wvga_power_on(void *board_data, struct fb_info *info)
160{ 178{
161 msleep(100); 179 msleep(100);
162 180
163 /* ASD AP-320/325 LCD ON */ 181 /* ASD AP-320/325 LCD ON */
164 __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG); 182 __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG);
165
166 /* backlight */
167 gpio_set_value(GPIO_PTS3, 0);
168 __raw_writew(0x100, FPGA_BKLREG);
169} 183}
170 184
171static void ap320_wvga_power_off(void *board_data) 185static void ap320_wvga_power_off(void *board_data)
172{ 186{
173 /* backlight */
174 __raw_writew(0, FPGA_BKLREG);
175 gpio_set_value(GPIO_PTS3, 1);
176
177 /* ASD AP-320/325 LCD OFF */ 187 /* ASD AP-320/325 LCD OFF */
178 __raw_writew(0, FPGA_LCDREG); 188 __raw_writew(0, FPGA_LCDREG);
179} 189}
@@ -209,6 +219,12 @@ static struct sh_mobile_lcdc_info lcdc_info = {
209 .board_cfg = { 219 .board_cfg = {
210 .display_on = ap320_wvga_power_on, 220 .display_on = ap320_wvga_power_on,
211 .display_off = ap320_wvga_power_off, 221 .display_off = ap320_wvga_power_off,
222 .set_brightness = ap320_wvga_set_brightness,
223 .get_brightness = ap320_wvga_get_brightness,
224 },
225 .bl_info = {
226 .name = "sh_mobile_lcdc_bl",
227 .max_brightness = 1,
212 }, 228 },
213 } 229 }
214}; 230};
@@ -423,7 +439,7 @@ static struct resource sdhi0_cn3_resources[] = {
423 [0] = { 439 [0] = {
424 .name = "SDHI0", 440 .name = "SDHI0",
425 .start = 0x04ce0000, 441 .start = 0x04ce0000,
426 .end = 0x04ce01ff, 442 .end = 0x04ce00ff,
427 .flags = IORESOURCE_MEM, 443 .flags = IORESOURCE_MEM,
428 }, 444 },
429 [1] = { 445 [1] = {
@@ -453,7 +469,7 @@ static struct resource sdhi1_cn7_resources[] = {
453 [0] = { 469 [0] = {
454 .name = "SDHI1", 470 .name = "SDHI1",
455 .start = 0x04cf0000, 471 .start = 0x04cf0000,
456 .end = 0x04cf01ff, 472 .end = 0x04cf00ff,
457 .flags = IORESOURCE_MEM, 473 .flags = IORESOURCE_MEM,
458 }, 474 },
459 [1] = { 475 [1] = {
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c
index d7ac5af9d102..311bcebdbd07 100644
--- a/arch/sh/boards/mach-cayman/irq.c
+++ b/arch/sh/boards/mach-cayman/irq.c
@@ -149,8 +149,8 @@ void init_cayman_irq(void)
149 } 149 }
150 150
151 for (i = 0; i < NR_EXT_IRQS; i++) { 151 for (i = 0; i < NR_EXT_IRQS; i++) {
152 set_irq_chip_and_handler(START_EXT_IRQS + i, &cayman_irq_type, 152 irq_set_chip_and_handler(START_EXT_IRQS + i,
153 handle_level_irq); 153 &cayman_irq_type, handle_level_irq);
154 } 154 }
155 155
156 /* Setup the SMSC interrupt */ 156 /* Setup the SMSC interrupt */
diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c
index 72e7ac9549da..f63d323f411f 100644
--- a/arch/sh/boards/mach-dreamcast/irq.c
+++ b/arch/sh/boards/mach-dreamcast/irq.c
@@ -51,7 +51,7 @@
51 */ 51 */
52#define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32) 52#define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32)
53 53
54/* Return the hardware event's bit positon within the EMR/ESR */ 54/* Return the hardware event's bit position within the EMR/ESR */
55#define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31) 55#define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31)
56 56
57/* 57/*
@@ -161,7 +161,6 @@ void systemasic_irq_init(void)
161 return; 161 return;
162 } 162 }
163 163
164 set_irq_chip_and_handler(i, &systemasic_int, 164 irq_set_chip_and_handler(i, &systemasic_int, handle_level_irq);
165 handle_level_irq);
166 } 165 }
167} 166}
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index e44480ce2ea8..bb13d0e1b964 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -11,9 +11,9 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/mfd/sh_mobile_sdhi.h>
15#include <linux/mmc/host.h> 14#include <linux/mmc/host.h>
16#include <linux/mmc/sh_mmcif.h> 15#include <linux/mmc/sh_mmcif.h>
16#include <linux/mmc/sh_mobile_sdhi.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
@@ -263,6 +263,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = {
263 }, 263 },
264}; 264};
265 265
266static int ecovec24_set_brightness(void *board_data, int brightness)
267{
268 gpio_set_value(GPIO_PTR1, brightness);
269
270 return 0;
271}
272
273static int ecovec24_get_brightness(void *board_data)
274{
275 return gpio_get_value(GPIO_PTR1);
276}
277
266static struct sh_mobile_lcdc_info lcdc_info = { 278static struct sh_mobile_lcdc_info lcdc_info = {
267 .ch[0] = { 279 .ch[0] = {
268 .interface_type = RGB18, 280 .interface_type = RGB18,
@@ -273,6 +285,12 @@ static struct sh_mobile_lcdc_info lcdc_info = {
273 .height = 91, 285 .height = 91,
274 }, 286 },
275 .board_cfg = { 287 .board_cfg = {
288 .set_brightness = ecovec24_set_brightness,
289 .get_brightness = ecovec24_get_brightness,
290 },
291 .bl_info = {
292 .name = "sh_mobile_lcdc_bl",
293 .max_brightness = 1,
276 }, 294 },
277 } 295 }
278}; 296};
@@ -464,7 +482,7 @@ static struct i2c_board_info ts_i2c_clients = {
464 .irq = IRQ0, 482 .irq = IRQ0,
465}; 483};
466 484
467#ifdef CONFIG_MFD_SH_MOBILE_SDHI 485#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
468/* SDHI0 */ 486/* SDHI0 */
469static void sdhi0_set_pwr(struct platform_device *pdev, int state) 487static void sdhi0_set_pwr(struct platform_device *pdev, int state)
470{ 488{
@@ -482,7 +500,7 @@ static struct resource sdhi0_resources[] = {
482 [0] = { 500 [0] = {
483 .name = "SDHI0", 501 .name = "SDHI0",
484 .start = 0x04ce0000, 502 .start = 0x04ce0000,
485 .end = 0x04ce01ff, 503 .end = 0x04ce00ff,
486 .flags = IORESOURCE_MEM, 504 .flags = IORESOURCE_MEM,
487 }, 505 },
488 [1] = { 506 [1] = {
@@ -504,7 +522,7 @@ static struct platform_device sdhi0_device = {
504 }, 522 },
505}; 523};
506 524
507#if !defined(CONFIG_MMC_SH_MMCIF) 525#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
508/* SDHI1 */ 526/* SDHI1 */
509static void sdhi1_set_pwr(struct platform_device *pdev, int state) 527static void sdhi1_set_pwr(struct platform_device *pdev, int state)
510{ 528{
@@ -522,7 +540,7 @@ static struct resource sdhi1_resources[] = {
522 [0] = { 540 [0] = {
523 .name = "SDHI1", 541 .name = "SDHI1",
524 .start = 0x04cf0000, 542 .start = 0x04cf0000,
525 .end = 0x04cf01ff, 543 .end = 0x04cf00ff,
526 .flags = IORESOURCE_MEM, 544 .flags = IORESOURCE_MEM,
527 }, 545 },
528 [1] = { 546 [1] = {
@@ -818,7 +836,7 @@ static struct platform_device vou_device = {
818 }, 836 },
819}; 837};
820 838
821#if defined(CONFIG_MMC_SH_MMCIF) 839#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE)
822/* SH_MMCIF */ 840/* SH_MMCIF */
823static void mmcif_set_pwr(struct platform_device *pdev, int state) 841static void mmcif_set_pwr(struct platform_device *pdev, int state)
824{ 842{
@@ -880,9 +898,9 @@ static struct platform_device *ecovec_devices[] __initdata = {
880 &ceu0_device, 898 &ceu0_device,
881 &ceu1_device, 899 &ceu1_device,
882 &keysc_device, 900 &keysc_device,
883#ifdef CONFIG_MFD_SH_MOBILE_SDHI 901#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
884 &sdhi0_device, 902 &sdhi0_device,
885#if !defined(CONFIG_MMC_SH_MMCIF) 903#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
886 &sdhi1_device, 904 &sdhi1_device,
887#endif 905#endif
888#else 906#else
@@ -894,7 +912,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
894 &fsi_device, 912 &fsi_device,
895 &irda_device, 913 &irda_device,
896 &vou_device, 914 &vou_device,
897#if defined(CONFIG_MMC_SH_MMCIF) 915#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE)
898 &sh_mmcif_device, 916 &sh_mmcif_device,
899#endif 917#endif
900}; 918};
@@ -936,7 +954,7 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd)
936 return; 954 return;
937 } 955 }
938 956
939 /* read MAC address frome EEPROM */ 957 /* read MAC address from EEPROM */
940 for (i = 0; i < sizeof(pd->mac_addr); i++) { 958 for (i = 0; i < sizeof(pd->mac_addr); i++) {
941 pd->mac_addr[i] = mac_read(a, 0x10 + i); 959 pd->mac_addr[i] = mac_read(a, 0x10 + i);
942 msleep(10); 960 msleep(10);
@@ -1102,7 +1120,7 @@ static int __init arch_setup(void)
1102 1120
1103 /* enable TouchScreen */ 1121 /* enable TouchScreen */
1104 i2c_register_board_info(0, &ts_i2c_clients, 1); 1122 i2c_register_board_info(0, &ts_i2c_clients, 1);
1105 set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW); 1123 irq_set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW);
1106 } 1124 }
1107 1125
1108 /* enable CEU0 */ 1126 /* enable CEU0 */
@@ -1162,7 +1180,7 @@ static int __init arch_setup(void)
1162 gpio_direction_input(GPIO_PTR5); 1180 gpio_direction_input(GPIO_PTR5);
1163 gpio_direction_input(GPIO_PTR6); 1181 gpio_direction_input(GPIO_PTR6);
1164 1182
1165#ifdef CONFIG_MFD_SH_MOBILE_SDHI 1183#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
1166 /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */ 1184 /* enable SDHI0 on CN11 (needs DS2.4 set to ON) */
1167 gpio_request(GPIO_FN_SDHI0CD, NULL); 1185 gpio_request(GPIO_FN_SDHI0CD, NULL);
1168 gpio_request(GPIO_FN_SDHI0WP, NULL); 1186 gpio_request(GPIO_FN_SDHI0WP, NULL);
@@ -1175,7 +1193,7 @@ static int __init arch_setup(void)
1175 gpio_request(GPIO_PTB6, NULL); 1193 gpio_request(GPIO_PTB6, NULL);
1176 gpio_direction_output(GPIO_PTB6, 0); 1194 gpio_direction_output(GPIO_PTB6, 0);
1177 1195
1178#if !defined(CONFIG_MMC_SH_MMCIF) 1196#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
1179 /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */ 1197 /* enable SDHI1 on CN12 (needs DS2.6,7 set to ON,OFF) */
1180 gpio_request(GPIO_FN_SDHI1CD, NULL); 1198 gpio_request(GPIO_FN_SDHI1CD, NULL);
1181 gpio_request(GPIO_FN_SDHI1WP, NULL); 1199 gpio_request(GPIO_FN_SDHI1WP, NULL);
@@ -1266,7 +1284,7 @@ static int __init arch_setup(void)
1266 gpio_request(GPIO_PTU5, NULL); 1284 gpio_request(GPIO_PTU5, NULL);
1267 gpio_direction_output(GPIO_PTU5, 0); 1285 gpio_direction_output(GPIO_PTU5, 0);
1268 1286
1269#if defined(CONFIG_MMC_SH_MMCIF) 1287#if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE)
1270 /* enable MMCIF (needs DS2.6,7 set to OFF,ON) */ 1288 /* enable MMCIF (needs DS2.6,7 set to OFF,ON) */
1271 gpio_request(GPIO_FN_MMC_D7, NULL); 1289 gpio_request(GPIO_FN_MMC_D7, NULL);
1272 gpio_request(GPIO_FN_MMC_D6, NULL); 1290 gpio_request(GPIO_FN_MMC_D6, NULL);
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 7504daaa85da..8b4abbbd1477 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -10,8 +10,8 @@
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/mfd/sh_mobile_sdhi.h>
14#include <linux/mmc/host.h> 13#include <linux/mmc/host.h>
14#include <linux/mmc/sh_mobile_sdhi.h>
15#include <linux/mfd/tmio.h> 15#include <linux/mfd/tmio.h>
16#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
17#include <linux/mtd/onenand.h> 17#include <linux/mtd/onenand.h>
@@ -354,7 +354,7 @@ static struct resource kfr2r09_sh_sdhi0_resources[] = {
354 [0] = { 354 [0] = {
355 .name = "SDHI0", 355 .name = "SDHI0",
356 .start = 0x04ce0000, 356 .start = 0x04ce0000,
357 .end = 0x04ce01ff, 357 .end = 0x04ce00ff,
358 .flags = IORESOURCE_MEM, 358 .flags = IORESOURCE_MEM,
359 }, 359 },
360 [1] = { 360 [1] = {
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c
index 94186cf079b6..f1147caebacf 100644
--- a/arch/sh/boards/mach-landisk/setup.c
+++ b/arch/sh/boards/mach-landisk/setup.c
@@ -23,7 +23,7 @@
23 23
24static void landisk_power_off(void) 24static void landisk_power_off(void)
25{ 25{
26 __raw_writeb(0x01, PA_SHUTDOWN); 26 __raw_writeb(0x01, PA_SHUTDOWN);
27} 27}
28 28
29static struct resource cf_ide_resources[3]; 29static struct resource cf_ide_resources[3];
@@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup);
85 85
86static void __init landisk_setup(char **cmdline_p) 86static void __init landisk_setup(char **cmdline_p)
87{ 87{
88 /* LED ON */ 88 /* LED ON */
89 __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); 89 __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
90 90
91 printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); 91 printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n");
@@ -97,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p)
97 */ 97 */
98static struct sh_machine_vector mv_landisk __initmv = { 98static struct sh_machine_vector mv_landisk __initmv = {
99 .mv_name = "LANDISK", 99 .mv_name = "LANDISK",
100 .mv_nr_irqs = 72,
101 .mv_setup = landisk_setup, 100 .mv_setup = landisk_setup,
102 .mv_init_irq = init_landisk_IRQ, 101 .mv_init_irq = init_landisk_IRQ,
103}; 102};
diff --git a/arch/sh/boards/mach-microdev/irq.c b/arch/sh/boards/mach-microdev/irq.c
index c35001fd9032..4fb00369f0e2 100644
--- a/arch/sh/boards/mach-microdev/irq.c
+++ b/arch/sh/boards/mach-microdev/irq.c
@@ -117,7 +117,7 @@ static struct irq_chip microdev_irq_type = {
117static void __init make_microdev_irq(unsigned int irq) 117static void __init make_microdev_irq(unsigned int irq)
118{ 118{
119 disable_irq_nosync(irq); 119 disable_irq_nosync(irq);
120 set_irq_chip_and_handler(irq, &microdev_irq_type, handle_level_irq); 120 irq_set_chip_and_handler(irq, &microdev_irq_type, handle_level_irq);
121 disable_microdev_irq(irq_get_irq_data(irq)); 121 disable_microdev_irq(irq_get_irq_data(irq));
122} 122}
123 123
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 03a7ffe729d5..184fde169132 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -12,8 +12,8 @@
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/input.h> 13#include <linux/input.h>
14#include <linux/input/sh_keysc.h> 14#include <linux/input/sh_keysc.h>
15#include <linux/mfd/sh_mobile_sdhi.h>
16#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
16#include <linux/mmc/sh_mobile_sdhi.h>
17#include <linux/mtd/physmap.h> 17#include <linux/mtd/physmap.h>
18#include <linux/mtd/nand.h> 18#include <linux/mtd/nand.h>
19#include <linux/i2c.h> 19#include <linux/i2c.h>
@@ -399,7 +399,7 @@ static struct resource sdhi_cn9_resources[] = {
399 [0] = { 399 [0] = {
400 .name = "SDHI", 400 .name = "SDHI",
401 .start = 0x04ce0000, 401 .start = 0x04ce0000,
402 .end = 0x04ce01ff, 402 .end = 0x04ce00ff,
403 .flags = IORESOURCE_MEM, 403 .flags = IORESOURCE_MEM,
404 }, 404 },
405 [1] = { 405 [1] = {
diff --git a/arch/sh/boards/mach-se/7206/irq.c b/arch/sh/boards/mach-se/7206/irq.c
index 9070d7e60704..0db058e709e9 100644
--- a/arch/sh/boards/mach-se/7206/irq.c
+++ b/arch/sh/boards/mach-se/7206/irq.c
@@ -92,9 +92,8 @@ static void eoi_se7206_irq(struct irq_data *data)
92{ 92{
93 unsigned short sts0,sts1; 93 unsigned short sts0,sts1;
94 unsigned int irq = data->irq; 94 unsigned int irq = data->irq;
95 struct irq_desc *desc = irq_to_desc(irq);
96 95
97 if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) 96 if (!irqd_irq_disabled(data) && !irqd_irq_inprogress(data))
98 enable_se7206_irq(data); 97 enable_se7206_irq(data);
99 /* FPGA isr clear */ 98 /* FPGA isr clear */
100 sts0 = __raw_readw(INTSTS0); 99 sts0 = __raw_readw(INTSTS0);
@@ -126,7 +125,7 @@ static struct irq_chip se7206_irq_chip __read_mostly = {
126static void make_se7206_irq(unsigned int irq) 125static void make_se7206_irq(unsigned int irq)
127{ 126{
128 disable_irq_nosync(irq); 127 disable_irq_nosync(irq);
129 set_irq_chip_and_handler_name(irq, &se7206_irq_chip, 128 irq_set_chip_and_handler_name(irq, &se7206_irq_chip,
130 handle_level_irq, "level"); 129 handle_level_irq, "level");
131 disable_se7206_irq(irq_get_irq_data(irq)); 130 disable_se7206_irq(irq_get_irq_data(irq));
132} 131}
diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c
index 76255a19417f..fd45ffc48340 100644
--- a/arch/sh/boards/mach-se/7343/irq.c
+++ b/arch/sh/boards/mach-se/7343/irq.c
@@ -67,19 +67,20 @@ void __init init_7343se_IRQ(void)
67 return; 67 return;
68 se7343_fpga_irq[i] = irq; 68 se7343_fpga_irq[i] = irq;
69 69
70 set_irq_chip_and_handler_name(se7343_fpga_irq[i], 70 irq_set_chip_and_handler_name(se7343_fpga_irq[i],
71 &se7343_irq_chip, 71 &se7343_irq_chip,
72 handle_level_irq, "level"); 72 handle_level_irq,
73 "level");
73 74
74 set_irq_chip_data(se7343_fpga_irq[i], (void *)i); 75 irq_set_chip_data(se7343_fpga_irq[i], (void *)i);
75 } 76 }
76 77
77 set_irq_chained_handler(IRQ0_IRQ, se7343_irq_demux); 78 irq_set_chained_handler(IRQ0_IRQ, se7343_irq_demux);
78 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW); 79 irq_set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
79 set_irq_chained_handler(IRQ1_IRQ, se7343_irq_demux); 80 irq_set_chained_handler(IRQ1_IRQ, se7343_irq_demux);
80 set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW); 81 irq_set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW);
81 set_irq_chained_handler(IRQ4_IRQ, se7343_irq_demux); 82 irq_set_chained_handler(IRQ4_IRQ, se7343_irq_demux);
82 set_irq_type(IRQ4_IRQ, IRQ_TYPE_LEVEL_LOW); 83 irq_set_irq_type(IRQ4_IRQ, IRQ_TYPE_LEVEL_LOW);
83 set_irq_chained_handler(IRQ5_IRQ, se7343_irq_demux); 84 irq_set_chained_handler(IRQ5_IRQ, se7343_irq_demux);
84 set_irq_type(IRQ5_IRQ, IRQ_TYPE_LEVEL_LOW); 85 irq_set_irq_type(IRQ5_IRQ, IRQ_TYPE_LEVEL_LOW);
85} 86}
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c
index c013f95628ed..aac92f21ebd2 100644
--- a/arch/sh/boards/mach-se/7722/irq.c
+++ b/arch/sh/boards/mach-se/7722/irq.c
@@ -67,16 +67,17 @@ void __init init_se7722_IRQ(void)
67 return; 67 return;
68 se7722_fpga_irq[i] = irq; 68 se7722_fpga_irq[i] = irq;
69 69
70 set_irq_chip_and_handler_name(se7722_fpga_irq[i], 70 irq_set_chip_and_handler_name(se7722_fpga_irq[i],
71 &se7722_irq_chip, 71 &se7722_irq_chip,
72 handle_level_irq, "level"); 72 handle_level_irq,
73 "level");
73 74
74 set_irq_chip_data(se7722_fpga_irq[i], (void *)i); 75 irq_set_chip_data(se7722_fpga_irq[i], (void *)i);
75 } 76 }
76 77
77 set_irq_chained_handler(IRQ0_IRQ, se7722_irq_demux); 78 irq_set_chained_handler(IRQ0_IRQ, se7722_irq_demux);
78 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW); 79 irq_set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
79 80
80 set_irq_chained_handler(IRQ1_IRQ, se7722_irq_demux); 81 irq_set_chained_handler(IRQ1_IRQ, se7722_irq_demux);
81 set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW); 82 irq_set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW);
82} 83}
diff --git a/arch/sh/boards/mach-se/7724/irq.c b/arch/sh/boards/mach-se/7724/irq.c
index 5bd87c22b65b..c6342ce7768d 100644
--- a/arch/sh/boards/mach-se/7724/irq.c
+++ b/arch/sh/boards/mach-se/7724/irq.c
@@ -140,17 +140,16 @@ void __init init_se7724_IRQ(void)
140 return; 140 return;
141 } 141 }
142 142
143 set_irq_chip_and_handler_name(irq, 143 irq_set_chip_and_handler_name(irq, &se7724_irq_chip,
144 &se7724_irq_chip,
145 handle_level_irq, "level"); 144 handle_level_irq, "level");
146 } 145 }
147 146
148 set_irq_chained_handler(IRQ0_IRQ, se7724_irq_demux); 147 irq_set_chained_handler(IRQ0_IRQ, se7724_irq_demux);
149 set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW); 148 irq_set_irq_type(IRQ0_IRQ, IRQ_TYPE_LEVEL_LOW);
150 149
151 set_irq_chained_handler(IRQ1_IRQ, se7724_irq_demux); 150 irq_set_chained_handler(IRQ1_IRQ, se7724_irq_demux);
152 set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW); 151 irq_set_irq_type(IRQ1_IRQ, IRQ_TYPE_LEVEL_LOW);
153 152
154 set_irq_chained_handler(IRQ2_IRQ, se7724_irq_demux); 153 irq_set_chained_handler(IRQ2_IRQ, se7724_irq_demux);
155 set_irq_type(IRQ2_IRQ, IRQ_TYPE_LEVEL_LOW); 154 irq_set_irq_type(IRQ2_IRQ, IRQ_TYPE_LEVEL_LOW);
156} 155}
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index c8bcf6a19b55..12357671023e 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -14,8 +14,8 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/mfd/sh_mobile_sdhi.h>
18#include <linux/mmc/host.h> 17#include <linux/mmc/host.h>
18#include <linux/mmc/sh_mobile_sdhi.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/smc91x.h> 21#include <linux/smc91x.h>
@@ -456,7 +456,7 @@ static struct resource sdhi0_cn7_resources[] = {
456 [0] = { 456 [0] = {
457 .name = "SDHI0", 457 .name = "SDHI0",
458 .start = 0x04ce0000, 458 .start = 0x04ce0000,
459 .end = 0x04ce01ff, 459 .end = 0x04ce00ff,
460 .flags = IORESOURCE_MEM, 460 .flags = IORESOURCE_MEM,
461 }, 461 },
462 [1] = { 462 [1] = {
@@ -488,7 +488,7 @@ static struct resource sdhi1_cn8_resources[] = {
488 [0] = { 488 [0] = {
489 .name = "SDHI1", 489 .name = "SDHI1",
490 .start = 0x04cf0000, 490 .start = 0x04cf0000,
491 .end = 0x04cf01ff, 491 .end = 0x04cf00ff,
492 .flags = IORESOURCE_MEM, 492 .flags = IORESOURCE_MEM,
493 }, 493 },
494 [1] = { 494 [1] = {
diff --git a/arch/sh/boards/mach-x3proto/gpio.c b/arch/sh/boards/mach-x3proto/gpio.c
index 239e74066253..f33b2b57019c 100644
--- a/arch/sh/boards/mach-x3proto/gpio.c
+++ b/arch/sh/boards/mach-x3proto/gpio.c
@@ -102,8 +102,8 @@ int __init x3proto_gpio_setup(void)
102 102
103 spin_lock_irqsave(&x3proto_gpio_lock, flags); 103 spin_lock_irqsave(&x3proto_gpio_lock, flags);
104 x3proto_gpio_irq_map[i] = irq; 104 x3proto_gpio_irq_map[i] = irq;
105 set_irq_chip_and_handler_name(irq, &dummy_irq_chip, 105 irq_set_chip_and_handler_name(irq, &dummy_irq_chip,
106 handle_simple_irq, "gpio"); 106 handle_simple_irq, "gpio");
107 spin_unlock_irqrestore(&x3proto_gpio_lock, flags); 107 spin_unlock_irqrestore(&x3proto_gpio_lock, flags);
108 } 108 }
109 109
@@ -113,8 +113,8 @@ int __init x3proto_gpio_setup(void)
113 x3proto_gpio_chip.base + x3proto_gpio_chip.ngpio, 113 x3proto_gpio_chip.base + x3proto_gpio_chip.ngpio,
114 ilsel); 114 ilsel);
115 115
116 set_irq_chained_handler(ilsel, x3proto_gpio_irq_handler); 116 irq_set_chained_handler(ilsel, x3proto_gpio_irq_handler);
117 set_irq_wake(ilsel, 1); 117 irq_set_irq_wake(ilsel, 1);
118 118
119 return 0; 119 return 0;
120 120
diff --git a/arch/sh/cchips/hd6446x/hd64461.c b/arch/sh/cchips/hd6446x/hd64461.c
index 177a10b25cad..eb4ea4d44d59 100644
--- a/arch/sh/cchips/hd6446x/hd64461.c
+++ b/arch/sh/cchips/hd6446x/hd64461.c
@@ -107,12 +107,12 @@ int __init setup_hd64461(void)
107 return -EINVAL; 107 return -EINVAL;
108 } 108 }
109 109
110 set_irq_chip_and_handler(i, &hd64461_irq_chip, 110 irq_set_chip_and_handler(i, &hd64461_irq_chip,
111 handle_level_irq); 111 handle_level_irq);
112 } 112 }
113 113
114 set_irq_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux); 114 irq_set_chained_handler(CONFIG_HD64461_IRQ, hd64461_irq_demux);
115 set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW); 115 irq_set_irq_type(CONFIG_HD64461_IRQ, IRQ_TYPE_LEVEL_LOW);
116 116
117#ifdef CONFIG_HD64461_ENABLER 117#ifdef CONFIG_HD64461_ENABLER
118 printk(KERN_INFO "HD64461: enabling PCMCIA devices\n"); 118 printk(KERN_INFO "HD64461: enabling PCMCIA devices\n");
diff --git a/arch/sh/configs/apsh4ad0a_defconfig b/arch/sh/configs/apsh4ad0a_defconfig
index e71a531f1e31..77ec0e7b8ddf 100644
--- a/arch/sh/configs/apsh4ad0a_defconfig
+++ b/arch/sh/configs/apsh4ad0a_defconfig
@@ -48,7 +48,6 @@ CONFIG_PREEMPT=y
48CONFIG_BINFMT_MISC=y 48CONFIG_BINFMT_MISC=y
49CONFIG_PM=y 49CONFIG_PM=y
50CONFIG_PM_DEBUG=y 50CONFIG_PM_DEBUG=y
51CONFIG_PM_VERBOSE=y
52CONFIG_PM_RUNTIME=y 51CONFIG_PM_RUNTIME=y
53CONFIG_CPU_IDLE=y 52CONFIG_CPU_IDLE=y
54CONFIG_NET=y 53CONFIG_NET=y
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
index 8d13e8a5a750..911e30c9abfd 100644
--- a/arch/sh/configs/ecovec24_defconfig
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -115,7 +115,7 @@ CONFIG_USB_GADGET=y
115CONFIG_USB_FILE_STORAGE=m 115CONFIG_USB_FILE_STORAGE=m
116CONFIG_MMC=y 116CONFIG_MMC=y
117CONFIG_MMC_SPI=y 117CONFIG_MMC_SPI=y
118CONFIG_MMC_TMIO=y 118CONFIG_MMC_SDHI=y
119CONFIG_RTC_CLASS=y 119CONFIG_RTC_CLASS=y
120CONFIG_RTC_DRV_RS5C372=y 120CONFIG_RTC_DRV_RS5C372=y
121CONFIG_UIO=y 121CONFIG_UIO=y
diff --git a/arch/sh/configs/sdk7786_defconfig b/arch/sh/configs/sdk7786_defconfig
index dc4a2eb6a616..c41650572d79 100644
--- a/arch/sh/configs/sdk7786_defconfig
+++ b/arch/sh/configs/sdk7786_defconfig
@@ -83,7 +83,6 @@ CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
83CONFIG_BINFMT_MISC=y 83CONFIG_BINFMT_MISC=y
84CONFIG_PM=y 84CONFIG_PM=y
85CONFIG_PM_DEBUG=y 85CONFIG_PM_DEBUG=y
86CONFIG_PM_VERBOSE=y
87CONFIG_PM_RUNTIME=y 86CONFIG_PM_RUNTIME=y
88CONFIG_CPU_IDLE=y 87CONFIG_CPU_IDLE=y
89CONFIG_NET=y 88CONFIG_NET=y
diff --git a/arch/sh/configs/sh7757lcr_defconfig b/arch/sh/configs/sh7757lcr_defconfig
index fa0ecf87034c..33ddb130a7c8 100644
--- a/arch/sh/configs/sh7757lcr_defconfig
+++ b/arch/sh/configs/sh7757lcr_defconfig
@@ -70,7 +70,7 @@ CONFIG_USB_EHCI_HCD=y
70CONFIG_USB_OHCI_HCD=y 70CONFIG_USB_OHCI_HCD=y
71CONFIG_USB_STORAGE=y 71CONFIG_USB_STORAGE=y
72CONFIG_MMC=y 72CONFIG_MMC=y
73CONFIG_MMC_TMIO=y 73CONFIG_MMC_SDHI=y
74CONFIG_MMC_SH_MMCIF=y 74CONFIG_MMC_SH_MMCIF=y
75CONFIG_EXT2_FS=y 75CONFIG_EXT2_FS=y
76CONFIG_EXT3_FS=y 76CONFIG_EXT3_FS=y
diff --git a/arch/sh/drivers/pci/fixups-se7751.c b/arch/sh/drivers/pci/fixups-se7751.c
index a4c7d3a4efca..fd3e6b02f289 100644
--- a/arch/sh/drivers/pci/fixups-se7751.c
+++ b/arch/sh/drivers/pci/fixups-se7751.c
@@ -6,7 +6,7 @@
6#include <linux/io.h> 6#include <linux/io.h>
7#include "pci-sh4.h" 7#include "pci-sh4.h"
8 8
9int __init pcibios_map_platform_irq(u8 slot, u8 pin) 9int __init pcibios_map_platform_irq(struct pci_dev *, u8 slot, u8 pin)
10{ 10{
11 switch (slot) { 11 switch (slot) {
12 case 0: return 13; 12 case 0: return 13;
diff --git a/arch/sh/drivers/pci/pci-sh7751.h b/arch/sh/drivers/pci/pci-sh7751.h
index 4983a4d20355..5ede38c330d3 100644
--- a/arch/sh/drivers/pci/pci-sh7751.h
+++ b/arch/sh/drivers/pci/pci-sh7751.h
@@ -61,7 +61,7 @@
61 #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */ 61 #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */
62 #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */ 62 #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */
63 #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */ 63 #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */
64 #define SH7751_PCICONF3_HD7 0x00800000 /* Single Funtion device */ 64 #define SH7751_PCICONF3_HD7 0x00800000 /* Single Function device */
65 #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */ 65 #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */
66 #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */ 66 #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */
67 #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */ 67 #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index a09c77dd09db..194231cb5a70 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -84,7 +84,7 @@ int __devinit register_pci_controller(struct pci_channel *hose)
84 hose_tail = &hose->next; 84 hose_tail = &hose->next;
85 85
86 /* 86 /*
87 * Do not panic here but later - this might hapen before console init. 87 * Do not panic here but later - this might happen before console init.
88 */ 88 */
89 if (!hose->io_map_base) { 89 if (!hose->io_map_base) {
90 printk(KERN_WARNING 90 printk(KERN_WARNING
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
index c4e0b3d472b9..822d6084195b 100644
--- a/arch/sh/include/asm/page.h
+++ b/arch/sh/include/asm/page.h
@@ -186,7 +186,7 @@ typedef struct page *pgtable_t;
186/* 186/*
187 * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still 187 * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still
188 * happily generate {ld/st}.q pairs, requiring us to have 8-byte 188 * happily generate {ld/st}.q pairs, requiring us to have 8-byte
189 * alignment to avoid traps. The kmalloc alignment is gauranteed by 189 * alignment to avoid traps. The kmalloc alignment is guaranteed by
190 * virtue of L1_CACHE_BYTES, requiring this to only be special cased 190 * virtue of L1_CACHE_BYTES, requiring this to only be special cased
191 * for slab caches. 191 * for slab caches.
192 */ 192 */
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h
index b799fe71114c..0bce3d81569e 100644
--- a/arch/sh/include/asm/pgtable_32.h
+++ b/arch/sh/include/asm/pgtable_32.h
@@ -167,7 +167,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x)
167#endif 167#endif
168 168
169/* 169/*
170 * Mask of bits that are to be preserved accross pgprot changes. 170 * Mask of bits that are to be preserved across pgprot changes.
171 */ 171 */
172#define _PAGE_CHG_MASK \ 172#define _PAGE_CHG_MASK \
173 (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ 173 (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \
diff --git a/arch/sh/include/asm/stacktrace.h b/arch/sh/include/asm/stacktrace.h
index 797018213718..a7e2d4dfd087 100644
--- a/arch/sh/include/asm/stacktrace.h
+++ b/arch/sh/include/asm/stacktrace.h
@@ -10,9 +10,6 @@
10/* Generic stack tracer with callbacks */ 10/* Generic stack tracer with callbacks */
11 11
12struct stacktrace_ops { 12struct stacktrace_ops {
13 void (*warning)(void *data, char *msg);
14 /* msg must contain %s for the symbol */
15 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
16 void (*address)(void *data, unsigned long address, int reliable); 13 void (*address)(void *data, unsigned long address, int reliable);
17 /* On negative return stop dumping */ 14 /* On negative return stop dumping */
18 int (*stack)(void *data, char *name); 15 int (*stack)(void *data, char *name);
diff --git a/arch/sh/include/asm/unaligned-sh4a.h b/arch/sh/include/asm/unaligned-sh4a.h
index c48a9c3420da..95adc500cabc 100644
--- a/arch/sh/include/asm/unaligned-sh4a.h
+++ b/arch/sh/include/asm/unaligned-sh4a.h
@@ -9,7 +9,7 @@
9 * struct. 9 * struct.
10 * 10 *
11 * The same note as with the movli.l/movco.l pair applies here, as long 11 * The same note as with the movli.l/movco.l pair applies here, as long
12 * as the load is gauranteed to be inlined, nothing else will hook in to 12 * as the load is guaranteed to be inlined, nothing else will hook in to
13 * r0 and we get the return value for free. 13 * r0 and we get the return value for free.
14 * 14 *
15 * NOTE: Due to the fact we require r0 encoding, care should be taken to 15 * NOTE: Due to the fact we require r0 encoding, care should be taken to
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h
index ca7765e5f967..bb7d2702c2c9 100644
--- a/arch/sh/include/asm/unistd_32.h
+++ b/arch/sh/include/asm/unistd_32.h
@@ -373,8 +373,9 @@
373#define __NR_open_by_handle_at 360 373#define __NR_open_by_handle_at 360
374#define __NR_clock_adjtime 361 374#define __NR_clock_adjtime 361
375#define __NR_syncfs 362 375#define __NR_syncfs 362
376#define __NR_sendmmsg 363
376 377
377#define NR_syscalls 363 378#define NR_syscalls 364
378 379
379#ifdef __KERNEL__ 380#ifdef __KERNEL__
380 381
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h
index a694009bb816..46327cea1e5c 100644
--- a/arch/sh/include/asm/unistd_64.h
+++ b/arch/sh/include/asm/unistd_64.h
@@ -394,10 +394,11 @@
394#define __NR_open_by_handle_at 371 394#define __NR_open_by_handle_at 371
395#define __NR_clock_adjtime 372 395#define __NR_clock_adjtime 372
396#define __NR_syncfs 373 396#define __NR_syncfs 373
397#define __NR_sendmmsg 374
397 398
398#ifdef __KERNEL__ 399#ifdef __KERNEL__
399 400
400#define NR_syscalls 374 401#define NR_syscalls 375
401 402
402#define __ARCH_WANT_IPC_PARSE_VERSION 403#define __ARCH_WANT_IPC_PARSE_VERSION
403#define __ARCH_WANT_OLD_READDIR 404#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/sh/include/mach-common/mach/highlander.h b/arch/sh/include/mach-common/mach/highlander.h
index 5d9d4d5154be..6ce944e33e59 100644
--- a/arch/sh/include/mach-common/mach/highlander.h
+++ b/arch/sh/include/mach-common/mach/highlander.h
@@ -24,7 +24,7 @@
24#define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */ 24#define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */
25#define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */ 25#define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */
26#define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */ 26#define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */
27#define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ 27#define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */
28#define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ 28#define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */
29#define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ 29#define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */
30#define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ 30#define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */
@@ -89,7 +89,7 @@
89#define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */ 89#define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */
90#define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */ 90#define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */
91#define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */ 91#define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */
92#define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ 92#define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */
93#define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ 93#define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */
94#define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ 94#define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */
95#define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ 95#define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */
diff --git a/arch/sh/include/mach-common/mach/r2d.h b/arch/sh/include/mach-common/mach/r2d.h
index 0a800157b826..e04f75eaa153 100644
--- a/arch/sh/include/mach-common/mach/r2d.h
+++ b/arch/sh/include/mach-common/mach/r2d.h
@@ -18,18 +18,18 @@
18#define PA_DISPCTL 0xa4000008 /* Display Timing control */ 18#define PA_DISPCTL 0xa4000008 /* Display Timing control */
19#define PA_SDMPOW 0xa400000a /* SD Power control */ 19#define PA_SDMPOW 0xa400000a /* SD Power control */
20#define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ 20#define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */
21#define PA_PCICD 0xa400000e /* PCI Extention detect control */ 21#define PA_PCICD 0xa400000e /* PCI Extension detect control */
22#define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ 22#define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */
23 23
24#define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ 24#define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */
25#define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ 25#define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */
26#define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ 26#define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */
27#define PA_R2D1_EXTRST 0xa4000028 /* Extention Reset control */ 27#define PA_R2D1_EXTRST 0xa4000028 /* Extension Reset control */
28#define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ 28#define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */
29 29
30#define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ 30#define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */
31#define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ 31#define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */
32#define PA_R2DPLUS_EXTRST 0xa4000026 /* Extention Reset control */ 32#define PA_R2DPLUS_EXTRST 0xa4000026 /* Extension Reset control */
33#define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ 33#define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */
34#define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ 34#define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */
35 35
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile
index d49c2135fd48..ae95935d93cd 100644
--- a/arch/sh/kernel/cpu/Makefile
+++ b/arch/sh/kernel/cpu/Makefile
@@ -17,7 +17,5 @@ obj-$(CONFIG_ARCH_SHMOBILE) += shmobile/
17 17
18obj-$(CONFIG_SH_ADC) += adc.o 18obj-$(CONFIG_SH_ADC) += adc.o
19obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o 19obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o
20obj-$(CONFIG_SH_FPU) += fpu.o
21obj-$(CONFIG_SH_FPU_EMU) += fpu.o
22 20
23obj-y += irq/ init.o clock.o hwblk.o proc.o 21obj-y += irq/ init.o clock.o fpu.o hwblk.o proc.o
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index dd0e0f211359..8f63a264a842 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -67,7 +67,7 @@ int __init __deprecated cpg_clk_init(void)
67} 67}
68 68
69/* 69/*
70 * Placeholder for compatability, until the lazy CPUs do this 70 * Placeholder for compatibility, until the lazy CPUs do this
71 * on their own. 71 * on their own.
72 */ 72 */
73int __init __weak arch_clk_init(void) 73int __init __weak arch_clk_init(void)
diff --git a/arch/sh/kernel/cpu/irq/imask.c b/arch/sh/kernel/cpu/irq/imask.c
index 32c825c9488e..39b6a24c159d 100644
--- a/arch/sh/kernel/cpu/irq/imask.c
+++ b/arch/sh/kernel/cpu/irq/imask.c
@@ -80,6 +80,6 @@ static struct irq_chip imask_irq_chip = {
80 80
81void make_imask_irq(unsigned int irq) 81void make_imask_irq(unsigned int irq)
82{ 82{
83 set_irq_chip_and_handler_name(irq, &imask_irq_chip, 83 irq_set_chip_and_handler_name(irq, &imask_irq_chip, handle_level_irq,
84 handle_level_irq, "level"); 84 "level");
85} 85}
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c
index 5af48f8357e5..9e056a3a0c73 100644
--- a/arch/sh/kernel/cpu/irq/intc-sh5.c
+++ b/arch/sh/kernel/cpu/irq/intc-sh5.c
@@ -135,7 +135,7 @@ void __init plat_irq_setup(void)
135 135
136 /* Set default: per-line enable/disable, priority driven ack/eoi */ 136 /* Set default: per-line enable/disable, priority driven ack/eoi */
137 for (i = 0; i < NR_INTC_IRQS; i++) 137 for (i = 0; i < NR_INTC_IRQS; i++)
138 set_irq_chip_and_handler(i, &intc_irq_type, handle_level_irq); 138 irq_set_chip_and_handler(i, &intc_irq_type, handle_level_irq);
139 139
140 140
141 /* Disable all interrupts and set all priorities to 0 to avoid trouble */ 141 /* Disable all interrupts and set all priorities to 0 to avoid trouble */
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 7516c35ee514..5de6dff5c21b 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -74,9 +74,9 @@ void register_ipr_controller(struct ipr_desc *desc)
74 } 74 }
75 75
76 disable_irq_nosync(p->irq); 76 disable_irq_nosync(p->irq);
77 set_irq_chip_and_handler_name(p->irq, &desc->chip, 77 irq_set_chip_and_handler_name(p->irq, &desc->chip,
78 handle_level_irq, "level"); 78 handle_level_irq, "level");
79 set_irq_chip_data(p->irq, p); 79 irq_set_chip_data(p->irq, p);
80 disable_ipr_irq(irq_get_irq_data(p->irq)); 80 disable_ipr_irq(irq_get_irq_data(p->irq));
81 } 81 }
82} 82}
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index 14726eef1ce0..f0907995b4c9 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -20,6 +20,7 @@
20#include <linux/vmalloc.h> 20#include <linux/vmalloc.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/prefetch.h>
23#include <asm/page.h> 24#include <asm/page.h>
24#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
25#include <cpu/sq.h> 26#include <cpu/sq.h>
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index 1656b8c91faf..beba32beb6d9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -648,7 +648,7 @@ static void __init sh7786_usb_setup(void)
648 * The following settings are necessary 648 * The following settings are necessary
649 * for using the USB modules. 649 * for using the USB modules.
650 * 650 *
651 * see "USB Inital Settings" for detail 651 * see "USB Initial Settings" for detail
652 */ 652 */
653 __raw_writel(USBINITVAL1, USBINITREG1); 653 __raw_writel(USBINITVAL1, USBINITREG1);
654 __raw_writel(USBINITVAL2, USBINITREG2); 654 __raw_writel(USBINITVAL2, USBINITREG2);
diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
index 6dcb8166a64d..64c807c39208 100644
--- a/arch/sh/kernel/cpu/shmobile/pm_runtime.c
+++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
@@ -139,7 +139,7 @@ void platform_pm_runtime_suspend_idle(void)
139 queue_work(pm_wq, &hwblk_work); 139 queue_work(pm_wq, &hwblk_work);
140} 140}
141 141
142int platform_pm_runtime_suspend(struct device *dev) 142static int default_platform_runtime_suspend(struct device *dev)
143{ 143{
144 struct platform_device *pdev = to_platform_device(dev); 144 struct platform_device *pdev = to_platform_device(dev);
145 struct pdev_archdata *ad = &pdev->archdata; 145 struct pdev_archdata *ad = &pdev->archdata;
@@ -147,7 +147,7 @@ int platform_pm_runtime_suspend(struct device *dev)
147 int hwblk = ad->hwblk_id; 147 int hwblk = ad->hwblk_id;
148 int ret = 0; 148 int ret = 0;
149 149
150 dev_dbg(dev, "platform_pm_runtime_suspend() [%d]\n", hwblk); 150 dev_dbg(dev, "%s() [%d]\n", __func__, hwblk);
151 151
152 /* ignore off-chip platform devices */ 152 /* ignore off-chip platform devices */
153 if (!hwblk) 153 if (!hwblk)
@@ -157,7 +157,7 @@ int platform_pm_runtime_suspend(struct device *dev)
157 might_sleep(); 157 might_sleep();
158 158
159 /* catch misconfigured drivers not starting with resume */ 159 /* catch misconfigured drivers not starting with resume */
160 if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags)) { 160 if (test_bit(PDEV_ARCHDATA_FLAG_INIT, &ad->flags)) {
161 ret = -EINVAL; 161 ret = -EINVAL;
162 goto out; 162 goto out;
163 } 163 }
@@ -170,8 +170,8 @@ int platform_pm_runtime_suspend(struct device *dev)
170 170
171 /* put device on idle list */ 171 /* put device on idle list */
172 spin_lock_irqsave(&hwblk_lock, flags); 172 spin_lock_irqsave(&hwblk_lock, flags);
173 list_add_tail(&pdev->archdata.entry, &hwblk_idle_list); 173 list_add_tail(&ad->entry, &hwblk_idle_list);
174 __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &pdev->archdata.flags); 174 __set_bit(PDEV_ARCHDATA_FLAG_IDLE, &ad->flags);
175 spin_unlock_irqrestore(&hwblk_lock, flags); 175 spin_unlock_irqrestore(&hwblk_lock, flags);
176 176
177 /* increase idle count */ 177 /* increase idle count */
@@ -183,20 +183,20 @@ int platform_pm_runtime_suspend(struct device *dev)
183 mutex_unlock(&ad->mutex); 183 mutex_unlock(&ad->mutex);
184 184
185out: 185out:
186 dev_dbg(dev, "platform_pm_runtime_suspend() [%d] returns %d\n", 186 dev_dbg(dev, "%s() [%d] returns %d\n",
187 hwblk, ret); 187 __func__, hwblk, ret);
188 188
189 return ret; 189 return ret;
190} 190}
191 191
192int platform_pm_runtime_resume(struct device *dev) 192static int default_platform_runtime_resume(struct device *dev)
193{ 193{
194 struct platform_device *pdev = to_platform_device(dev); 194 struct platform_device *pdev = to_platform_device(dev);
195 struct pdev_archdata *ad = &pdev->archdata; 195 struct pdev_archdata *ad = &pdev->archdata;
196 int hwblk = ad->hwblk_id; 196 int hwblk = ad->hwblk_id;
197 int ret = 0; 197 int ret = 0;
198 198
199 dev_dbg(dev, "platform_pm_runtime_resume() [%d]\n", hwblk); 199 dev_dbg(dev, "%s() [%d]\n", __func__, hwblk);
200 200
201 /* ignore off-chip platform devices */ 201 /* ignore off-chip platform devices */
202 if (!hwblk) 202 if (!hwblk)
@@ -228,19 +228,19 @@ int platform_pm_runtime_resume(struct device *dev)
228 */ 228 */
229 mutex_unlock(&ad->mutex); 229 mutex_unlock(&ad->mutex);
230out: 230out:
231 dev_dbg(dev, "platform_pm_runtime_resume() [%d] returns %d\n", 231 dev_dbg(dev, "%s() [%d] returns %d\n",
232 hwblk, ret); 232 __func__, hwblk, ret);
233 233
234 return ret; 234 return ret;
235} 235}
236 236
237int platform_pm_runtime_idle(struct device *dev) 237static int default_platform_runtime_idle(struct device *dev)
238{ 238{
239 struct platform_device *pdev = to_platform_device(dev); 239 struct platform_device *pdev = to_platform_device(dev);
240 int hwblk = pdev->archdata.hwblk_id; 240 int hwblk = pdev->archdata.hwblk_id;
241 int ret = 0; 241 int ret = 0;
242 242
243 dev_dbg(dev, "platform_pm_runtime_idle() [%d]\n", hwblk); 243 dev_dbg(dev, "%s() [%d]\n", __func__, hwblk);
244 244
245 /* ignore off-chip platform devices */ 245 /* ignore off-chip platform devices */
246 if (!hwblk) 246 if (!hwblk)
@@ -252,10 +252,19 @@ int platform_pm_runtime_idle(struct device *dev)
252 /* suspend synchronously to disable clocks immediately */ 252 /* suspend synchronously to disable clocks immediately */
253 ret = pm_runtime_suspend(dev); 253 ret = pm_runtime_suspend(dev);
254out: 254out:
255 dev_dbg(dev, "platform_pm_runtime_idle() [%d] done!\n", hwblk); 255 dev_dbg(dev, "%s() [%d] done!\n", __func__, hwblk);
256 return ret; 256 return ret;
257} 257}
258 258
259static struct dev_power_domain default_power_domain = {
260 .ops = {
261 .runtime_suspend = default_platform_runtime_suspend,
262 .runtime_resume = default_platform_runtime_resume,
263 .runtime_idle = default_platform_runtime_idle,
264 USE_PLATFORM_PM_SLEEP_OPS
265 },
266};
267
259static int platform_bus_notify(struct notifier_block *nb, 268static int platform_bus_notify(struct notifier_block *nb,
260 unsigned long action, void *data) 269 unsigned long action, void *data)
261{ 270{
@@ -276,6 +285,7 @@ static int platform_bus_notify(struct notifier_block *nb,
276 hwblk_disable(hwblk_info, hwblk); 285 hwblk_disable(hwblk_info, hwblk);
277 /* make sure driver re-inits itself once */ 286 /* make sure driver re-inits itself once */
278 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags); 287 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
288 dev->pwr_domain = &default_power_domain;
279 break; 289 break;
280 /* TODO: add BUS_NOTIFY_BIND_DRIVER and increase idle count */ 290 /* TODO: add BUS_NOTIFY_BIND_DRIVER and increase idle count */
281 case BUS_NOTIFY_BOUND_DRIVER: 291 case BUS_NOTIFY_BOUND_DRIVER:
@@ -289,6 +299,7 @@ static int platform_bus_notify(struct notifier_block *nb,
289 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags); 299 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
290 break; 300 break;
291 case BUS_NOTIFY_DEL_DEVICE: 301 case BUS_NOTIFY_DEL_DEVICE:
302 dev->pwr_domain = NULL;
292 break; 303 break;
293 } 304 }
294 return 0; 305 return 0;
diff --git a/arch/sh/kernel/dumpstack.c b/arch/sh/kernel/dumpstack.c
index 6f5ad1513409..694158b9a50f 100644
--- a/arch/sh/kernel/dumpstack.c
+++ b/arch/sh/kernel/dumpstack.c
@@ -69,19 +69,6 @@ stack_reader_dump(struct task_struct *task, struct pt_regs *regs,
69 } 69 }
70} 70}
71 71
72static void
73print_trace_warning_symbol(void *data, char *msg, unsigned long symbol)
74{
75 printk(data);
76 print_symbol(msg, symbol);
77 printk("\n");
78}
79
80static void print_trace_warning(void *data, char *msg)
81{
82 printk("%s%s\n", (char *)data, msg);
83}
84
85static int print_trace_stack(void *data, char *name) 72static int print_trace_stack(void *data, char *name)
86{ 73{
87 printk("%s <%s> ", (char *)data, name); 74 printk("%s <%s> ", (char *)data, name);
@@ -98,8 +85,6 @@ static void print_trace_address(void *data, unsigned long addr, int reliable)
98} 85}
99 86
100static const struct stacktrace_ops print_trace_ops = { 87static const struct stacktrace_ops print_trace_ops = {
101 .warning = print_trace_warning,
102 .warning_symbol = print_trace_warning_symbol,
103 .stack = print_trace_stack, 88 .stack = print_trace_stack,
104 .address = print_trace_address, 89 .address = print_trace_address,
105}; 90};
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 64ea0b165399..91971103b62b 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -183,7 +183,7 @@ asmlinkage void do_softirq(void)
183 ); 183 );
184 184
185 /* 185 /*
186 * Shouldnt happen, we returned above if in_interrupt(): 186 * Shouldn't happen, we returned above if in_interrupt():
187 */ 187 */
188 WARN_ON_ONCE(softirq_count()); 188 WARN_ON_ONCE(softirq_count());
189 } 189 }
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c
index ae0be697a89e..19b1f8826aef 100644
--- a/arch/sh/kernel/module.c
+++ b/arch/sh/kernel/module.c
@@ -93,6 +93,8 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
93#endif 93#endif
94 94
95 switch (ELF32_R_TYPE(rel[i].r_info)) { 95 switch (ELF32_R_TYPE(rel[i].r_info)) {
96 case R_SH_NONE:
97 break;
96 case R_SH_DIR32: 98 case R_SH_DIR32:
97 value = get_unaligned(location); 99 value = get_unaligned(location);
98 value += relocation; 100 value += relocation;
diff --git a/arch/sh/kernel/perf_callchain.c b/arch/sh/kernel/perf_callchain.c
index d5ca1ef50fa9..cc80b614b5fa 100644
--- a/arch/sh/kernel/perf_callchain.c
+++ b/arch/sh/kernel/perf_callchain.c
@@ -14,16 +14,6 @@
14#include <asm/unwinder.h> 14#include <asm/unwinder.h>
15#include <asm/ptrace.h> 15#include <asm/ptrace.h>
16 16
17
18static void callchain_warning(void *data, char *msg)
19{
20}
21
22static void
23callchain_warning_symbol(void *data, char *msg, unsigned long symbol)
24{
25}
26
27static int callchain_stack(void *data, char *name) 17static int callchain_stack(void *data, char *name)
28{ 18{
29 return 0; 19 return 0;
@@ -38,8 +28,6 @@ static void callchain_address(void *data, unsigned long addr, int reliable)
38} 28}
39 29
40static const struct stacktrace_ops callchain_ops = { 30static const struct stacktrace_ops callchain_ops = {
41 .warning = callchain_warning,
42 .warning_symbol = callchain_warning_symbol,
43 .stack = callchain_stack, 31 .stack = callchain_stack,
44 .address = callchain_address, 32 .address = callchain_address,
45}; 33};
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 2130ca674e9b..3d7b209b2178 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -117,7 +117,11 @@ void user_enable_single_step(struct task_struct *child)
117 117
118 set_tsk_thread_flag(child, TIF_SINGLESTEP); 118 set_tsk_thread_flag(child, TIF_SINGLESTEP);
119 119
120 if (ptrace_get_breakpoints(child) < 0)
121 return;
122
120 set_single_step(child, pc); 123 set_single_step(child, pc);
124 ptrace_put_breakpoints(child);
121} 125}
122 126
123void user_disable_single_step(struct task_struct *child) 127void user_disable_single_step(struct task_struct *child)
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 4f267160c515..58bff45d1156 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -150,7 +150,7 @@ void __init check_for_initrd(void)
150 } 150 }
151 151
152 /* 152 /*
153 * If we got this far inspite of the boot loader's best efforts 153 * If we got this far in spite of the boot loader's best efforts
154 * to the contrary, assume we actually have a valid initrd and 154 * to the contrary, assume we actually have a valid initrd and
155 * fix up the root dev. 155 * fix up the root dev.
156 */ 156 */
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 509b36b45115..6207561ea34a 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/cpu.h> 21#include <linux/cpu.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/sched.h>
23#include <asm/atomic.h> 24#include <asm/atomic.h>
24#include <asm/processor.h> 25#include <asm/processor.h>
25#include <asm/system.h> 26#include <asm/system.h>
@@ -323,6 +324,7 @@ void smp_message_recv(unsigned int msg)
323 generic_smp_call_function_interrupt(); 324 generic_smp_call_function_interrupt();
324 break; 325 break;
325 case SMP_MSG_RESCHEDULE: 326 case SMP_MSG_RESCHEDULE:
327 scheduler_ipi();
326 break; 328 break;
327 case SMP_MSG_FUNCTION_SINGLE: 329 case SMP_MSG_FUNCTION_SINGLE:
328 generic_smp_call_function_single_interrupt(); 330 generic_smp_call_function_single_interrupt();
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index c2e45c48409c..bf989e063a0c 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -17,15 +17,6 @@
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/stacktrace.h> 18#include <asm/stacktrace.h>
19 19
20static void save_stack_warning(void *data, char *msg)
21{
22}
23
24static void
25save_stack_warning_symbol(void *data, char *msg, unsigned long symbol)
26{
27}
28
29static int save_stack_stack(void *data, char *name) 20static int save_stack_stack(void *data, char *name)
30{ 21{
31 return 0; 22 return 0;
@@ -51,8 +42,6 @@ static void save_stack_address(void *data, unsigned long addr, int reliable)
51} 42}
52 43
53static const struct stacktrace_ops save_stack_ops = { 44static const struct stacktrace_ops save_stack_ops = {
54 .warning = save_stack_warning,
55 .warning_symbol = save_stack_warning_symbol,
56 .stack = save_stack_stack, 45 .stack = save_stack_stack,
57 .address = save_stack_address, 46 .address = save_stack_address,
58}; 47};
@@ -88,8 +77,6 @@ save_stack_address_nosched(void *data, unsigned long addr, int reliable)
88} 77}
89 78
90static const struct stacktrace_ops save_stack_ops_nosched = { 79static const struct stacktrace_ops save_stack_ops_nosched = {
91 .warning = save_stack_warning,
92 .warning_symbol = save_stack_warning_symbol,
93 .stack = save_stack_stack, 80 .stack = save_stack_stack,
94 .address = save_stack_address_nosched, 81 .address = save_stack_address_nosched,
95}; 82};
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index 030966a9305c..7c486f3e3a3c 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -380,3 +380,4 @@ ENTRY(sys_call_table)
380 .long sys_open_by_handle_at /* 360 */ 380 .long sys_open_by_handle_at /* 360 */
381 .long sys_clock_adjtime 381 .long sys_clock_adjtime
382 .long sys_syncfs 382 .long sys_syncfs
383 .long sys_sendmmsg
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index ca0a6142ab63..ba1a737afe80 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -400,3 +400,4 @@ sys_call_table:
400 .long sys_open_by_handle_at 400 .long sys_open_by_handle_at
401 .long sys_clock_adjtime 401 .long sys_clock_adjtime
402 .long sys_syncfs 402 .long sys_syncfs
403 .long sys_sendmmsg
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c
index 3484c2f65aba..b51a17104b5f 100644
--- a/arch/sh/kernel/traps_32.c
+++ b/arch/sh/kernel/traps_32.c
@@ -87,7 +87,6 @@ void die(const char * str, struct pt_regs * regs, long err)
87 bust_spinlocks(1); 87 bust_spinlocks(1);
88 88
89 printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); 89 printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
90 sysfs_printk_last_file();
91 print_modules(); 90 print_modules();
92 show_regs(regs); 91 show_regs(regs);
93 92
diff --git a/arch/sh/lib64/copy_user_memcpy.S b/arch/sh/lib64/copy_user_memcpy.S
index 2a62816d2ddd..49aeabeba2c2 100644
--- a/arch/sh/lib64/copy_user_memcpy.S
+++ b/arch/sh/lib64/copy_user_memcpy.S
@@ -27,7 +27,7 @@
27! 2.: When there are two or three bytes in the last word of an 11-or-more 27! 2.: When there are two or three bytes in the last word of an 11-or-more
28! bytes memory chunk to b copied, the rest of the word can be read 28! bytes memory chunk to b copied, the rest of the word can be read
29! without side effects. 29! without side effects.
30! This could be easily changed by increasing the minumum size of 30! This could be easily changed by increasing the minimum size of
31! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, 31! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2,
32! however, this would cost a few extra cyles on average. 32! however, this would cost a few extra cyles on average.
33! For SHmedia, the assumption is that any quadword can be read in its 33! For SHmedia, the assumption is that any quadword can be read in its
diff --git a/arch/sh/lib64/memcpy.S b/arch/sh/lib64/memcpy.S
index dd300c372ce1..5d682e0ee24f 100644
--- a/arch/sh/lib64/memcpy.S
+++ b/arch/sh/lib64/memcpy.S
@@ -29,7 +29,7 @@
29! 2.: When there are two or three bytes in the last word of an 11-or-more 29! 2.: When there are two or three bytes in the last word of an 11-or-more
30! bytes memory chunk to b copied, the rest of the word can be read 30! bytes memory chunk to b copied, the rest of the word can be read
31! without side effects. 31! without side effects.
32! This could be easily changed by increasing the minumum size of 32! This could be easily changed by increasing the minimum size of
33! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, 33! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2,
34! however, this would cost a few extra cyles on average. 34! however, this would cost a few extra cyles on average.
35! For SHmedia, the assumption is that any quadword can be read in its 35! For SHmedia, the assumption is that any quadword can be read in its
diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c
index 37f3a75ea6cb..9c88dcd56e86 100644
--- a/arch/sh/oprofile/backtrace.c
+++ b/arch/sh/oprofile/backtrace.c
@@ -23,17 +23,6 @@
23#include <asm/sections.h> 23#include <asm/sections.h>
24#include <asm/stacktrace.h> 24#include <asm/stacktrace.h>
25 25
26static void backtrace_warning_symbol(void *data, char *msg,
27 unsigned long symbol)
28{
29 /* Ignore warnings */
30}
31
32static void backtrace_warning(void *data, char *msg)
33{
34 /* Ignore warnings */
35}
36
37static int backtrace_stack(void *data, char *name) 26static int backtrace_stack(void *data, char *name)
38{ 27{
39 /* Yes, we want all stacks */ 28 /* Yes, we want all stacks */
@@ -49,8 +38,6 @@ static void backtrace_address(void *data, unsigned long addr, int reliable)
49} 38}
50 39
51static struct stacktrace_ops backtrace_ops = { 40static struct stacktrace_ops backtrace_ops = {
52 .warning = backtrace_warning,
53 .warning_symbol = backtrace_warning_symbol,
54 .stack = backtrace_stack, 41 .stack = backtrace_stack,
55 .address = backtrace_address, 42 .address = backtrace_address,
56}; 43};