Commit 83afdf24 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  arch/sh/drivers/dma/dma-sh.c: Correct use of ! and &
  serial: Move asm-sh/sci.h to linux/serial_sci.h.
  sh: Fix up HAS_SR_RB typo in entry-macros.
  
  maple: fix device detection
  sh: fix rtc_resources setup for sh770x
  sh: heartbeat: ioremap is expected to succeed
  sh: Storage class should be before const qualifier
  maple: remove unused variable
  sh: SH5-103 needs to select CPU_SH5.
  sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash.
parents 219ff3ad b2d7c7f7
...@@ -330,6 +330,7 @@ config CPU_SUBTYPE_SH5_101 ...@@ -330,6 +330,7 @@ config CPU_SUBTYPE_SH5_101
config CPU_SUBTYPE_SH5_103 config CPU_SUBTYPE_SH5_103
bool "Support SH5-103 processor" bool "Support SH5-103 processor"
select CPU_SH5
endchoice endchoice
......
...@@ -90,7 +90,7 @@ static irqreturn_t dma_tei(int irq, void *dev_id) ...@@ -90,7 +90,7 @@ static irqreturn_t dma_tei(int irq, void *dev_id)
static int sh_dmac_request_dma(struct dma_channel *chan) static int sh_dmac_request_dma(struct dma_channel *chan)
{ {
if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) if (unlikely(!(chan->flags & DMA_TEI_CAPABLE)))
return 0; return 0;
return request_irq(get_dmte_irq(chan->chan), dma_tei, return request_irq(get_dmte_irq(chan->chan), dma_tei,
......
...@@ -93,7 +93,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev) ...@@ -93,7 +93,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
} }
hd->base = ioremap_nocache(res->start, res->end - res->start + 1); hd->base = ioremap_nocache(res->start, res->end - res->start + 1);
if (!unlikely(hd->base)) { if (unlikely(!hd->base)) {
dev_err(&pdev->dev, "ioremap failed\n"); dev_err(&pdev->dev, "ioremap failed\n");
if (!pdev->dev.platform_data) if (!pdev->dev.platform_data)
......
...@@ -83,9 +83,9 @@ static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int ...@@ -83,9 +83,9 @@ static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int
return PCIBIOS_DEVICE_NOT_FOUND; return PCIBIOS_DEVICE_NOT_FOUND;
switch (size) { switch (size) {
case 1: *val = ctrl_inb(GAPSPCI_BBA_CONFIG+where); break; case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break;
case 2: *val = ctrl_inw(GAPSPCI_BBA_CONFIG+where); break; case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break;
case 4: *val = ctrl_inl(GAPSPCI_BBA_CONFIG+where); break; case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break;
} }
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
...@@ -97,9 +97,9 @@ static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int ...@@ -97,9 +97,9 @@ static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int
return PCIBIOS_DEVICE_NOT_FOUND; return PCIBIOS_DEVICE_NOT_FOUND;
switch (size) { switch (size) {
case 1: ctrl_outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break;
case 2: ctrl_outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break;
case 4: ctrl_outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break;
} }
return PCIBIOS_SUCCESSFUL; return PCIBIOS_SUCCESSFUL;
...@@ -127,36 +127,36 @@ int __init gapspci_init(void) ...@@ -127,36 +127,36 @@ int __init gapspci_init(void)
*/ */
for (i=0; i<16; i++) for (i=0; i<16; i++)
idbuf[i] = ctrl_inb(GAPSPCI_REGS+i); idbuf[i] = inb(GAPSPCI_REGS+i);
if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16)) if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16))
return -ENODEV; return -ENODEV;
ctrl_outl(0x5a14a501, GAPSPCI_REGS+0x18); outl(0x5a14a501, GAPSPCI_REGS+0x18);
for (i=0; i<1000000; i++) for (i=0; i<1000000; i++)
; ;
if (ctrl_inl(GAPSPCI_REGS+0x18) != 1) if (inl(GAPSPCI_REGS+0x18) != 1)
return -EINVAL; return -EINVAL;
ctrl_outl(0x01000000, GAPSPCI_REGS+0x20); outl(0x01000000, GAPSPCI_REGS+0x20);
ctrl_outl(0x01000000, GAPSPCI_REGS+0x24); outl(0x01000000, GAPSPCI_REGS+0x24);
ctrl_outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28); outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28);
ctrl_outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c); outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c);
ctrl_outl(1, GAPSPCI_REGS+0x14); outl(1, GAPSPCI_REGS+0x14);
ctrl_outl(1, GAPSPCI_REGS+0x34); outl(1, GAPSPCI_REGS+0x34);
/* Setting Broadband Adapter */ /* Setting Broadband Adapter */
ctrl_outw(0xf900, GAPSPCI_BBA_CONFIG+0x06); outw(0xf900, GAPSPCI_BBA_CONFIG+0x06);
ctrl_outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30); outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30);
ctrl_outb(0x00, GAPSPCI_BBA_CONFIG+0x3c); outb(0x00, GAPSPCI_BBA_CONFIG+0x3c);
ctrl_outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d); outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d);
ctrl_outw(0x0006, GAPSPCI_BBA_CONFIG+0x04); outw(0x0006, GAPSPCI_BBA_CONFIG+0x04);
ctrl_outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10);
ctrl_outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14);
return 0; return 0;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
enum { enum {
UNUSED = 0, UNUSED = 0,
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#include <asm/freq.h> #include <asm/freq.h>
#include <asm/io.h> #include <asm/io.h>
const static int pll1rate[]={8,12,16,0}; static const int pll1rate[]={8,12,16,0};
const static int pfc_divisors[]={1,2,3,4,6,8,12}; static const int pfc_divisors[]={1,2,3,4,6,8,12};
#define ifc_divisors pfc_divisors #define ifc_divisors pfc_divisors
#if (CONFIG_SH_CLK_MD == 0) #if (CONFIG_SH_CLK_MD == 0)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
enum { enum {
UNUSED = 0, UNUSED = 0,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
enum { enum {
UNUSED = 0, UNUSED = 0,
......
...@@ -94,9 +94,9 @@ int __uses_jump_to_uncached detect_cpu_and_cache_system(void) ...@@ -94,9 +94,9 @@ int __uses_jump_to_uncached detect_cpu_and_cache_system(void)
boot_cpu_data.dcache.way_incr = (1 << 13); boot_cpu_data.dcache.way_incr = (1 << 13);
boot_cpu_data.dcache.entry_mask = 0x1ff0; boot_cpu_data.dcache.entry_mask = 0x1ff0;
boot_cpu_data.dcache.sets = 512; boot_cpu_data.dcache.sets = 512;
ctrl_outl(CCR_CACHE_32KB, CCR3); ctrl_outl(CCR_CACHE_32KB, CCR3_REG);
#else #else
ctrl_outl(CCR_CACHE_16KB, CCR3); ctrl_outl(CCR_CACHE_16KB, CCR3_REG);
#endif #endif
#endif #endif
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
#include <asm/rtc.h> #include <asm/rtc.h>
enum { enum {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
enum { enum {
UNUSED = 0, UNUSED = 0,
...@@ -123,15 +123,15 @@ static struct resource rtc_resources[] = { ...@@ -123,15 +123,15 @@ static struct resource rtc_resources[] = {
.flags = IORESOURCE_IO, .flags = IORESOURCE_IO,
}, },
[1] = { [1] = {
.start = 20, .start = 21,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
[2] = { [2] = {
.start = 21, .start = 22,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
[3] = { [3] = {
.start = 22, .start = 20,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
#include <asm/rtc.h> #include <asm/rtc.h>
enum { enum {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
#include <asm/rtc.h> #include <asm/rtc.h>
#define INTC_ICR1 0xA4140010UL #define INTC_ICR1 0xA4140010UL
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct resource rtc_resources[] = { static struct resource rtc_resources[] = {
[0] = { [0] = {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
enum { enum {
UNUSED = 0, UNUSED = 0,
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/sci.h>
static struct resource usbf_resources[] = { static struct resource usbf_resources[] = {
[0] = { [0] = {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct resource rtc_resources[] = { static struct resource rtc_resources[] = {
[0] = { [0] = {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/sci.h> #include <linux/serial_sci.h>
static struct resource rtc_resources[] = { static struct resource rtc_resources[] = {
[0] = { [0] = {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <asm/sci.h>
static struct plat_sci_port sci_platform_data[] = { static struct plat_sci_port sci_platform_data[] = {
{ {
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial_sci.h>
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
#include <linux/notifier.h> #include <linux/notifier.h>
...@@ -54,7 +55,6 @@ ...@@ -54,7 +55,6 @@
#include <asm/kgdb.h> #include <asm/kgdb.h>
#endif #endif
#include <asm/sci.h>
#include "sh-sci.h" #include "sh-sci.h"
struct sci_port { struct sci_port {
......
/* /*
* Core maple bus functionality * Core maple bus functionality
* *
* Copyright (C) 2007 Adrian McMenamin * Copyright (C) 2007, 2008 Adrian McMenamin
* *
* Based on 2.4 code by: * Based on 2.4 code by:
* *
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/module.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -54,7 +53,7 @@ static struct device maple_bus; ...@@ -54,7 +53,7 @@ static struct device maple_bus;
static int subdevice_map[MAPLE_PORTS]; static int subdevice_map[MAPLE_PORTS];
static unsigned long *maple_sendbuf, *maple_sendptr, *maple_lastptr; static unsigned long *maple_sendbuf, *maple_sendptr, *maple_lastptr;
static unsigned long maple_pnp_time; static unsigned long maple_pnp_time;
static int started, scanning, liststatus, realscan; static int started, scanning, liststatus, fullscan;
static struct kmem_cache *maple_queue_cache; static struct kmem_cache *maple_queue_cache;
struct maple_device_specify { struct maple_device_specify {
...@@ -62,6 +61,9 @@ struct maple_device_specify { ...@@ -62,6 +61,9 @@ struct maple_device_specify {
int unit; int unit;
}; };
static bool checked[4];
static struct maple_device *baseunits[4];
/** /**
* maple_driver_register - register a device driver * maple_driver_register - register a device driver
* automatically makes the driver bus a maple bus * automatically makes the driver bus a maple bus
...@@ -309,11 +311,9 @@ static void maple_attach_driver(struct maple_device *mdev) ...@@ -309,11 +311,9 @@ static void maple_attach_driver(struct maple_device *mdev)
else else
break; break;
if (realscan) { printk(KERN_INFO "Maple device detected: %s\n",
printk(KERN_INFO "Maple device detected: %s\n", mdev->product_name);
mdev->product_name); printk(KERN_INFO "Maple device: %s\n", mdev->product_licence);
printk(KERN_INFO "Maple device: %s\n", mdev->product_licence);
}
function = be32_to_cpu(mdev->devinfo.function); function = be32_to_cpu(mdev->devinfo.function);
...@@ -323,10 +323,9 @@ static void maple_attach_driver(struct maple_device *mdev) ...@@ -323,10 +323,9 @@ static void maple_attach_driver(struct maple_device *mdev)
mdev->driver = &maple_dummy_driver; mdev->driver = &maple_dummy_driver;
sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port); sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port);
} else { } else {
if (realscan) printk(KERN_INFO
printk(KERN_INFO "Maple bus at (%d, %d): Function 0x%lX\n",
"Maple bus at (%d, %d): Function 0x%lX\n", mdev->port, mdev->unit, function);
mdev->port, mdev->unit, function);
matched = matched =
bus_for_each_drv(&maple_bus_type, NULL, mdev, bus_for_each_drv(&maple_bus_type, NULL, mdev,
...@@ -334,9 +333,8 @@ static void maple_attach_driver(struct maple_device *mdev) ...@@ -334,9 +333,8 @@ static void maple_attach_driver(struct maple_device *mdev)
if (matched == 0) { if (matched == 0) {
/* Driver does not exist yet */ /* Driver does not exist yet */
if (realscan) printk(KERN_INFO
printk(KERN_INFO "No maple driver found.\n");
"No maple driver found.\n");
mdev->driver = &maple_dummy_driver; mdev->driver = &maple_dummy_driver;
} }
sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port, sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port,
...@@ -472,9 +470,12 @@ static void maple_response_none(struct maple_device *mdev, ...@@ -472,9 +470,12 @@ static void maple_response_none(struct maple_device *mdev,
maple_detach_driver(mdev); maple_detach_driver(mdev);
return; return;
} }
if (!started) { if (!started || !fullscan) {
printk(KERN_INFO "No maple devices attached to port %d\n", if (checked[mdev->port] == false) {
mdev->port); checked[mdev->port] = true;
printk(KERN_INFO "No maple devices attached"
" to port %d\n", mdev->port);
}
return; return;
} }
maple_clean_submap(mdev); maple_clean_submap(mdev);
...@@ -485,8 +486,14 @@ static void maple_response_devinfo(struct maple_device *mdev, ...@@ -485,8 +486,14 @@ static void maple_response_devinfo(struct maple_device *mdev,
char *recvbuf) char *recvbuf)
{ {
char submask; char submask;
if ((!started) || (scanning == 2)) { if (!started || (scanning == 2) || !fullscan) {
maple_attach_driver(mdev); if ((mdev->unit == 0) && (checked[mdev->port] == false)) {
checked[mdev->port] = true;
maple_attach_driver(mdev);
} else {
if (mdev->unit != 0)
maple_attach_driver(mdev);
}
return; return;
} }
if (mdev->unit == 0) { if (mdev->unit == 0) {
...@@ -505,6 +512,7 @@ static void maple_dma_handler(struct work_struct *work) ...@@ -505,6 +512,7 @@ static void maple_dma_handler(struct work_struct *work)
struct maple_device *dev; struct maple_device *dev;
char *recvbuf; char *recvbuf;
enum maple_code code; enum maple_code code;
int i;
if (!maple_dma_done()) if (!maple_dma_done())
return; return;
...@@ -557,6 +565,19 @@ static void maple_dma_handler(struct work_struct *work) ...@@ -557,6 +565,19 @@ static void maple_dma_handler(struct work_struct *work)
} else } else
scanning = 0; scanning = 0;
if (!fullscan) {
fullscan = 1;
for (i = 0; i < MAPLE_PORTS; i++) {
if (checked[i] == false) {
fullscan = 0;
dev = baseunits[i];
dev->mq->command =
MAPLE_COMMAND_DEVINFO;
dev->mq->length = 0;
maple_add_packet(dev->mq);
}
}
}
if (started == 0) if (started == 0)
started = 1; started = 1;
} }
...@@ -694,7 +715,9 @@ static int __init maple_bus_init(void) ...@@ -694,7 +715,9 @@ static int __init maple_bus_init(void)
/* setup maple ports */ /* setup maple ports */
for (i = 0; i < MAPLE_PORTS; i++) { for (i = 0; i < MAPLE_PORTS; i++) {
checked[i] = false;
mdev[i] = maple_alloc_dev(i, 0); mdev[i] = maple_alloc_dev(i, 0);
baseunits[i] = mdev[i];
if (!mdev[i]) { if (!mdev[i]) {
while (i-- > 0) while (i-- > 0)
maple_free_dev(mdev[i]); maple_free_dev(mdev[i]);
...@@ -703,12 +726,9 @@ static int __init maple_bus_init(void) ...@@ -703,12 +726,9 @@ static int __init maple_bus_init(void)
mdev[i]->mq->command = MAPLE_COMMAND_DEVINFO; mdev[i]->mq->command = MAPLE_COMMAND_DEVINFO;
mdev[i]->mq->length = 0; mdev[i]->mq->length = 0;
maple_add_packet(mdev[i]->mq); maple_add_packet(mdev[i]->mq);
/* delay aids hardware detection */
mdelay(5);
subdevice_map[i] = 0; subdevice_map[i] = 0;
} }
realscan = 1;
/* setup maplebus hardware */ /* setup maplebus hardware */
maplebus_dma_reset(); maplebus_dma_reset();
/* initial detection */ /* initial detection */
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
defined(CONFIG_CPU_SUBTYPE_SH7710) || \ defined(CONFIG_CPU_SUBTYPE_SH7710) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) defined(CONFIG_CPU_SUBTYPE_SH7721)
#define CCR3 0xa40000b4 #define CCR3_REG 0xa40000b4
#define CCR_CACHE_16KB 0x00010000 #define CCR_CACHE_16KB 0x00010000
#define CCR_CACHE_32KB 0x00020000 #define CCR_CACHE_32KB 0x00020000
#endif #endif
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
not r11, r11 not r11, r11
stc sr, r10 stc sr, r10
and r11, r10 and r11, r10
#ifdef CONFIG_HAS_SR_RB #ifdef CONFIG_CPU_HAS_SR_RB
stc k_g_imask, r11 stc k_g_imask, r11
or r11, r10 or r11, r10
#endif #endif
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
.endm .endm
.macro get_current_thread_info, ti, tmp .macro get_current_thread_info, ti, tmp
#ifdef CONFIG_HAS_SR_RB #ifdef CONFIG_CPU_HAS_SR_RB
stc r7_bank, \ti stc r7_bank, \ti
#else #else
mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp
......
...@@ -64,7 +64,6 @@ struct maple_driver { ...@@ -64,7 +64,6 @@ struct maple_driver {
int (*connect) (struct maple_device * dev); int (*connect) (struct maple_device * dev);
void (*disconnect) (struct maple_device * dev); void (*disconnect) (struct maple_device * dev);
struct device_driver drv; struct device_driver drv;
int registered;
}; };
void maple_getcond_callback(struct maple_device *dev, void maple_getcond_callback(struct maple_device *dev,
......
#ifndef __ASM_SH_SCI_H #ifndef __LINUX_SERIAL_SCI_H
#define __ASM_SH_SCI_H #define __LINUX_SERIAL_SCI_H
#include <linux/serial_core.h> #include <linux/serial_core.h>
/* /*
* Generic header for SuperH SCI(F) * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
*
* Do not place SH-specific parts in here, sh64 and h8300 depend on this too.
*/ */
/* Offsets into the sci_port->irqs array */ /* Offsets into the sci_port->irqs array */
...@@ -31,4 +29,4 @@ struct plat_sci_port { ...@@ -31,4 +29,4 @@ struct plat_sci_port {
int early_sci_setup(struct uart_port *port); int early_sci_setup(struct uart_port *port);
#endif /* __ASM_SH_SCI_H */ #endif /* __LINUX_SERIAL_SCI_H */
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