aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/ops-dreamcast.c
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-02-26 00:14:56 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-02-26 00:14:56 -0500
commit763a495a022ac26afb2940e768e86725c1c7e8c9 (patch)
tree1f7d5d579472b51abd1430b378bf80712472a94e /arch/sh/drivers/pci/ops-dreamcast.c
parentbd49666974a12f39eb9c74044e0b1753efcd94c4 (diff)
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 <damm@igel.co.jp> Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/ops-dreamcast.c')
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c44
1 files changed, 22 insertions, 22 deletions
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}