Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Problems with PCMCIA on AMD dbau1100
@ 2004-12-21 11:31 Josh Green
  2004-12-21 16:46 ` Pete Popov
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Green @ 2004-12-21 11:31 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

I'm having trouble getting PCMCIA to work properly on my dbau1100 MIPS
board with latest CVS (2.6.10rc3).  Any help would be very appreciated.
Here is lsmod output:

# lsmod
Module                  Size  Used by    Not tainted
au1x00_ss 12160 0 - Live 0xc0005000
pcmcia_core 60848 1 au1x00_ss, Live 0xc0015000


I get this output when modprobing au1x00_ss:

Linux Kernel Card Services
  options:  none


At this point 'pcmcia' is not listed in /proc/devices though, so I'm
assuming another module needs to be inserted?  On my x86 laptop I see
there is a ds module.  This appears to have been compiled into an object
for my MIPS build, but there is no stand alone ds module.  If I insert
the 'pcmcia' module I get pcmcia support (I'm assuming this is the 16
bit PCMCIA module, it doesn't appear dependent on au1x00_ss), but no
cards are detected:

# cardctl ident
Socket 0:
  no product info available
Socket 1:
  no product info available

# cardctl status
Socket 0:
  no card
Socket 1:
  no card


One thing to note is that I get a few warnings during the PCMCIA build:

  CC [M]  drivers/pcmcia/au1000_generic.o
drivers/pcmcia/au1000_generic.c: In function
`au1x00_pcmcia_socket_probe':
drivers/pcmcia/au1000_generic.c:425: warning: integer constant is too
large for "long" type
drivers/pcmcia/au1000_generic.c:433: warning: integer constant is too
large for "long" type

The first warning is related to the following code (second is similar
but for socket 1):

	skt->virt_io = (void *)
		((u32)ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) -
		(u32)mips_io_port_base);


AU1X_SOCK0_IO is defined as 0xF00000000 which is a 36 bit number, not
sure if that will cause a problem or not (since ioremap is using phys_t
which is 32 bit).  Perhaps this truncation is intentional though.

Thanks in advance for any helpful pointers. Best regards,
	Josh Green


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with PCMCIA on AMD dbau1100
  2004-12-21 11:31 Problems with PCMCIA on AMD dbau1100 Josh Green
@ 2004-12-21 16:46 ` Pete Popov
  2004-12-21 19:38   ` Josh Green
  2004-12-21 23:22   ` Josh Green
  0 siblings, 2 replies; 6+ messages in thread
From: Pete Popov @ 2004-12-21 16:46 UTC (permalink / raw)
  To: Josh Green; +Cc: linux-mips

Josh Green wrote:
> I'm having trouble getting PCMCIA to work properly on my dbau1100 MIPS
> board with latest CVS (2.6.10rc3).  Any help would be very appreciated.
> Here is lsmod output:
> 
> # lsmod
> Module                  Size  Used by    Not tainted
> au1x00_ss 12160 0 - Live 0xc0005000
> pcmcia_core 60848 1 au1x00_ss, Live 0xc0015000
> 
> 
> I get this output when modprobing au1x00_ss:
> 
> Linux Kernel Card Services
>   options:  none
> 
> 
> At this point 'pcmcia' is not listed in /proc/devices though, so I'm
> assuming another module needs to be inserted?  On my x86 laptop I see
> there is a ds module.  This appears to have been compiled into an object
> for my MIPS build, but there is no stand alone ds module.  If I insert
> the 'pcmcia' module I get pcmcia support (I'm assuming this is the 16
> bit PCMCIA module, it doesn't appear dependent on au1x00_ss), but no
> cards are detected:
> 
> # cardctl ident
> Socket 0:
>   no product info available
> Socket 1:
>   no product info available
> 
> # cardctl status
> Socket 0:
>   no card
> Socket 1:
>   no card

If all the config files are setup properly, you should start pcmcia 
with /etc/rc.d/init.d/pcmcia start. That will also run the cardmgr. 
Without the cardmgr, nothing will happen. If you're loading the 
modules manuall, modprobe au1x00_ss, then ds.o, the execute cardmgr 
and at that point the card should be detected.

> One thing to note is that I get a few warnings during the PCMCIA build:
> 
>   CC [M]  drivers/pcmcia/au1000_generic.o
> drivers/pcmcia/au1000_generic.c: In function
> `au1x00_pcmcia_socket_probe':
> drivers/pcmcia/au1000_generic.c:425: warning: integer constant is too
> large for "long" type
> drivers/pcmcia/au1000_generic.c:433: warning: integer constant is too
> large for "long" type
> 
> The first warning is related to the following code (second is similar
> but for socket 1):
> 
> 	skt->virt_io = (void *)
> 		((u32)ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) -
> 		(u32)mips_io_port_base);
> 
> 
> AU1X_SOCK0_IO is defined as 0xF00000000 which is a 36 bit number, not
> sure if that will cause a problem or not (since ioremap is using phys_t
> which is 32 bit). 

