linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Question on the pcmcia module for ppc
@ 2002-01-04 10:36 Liu HongXun-a16975
  2002-01-04 14:21 ` Peter Desnoyers
  2002-01-04 19:40 ` Matthew Locke
  0 siblings, 2 replies; 8+ messages in thread
From: Liu HongXun-a16975 @ 2002-01-04 10:36 UTC (permalink / raw)
  To: linuxppc-embedded


Hi, all,
I worked on the PCMCIA module for my MPC 857T based board.
I downloaded the pcmcia-cs 3.1.29 and modified the file modules/m8xx_pcmcia.c.
My board uses the SLOT B. What I did are just like the (F)ADS and RPXLite.
I compiled the resulted pcmcia module and loaded them into linux kernel using "insmod".
1. insmod pcmcia_core.o
2. insmod m8xx_pcmcia.o
3. insmod ds.o
Here comes the problem.
When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
I looked through the source code and the debug info.
I found that a lot of the same messages as follows:
GetStatus(0) = 0x190
...
Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
is not satisfied with the above return value and " get status " again and again.
Then it quit.

Any suggestions are highly appreciated!
Thanks a lot

Rolf

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Question on the pcmcia module for ppc
  2002-01-04 10:36 Liu HongXun-a16975
@ 2002-01-04 14:21 ` Peter Desnoyers
  2002-01-04 19:40 ` Matthew Locke
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Desnoyers @ 2002-01-04 14:21 UTC (permalink / raw)
  To: Liu HongXun-a16975; +Cc: linuxppc-embedded


Liu HongXun-a16975 wrote:
>
> When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
> I looked through the source code and the debug info.
> I found that a lot of the same messages as follows:
> GetStatus(0) = 0x190
> ...
> Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
> is not satisfied with the above return value and " get status " again and again.
> Then it quit.

To look at it a different way - the driver was unhappy with the value of
the first inb() on an address in the card's I/O space.

My first guess (been there myself) is that inb() and outb() aren't
working to your card's I/O space.

--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Question on the pcmcia module for ppc
  2002-01-04 10:36 Liu HongXun-a16975
  2002-01-04 14:21 ` Peter Desnoyers
@ 2002-01-04 19:40 ` Matthew Locke
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Locke @ 2002-01-04 19:40 UTC (permalink / raw)
  To: Liu HongXun-a16975; +Cc: linuxppc-embedded


Liu HongXun-a16975 wrote:

> Hi, all,
> I worked on the PCMCIA module for my MPC 857T based board.
> I downloaded the pcmcia-cs 3.1.29 and modified the file modules/m8xx_pcmcia.c.
> My board uses the SLOT B. What I did are just like the (F)ADS and RPXLite.
> I compiled the resulted pcmcia module and loaded them into linux kernel using "insmod".
> 1. insmod pcmcia_core.o
> 2. insmod m8xx_pcmcia.o
> 3. insmod ds.o
> Here comes the problem.
> When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
> I looked through the source code and the debug info.
> I found that a lot of the same messages as follows:
> GetStatus(0) = 0x190
> ...
> Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
> is not satisfied with the above return value and " get status " again and again.
> Then it quit.
>
> Any suggestions are highly appreciated!
> Thanks a lot


I'm not familiar with the 857T pcmcia, perhaps the timing is different.
 Check the timing calculation functions against the 857T UM.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: Question on the pcmcia module for ppc
@ 2002-01-07  3:02 Liu HongXun-a16975
  2002-01-07 15:11 ` Peter Desnoyers
  0 siblings, 1 reply; 8+ messages in thread
From: Liu HongXun-a16975 @ 2002-01-07  3:02 UTC (permalink / raw)
  To: Peter Desnoyers; +Cc: linuxppc-embedded


Hi, Peter and all,
Could you give me some more detailed hints?
The return value from m8xx_get_status()/m8xx_pcmcia.c is 0x190, which means
the current status of the PCMCIA card is : SS_POWERON + SS_DETECT + SS_BATDEAD.
It seems that the problem coming from SS_BATDEAD.
In function m8xx_get_status()/m8xx_pcmcia.c, there are the following statements:
	if (s->state.flags & SS_IOCARD)
		*value |= (pipr & M8XX_PCMCIA_BVD1(_slot_)) ? SS_STSCHG : 0;
	else {
		*value |= (pipr & M8XX_PCMCIA_RDY(_slot_)) ? SS_READY : 0;
		*value |= (pipr & M8XX_PCMCIA_BVD1(_slot_)) ? SS_BATDEAD : 0;
		*value |= (pipr & M8XX_PCMCIA_BVD2(_slot_)) ? SS_BATWARN : 0;
	}
My card is a Prism2 WLAN card, a IOCARD. Why  "(s->state.flags  & SS_IOCARD)"
returns FALSE?
Who should set the s->state.flags to state this is a IO CARD, not a memory only card?

As to the IO space, I defined

#define  _IO_BASE              0x80000000
#define  _IO_BASE_SIZE   0x1000
in the header file for my board.
And I use ioremap() in function  arch/ppc/mm/init.c/MMU_init().
ioremap( _IO_BASE, _IO_BASE_SIZE);
Is that OK for PCMCIA IO base access?

Thanks a lot
rolf

-----Original Message-----
From: Peter Desnoyers [mailto:pdesnoyers@chinook.com]
Sent: 2002?1?4? 22:21
To: Liu HongXun-a16975
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Question on the pcmcia module for ppc


Liu HongXun-a16975 wrote:
>
> When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
> I looked through the source code and the debug info.
> I found that a lot of the same messages as follows:
> GetStatus(0) = 0x190
> ...
> Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
> is not satisfied with the above return value and " get status " again and again.
> Then it quit.

To look at it a different way - the driver was unhappy with the value of
the first inb() on an address in the card's I/O space.

My first guess (been there myself) is that inb() and outb() aren't
working to your card's I/O space.


--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: Question on the pcmcia module for ppc
@ 2002-01-07  3:21 Liu HongXun-a16975
  2002-01-07 19:08 ` Matthew Locke
  0 siblings, 1 reply; 8+ messages in thread
