aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/drivers/dma/dma-sh.c2
-rw-r--r--arch/sh/drivers/heartbeat.c2
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c44
-rw-r--r--arch/sh/kernel/cpu/sh2/setup-sh7619.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/clock-sh7203.c4
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7203.c2
-rw-r--r--arch/sh/kernel/cpu/sh2a/setup-sh7206.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/probe.c4
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7705.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh770x.c8
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c2
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7720.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh4-202.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7750.c2
-rw-r--r--arch/sh/kernel/cpu/sh4/setup-sh7760.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7343.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7366.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7770.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-shx3.c2
-rw-r--r--drivers/serial/sh-sci.c2
-rw-r--r--drivers/sh/maple/maple.c66
-rw-r--r--include/asm-sh/cpu-sh3/cache.h2
-rw-r--r--include/asm-sh/entry-macros.S4
-rw-r--r--include/linux/maple.h1
-rw-r--r--include/linux/serial_sci.h (renamed from include/asm-sh/sci.h)10
30 files changed, 101 insertions, 83 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index b3400b5ad5c6..783cfbbf87ca 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -330,6 +330,7 @@ config CPU_SUBTYPE_SH5_101
330 330
331config CPU_SUBTYPE_SH5_103 331config CPU_SUBTYPE_SH5_103
332 bool "Support SH5-103 processor" 332 bool "Support SH5-103 processor"
333 select CPU_SH5
333 334
334endchoice 335endchoice
335 336
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index 5c3359756a92..71ff3d6f26e2 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)
90 90
91static int sh_dmac_request_dma(struct dma_channel *chan) 91static int sh_dmac_request_dma(struct dma_channel *chan)
92{ 92{
93 if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) 93 if (unlikely(!(chan->flags & DMA_TEI_CAPABLE)))
94 return 0; 94 return 0;
95 95
96 return request_irq(get_dmte_irq(chan->chan), dma_tei, 96 return request_irq(get_dmte_irq(chan->chan), dma_tei,
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index b76a14f12ce2..ab77b0e0fa0e 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)
93 } 93 }
94 94
95 hd->base = ioremap_nocache(res->start, res->end - res->start + 1); 95 hd->base = ioremap_nocache(res->start, res->end - res->start + 1);
96 if (!unlikely(hd->base)) { 96 if (unlikely(!hd->base)) {
97 dev_err(&pdev->dev, "ioremap failed\n"); 97 dev_err(&pdev->dev, "ioremap failed\n");
98 98
99 if (!pdev->dev.platform_data) 99 if (!pdev->dev.platform_data)
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index 0dac87b19624..e1284fc69361 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
83 return PCIBIOS_DEVICE_NOT_FOUND; 83 return PCIBIOS_DEVICE_NOT_FOUND;
84 84
85 switch (size) { 85 switch (size) {
86 case 1: *val = ctrl_inb(GAPSPCI_BBA_CONFIG+where); break; 86 case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break;
87 case 2: *val = ctrl_inw(GAPSPCI_BBA_CONFIG+where); break; 87 case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break;
88 case 4: *val = ctrl_inl(GAPSPCI_BBA_CONFIG+where); break; 88 case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break;
89 } 89 }
90 90
91 return PCIBIOS_SUCCESSFUL; 91 return PCIBIOS_SUCCESSFUL;
@@ -97,9 +97,9 @@ static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int
97 return PCIBIOS_DEVICE_NOT_FOUND; 97 return PCIBIOS_DEVICE_NOT_FOUND;
98 98
99 switch (size) { 99 switch (size) {
100 case 1: ctrl_outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; 100 case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break;
101 case 2: ctrl_outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; 101 case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break;
102 case 4: ctrl_outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; 102 case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break;
103 } 103 }
104 104
105 return PCIBIOS_SUCCESSFUL; 105 return PCIBIOS_SUCCESSFUL;
@@ -127,36 +127,36 @@ int __init gapspci_init(void)
127 */ 127 */
128 128
129 for (i=0; i<16; i++) 129 for (i=0; i<16; i++)
130 idbuf[i] = ctrl_inb(GAPSPCI_REGS+i); 130 idbuf[i] = inb(GAPSPCI_REGS+i);
131 131
132 if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16)) 132 if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16))
133 return -ENODEV; 133 return -ENODEV;
134 134
135 ctrl_outl(0x5a14a501, GAPSPCI_REGS+0x18); 135 outl(0x5a14a501, GAPSPCI_REGS+0x18);
136 136
137 for (i=0; i<1000000; i++) 137 for (i=0; i<1000000; i++)
138 ; 138 ;
139 139
140 if (ctrl_inl(GAPSPCI_REGS+0x18) != 1) 140 if (inl(GAPSPCI_REGS+0x18) != 1)
141 return -EINVAL; 141 return -EINVAL;
142 142
143 ctrl_outl(0x01000000, GAPSPCI_REGS+0x20); 143 outl(0x01000000, GAPSPCI_REGS+0x20);
144 ctrl_outl(0x01000000, GAPSPCI_REGS+0x24); 144 outl(0x01000000, GAPSPCI_REGS+0x24);
145 145
146 ctrl_outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28); 146 outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28);
147 ctrl_outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c); 147 outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c);
148 148
149 ctrl_outl(1, GAPSPCI_REGS+0x14); 149 outl(1, GAPSPCI_REGS+0x14);
150 ctrl_outl(1, GAPSPCI_REGS+0x34); 150 outl(1, GAPSPCI_REGS+0x34);
151 151
152 /* Setting Broadband Adapter */ 152 /* Setting Broadband Adapter */
153 ctrl_outw(0xf900, GAPSPCI_BBA_CONFIG+0x06); 153 outw(0xf900, GAPSPCI_BBA_CONFIG+0x06);
154 ctrl_outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30); 154 outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30);
155 ctrl_outb(0x00, GAPSPCI_BBA_CONFIG+0x3c); 155 outb(0x00, GAPSPCI_BBA_CONFIG+0x3c);
156 ctrl_outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d); 156 outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d);
157 ctrl_outw(0x0006, GAPSPCI_BBA_CONFIG+0x04); 157 outw(0x0006, GAPSPCI_BBA_CONFIG+0x04);
158 ctrl_outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); 158 outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10);
159 ctrl_outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); 159 outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14);
160 160
161 return 0; 161 return 0;
162} 162}
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index b230eb278cef..cc530f4d84d6 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15enum { 15enum {
16 UNUSED = 0, 16 UNUSED = 0,
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
index 3feb95a4fcbc..fb781329848a 100644
--- a/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7203.c
@@ -21,8 +21,8 @@
21#include <asm/freq.h> 21#include <asm/freq.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24const static int pll1rate[]={8,12,16,0}; 24static const int pll1rate[]={8,12,16,0};
25const static int pfc_divisors[]={1,2,3,4,6,8,12}; 25static const int pfc_divisors[]={1,2,3,4,6,8,12};
26#define ifc_divisors pfc_divisors 26#define ifc_divisors pfc_divisors
27 27
28#if (CONFIG_SH_CLK_MD == 0) 28#if (CONFIG_SH_CLK_MD == 0)
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
index db6ef5cecde1..e98dc4450352 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15enum { 15enum {
16 UNUSED = 0, 16 UNUSED = 0,
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
index a564425b905f..e6d4ec445dd8 100644
--- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15enum { 15enum {
16 UNUSED = 0, 16 UNUSED = 0,
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c
index fcc80bb7bee7..10f2a760c5ee 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)
94 boot_cpu_data.dcache.way_incr = (1 << 13); 94 boot_cpu_data.dcache.way_incr = (1 << 13);
95 boot_cpu_data.dcache.entry_mask = 0x1ff0; 95 boot_cpu_data.dcache.entry_mask = 0x1ff0;
96 boot_cpu_data.dcache.sets = 512; 96 boot_cpu_data.dcache.sets = 512;
97 ctrl_outl(CCR_CACHE_32KB, CCR3); 97 ctrl_outl(CCR_CACHE_32KB, CCR3_REG);
98#else 98#else
99 ctrl_outl(CCR_CACHE_16KB, CCR3); 99 ctrl_outl(CCR_CACHE_16KB, CCR3_REG);
100#endif 100#endif
101#endif 101#endif
102 } 102 }
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
index dd0a20a685f7..f581534cb732 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <asm/sci.h> 15#include <linux/serial_sci.h>
16#include <asm/rtc.h> 16#include <asm/rtc.h>
17 17
18enum { 18enum {
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
index 969804bb523b..d3733b13ea52 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
@@ -16,7 +16,7 @@
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/serial.h> 18#include <linux/serial.h>
19#include <asm/sci.h> 19#include <linux/serial_sci.h>
20 20
21enum { 21enum {
22 UNUSED = 0, 22 UNUSED = 0,
@@ -123,15 +123,15 @@ static struct resource rtc_resources[] = {
123 .flags = IORESOURCE_IO, 123 .flags = IORESOURCE_IO,
124 }, 124 },
125 [1] = { 125 [1] = {
126 .start = 20, 126 .start = 21,
127 .flags = IORESOURCE_IRQ, 127 .flags = IORESOURCE_IRQ,
128 }, 128 },
129 [2] = { 129 [2] = {
130 .start = 21, 130 .start = 22,
131 .flags = IORESOURCE_IRQ, 131 .flags = IORESOURCE_IRQ,
132 }, 132 },
133 [3] = { 133 [3] = {
134 .start = 22, 134 .start = 20,
135 .flags = IORESOURCE_IRQ, 135 .flags = IORESOURCE_IRQ,
136 }, 136 },
137}; 137};
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index 0cc0e2bf135d..7406c9ad9259 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <asm/sci.h> 15#include <linux/serial_sci.h>
16#include <asm/rtc.h> 16#include <asm/rtc.h>
17 17
18enum { 18enum {
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
index 3855ea4c21c8..8028082527c5 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
@@ -16,7 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/serial.h> 17#include <linux/serial.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <asm/sci.h> 19#include <linux/serial_sci.h>
20#include <asm/rtc.h> 20#include <asm/rtc.h>
21 21
22#define INTC_ICR1 0xA4140010UL 22#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 dab193293f20..7371abf64f80 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 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15static struct plat_sci_port sci_platform_data[] = { 15static struct plat_sci_port sci_platform_data[] = {
16 { 16 {
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index ae3603aca615..ec884039b914 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/sci.h> 15#include <linux/serial_sci.h>
16 16
17static struct resource rtc_resources[] = { 17static struct resource rtc_resources[] = {
18 [0] = { 18 [0] = {
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
index 85f81579b97e..254c5c55ab91 100644
--- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15enum { 15enum {
16 UNUSED = 0, 16 UNUSED = 0,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
index c0a3f079dfdc..6d4f50cd4aaf 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15static struct plat_sci_port sci_platform_data[] = { 15static struct plat_sci_port sci_platform_data[] = {
16 { 16 {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
index 967e8b69a2f8..f26b5cdad0d1 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
@@ -12,7 +12,7 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/serial.h> 14#include <linux/serial.h>
15#include <asm/sci.h> 15#include <linux/serial_sci.h>
16 16
17static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port sci_platform_data[] = {
18 { 18 {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 73c778d40d13..b98b4bc93ec9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -10,9 +10,9 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h>
13#include <linux/mm.h> 14#include <linux/mm.h>
14#include <asm/mmzone.h> 15#include <asm/mmzone.h>
15#include <asm/sci.h>
16 16
17static struct resource usbf_resources[] = { 17static struct resource usbf_resources[] = {
18 [0] = { 18 [0] = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index eabd5386812d..07c988dc9de6 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/serial.h> 13#include <linux/serial.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/sci.h> 15#include <linux/serial_sci.h>
16 16
17static struct resource rtc_resources[] = { 17static struct resource rtc_resources[] = {
18 [0] = { 18 [0] = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
index 32f4f59a837b..b9cec48b1808 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
@@ -10,7 +10,7 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <asm/sci.h> 13#include <linux/serial_sci.h>
14 14
15static struct plat_sci_port sci_platform_data[] = { 15static struct plat_sci_port sci_platform_data[] = {
16 { 16 {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 293004b526ff..18dbbe23fea1 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -11,7 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <asm/sci.h> 14#include <linux/serial_sci.h>
15 15
16static struct resource rtc_resources[] = { 16static struct resource rtc_resources[] = {
17 [0] = { 17 [0] = {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index 74b60e96cdf4..621e7329ec63 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -10,10 +10,10 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h>
13#include <linux/io.h> 14#include <linux/io.h>
14#include <linux/mm.h> 15#include <linux/mm.h>
15#include <asm/mmzone.h> 16#include <asm/mmzone.h>
16#include <asm/sci.h>
17 17
18static struct plat_sci_port sci_platform_data[] = { 18static struct plat_sci_port sci_platform_data[] = {
19 { 19 {
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
index 4dc958b6b314..bd35f32534b9 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
@@ -10,9 +10,9 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h>
13#include <linux/io.h> 14#include <linux/io.h>
14#include <asm/mmzone.h> 15#include <asm/mmzone.h>
15#include <asm/sci.h>
16 16
17static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port sci_platform_data[] = {
18 { 18 {
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 9ce12cb2cebc..a8c116b80bff 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -41,6 +41,7 @@
41#include <linux/delay.h> 41#include <linux/delay.h>
42#include <linux/console.h> 42#include <linux/console.h>
43#include <linux/platform_device.h> 43#include <linux/platform_device.h>
44#include <linux/serial_sci.h>
44 45
45#ifdef CONFIG_CPU_FREQ 46#ifdef CONFIG_CPU_FREQ
46#include <linux/notifier.h> 47#include <linux/notifier.h>
@@ -54,7 +55,6 @@
54#include <asm/kgdb.h> 55#include <asm/kgdb.h>
55#endif 56#endif
56 57
57#include <asm/sci.h>
58#include "sh-sci.h" 58#include "sh-sci.h"
59 59
60struct sci_port { 60struct sci_port {
diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index 9cfcfd8dad5e..617efb1640b1 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Core maple bus functionality 2 * Core maple bus functionality
3 * 3 *
4 * Copyright (C) 2007 Adrian McMenamin 4 * Copyright (C) 2007, 2008 Adrian McMenamin
5 * 5 *
6 * Based on 2.4 code by: 6 * Based on 2.4 code by:
7 * 7 *
@@ -18,7 +18,6 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/module.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
23#include <linux/list.h> 22#include <linux/list.h>
24#include <linux/io.h> 23#include <linux/io.h>
@@ -54,7 +53,7 @@ static struct device maple_bus;
54static int subdevice_map[MAPLE_PORTS]; 53static int subdevice_map[MAPLE_PORTS];
55static unsigned long *maple_sendbuf, *maple_sendptr, *maple_lastptr; 54static unsigned long *maple_sendbuf, *maple_sendptr, *maple_lastptr;
56static unsigned long maple_pnp_time; 55static unsigned long maple_pnp_time;
57static int started, scanning, liststatus, realscan; 56static int started, scanning, liststatus, fullscan;
58static struct kmem_cache *maple_queue_cache; 57static struct kmem_cache *maple_queue_cache;
59 58
60struct maple_device_specify { 59struct maple_device_specify {
@@ -62,6 +61,9 @@ struct maple_device_specify {
62 int unit; 61 int unit;
63}; 62};
64 63
64static bool checked[4];
65static struct maple_device *baseunits[4];
66
65/** 67/**
66 * maple_driver_register - register a device driver 68 * maple_driver_register - register a device driver
67 * automatically makes the driver bus a maple bus 69 * automatically makes the driver bus a maple bus
@@ -309,11 +311,9 @@ static void maple_attach_driver(struct maple_device *mdev)
309 else 311 else
310 break; 312 break;
311 313
312 if (realscan) { 314 printk(KERN_INFO "Maple device detected: %s\n",
313 printk(KERN_INFO "Maple device detected: %s\n", 315 mdev->product_name);
314 mdev->product_name); 316 printk(KERN_INFO "Maple device: %s\n", mdev->product_licence);
315 printk(KERN_INFO "Maple device: %s\n", mdev->product_licence);
316 }
317 317
318 function = be32_to_cpu(mdev->devinfo.function); 318 function = be32_to_cpu(mdev->devinfo.function);
319 319
@@ -323,10 +323,9 @@ static void maple_attach_driver(struct maple_device *mdev)
323 mdev->driver = &maple_dummy_driver; 323 mdev->driver = &maple_dummy_driver;
324 sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port); 324 sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port);
325 } else { 325 } else {
326 if (realscan) 326 printk(KERN_INFO
327 printk(KERN_INFO 327 "Maple bus at (%d, %d): Function 0x%lX\n",
328 "Maple bus at (%d, %d): Function 0x%lX\n", 328 mdev->port, mdev->unit, function);
329 mdev->port, mdev->unit, function);
330 329
331 matched = 330 matched =
332 bus_for_each_drv(&maple_bus_type, NULL, mdev, 331 bus_for_each_drv(&maple_bus_type, NULL, mdev,
@@ -334,9 +333,8 @@ static void maple_attach_driver(struct maple_device *mdev)
334 333
335 if (matched == 0) { 334 if (matched == 0) {
336 /* Driver does not exist yet */ 335 /* Driver does not exist yet */
337 if (realscan) 336 printk(KERN_INFO
338 printk(KERN_INFO 337 "No maple driver found.\n");
339 "No maple driver found.\n");
340 mdev->driver = &maple_dummy_driver; 338 mdev->driver = &maple_dummy_driver;
341 } 339 }
342 sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port, 340 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 maple_detach_driver(mdev); 470 maple_detach_driver(mdev);
473 return; 471 return;
474 } 472 }
475 if (!started) { 473 if (!started || !fullscan) {
476 printk(KERN_INFO "No maple devices attached to port %d\n", 474 if (checked[mdev->port] == false) {
477 mdev->port); 475 checked[mdev->port] = true;
476 printk(KERN_INFO "No maple devices attached"
477 " to port %d\n", mdev->port);
478 }
478 return; 479 return;
479 } 480 }
480 maple_clean_submap(mdev); 481 maple_clean_submap(mdev);
@@ -485,8 +486,14 @@ static void maple_response_devinfo(struct maple_device *mdev,
485 char *recvbuf) 486 char *recvbuf)
486{ 487{
487 char submask; 488 char submask;
488 if ((!started) || (scanning == 2)) { 489 if (!started || (scanning == 2) || !fullscan) {
489 maple_attach_driver(mdev); 490 if ((mdev->unit == 0) && (checked[mdev->port] == false)) {
491 checked[mdev->port] = true;
492 maple_attach_driver(mdev);
493 } else {
494 if (mdev->unit != 0)
495 maple_attach_driver(mdev);
496 }
490 return; 497 return;
491 } 498 }
492 if (mdev->unit == 0) { 499 if (mdev->unit == 0) {
@@ -505,6 +512,7 @@ static void maple_dma_handler(struct work_struct *work)
505 struct maple_device *dev; 512 struct maple_device *dev;
506 char *recvbuf; 513 char *recvbuf;
507 enum maple_code code; 514 enum maple_code code;
515 int i;
508 516
509 if (!maple_dma_done()) 517 if (!maple_dma_done())
510 return; 518 return;
@@ -557,6 +565,19 @@ static void maple_dma_handler(struct work_struct *work)
557 } else 565 } else
558 scanning = 0; 566 scanning = 0;
559 567
568 if (!fullscan) {
569 fullscan = 1;
570 for (i = 0; i < MAPLE_PORTS; i++) {
571 if (checked[i] == false) {
572 fullscan = 0;
573 dev = baseunits[i];
574 dev->mq->command =
575 MAPLE_COMMAND_DEVINFO;
576 dev->mq->length = 0;
577 maple_add_packet(dev->mq);
578 }
579 }
580 }
560 if (started == 0) 581 if (started == 0)
561 started = 1; 582 started = 1;
562 } 583 }
@@ -694,7 +715,9 @@ static int __init maple_bus_init(void)
694 715
695 /* setup maple ports */ 716 /* setup maple ports */
696 for (i = 0; i < MAPLE_PORTS; i++) { 717 for (i = 0; i < MAPLE_PORTS; i++) {
718 checked[i] = false;
697 mdev[i] = maple_alloc_dev(i, 0); 719 mdev[i] = maple_alloc_dev(i, 0);
720 baseunits[i] = mdev[i];
698 if (!mdev[i]) { 721 if (!mdev[i]) {
699 while (i-- > 0) 722 while (i-- > 0)
700 maple_free_dev(mdev[i]); 723 maple_free_dev(mdev[i]);
@@ -703,12 +726,9 @@ static int __init maple_bus_init(void)
703 mdev[i]->mq->command = MAPLE_COMMAND_DEVINFO; 726 mdev[i]->mq->command = MAPLE_COMMAND_DEVINFO;
704 mdev[i]->mq->length = 0; 727 mdev[i]->mq->length = 0;
705 maple_add_packet(mdev[i]->mq); 728 maple_add_packet(mdev[i]->mq);
706 /* delay aids hardware detection */
707 mdelay(5);
708 subdevice_map[i] = 0; 729 subdevice_map[i] = 0;
709 } 730 }
710 731
711 realscan = 1;
712 /* setup maplebus hardware */ 732 /* setup maplebus hardware */
713 maplebus_dma_reset(); 733 maplebus_dma_reset();
714 /* initial detection */ 734 /* initial detection */
diff --git a/include/asm-sh/cpu-sh3/cache.h b/include/asm-sh/cpu-sh3/cache.h
index 56bd838b7db4..bee2d81c56bf 100644
--- a/include/asm-sh/cpu-sh3/cache.h
+++ b/include/asm-sh/cpu-sh3/cache.h
@@ -35,7 +35,7 @@
35 defined(CONFIG_CPU_SUBTYPE_SH7710) || \ 35 defined(CONFIG_CPU_SUBTYPE_SH7710) || \
36 defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 36 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
37 defined(CONFIG_CPU_SUBTYPE_SH7721) 37 defined(CONFIG_CPU_SUBTYPE_SH7721)
38#define CCR3 0xa40000b4 38#define CCR3_REG 0xa40000b4
39#define CCR_CACHE_16KB 0x00010000 39#define CCR_CACHE_16KB 0x00010000
40#define CCR_CACHE_32KB 0x00020000 40#define CCR_CACHE_32KB 0x00020000
41#endif 41#endif
diff --git a/include/asm-sh/entry-macros.S b/include/asm-sh/entry-macros.S
index 500030eae7aa..2dab0b8d9454 100644
--- a/include/asm-sh/entry-macros.S
+++ b/include/asm-sh/entry-macros.S
@@ -12,7 +12,7 @@
12 not r11, r11 12 not r11, r11
13 stc sr, r10 13 stc sr, r10
14 and r11, r10 14 and r11, r10
15#ifdef CONFIG_HAS_SR_RB 15#ifdef CONFIG_CPU_HAS_SR_RB
16 stc k_g_imask, r11 16 stc k_g_imask, r11
17 or r11, r10 17 or r11, r10
18#endif 18#endif
@@ -20,7 +20,7 @@
20 .endm 20 .endm
21 21
22 .macro get_current_thread_info, ti, tmp 22 .macro get_current_thread_info, ti, tmp
23#ifdef CONFIG_HAS_SR_RB 23#ifdef CONFIG_CPU_HAS_SR_RB
24 stc r7_bank, \ti 24 stc r7_bank, \ti
25#else 25#else
26 mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp 26 mov #((THREAD_SIZE - 1) >> 10) ^ 0xff, \tmp
diff --git a/include/linux/maple.h b/include/linux/maple.h
index 3f01e2bae1a1..d31e36ebb436 100644
--- a/include/linux/maple.h
+++ b/include/linux/maple.h
@@ -64,7 +64,6 @@ struct maple_driver {
64 int (*connect) (struct maple_device * dev); 64 int (*connect) (struct maple_device * dev);
65 void (*disconnect) (struct maple_device * dev); 65 void (*disconnect) (struct maple_device * dev);
66 struct device_driver drv; 66 struct device_driver drv;
67 int registered;
68}; 67};
69 68
70void maple_getcond_callback(struct maple_device *dev, 69void maple_getcond_callback(struct maple_device *dev,
diff --git a/include/asm-sh/sci.h b/include/linux/serial_sci.h
index 52e73660c129..893cc53486bc 100644
--- a/include/asm-sh/sci.h
+++ b/include/linux/serial_sci.h
@@ -1,12 +1,10 @@
1#ifndef __ASM_SH_SCI_H 1#ifndef __LINUX_SERIAL_SCI_H
2#define __ASM_SH_SCI_H 2#define __LINUX_SERIAL_SCI_H
3 3
4#include <linux/serial_core.h> 4#include <linux/serial_core.h>
5 5
6/* 6/*
7 * Generic header for SuperH SCI(F) 7 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
8 *
9 * Do not place SH-specific parts in here, sh64 and h8300 depend on this too.
10 */ 8 */
11 9
12/* Offsets into the sci_port->irqs array */ 10/* Offsets into the sci_port->irqs array */
@@ -31,4 +29,4 @@ struct plat_sci_port {
31 29
32int early_sci_setup(struct uart_port *port); 30int early_sci_setup(struct uart_port *port);
33 31
34#endif /* __ASM_SH_SCI_H */ 32#endif /* __LINUX_SERIAL_SCI_H */