phys_t is 64 bit if 64BIT is enabled. Make sure you have the 36bit 
I/O support enabled. CONFIG_64BIT_PHYS_ADDR has to be defined.

> Perhaps this truncation is intentional though.
> 
> Thanks in advance for any helpful pointers. Best regards,
> 	Josh Green

I tested pcmcia a couple of months ago when I updated the driver. 
I'll retest it in the next few days and send you additional 
instructions.

Pete

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with PCMCIA on AMD dbau1100
  2004-12-21 16:46 ` Pete Popov
@ 2004-12-21 19:38   ` Josh Green
  2004-12-21 23:22   ` Josh Green
  1 sibling, 0 replies; 6+ messages in thread
From: Josh Green @ 2004-12-21 19:38 UTC (permalink / raw)
  To: Pete Popov; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 2468 bytes --]

On Tue, 2004-12-21 at 08:46 -0800, Pete Popov wrote:
> If all the config files are setup properly, you should start pcmcia 
> with /etc/rc.d/init.d/pcmcia start. That will also run the cardmgr. 
> Without the cardmgr, nothing will happen. If you're loading the 
> modules manuall, modprobe au1x00_ss, then ds.o, the execute cardmgr 
> and at that point the card should be detected.
> 

Ok, so there should be a ds.ko compiled then, which I'm not getting
(there is a ds.o in the build tree, but it doesn't get installed as a
module).  I'm still trying to figure out why this is.

> > One thing to note is that I get a few warnings during the PCMCIA build:
> > 
> >   CC [M]  drivers/pcmcia/au1000_generic.o
> > drivers/pcmcia/au1000_generic.c: In function
> > `au1x00_pcmcia_socket_probe':
> > drivers/pcmcia/au1000_generic.c:425: warning: integer constant is too
> > large for "long" type
> > drivers/pcmcia/au1000_generic.c:433: warning: integer constant is too
> > large for "long" type
> > 
> > The first warning is related to the following code (second is similar
> > but for socket 1):
> > 
> > 	skt->virt_io = (void *)
> > 		((u32)ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) -
> > 		(u32)mips_io_port_base);
> > 
> > 
> > AU1X_SOCK0_IO is defined as 0xF00000000 which is a 36 bit number, not
> > sure if that will cause a problem or not (since ioremap is using phys_t
> > which is 32 bit). 
> 
> phys_t is 64 bit if 64BIT is enabled. Make sure you have the 36bit 
> I/O support enabled. CONFIG_64BIT_PHYS_ADDR has to be defined.
> 

I made sure that was enabled (it isn't very evident that it has to be, I
found that out from the code), but still got the same warnings.  I don't
suppose there is the possibility that 'unsigned long long' isn't 64 bit
on MIPS?  I changed the #ifdef CONFIG_64BIT_PHYS_ADDR to '#if 1' in
include/asm/types.h (for the typedef phys_t) just to make sure, and got
the same result (those warnings).

> > Perhaps this truncation is intentional though.
> > 
> > Thanks in advance for any helpful pointers. Best regards,
> > 	Josh Green
> 
> I tested pcmcia a couple of months ago when I updated the driver. 
> I'll retest it in the next few days and send you additional 
> instructions.
> 
> Pete
> 

Thank you very much for the info, it gives me a better idea of what I
should be seeing.  I'll keep probing to see if I can figure out whats
going on.  Best regards,
	Josh Green


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with PCMCIA on AMD dbau1100
  2004-12-21 16:46 ` Pete Popov
  2004-12-21 19:38   ` Josh Green
@ 2004-12-21 23:22   ` Josh Green
       [not found]     ` <41C8B1B3.9080201@amd.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Josh Green @ 2004-12-21 23:22 UTC (permalink / raw)
  To: Pete Popov; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]

Some additional info..

On Tue, 2004-12-21 at 08:46 -0800, Pete Popov wrote:
> If all the config files are setup properly, you should start pcmcia 
> with /etc/rc.d/init.d/pcmcia start. That will also run the cardmgr. 
> Without the cardmgr, nothing will happen. If you're loading the 
> modules manuall, modprobe au1x00_ss, then ds.o, the execute cardmgr 
> and at that point the card should be detected.
> 

Looks like pcmcia.ko is probably what should be used instead of ds.o,
although I'm not sure why this policy is different than from before.
Here is the output after loading these 3 modules and running the pcmcia
init script:

# insmod pcmcia_core.ko
# insmod au1x00_ss.ko
# insmod pcmcia.ko

# /etc/init.d/pcmcia start
Starting PCMCIA services: cardmgr[836]: watching 2 sockets
done.

