diff options
Diffstat (limited to 'drivers/pcmcia/xxs1500_ss.c')
-rw-r--r-- | drivers/pcmcia/xxs1500_ss.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c index 4e36930b51ce..61560cd6e287 100644 --- a/drivers/pcmcia/xxs1500_ss.c +++ b/drivers/pcmcia/xxs1500_ss.c | |||
@@ -56,10 +56,9 @@ struct xxs1500_pcmcia_sock { | |||
56 | struct pcmcia_socket socket; | 56 | struct pcmcia_socket socket; |
57 | void *virt_io; | 57 | void *virt_io; |
58 | 58 | ||
59 | /* the "pseudo" addresses of the PCMCIA space. */ | 59 | phys_addr_t phys_io; |
60 | unsigned long phys_io; | 60 | phys_addr_t phys_attr; |
61 | unsigned long phys_attr; | 61 | phys_addr_t phys_mem; |
62 | unsigned long phys_mem; | ||
63 | 62 | ||
64 | /* previous flags for set_socket() */ | 63 | /* previous flags for set_socket() */ |
65 | unsigned int old_flags; | 64 | unsigned int old_flags; |
@@ -211,7 +210,6 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
211 | { | 210 | { |
212 | struct xxs1500_pcmcia_sock *sock; | 211 | struct xxs1500_pcmcia_sock *sock; |
213 | struct resource *r; | 212 | struct resource *r; |
214 | phys_t physio; | ||
215 | int ret, irq; | 213 | int ret, irq; |
216 | 214 | ||
217 | sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL); | 215 | sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL); |
@@ -225,9 +223,9 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
225 | * for this socket (usually the 36bit address shifted 4 to the | 223 | * for this socket (usually the 36bit address shifted 4 to the |
226 | * right). | 224 | * right). |
227 | */ | 225 | */ |
228 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-attr"); | 226 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr"); |
229 | if (!r) { | 227 | if (!r) { |
230 | dev_err(&pdev->dev, "missing 'pseudo-attr' resource!\n"); | 228 | dev_err(&pdev->dev, "missing 'pcmcia-attr' resource!\n"); |
231 | goto out0; | 229 | goto out0; |
232 | } | 230 | } |
233 | sock->phys_attr = r->start; | 231 | sock->phys_attr = r->start; |
@@ -236,9 +234,9 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
236 | * pseudo-mem: The 32bit address of the PCMCIA memory space for | 234 | * pseudo-mem: The 32bit address of the PCMCIA memory space for |
237 | * this socket (usually the 36bit address shifted 4 to the right) | 235 | * this socket (usually the 36bit address shifted 4 to the right) |
238 | */ | 236 | */ |
239 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-mem"); | 237 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem"); |
240 | if (!r) { | 238 | if (!r) { |
241 | dev_err(&pdev->dev, "missing 'pseudo-mem' resource!\n"); | 239 | dev_err(&pdev->dev, "missing 'pcmcia-mem' resource!\n"); |
242 | goto out0; | 240 | goto out0; |
243 | } | 241 | } |
244 | sock->phys_mem = r->start; | 242 | sock->phys_mem = r->start; |
@@ -247,19 +245,14 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
247 | * pseudo-io: The 32bit address of the PCMCIA IO space for this | 245 | * pseudo-io: The 32bit address of the PCMCIA IO space for this |
248 | * socket (usually the 36bit address shifted 4 to the right). | 246 | * socket (usually the 36bit address shifted 4 to the right). |
249 | */ | 247 | */ |
250 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-io"); | 248 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io"); |
251 | if (!r) { | 249 | if (!r) { |
252 | dev_err(&pdev->dev, "missing 'pseudo-io' resource!\n"); | 250 | dev_err(&pdev->dev, "missing 'pcmcia-io' resource!\n"); |
253 | goto out0; | 251 | goto out0; |
254 | } | 252 | } |
255 | sock->phys_io = r->start; | 253 | sock->phys_io = r->start; |
256 | 254 | ||
257 | 255 | ||
258 | /* for io must remap the full 36bit address (for reference see | ||
259 | * alchemy/common/setup.c::__fixup_bigphys_addr) | ||
260 | */ | ||
261 | physio = ((phys_t)sock->phys_io) << 4; | ||
262 | |||
263 | /* | 256 | /* |
264 | * PCMCIA client drivers use the inb/outb macros to access | 257 | * PCMCIA client drivers use the inb/outb macros to access |
265 | * the IO registers. Since mips_io_port_base is added | 258 | * the IO registers. Since mips_io_port_base is added |
@@ -268,7 +261,7 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
268 | * to access the I/O or MEM address directly, without | 261 | * to access the I/O or MEM address directly, without |
269 | * going through this "mips_io_port_base" mechanism. | 262 | * going through this "mips_io_port_base" mechanism. |
270 | */ | 263 | */ |
271 | sock->virt_io = (void *)(ioremap(physio, IO_MAP_SIZE) - | 264 | sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) - |
272 | mips_io_port_base); | 265 | mips_io_port_base); |
273 | 266 | ||
274 | if (!sock->virt_io) { | 267 | if (!sock->virt_io) { |