From: Liu HongXun-a16975 @ 2002-01-07  3:21 UTC (permalink / raw)
  To: Matthew Locke; +Cc: linuxppc-embedded


Hi, Matthew and all,
The MPC 857T is just the same as MPC 860T, except some little revisions.
The linux we used is hhl 2.0, lsp for RPXLite.
MPC 857T ran at 50MHZ and the bus frequency is 50MHZ.
I set this value as follow:
#define M8XX_BUSFREQ (50 * 1000000)

Am I mising anything here?
Thanks a lot
rolf

-----Original Message-----
From: Matthew Locke [mailto:mlocke@mvista.com]
Sent: 2002年1月5日 3:40
To: Liu HongXun-a16975
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Question on the pcmcia module for ppc


Liu HongXun-a16975 wrote:

> Hi, all,
> I worked on the PCMCIA module for my MPC 857T based board.
> I downloaded the pcmcia-cs 3.1.29 and modified the file modules/m8xx_pcmcia.c.
> My board uses the SLOT B. What I did are just like the (F)ADS and RPXLite.
> I compiled the resulted pcmcia module and loaded them into linux kernel using "insmod".
> 1. insmod pcmcia_core.o
> 2. insmod m8xx_pcmcia.o
> 3. insmod ds.o
> Here comes the problem.
> When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
> I looked through the source code and the debug info.
> I found that a lot of the same messages as follows:
> GetStatus(0) = 0x190
> ...
> Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
> is not satisfied with the above return value and " get status " again and again.
> Then it quit.
>
> Any suggestions are highly appreciated!
> Thanks a lot


I'm not familiar with the 857T pcmcia, perhaps the timing is different.
 Check the timing calculation functions against the 857T UM.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Question on the pcmcia module for ppc
  2002-01-07  3:02 Liu HongXun-a16975
@ 2002-01-07 15:11 ` Peter Desnoyers
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Desnoyers @ 2002-01-07 15:11 UTC (permalink / raw)
  To: Liu HongXun-a16975; +Cc: linuxppc-embedded


Liu HongXun-a16975 wrote:
>
> Hi, Peter and all,
> Could you give me some more detailed hints?

I'll repeat what I said, more slowly and clearly :-)

   I don't think that inb() and outb() are working to your PCMCIA
   card, since it appears that the software does not like the
   return value from what is probably the first inb() read from
   the card's I/O space.

That means that the code for inb() (_IOBASE and all that) doesn't match
the way you're initializing your PCMCIA registers.

> As to the IO space, I defined
>
> #define  _IO_BASE              0x80000000
> #define  _IO_BASE_SIZE   0x1000
> in the header file for my board.
> And I use ioremap() in function  arch/ppc/mm/init.c/MMU_init().
> ioremap( _IO_BASE, _IO_BASE_SIZE);
> Is that OK for PCMCIA IO base access?

You'll have to tell me.  Or else you'll have to provide some information
on how you're initializing the PCMCIA registers.

One very relevant question here - do you have PCI on your board?
Mapping all this stuff properly is a bit harder if you do, but still
doable.

--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Question on the pcmcia module for ppc
  2002-01-07  3:21 Question on the pcmcia module for ppc Liu HongXun-a16975
@ 2002-01-07 19:08 ` Matthew Locke
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Locke @ 2002-01-07 19:08 UTC (permalink / raw)
  To: Liu HongXun-a16975; +Cc: linuxppc-embedded


Liu HongXun-a16975 wrote:

> Hi, Matthew and all,
> The MPC 857T is just the same as MPC 860T, except some little revisions.
> The linux we used is hhl 2.0, lsp for RPXLite.
> MPC 857T ran at 50MHZ and the bus frequency is 50MHZ.
> I set this value as follow:
> #define M8XX_BUSFREQ (50 * 1000000)


The rpx-lite is an 823e.  You should start with the rpx-cllf lsp which
is a 860.  However, assuming you don't have pci the io base of 0x8000000
will work fine.  I have only tested Slot A on an 860 board (cllf from EP).