# lsmod
Module                  Size  Used by    Not tainted
pcmcia 24208 4 - Live 0xc0025000
au1x00_ss 12192 0 - Live 0xc0005000
pcmcia_core 60912 2 pcmcia,au1x00_ss, Live 0xc0015000

# cardctl status
Socket 0:
  no card
Socket 1:
  no card


There is a card in the second slot (Netgear 32 bit CardBus WG511
wireless card which uses prism54 driver).  I don't have the driver
compiled for it but I was expecting it to at least be identified.

> 
> > One thing to note is that I get a few warnings during the PCMCIA build:
> > 
> >   CC [M]  drivers/pcmcia/au1000_generic.o
> > drivers/pcmcia/au1000_generic.c: In function
> > `au1x00_pcmcia_socket_probe':
> > drivers/pcmcia/au1000_generic.c:425: warning: integer constant is too
> > large for "long" type
> > drivers/pcmcia/au1000_generic.c:433: warning: integer constant is too
> > large for "long" type
> > 
> > The first warning is related to the following code (second is similar
> > but for socket 1):
> > 
> > 	skt->virt_io = (void *)
> > 		((u32)ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) -
> > 		(u32)mips_io_port_base);
> > 
> > 
> > AU1X_SOCK0_IO is defined as 0xF00000000 which is a 36 bit number, not
> > sure if that will cause a problem or not (since ioremap is using phys_t
> > which is 32 bit). 
> 
> phys_t is 64 bit if 64BIT is enabled. Make sure you have the 36bit 
> I/O support enabled. CONFIG_64BIT_PHYS_ADDR has to be defined.
> 

I discovered that those warnings are generated due to the constants
themselves being truncated (they should be followed by LL, like
0xF00000000LL).  Still no luck though with detecting my card.  Cheers.
	Josh Green


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with PCMCIA on AMD dbau1100
       [not found]     ` <41C8B1B3.9080201@amd.com>
@ 2004-12-22  3:53       ` Josh Green
  2004-12-22  4:38         ` Pete Popov
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Green @ 2004-12-22  3:53 UTC (permalink / raw)
  To: Eric DeVolder; +Cc: Pete Popov, linux-mips

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

On Tue, 2004-12-21 at 17:28 -0600, Eric DeVolder wrote:
> cardbus isn't supported....and i'm not sure if the pcmcia slots are
> even electrically compatible (meaning i hope your card/db1100 isn't
> damaged).
> 

Ahh, thanks for that bit of insight.  I wasn't aware that 32 bit cardbus
was not supported.  I have a compact flash to PCMCIA adapter which I
have a 128MB compact flash card installed in, it was detected fine (no
damage seems to have occurred with either the card or au1100 PCMCIA
slots).  That solves that problem.

At first I was rather disappointed when I read this reply, but then I
looked up the wireless card I want to use (Senao NL-2511 Plus EXT2, a
Prism 2.5 based card) and it is PCMCIA Type II 16-bit which I suppose
should work using the hostap driver.

Thanks again for pointing this out!  Cheers.
	Josh Green


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with PCMCIA on AMD dbau1100
  2004-12-22  3:53       ` Josh Green
@ 2004-12-22  4:38         ` Pete Popov
  0 siblings, 0 replies; 6+ messages in thread
From: Pete Popov @ 2004-12-22  4:38 UTC (permalink / raw)
  To: Josh Green; +Cc: Eric DeVolder, linux-mips

Josh Green wrote:
> On Tue, 2004-12-21 at 17:28 -0600, Eric DeVolder wrote:
> 
>>cardbus isn't supported....and i'm not sure if the pcmcia slots are
>>even electrically compatible (meaning i hope your card/db1100 isn't
>>damaged).
>>
> 
> 
> Ahh, thanks for that bit of insight.  I wasn't aware that 32 bit cardbus
> was not supported.  I have a compact flash to PCMCIA adapter which I
> have a 128MB compact flash card installed in, it was detected fine (no
> damage seems to have occurred with either the card or au1100 PCMCIA
> slots).  That solves that problem.
> 
> At first I was rather disappointed when I read this reply, but then I
> looked up the wireless card I want to use (Senao NL-2511 Plus EXT2, a
> Prism 2.5 based card) and it is PCMCIA Type II 16-bit which I suppose
> should work using the hostap driver.

I've used the hostap driver on 2.4 with a Db1x board. It should work 
fine with 2.6 as well.

Pete

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-22  4:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-21 11:31 Problems with PCMCIA on AMD dbau1100 Josh Green
2004-12-21 16:46 ` Pete Popov
2004-12-21 19:38   ` Josh Green
2004-12-21 23:22   ` Josh Green
     [not found]     ` <41C8B1B3.9080201@amd.com>
2004-12-22  3:53       ` Josh Green
2004-12-22  4:38         ` Pete Popov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox