Commit 26cf4457 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: select ARCH_NO_SYSDEV_OPS.
  sh: fix build error in board-sh7757lcr.c
  sh: landisk: Remove whitespace
  sh: landisk: Remove mv_nr_irqs
  sh: sh-sci: Fix double initialization by serial_console_setup
  serial: sh-sci: prevent setup of uninitialized serial console
  dma: shdma: add checking the DMAOR_AE in sh_dmae_err
parents 8b9686ff 99b662e5
...@@ -24,6 +24,7 @@ config SUPERH ...@@ -24,6 +24,7 @@ config SUPERH
select RTC_LIB select RTC_LIB
select GENERIC_ATOMIC64 select GENERIC_ATOMIC64
select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW
select ARCH_NO_SYSDEV_OPS
help help
The SuperH is a RISC processor targeted for use in embedded systems The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast and consumer electronics; it was also used in the Sega Dreamcast
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/sh_mmcif.h> #include <linux/mmc/sh_mmcif.h>
#include <linux/mfd/sh_mobile_sdhi.h> #include <linux/mmc/sh_mobile_sdhi.h>
#include <cpu/sh7757.h> #include <cpu/sh7757.h>
#include <asm/sh_eth.h> #include <asm/sh_eth.h>
#include <asm/heartbeat.h> #include <asm/heartbeat.h>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
static void landisk_power_off(void) static void landisk_power_off(void)
{ {
__raw_writeb(0x01, PA_SHUTDOWN); __raw_writeb(0x01, PA_SHUTDOWN);
} }
static struct resource cf_ide_resources[3]; static struct resource cf_ide_resources[3];
...@@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup); ...@@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup);
static void __init landisk_setup(char **cmdline_p) static void __init landisk_setup(char **cmdline_p)
{ {
/* LED ON */ /* LED ON */
__raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); 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,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p)
*/ */
static struct sh_machine_vector mv_landisk __initmv = { static struct sh_machine_vector mv_landisk __initmv = {
.mv_name = "LANDISK", .mv_name = "LANDISK",
.mv_nr_irqs = 72,
.mv_setup = landisk_setup, .mv_setup = landisk_setup,
.mv_init_irq = init_landisk_IRQ, .mv_init_irq = init_landisk_IRQ,
}; };
...@@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) ...@@ -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) 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) static void dmae_do_tasklet(unsigned long data)
......
...@@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options) ...@@ -1836,6 +1836,12 @@ static int __devinit serial_console_setup(struct console *co, char *options)
sci_port = &sci_ports[co->index]; sci_port = &sci_ports[co->index];
port = &sci_port->port; port = &sci_port->port;
/*
* Refuse to handle uninitialized ports.
*/
if (!port->ops)
return -ENODEV;
ret = sci_remap_port(port); ret = sci_remap_port(port);
if (unlikely(ret != 0)) if (unlikely(ret != 0))
return ret; return ret;
...@@ -1866,13 +1872,6 @@ static struct console serial_console = { ...@@ -1866,13 +1872,6 @@ static struct console serial_console = {
.data = &sci_uart_driver, .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 = { static struct console early_serial_console = {
.name = "early_ttySC", .name = "early_ttySC",
.write = serial_console_write, .write = serial_console_write,
...@@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev) ...@@ -1901,18 +1900,18 @@ static int __devinit sci_probe_earlyprintk(struct platform_device *pdev)
register_console(&early_serial_console); register_console(&early_serial_console);
return 0; return 0;
} }
#define SCI_CONSOLE (&serial_console)
#else #else
static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev) static inline int __devinit sci_probe_earlyprintk(struct platform_device *pdev)
{ {
return -EINVAL; return -EINVAL;
} }
#endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
#if defined(CONFIG_SERIAL_SH_SCI_CONSOLE) #define SCI_CONSOLE NULL
#define SCI_CONSOLE (&serial_console)
#else #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
#define SCI_CONSOLE 0
#endif
static char banner[] __initdata = static char banner[] __initdata =
KERN_INFO "SuperH SCI(F) driver initialized\n"; KERN_INFO "SuperH SCI(F) driver initialized\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment