Success! Full CardBus/EXCA on PCI->Cardbus Bridge + DbAU1500
Everyone:
Thank you very much for helping this green hand get up to speed on the MIPS platform. I have successfully configured card services to work with the current linux_2_4 CVS, in conjunction with a TI PCI1510 PCI->CardBus bridge.
There are a few card services options that you will need, in order to replicate my work:
1. The pcmcia_core cis_speed needs to be set to a fairly low value. I have successfully used modprobe pcmcia_core cis_speed=10 and modprobe pcmcia_core cis_speed=1.
2. The PCMCIA memory window must map into the memory window assigned by the PCI device autoconfiguration. Since my lspci -v shows:
00:0d.0 CardBus bridge: Texas Instruments: Unknown device ac56
Subsystem: Unknown device 5678:1234
Flags: bus master, medium devsel, latency 168, IRQ 1
Memory at 40000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=05, subordinate=00, sec-latency=176
Memory window 0: 40001000-40002000 (prefetchable)
Memory window 1: 40400000-407ff000
I/O window 0: 00004000-000040ff
I/O window 1: 00004400-000044ff
16-bit legacy interface ports at 0001 I configured /etc/pcmcia/config.opts as follows:
#
# Local PCMCIA Configuration File
#
#----------------------------------------------------------------------
# System resources available for PCMCIA devices
# remember to modprobe pcmcia_core cis_speed=10
include port 0x100-0x4ff, port 0xc00-0xcff
include memory 0x40000000-0x40ffffff
#-------------------------- eof Special thanks to Pete for answering so many of my questions.
I hope you find this information useful!
Best regards,
Jeff
Signature · 7 lines
Jeffrey Baitis - Associate Software Engineer
Evolution Robotics, Inc.
130 West Union Street
Pasadena CA 91103
tel: 626.535.2776 | fax: 626.535.2777 | [email protected] Quoted 34 lines · Jeff Baitis
Everyone:
Thank you very much for helping this green hand get up to speed on the MIPS platform. I have successfully configured card services to work with the current
linux_2_4CVS, in conjunction with a TI PCI1510PCI->CardBusbridge.There are a few card services options that you will need, in order to replicate my work:
1. The
pcmcia_corecis_speedneeds to be set to a fairly low value. I have successfully usedmodprobe pcmcia_core cis_speed=10andmodprobe pcmcia_core cis_speed=1.2. The PCMCIA memory window must map into the memory window assigned by the PCI device autoconfiguration. Since my
lspci -vshows:00:0d.0 CardBus bridge: Texas Instruments: Unknown device ac56 Subsystem: Unknown device 5678:1234 Flags: bus master, medium devsel, latency 168, IRQ 1 Memory at 40000000 (32-bit, non-prefetchable) [size=4K] Bus: primary=00, secondary=05, subordinate=00, sec-latency=176 Memory window 0: 40001000-40002000 (prefetchable) Memory window 1: 40400000-407ff000 I/O window 0: 00004000-000040ff I/O window 1: 00004400-000044ff 16-bit legacy interface ports at 0001 I configured /etc/pcmcia/config.opts as follows: # # Local PCMCIA Configuration File # #----------------------------------------------------------------------
Quoted 7 lines
# System resources available for PCMCIA devices
# remember to modprobe pcmcia_core cis_speed=10
include port 0x100-0x4ff, port 0xc00-0xcff
include memory 0x40000000-0x40ffffff
#-------------------------- eof Yep, I had to do that way back then when I got the same sort of setup working. Good job figuring that out :)
Just to confirm, this setup works with the current linux-mips.org plus the above info? No other patches are required, correct?
I think I'll start an Alchemy/AMD FAQ or something in my directory and put this information there. Thanks!
Pete
Quoted 8 lines · Pete Popov
Yep, I had to do that way back then when I got the same sort of setup working. Good job figuring that out :)
Just to confirm, this setup works with the current linux-mips.org plus the above info? No other patches are required, correct?
I think I'll start an Alchemy/AMD FAQ or something in my directory and put this information there. Thanks!
The patches that I'm using:
Pete's 36bit_addr_2.4.21-pre4.patch
Pete's 64bit_pcmcia.patch
Additionally, I had to apply the patch to include/asm-mips/io.h in order to get the hermes/orinoco drivers to compile. (I posted this patch earlier, and someone suggested that the SLOW_DOWN_IO; call was not necessary). Find it below.
I have some other patches applied; they should not affect PCMCIA. I'll check out clean source and patch it with this bare minimum, and let you know if something else is required.
Thanks, Pete -- a FAQ about your patches will really help people who are starting out on the Alchemy platform.
Regards,
Jeff
Index: io.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/io.h,v retrieving revision 1.29.2.20
diff -u -r1.29.2.20 io.h
--- io.h 25 Feb 2003 22:03:12 -0000 1.29.2.20
+++ io.h 14 Mar 2003 21:50:14 -0000
@@ -332,12 +332,25 @@
SLOW_DOWN_IO; \
} while(0)
°
-#define outw_p(val,port) \
-do { \
- *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \
- __ioswab16(val); \
- SLOW_DOWN_IO; \
-} while(0)
+/* baitisj */
+static inline u16 outw_p(u16 val, unsigned long port) +{
+ register u16 retval;
+ do {
+ retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) =
+ __ioswab16(val);
+ SLOW_DOWN_IO;
+ } while(0);
+ return retval;
+}
+/*°°
+ * #define outw_p(val,port) \
+ * do { \
+ * *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \
+ * __ioswab16(val); \
+ * SLOW_DOWN_IO; \
+ * } while(0)
+ */
°
#define outl_p(val,port) \
do { \
Quoted 48 lines · Jeff Baitis
Quoted 34 lines
Everyone:
Thank you very much for helping this green hand get up to speed on the MIPS platform. I have successfully configured card services to work with the current
linux_2_4CVS, in conjunction with a TI PCI1510PCI->CardBusbridge.There are a few card services options that you will need, in order to replicate my work:
1. The
pcmcia_corecis_speedneeds to be set to a fairly low value. I have successfully usedmodprobe pcmcia_core cis_speed=10andmodprobe pcmcia_core cis_speed=1.2. The PCMCIA memory window must map into the memory window assigned by the PCI device autoconfiguration. Since my
lspci -vshows:00:0d.0 CardBus bridge: Texas Instruments: Unknown device ac56 Subsystem: Unknown device 5678:1234 Flags: bus master, medium devsel, latency 168, IRQ 1 Memory at 40000000 (32-bit, non-prefetchable) [size=4K] Bus: primary=00, secondary=05, subordinate=00, sec-latency=176 Memory window 0: 40001000-40002000 (prefetchable) Memory window 1: 40400000-407ff000 I/O window 0: 00004000-000040ff I/O window 1: 00004400-000044ff 16-bit legacy interface ports at 0001 I configured /etc/pcmcia/config.opts as follows: # # Local PCMCIA Configuration File # #----------------------------------------------------------------------Quoted 7 lines
# System resources available for PCMCIA devices # remember to modprobe pcmcia_core cis_speed=10 include port 0x100-0x4ff, port 0xc00-0xcff include memory 0x40000000-0x40ffffff #-------------------------- eofPete
Signature · 7 lines
Jeffrey Baitis - Associate Software Engineer
Evolution Robotics, Inc.
130 West Union Street
Pasadena CA 91103
tel: 626.535.2776 | fax: 626.535.2777 | [email protected] Jeff,
I don't touch generic files, especially io.h :), so Ralf will have to decide whether to apply the patch or not.
Pete
Quoted 56 lines
Additionally, I had to apply the patch to
include/asm-mips/io.hin order to get the hermes/orinoco drivers to compile. (I posted this patch earlier, and someone suggested that theSLOW_DOWN_IO; call was not necessary). Find it below.I have some other patches applied; they should not affect PCMCIA. I'll check out clean source and patch it with this bare minimum, and let you know if something else is required.
Thanks, Pete -- a FAQ about your patches will really help people who are starting out on the Alchemy platform.
Regards,
Jeff
Index:
io.h
===================================================================
RCS file:/home/cvs/linux/include/asm-mips/io.h,vretrieving revision 1.29.2.20
diff -u -r1.29.2.20io.h
---io.h25 Feb 2003 22:03:12 -0000 1.29.2.20
+++io.h14 Mar 2003 21:50:14 -0000
@@ -332,12 +332,25 @@SLOW_DOWN_IO; \ } while(0) ° -#define outw_p(val,port) \ -do { \ - *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \ - __ioswab16(val); \ - SLOW_DOWN_IO; \ -} while(0) +/* baitisj */ +static inline u16 outw_p(u16 val, unsigned long port) +{ + register u16 retval; + do { + retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = + __ioswab16(val); + SLOW_DOWN_IO; + } while(0); + return retval; +} +/*°° + * #define outw_p(val,port) \ + * do { \ + * *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \ + * __ioswab16(val); \ + * SLOW_DOWN_IO; \ + * } while(0) + */ ° #define outl_p(val,port) \ do { \
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"pete" == Pete Popov <[email protected]> writes:
Hi
Quoted 20 lines
Quoted 20 lines
Index:
io.h
===================================================================
RCS file:/home/cvs/linux/include/asm-mips/io.h,v
retrieving revision 1.29.2.20
diff -u -r1.29.2.20io.hio.h 14 Mar 2003 21:50:14 -0000 renamed from io.h 25 Feb 2003 22:03:12 -0000 1.29.2.20 +0
-0@@ -332,12 +332,25 @@ SLOW_DOWN_IO; \ } while(0)°
io.h 14 Mar 2003 21:50:14 -0000 renamed from io.h 25 Feb 2003 22:03:12 -0000 1.29.2.20 +3
-6-#define outw_p(val,port) \ -do { \ - *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = \ - __ioswab16(val); \ - SLOW_DOWN_IO; \ -} while(0) +/* baitisj */ +static inline u16 outw_p(u16 val, unsigned long port) +{
Quoted 8 lines
io.h 14 Mar 2003 21:50:14 -0000
Quoted 8 lines
io.h 14 Mar 2003 21:50:14 -0000 renamed from io.h 25 Feb 2003 22:03:12 -0000 1.29.2.20 +8
-0+ register u16 retval; + do { + retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) = + __ioswab16(val); + SLOW_DOWN_IO; + } while(0); + return retval; +}
static inline u16 outw_p(u16 val, unsigned long port)
{
u16 retval;
retval = *(volatile u16 *)(mips_io_port_base + __swizzle_addr_w(port)) =
__ioswab16(val);
SLOW_DOWN_IO;
return retval;
}while do construct inside a function shouldn't be needed when you have a function. And register is obsolete :)
Later, Juan.
Signature · 2 lines
In theory, practice and theory are the same, but in practice they are different -- Larry McVoy