Skip to contentSkip to conversation

Au1000 PCMCIA I/O space?

PATCH Ilya A. Volynets-Evenbakh 2 participants 3 messages Aug 1, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Is there any particular reason why Au1000 PCMCIA IO space is not included in 36-bit address fixup? Attached patch fixes it for me, but I'm wondering if there is valid reason not to do that.

Signature · 3 lines
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com

Index: arch/mips/au1000/common/setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/common/setup.c,v retrieving revision 1.25

mips/au1000/common/setup.c +1 -1
diff -u -r1.25 setup.c
@@ -179,7 +179,7 @@
 	 * The pseudo address we use is 0xF400 0000. Any address over
 	 * 0xF400 0000 is a pcmcia pseudo address.
 	 */
-	if ((phys_addr >= 0xF4000000) && (phys_addr < 0xFFFFFFFF)) {
+	if ((phys_addr >= 0xF0000000) && (phys_addr < 0xFFFFFFFF)) {
 		return (phys_t)(phys_addr << 4);
 	}
 
#1 lore raw
Quoted 4 lines · Ilya A. Volynets-Evenbakh

Is there any particular reason why Au1000 PCMCIA IO space is not included in 36-bit address fixup?
Attached patch fixes it for me, but I'm wondering if there is valid reason not to do that.

Because it's ioremapped by the au1x pcmcia driver and the driver passes the virt address to the pcmcia stack. If this isn't working for you, something else is broken. You only need the fixup when you can't call ioremap with the entire 36 bit phys address. For example, the attribute and common memory space are ioremapped by the "pcmcia stack" in the kernel, not the low level socket driver over which we have control. Thus, to work around the fact that you can't easily change the entire pcmcia stack, you do the fixup thing.

Unless the pcmcia stack changed, the driver should work as is.

Pete

#2 lore raw

Hmm, I see. I'm not really using PCMCIA driver - I just have IDE interface hanging off of PCMCIA controller of Au1000, so I had to do something similar to drivers/ide/mips/swarm.c. Thus since I can pass addresses directly to ioremap, I'm OK anyways.

Quoted 20 lines · Pete Popov
Quoted 4 lines · Ilya A. Volynets-Evenbakh

Is there any particular reason why Au1000 PCMCIA IO space is not included in 36-bit address fixup? Attached patch fixes it for me, but I'm wondering if there is valid reason not to do that.

Because it's ioremapped by the au1x pcmcia driver and the driver passes the virt address to the pcmcia stack. If this isn't working for you, something else is broken. You only need the fixup when you can't call ioremap with the entire 36 bit phys address. For example, the attribute and common memory space are ioremapped by the "pcmcia stack" in the kernel,
not the low level socket driver over which we have control. Thus, to
work around the fact that you can't easily change the entire pcmcia
stack, you do the fixup thing.

Unless the pcmcia stack changed, the driver should work as is.

Pete

Signature · 3 lines
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com