From cc645a020510cf68332a71394a32c1eacb92c6ed Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 14 Feb 2008 15:09:27 +0900 Subject: sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash. drivers/char/pcmcia/synclink_cs.c:284:1: warning: "CCR3" redefined In file included from include/asm/cache.h:13, from include/asm/processor_32.h:15, from include/asm/processor.h:60, from include/linux/prefetch.h:14, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/char/pcmcia/synclink_cs.c:38: include/asm/cpu/cache.h:38:1: warning: this is the location of the previous definition Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh3/probe.c | 4 ++-- include/asm-sh/cpu-sh3/cache.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index fcc80bb7bee..10f2a760c5e 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c @@ -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.entry_mask = 0x1ff0; boot_cpu_data.dcache.sets = 512; - ctrl_outl(CCR_CACHE_32KB, CCR3); + ctrl_outl(CCR_CACHE_32KB, CCR3_REG); #else - ctrl_outl(CCR_CACHE_16KB, CCR3); + ctrl_outl(CCR_CACHE_16KB, CCR3_REG); #endif #endif } diff --git a/include/asm-sh/cpu-sh3/cache.h b/include/asm-sh/cpu-sh3/cache.h index 56bd838b7db..bee2d81c56b 100644 --- a/include/asm-sh/cpu-sh3/cache.h +++ b/include/asm-sh/cpu-sh3/cache.h @@ -35,7 +35,7 @@ defined(CONFIG_CPU_SUBTYPE_SH7710) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) -#define CCR3 0xa40000b4 +#define CCR3_REG 0xa40000b4 #define CCR_CACHE_16KB 0x00010000 #define CCR_CACHE_32KB 0x00020000 #endif -- cgit v1.2.3 From 8ef97dd7a8721882732ea8041fc07c80be3882ba Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 14 Feb 2008 15:30:54 +0900 Subject: sh: SH5-103 needs to select CPU_SH5. Without this, it's possible to have CONFIG_SUPERH32=y set on SH5-103 parts, which leads to much build badness. 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 b3400b5ad5c..783cfbbf87c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -330,6 +330,7 @@ config CPU_SUBTYPE_SH5_101 config CPU_SUBTYPE_SH5_103 bool "Support SH5-103 processor" + select CPU_SH5 endchoice -- cgit v1.2.3 From 24d10f0c37d301e88f6965e3dc0aa684311544e5 Mon Sep 17 00:00:00 2001 From: Adrian McMenamin Date: Sat, 16 Feb 2008 23:37:33 +0000 Subject: maple: remove unused variable Remove an unused variable from the definition of struct maple_device Signed-off-by: Adrian McMenamin Signed-off-by: Paul Mundt --- include/linux/maple.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/maple.h b/include/linux/maple.h index 3f01e2bae1a..d31e36ebb43 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h @@ -64,7 +64,6 @@ struct maple_driver { int (*connect) (struct maple_device * dev); void (*disconnect) (struct maple_device * dev); struct device_driver drv; - int registered; }; void maple_getcond_callback(struct maple_device *dev, -- cgit v1.2.3 From 4377e605e0b004a8d2049eac6cc89fbe1fdcdbb2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 17 Feb 2008 15:38:35 +0100 Subject: sh: Storage class should be before const qualifier The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh2a/clock-sh7203.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c index 3feb95a4fcb..fb781329848 100644 --- a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c @@ -21,8 +21,8 @@ #include #include -const static int pll1rate[]={8,12,16,0}; -const static int pfc_divisors[]={1,2,3,4,6,8,12}; +static const int pll1rate[]={8,12,16,0}; +static const int pfc_divisors[]={1,2,3,4,6,8,12}; #define ifc_divisors pfc_divisors #if (CONFIG_SH_CLK_MD == 0) -- cgit v1.2.3 From 1de83e94e6d4af22614c100b0c69716ab6eaa870 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Mon, 18 Feb 2008 14:09:10 +0100 Subject: sh: heartbeat: ioremap is expected to succeed ioremap is expected to succeed Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Paul Mundt --- arch/sh/drivers/heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index b76a14f12ce..ab77b0e0fa0 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c @@ -93,7 +93,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev) } 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"); if (!pdev->dev.platform_data) -- cgit v1.2.3 From b7fd095602468ee501c5bcc3f9ca788cb3834096 Mon Sep 17 00:00:00 2001 From: Rafael Ignacio Zurita Date: Mon, 18 Feb 2008 22:32:58 -0300 Subject: sh: fix rtc_resources setup for sh770x Fix the RTC resources setup for sh770x. Whit these proper start values RTC driver (drivers/rtc/rtc-sh.c) works. Signed-off-by: Rafael Ignacio Zurita Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index 969804bb523..9066ed78e28 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c @@ -123,15 +123,15 @@ static struct resource rtc_resources[] = { .flags = IORESOURCE_IO, }, [1] = { - .start = 20, + .start = 21, .flags = IORESOURCE_IRQ, }, [2] = { - .start = 21, + .start = 22, .flags = IORESOURCE_IRQ, }, [3] = { - .start = 22, + .start = 20, .flags = IORESOURCE_IRQ, }, }; -- cgit v1.2.3 From bd49666974a12f39eb9c74044e0b1753efcd94c4 Mon Sep 17 00:00:00 2001 From: Adrian McMenamin Date: Sun, 24 Feb 2008 14:30:23 +0000 Subject: maple: fix device detection The maple bus driver that went into the kernel mainline in September 2007 contained some bugs which were revealed by the update of the kobj code for the current release series. Unfortunately those bugs also helped ensure maple devices were properly detected. This patch (against the current git) now ensures that devices are properly detected again. (A previous attempt to fix this by delaying initialisation only partially fixed this - as became apparent when the bus was fully loaded) Signed-off-by: Adrian McMenamin Signed-off-by: Paul Mundt --- drivers/sh/maple/maple.c | 66 +++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 23 deletions(-) diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c index 9cfcfd8dad5..617efb1640b 100644 --- a/drivers/sh/maple/maple.c +++ b/drivers/sh/maple/maple.c @@ -1,7 +1,7 @@ /* * Core maple bus functionality * - * Copyright (C) 2007 Adrian McMenamin + * Copyright (C) 2007, 2008 Adrian McMenamin * * Based on 2.4 code by: * @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -54,7 +53,7 @@ static struct device maple_bus; static int subdevice_map[MAPLE_PORTS]; static unsigned long *maple_sendbuf, *maple_sendptr, *maple_lastptr; 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; struct maple_device_specify { @@ -62,6 +61,9 @@ struct maple_device_specify { int unit; }; +static bool checked[4]; +static struct maple_device *baseunits[4]; + /** * maple_driver_register - register a device driver * automatically makes the driver bus a maple bus @@ -309,11 +311,9 @@ static void maple_attach_driver(struct maple_device *mdev) else break; - if (realscan) { - printk(KERN_INFO "Maple device detected: %s\n", - mdev->product_name); - printk(KERN_INFO "Maple device: %s\n", mdev->product_licence); - } + printk(KERN_INFO "Maple device detected: %s\n", + mdev->product_name); + printk(KERN_INFO "Maple device: %s\n", mdev->product_licence); function = be32_to_cpu(mdev->devinfo.function); @@ -323,10 +323,9 @@ static void maple_attach_driver(struct maple_device *mdev) mdev->driver = &maple_dummy_driver; sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port); } else { - if (realscan) - printk(KERN_INFO - "Maple bus at (%d, %d): Function 0x%lX\n", - mdev->port, mdev->unit, function); + printk(KERN_INFO + "Maple bus at (%d, %d): Function 0x%lX\n", + mdev->port, mdev->unit, function); matched = bus_for_each_drv(&maple_bus_type, NULL, mdev, @@ -334,9 +333,8 @@ static void maple_attach_driver(struct maple_device *mdev) if (matched == 0) { /* Driver does not exist yet */ - if (realscan) - printk(KERN_INFO - "No maple driver found.\n"); + printk(KERN_INFO + "No maple driver found.\n"); mdev->driver = &maple_dummy_driver; } sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port, @@ -472,9 +470,12 @@ static void maple_response_none(struct maple_device *mdev, maple_detach_driver(mdev); return; } - if (!started) { - printk(KERN_INFO "No maple devices attached to port %d\n", - mdev->port); + if (!started || !fullscan) { + if (checked[mdev->port] == false) { + checked[mdev->port] = true; + printk(KERN_INFO "No maple devices attached" + " to port %d\n", mdev->port); + } return; } maple_clean_submap(mdev); @@ -485,8 +486,14 @@ static void maple_response_devinfo(struct maple_device *mdev, char *recvbuf) { char submask; - if ((!started) || (scanning == 2)) { - maple_attach_driver(mdev); + if (!started || (scanning == 2) || !fullscan) { + 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; } if (mdev->unit == 0) { @@ -505,6 +512,7 @@ static void maple_dma_handler(struct work_struct *work) struct maple_device *dev; char *recvbuf; enum maple_code code; + int i; if (!maple_dma_done()) return; @@ -557,6 +565,19 @@ static void maple_dma_handler(struct work_struct *work) } else 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) started = 1; } @@ -694,7 +715,9 @@ static int __init maple_bus_init(void) /* setup maple ports */ for (i = 0; i < MAPLE_PORTS; i++) { + checked[i] = false; mdev[i] = maple_alloc_dev(i, 0); + baseunits[i] = mdev[i]; if (!mdev[i]) { while (i-- > 0) maple_free_dev(mdev[i]); @@ -703,12 +726,9 @@ static int __init maple_bus_init(void) mdev[i]->mq->command = MAPLE_COMMAND_DEVINFO; mdev[i]->mq->length = 0; maple_add_packet(mdev[i]->mq); - /* delay aids hardware detection */ - mdelay(5); subdevice_map[i] = 0; } - realscan = 1; /* setup maplebus hardware */ maplebus_dma_reset(); /* initial detection */ -- cgit v1.2.3 From 763a495a022ac26afb2940e768e86725c1c7e8c9 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 26 Feb 2008 14:14:56 +0900 Subject: sh: revert dreamcast pci change Commit e036eaa681a17f71b64f6d9040fe605555623919 broke dreamcast pci, this patch fixes that by reverting the dreamcast specific bits. Signed-off-by: Magnus Damm Acked-by: Adrian McMenamin Signed-off-by: Andrew Morton Signed-off-by: Paul Mundt --- arch/sh/drivers/pci/ops-dreamcast.c | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c index 0dac87b1962..e1284fc6936 100644 --- a/arch/sh/drivers/pci/ops-dreamcast.c +++ b/arch/sh/drivers/pci/ops-dreamcast.c @@ -83,9 +83,9 @@ static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int return PCIBIOS_DEVICE_NOT_FOUND; switch (size) { - case 1: *val = ctrl_inb(GAPSPCI_BBA_CONFIG+where); break; - case 2: *val = ctrl_inw(GAPSPCI_BBA_CONFIG+where); break; - case 4: *val = ctrl_inl(GAPSPCI_BBA_CONFIG+where); break; + case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break; + case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break; + case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break; } return PCIBIOS_SUCCESSFUL; @@ -97,9 +97,9 @@ static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int return PCIBIOS_DEVICE_NOT_FOUND; switch (size) { - case 1: ctrl_outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; - case 2: ctrl_outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; - case 4: ctrl_outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; + case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; + case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; + case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; } return PCIBIOS_SUCCESSFUL; @@ -127,36 +127,36 @@ int __init gapspci_init(void) */ 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)) return -ENODEV; - ctrl_outl(0x5a14a501, GAPSPCI_REGS+0x18); + outl(0x5a14a501, GAPSPCI_REGS+0x18); for (i=0; i<1000000; i++) ; - if (ctrl_inl(GAPSPCI_REGS+0x18) != 1) + if (inl(GAPSPCI_REGS+0x18) != 1) return -EINVAL; - ctrl_outl(0x01000000, GAPSPCI_REGS+0x20); - ctrl_outl(0x01000000, GAPSPCI_REGS+0x24); + outl(0x01000000, GAPSPCI_REGS+0x20); + outl(0x01000000, GAPSPCI_REGS+0x24); - ctrl_outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28); - ctrl_outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c); + outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28); + outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c); - ctrl_outl(1, GAPSPCI_REGS+0x14); - ctrl_outl(1, GAPSPCI_REGS+0x34); + outl(1, GAPSPCI_REGS+0x14); + outl(1, GAPSPCI_REGS+0x34); /* Setting Broadband Adapter */ - ctrl_outw(0xf900, GAPSPCI_BBA_CONFIG+0x06); - ctrl_outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30); - ctrl_outb(0x00, GAPSPCI_BBA_CONFIG+0x3c); - ctrl_outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d); - ctrl_outw(0x0006, GAPSPCI_BBA_CONFIG+0x04); - ctrl_outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); - ctrl_outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); + outw(0xf900, GAPSPCI_BBA_CONFIG+0x06); + outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30); + outb(0x00, GAPSPCI_BBA_CONFIG+0x3c); + outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d); + outw(0x0006, GAPSPCI_BBA_CONFIG+0x04); + outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); + outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); return 0; } -- cgit v1.2.3 From 8b1d16540c6ae4e62fcff56bd47794951b3ca87a Mon Sep 17 00:00:00 2001 From: Hideo Saito Date: Tue, 26 Feb 2008 14:28:48 +0900 Subject: sh: Fix up HAS_SR_RB typo in entry-macros. Signed-off-by: Hideo Saito Signed-off-by: Paul Mundt --- include/asm-sh/entry-macros.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-sh/entry-macros.S b/include/asm-sh/entry-macros.S index 500030eae7a..2dab0b8d945 100644 --- a/include/asm-sh/entry-macros.S +++ b/include/asm-sh/entry-macros.S @@ -12,7 +12,7 @@ not r11, r11 stc sr, r10 and r11, r10 -#ifdef CONFIG_HAS_SR_RB +#ifdef CONFIG_CPU_HAS_SR_RB stc k_g_imask, r11 or r11, r10 #endif @@ -20,7 +20,7 @@ .endm .macro get_current_thread_info, ti, tmp -#ifdef CONFIG_HAS_SR_RB +#ifdef CONFIG_CPU_HAS_SR_RB stc r7_bank, \ti #else mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp -- cgit v1.2.3 From 96de1a8f0275bd67f243833e7088baced518f873 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 26 Feb 2008 14:52:45 +0900 Subject: serial: Move asm-sh/sci.h to linux/serial_sci.h. This header is needed on other architectures as well (namely h8300), which currently fails to build without this in place. Rather than duplicating the port definition completely there, just move this to a common location instead. This should get h8300 working again for 2.6.25, in addition to the changes already pushed by Sato-san in -rc2. Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh2/setup-sh7619.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 2 +- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 2 +- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 2 +- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 2 +- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +- drivers/serial/sh-sci.c | 2 +- include/asm-sh/sci.h | 34 ---------------------------------- include/linux/serial_sci.h | 32 ++++++++++++++++++++++++++++++++ 21 files changed, 51 insertions(+), 53 deletions(-) delete mode 100644 include/asm-sh/sci.h create mode 100644 include/linux/serial_sci.h diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index b230eb278ce..cc530f4d84d 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include enum { UNUSED = 0, diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index db6ef5cecde..e98dc445035 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include enum { UNUSED = 0, diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index a564425b905..e6d4ec445dd 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include enum { UNUSED = 0, diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index dd0a20a685f..f581534cb73 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include enum { diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index 9066ed78e28..d3733b13ea5 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include enum { UNUSED = 0, diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index 0cc0e2bf135..7406c9ad925 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include enum { diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c index 3855ea4c21c..8028082527c 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #define INTC_ICR1 0xA4140010UL diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index dab193293f2..7371abf64f8 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index ae3603aca61..ec884039b91 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include static struct resource rtc_resources[] = { [0] = { diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 85f81579b97..254c5c55ab9 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include enum { UNUSED = 0, diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index c0a3f079dfd..6d4f50cd4aa 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 967e8b69a2f..f26b5cdad0d 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 73c778d40d1..b98b4bc93ec 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include static struct resource usbf_resources[] = { [0] = { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index eabd5386812..07c988dc9de 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include static struct resource rtc_resources[] = { [0] = { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index 32f4f59a837..b9cec48b180 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 293004b526f..18dbbe23fea 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include static struct resource rtc_resources[] = { [0] = { diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index 74b60e96cdf..621e7329ec6 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c @@ -10,10 +10,10 @@ #include #include #include +#include #include #include #include -#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c index 4dc958b6b31..bd35f32534b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include static struct plat_sci_port sci_platform_data[] = { { diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 9ce12cb2ceb..a8c116b80bf 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef CONFIG_CPU_FREQ #include @@ -54,7 +55,6 @@ #include #endif -#include #include "sh-sci.h" struct sci_port { diff --git a/include/asm-sh/sci.h b/include/asm-sh/sci.h deleted file mode 100644 index 52e73660c12..00000000000 --- a/include/asm-sh/sci.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef __ASM_SH_SCI_H -#define __ASM_SH_SCI_H - -#include - -/* - * Generic header for SuperH SCI(F) - * - * Do not place SH-specific parts in here, sh64 and h8300 depend on this too. - */ - -/* Offsets into the sci_port->irqs array */ -enum { - SCIx_ERI_IRQ, - SCIx_RXI_IRQ, - SCIx_TXI_IRQ, - SCIx_BRI_IRQ, - SCIx_NR_IRQS, -}; - -/* - * Platform device specific platform_data struct - */ -struct plat_sci_port { - void __iomem *membase; /* io cookie */ - unsigned long mapbase; /* resource base */ - unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ - unsigned int type; /* SCI / SCIF / IRDA */ - upf_t flags; /* UPF_* flags */ -}; - -int early_sci_setup(struct uart_port *port); - -#endif /* __ASM_SH_SCI_H */ diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h new file mode 100644 index 00000000000..893cc53486b --- /dev/null +++ b/include/linux/serial_sci.h @@ -0,0 +1,32 @@ +#ifndef __LINUX_SERIAL_SCI_H +#define __LINUX_SERIAL_SCI_H + +#include + +/* + * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) + */ + +/* Offsets into the sci_port->irqs array */ +enum { + SCIx_ERI_IRQ, + SCIx_RXI_IRQ, + SCIx_TXI_IRQ, + SCIx_BRI_IRQ, + SCIx_NR_IRQS, +}; + +/* + * Platform device specific platform_data struct + */ +struct plat_sci_port { + void __iomem *membase; /* io cookie */ + unsigned long mapbase; /* resource base */ + unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ + unsigned int type; /* SCI / SCIF / IRDA */ + upf_t flags; /* UPF_* flags */ +}; + +int early_sci_setup(struct uart_port *port); + +#endif /* __LINUX_SERIAL_SCI_H */ -- cgit v1.2.3 From b2d7c7f7a69fd953626c3e507bac70e18b21f70e Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Tue, 26 Feb 2008 21:42:11 +0100 Subject: arch/sh/drivers/dma/dma-sh.c: Correct use of ! and & In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // Signed-off-by: Julia Lawall Signed-off-by: Paul Mundt --- arch/sh/drivers/dma/dma-sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index 5c3359756a9..71ff3d6f26e 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c @@ -90,7 +90,7 @@ static irqreturn_t dma_tei(int irq, void *dev_id) 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 request_irq(get_dmte_irq(chan->chan), dma_tei, -- cgit v1.2.3