>
> Am I mising anything here?
> Thanks a lot
> rolf
>
> -----Original Message-----
> From: Matthew Locke [mailto:mlocke@mvista.com]
> Sent: 2002年1月5日 3:40
> To: Liu HongXun-a16975
> Cc: linuxppc-embedded@lists.linuxppc.org
> Subject: Re: Question on the pcmcia module for ppc
>
>
> Liu HongXun-a16975 wrote:
>
>
>>Hi, all,
>>I worked on the PCMCIA module for my MPC 857T based board.
>>I downloaded the pcmcia-cs 3.1.29 and modified the file modules/m8xx_pcmcia.c.
>>My board uses the SLOT B. What I did are just like the (F)ADS and RPXLite.
>>I compiled the resulted pcmcia module and loaded them into linux kernel using "insmod".
>>1. insmod pcmcia_core.o
>>2. insmod m8xx_pcmcia.o
>>3. insmod ds.o
>>Here comes the problem.
>>When I inserted ds.o, the driver tells me that "cs: socket 0 timed out during reset"
>>I looked through the source code and the debug info.
>>I found that a lot of the same messages as follows:
>>GetStatus(0) = 0x190
>>...
>>Such info come from m8xx_pcmcia.c/m8xx_get_status. It seems that someone
>>is not satisfied with the above return value and " get status " again and again.
>>Then it quit.
>>
>>Any suggestions are highly appreciated!
>>Thanks a lot
>>
>
>
> I'm not familiar with the 857T pcmcia, perhaps the timing is different.
>  Check the timing calculation functions against the 857T UM.
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* RE: Question on the pcmcia module for ppc
@ 2002-01-09 11:40 Liu HongXun-a16975
  0 siblings, 0 replies; 8+ messages in thread
From: Liu HongXun-a16975 @ 2002-01-09 11:40 UTC (permalink / raw)
  To: Peter Desnoyers; +Cc: linuxppc-embedded


Hi, Peter,
>From the debug info, what you said should be right.
The PCMCIA card is a WLAN card (Prism2), using PCMCIA interface.
And there is no PCI bus on my board.
Now, the 'cardctl' utility can tell me something about the WLAN card.
The 'cardctl' can read the CIS info on the WLAN card.
Except the attribute memory for CIS, there is no memory windows on WLAN card.
All the operations are done through IO window.
And the problems come from the access of the IO address space in WLAN card
When I want to access the IO address in the WLAN card, there comes the Ooops message:

"Oops: kernel access of bad area ", coming from bad_page_fault()/fault.c.

It seems that MMU don't know how to access the IO space for the WLAN card, which is 0x80000000 + offset.
But I did use ioremap in arch/ppc/mm/init.c to map in the _IO_BASE ( 0x80000000 ) and
_IO_BASE_SIZE ( 0x1000).

I am totally confused here.

Thanks for suggestion

Rolf

-----Original Message-----
From: Peter Desnoyers [mailto:pdesnoyers@chinook.com]
Sent: 2002?1?7? 23:11
To: Liu HongXun-a16975
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Question on the pcmcia module for ppc




Liu HongXun-a16975 wrote:
>
> Hi, Peter and all,
> Could you give me some more detailed hints?

I'll repeat what I said, more slowly and clearly :-)

   I don't think that inb() and outb() are working to your PCMCIA
   card, since it appears that the software does not like the
   return value from what is probably the first inb() read from
   the card's I/O space.

That means that the code for inb() (_IOBASE and all that) doesn't match
the way you're initializing your PCMCIA registers.

> As to the IO space, I defined
>
> #define  _IO_BASE              0x80000000
> #define  _IO_BASE_SIZE   0x1000
> in the header file for my board.
> And I use ioremap() in function  arch/ppc/mm/init.c/MMU_init().
> ioremap( _IO_BASE, _IO_BASE_SIZE);
> Is that OK for PCMCIA IO base access?

You'll have to tell me.  Or else you'll have to provide some information
on how you're initializing the PCMCIA registers.

One very relevant question here - do you have PCI on your board?
Mapping all this stuff properly is a bit harder if you do, but still
doable.

--
.....................................................................
 Peter Desnoyers            (781) 457-1165   pdesnoyers@chinook.com
 Chinook Communications     (617) 661-1979   pjd@fred.cambridge.ma.us
 100 Hayden Ave, Lexington MA 02421

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-01-09 11:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-07  3:21 Question on the pcmcia module for ppc Liu HongXun-a16975
2002-01-07 19:08 ` Matthew Locke
  -- strict thread matches above, loose matches on Subject: below --
2002-01-09 11:40 Liu HongXun-a16975
2002-01-07  3:02 Liu HongXun-a16975
2002-01-07 15:11 ` Peter Desnoyers
2002-01-04 10:36 Liu HongXun-a16975
2002-01-04 14:21 ` Peter Desnoyers
2002-01-04 19:40 ` Matthew Locke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).