From ff7690b48ae8571d930a2621e21f6e5a41e42b6d Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Wed, 9 Feb 2011 07:46:47 +0000 Subject: dma: shdma: add checking the DMAOR_AE in sh_dmae_err The irq numbers of tranfer end and address error are assigned same number on some CPU. So the sh_dmae_err() should check the AE flag in DMAOR. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt --- drivers/dma/shdma.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 6451b581a70b..d50da41ac328 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) static irqreturn_t sh_dmae_err(int irq, void *data) { - return IRQ_RETVAL(sh_dmae_reset(data)); + struct sh_dmae_device *shdev = data; + + if (dmaor_read(shdev) & DMAOR_AE) + return IRQ_RETVAL(sh_dmae_reset(data)); + else + return IRQ_NONE; } static void dmae_do_tasklet(unsigned long data) -- cgit v1.2.3 From b2267a6b095afb84b5766d6646e581b9054704d9 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Wed, 9 Feb 2011 03:18:46 +0000 Subject: serial: sh-sci: prevent setup of uninitialized serial console Commit 906b17dc089f7fa87e37a9cfe6ee185efc90e0da introduced a condition where the kernel will crash unless a earlyprintk parameter is specified. Without this parameter, sci_console_init is called during early console setup without any port being initialized, and the kernel crashes a little bit later when uart_set_options attemps to invoke set_termios on a port with an ops member equal to NULL. This patch just checks in sci_console_init that the port is properly initialized, and aborts the early console setup if it is not. Signed-off-by: Alexandre Courbot Signed-off-by: Paul Mundt --- drivers/tty/serial/sh-sci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index eb7958c675a8..264209c32675 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options) sci_port = &sci_ports[co->index]; port = &sci_port->port; + /* + * Refuse to handle uninitialized ports. + */ + if (!port->ops) + return -ENODEV; + ret = sci_remap_port(port); if (unlikely(ret != 0)) return ret; -- cgit v1.2.3 From 6a8c979935f1955707fe79909cb3baf9575282f4 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Thu, 24 Mar 2011 02:20:56 +0000 Subject: sh: sh-sci: Fix double initialization by serial_console_setup The driver is initialized in a state with an unknown value by serial_console_setup. And initialization fails. This is caused by the initialization by sci_console_init. This function does not seem to be necessary for the present sh-sci driver. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- drivers/tty/serial/sh-sci.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 264209c32675..4e530a58bb1d 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1872,13 +1872,6 @@ static struct console serial_console = { .data = &sci_uart_driver, }; -static int __init sci_console_init(void) -{ - register_console(&serial_console); - return 0; -} -console_initcall(sci_console_init); - static struct console early_serial_console = { .name = "early_ttySC", .write = serial_console_write, @@ -1907,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) register_console(&early_serial_console); return 0; } + +#define SCI_CONSOLE (&serial_console) + #else static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) { return -EINVAL; } -#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ -#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) -#define SCI_CONSOLE (&serial_console) -#else -#define SCI_CONSOLE 0 -#endif +#define SCI_CONSOLE NULL + +#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ static char banner[] __initdata = KERN_INFO "SuperH SCI(F) driver initialized\n"; -- cgit v1.2.3 From 7a28691403c51260964ee155da9e81913392793f Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 28 Mar 2011 00:50:00 +0000 Subject: sh: landisk: Remove mv_nr_irqs Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- arch/sh/boards/mach-landisk/setup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index 94186cf079b6..aa1d0ad9eeea 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c @@ -97,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p) */ static struct sh_machine_vector mv_landisk __initmv = { .mv_name = "LANDISK", - .mv_nr_irqs = 72, .mv_setup = landisk_setup, .mv_init_irq = init_landisk_IRQ, }; -- cgit v1.2.3 From eee7631fdf8ae63c4f24daf66981ac1a7b55d7fd Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Mon, 28 Mar 2011 00:50:01 +0000 Subject: sh: landisk: Remove whitespace Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- arch/sh/boards/mach-landisk/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index aa1d0ad9eeea..f1147caebacf 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c @@ -23,7 +23,7 @@ static void landisk_power_off(void) { - __raw_writeb(0x01, PA_SHUTDOWN); + __raw_writeb(0x01, PA_SHUTDOWN); } static struct resource cf_ide_resources[3]; @@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup); static void __init landisk_setup(char **cmdline_p) { - /* LED ON */ + /* LED ON */ __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); -- cgit v1.2.3 From 9a86cad62a0b8b830a7bea465141bed26de25fe4 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Wed, 30 Mar 2011 01:46:15 +0000 Subject: sh: fix build error in board-sh7757lcr.c Fix the problem that the sh_mobile_sdhi.h changed the directory from "linux/mfd/" to "linux/mmc/". Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt --- arch/sh/boards/board-sh7757lcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 99b662e511e08230e8422e77cbe4fd31ed173df6 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 6 Apr 2011 11:42:01 -0700 Subject: sh: select ARCH_NO_SYSDEV_OPS. Now that everything that was using these interfaces has been converted to the syscore ops, prevent new code from using the old API. Signed-off-by: Paul Mundt --- arch/sh/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index bc439de48cd1..4b89da248d17 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -24,6 +24,7 @@ config SUPERH select RTC_LIB select GENERIC_ATOMIC64 select GENERIC_IRQ_SHOW + select ARCH_NO_SYSDEV_OPS help The SuperH is a RISC processor targeted for use in embedded systems and consumer electronics; it was also used in the Sega Dreamcast -- cgit v1.2.3