PCMCIA on an MPC860

2002-08-23 Thread shaowei dai

Hi, Alex:

You might want to use 'ksymoops' to find more useful information from this
oops.
It's smart to tell you which routine caused the trouble.

regards
- Original Message -
From: "Alex Zeffertt" <[EMAIL PROTECTED]>
To: "Steven Scholz" 
Cc: 
Sent: Friday, August 23, 2002 4:51 PM
Subject: Re: PCMCIA on an MPC860


>
> Steven,
>
>
> Thanks for your reply.  I did try an ethernet card as well.  With that
> I got a different problem -
> after insmodding the client driver I got the following error message:
> eth1: command 0x5800 did not complete!
>
> I also got this error whenever I tried to ping.
>
>
> My Kernel IDE config is as follows:
>
> # ATA/IDE/MFM/RLL support
> #
> CONFIG_IDE=y
>
> #
> # IDE, ATA and ATAPI Block devices
> #
> CONFIG_BLK_DEV_IDE=y
> # CONFIG_BLK_DEV_HD_IDE is not set
> # CONFIG_BLK_DEV_HD is not set
> CONFIG_BLK_DEV_IDEDISK=y
> (everything else IDE related is not set)
>
> Here's my Oops:
>
>
> Oops: kernel access of bad area, sig: 11
> NIP: C00C0A0C XER: C37F LR: C00C0A00 SP: C1763460 REGS: c17633b0
> TRAP: 0300
> MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 40009E9A, DSISR: 0409
> TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math  last
> altivec 
> GPR00: C00C0A00 C1763460 C1762000 9B78 00EC  C01C838C
> C0009E9A GPR08: 9032 40009E9A C0009E9A C01C8360 53935E95 1002205C
>  100B9E90 GPR16: 100BA770 0001 007FFF00  C17636D8
> C1C9D670 0002 C404 GPR24: C404 010E 0100 C01C84B8
>   C01C83C8 00EC Call backtrace: C00C0A00 C00C0F04
> C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0
> C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC
> 100032C0 10004764 0FED9DBC 
>
> Does this look familiar?  :-/
>
> Thanks,
>
> Alex
>
>
> On 2002.08.23 09:09 Steven Scholz wrote:
> >
> > Alex,
> >
> > actually I had the Card Service running on MPC855/860 systems with
> > Ethernet,
> > WaveLAN and ATA Cards.
> >
> > It's a while back so I try to remember realy hard now!
> >
> > I had this problem too.
> >
> > 1.) Did you try another PC Card, i.e. ethernet?
> > 2.) How are your settings for IDE in your kernel configuration?
> > 3.) I think I remember that I had to change something about the
> > request_irq /
> > request_8xxirq.
> > I think the oops comes because the driver can't request the irq!!!
> >
> > Could you please show us you're oops!?
> >
> > Steven
> >
> >
> > Alex Zeffertt wrote:
> > >
> > > All,
> > >
> > > Has anybody had any luck getting PCMCIA to work on an MPC860?
> > >
> > > I have a custom MPC860 board, with a single PCMCIA socket connected
> > to Slot B.  This is what I have
> > > so far done:
> > >
> > > 1.
> > > Downloaded pcmcia-cs-3.2.0.tar.gz
> > > 2.
> > > Added board specific definitions in modules/m8xx_pcmcia.c for
> > > hardware_enable()
> > > hardware_disable()
> > > voltage_set()
> > > socket_get()
> > > 3.
> > > Cross compiled for the 8xx.
> > > 4.
> > > In my kernel (linux-2.4.4-2001-11-24 from Denx) I added the
> > following lines
> > > include/asm-ppc/.h:
> > > /* define IO_BASE for pcmcia */
> > > #define _IO_BASE 0x8000
> > > #define _IO_BASE_SIZE (1024*64)
> > > arch/ppc/mm/init.c:
> > > void __init MMU_init(void) {
> > > ...
> > > ioremap(_IO_BASE,_IO_BASE_SIZE);
> > >
> > > ...as suggested by Magnus Damm in
> > >
> > http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html
> > >
> > > HOWEVER,
> > >
> > > 5.  When I boot my board with a Flash card in the PCMCIA slot,
> > and I run:
> > > /etc/rc.d/rc.pcmcia start
> > > I find that ide_cs.o causes an Oops when it calls
> > ide_register().  "cardctl status"
> > > and "cardctl ident" work though.
> > >
> > > Can anybody suggest what I'm doing wrong?
> > >
> > > Thanks in advance,
> > >
> > > Alex
> > >
> >
> >
>
>


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





PCMCIA on an MPC860

2002-08-23 Thread Magnus Damm

I've not used the driver together with a 2.4 kernel,
so I'm not sure how well modules from pcmcia-cs plays
with pcmcia stuff in the kernel.

Linux-2.4.19 has a version of the driver that
Matthew Locke modified and bugfixed. Maybe that one
works better with 2.4 kernels.

What happens if you decode the OOPS?

To get symbols, use the file System.map from
the kernel together with the map generated by
"insmod -m".
Or use /proc/ksysms from the running system.

"cardctl ident" and "cardctl status" only reads
the CIS and checks the pin status. (Correct me
if I remember wrong).

I think it will be the ide-driver that starts
accessing the IO-space. Maybe that doesn't work.

/ Magnus

Alex Zeffertt wrote:
>
> All,
>
> Has anybody had any luck getting PCMCIA to work on an MPC860?
>
> I have a custom MPC860 board, with a single PCMCIA socket connected to Slot 
> B.  This is what I have
> so far done:
>
> 1.
> Downloaded pcmcia-cs-3.2.0.tar.gz
> 2.
> Added board specific definitions in modules/m8xx_pcmcia.c for
> hardware_enable()
> hardware_disable()
> voltage_set()
> socket_get()
> 3.
> Cross compiled for the 8xx.
> 4.
> In my kernel (linux-2.4.4-2001-11-24 from Denx) I added the following lines
> include/asm-ppc/.h:
> /* define IO_BASE for pcmcia */
> #define _IO_BASE 0x8000
> #define _IO_BASE_SIZE (1024*64)
> arch/ppc/mm/init.c:
> void __init MMU_init(void) {
> ...
> ioremap(_IO_BASE,_IO_BASE_SIZE);
>
> ...as suggested by Magnus Damm in
> http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html
>
> HOWEVER,
>
> 5.  When I boot my board with a Flash card in the PCMCIA slot, and I run:
> /etc/rc.d/rc.pcmcia start
> I find that ide_cs.o causes an Oops when it calls ide_register().  
> "cardctl status"
> and "cardctl ident" work though.
>
> Can anybody suggest what I'm doing wrong?
>
> Thanks in advance,
>
> Alex

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





PCMCIA on an MPC860

2002-08-23 Thread Steven Scholz

Alex Zeffertt wrote:
>
> Steven,
>
> Thanks for your reply.  I did try an ethernet card as well.  With that
> I got a different problem -
> after insmodding the client driver I got the following error message:
> eth1: command 0x5800 did not complete!
>
> I also got this error whenever I tried to ping.
>
> My Kernel IDE config is as follows:
>
> # ATA/IDE/MFM/RLL support
> #
> CONFIG_IDE=y
>
> #
> # IDE, ATA and ATAPI Block devices
> #
> CONFIG_BLK_DEV_IDE=y
> # CONFIG_BLK_DEV_HD_IDE is not set
> # CONFIG_BLK_DEV_HD is not set
> CONFIG_BLK_DEV_IDEDISK=y
> (everything else IDE related is not set)
>
> Here's my Oops:
>
> Oops: kernel access of bad area, sig: 11
> NIP: C00C0A0C XER: C37F LR: C00C0A00 SP: C1763460 REGS: c17633b0
> TRAP: 0300
> MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 40009E9A, DSISR: 0409
> TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math  last
> altivec 
> GPR00: C00C0A00 C1763460 C1762000 9B78 00EC  C01C838C
> C0009E9A GPR08: 9032 40009E9A C0009E9A C01C8360 53935E95 1002205C
>  100B9E90 GPR16: 100BA770 0001 007FFF00  C17636D8
> C1C9D670 0002 C404 GPR24: C404 010E 0100 C01C84B8
>   C01C83C8 00EC Call backtrace: C00C0A00 C00C0F04
> C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0
> C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC
> 100032C0 10004764 0FED9DBC 
>
> Does this look familiar?  :-/

Not realy. :-(

Which kernel version do you use?

I suggest you switch on PCMCIA_DEBUG in CS, put some extra printk's into
ide_cs.c _and_  in ide_init_hwif_ports() to find out which addressen are used!

Can you backtrace 'cardmgr' ?

Steven

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





PCMCIA on an MPC860

2002-08-23 Thread Alex Zeffertt

On 2002.08.23 10:20 shaowei dai wrote:
>
> Hi, Alex:
>
> You might want to use 'ksymoops' to find more useful information from
> this
> oops.
> It's smart to tell you which routine caused the trouble.


Ah, I didn't actually know about ksymoops!!!  Here is the decoded Oops:

>> NIP; c00c0a0c<=
Trace; c00c0a00 
Trace; c00c0f04 
Trace; c00c10ec 
Trace; c00c188c 
Trace; c00c221c 
Trace; c00bbfd4 
Trace; c00bcaac 
Trace; c00bcb4c 
Trace; c403f7a4 <[ide_cs]ide_config+5c8/774>
Trace; c403fbe0 <[ide_cs]ide_event+9c/110>
Trace; c40031bc <[pcmcia_core]register_client+2ac/2e8>
Trace; c4004808 <[pcmcia_core]CardServices+104/1e4>
Trace; c403f18c <[ide_cs]__module_parm_irq_list+108/158>
Trace; c400f874 <[ds]bind_request+1b0/1fc>
Trace; c40105b4 <[ds]ds_ioctl+584/714>


Alex

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





PCMCIA on an MPC860

2002-08-23 Thread Alex Zeffertt

On 2002.08.23 10:09 Wolfgang Denk wrote:
> In message <20020823095133.F12271 at zambia.cambridgebroadband.com> you
> wrote:
> >
> > Here's my Oops:
> >
> >
> > Oops: kernel access of bad area, sig: 11
> > NIP: C00C0A0C XER: C37F LR: C00C0A00 SP: C1763460 REGS: c17633b0
> > TRAP: 0300
> > MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> > DAR: 40009E9A, DSISR: 0409
> > TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math 
> last
> > altivec 
> > GPR00: C00C0A00 C1763460 C1762000 9B78 00EC 
> C01C838C
> > C0009E9A GPR08: 9032 40009E9A C0009E9A C01C8360 53935E95
> 1002205C
> >  100B9E90 GPR16: 100BA770 0001 007FFF00 
> C17636D8
> > C1C9D670 0002 C404 GPR24: C404 010E 0100
> C01C84B8
> >   C01C83C8 00EC Call backtrace: C00C0A00
> C00C0F04
> > C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4
> C403FBE0
> > C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C
> 10002BAC
> > 100032C0 10004764 0FED9DBC 
> >
> > Does this look familiar?  :-/
>
> Alex, I guess Steven was more interested in the _decoded_  output  of
> the stack backtrace.
>

Yes, of course.  The crash occurs in the ide_cs client.  The order of
calls is:

(CARD INSERTION) -> ide_event() -> ide_config() -> ide_register().

The crash occurs somewhere in ide_register(), but I find reading
through that code a bit hairy as I don't really know anything about IDE
myself.

I suspect that I've got a problem with byte ordering.  This would
explain the problem I get when I insert an ethernet card.  When I do
this, the client 3c574_cs tries to write a command to a register on the
card, and read another register to determine when the command has been
completed - however, this never happens.  This could be a result of
performing reads and writes in the wrong order.

In Magnus' email
(http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html) he
talks about Endianness.  However, I've been through the source files he
talks about (my kernel is linux-2.4.4-2001-11-24) and all of the
changes he refers to are already there.

Any ideas?

Alex


> Wolfgang Denk
>
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
> The software required `Windows 95 or better', so I installed Linux.
>

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





PCMCIA on an MPC860

2002-08-23 Thread Steven Scholz

Alex,

actually I had the Card Service running on MPC855/860 systems with Ethernet,
WaveLAN and ATA Cards.

It's a while back so I try to remember realy hard now!

I had this problem too.

1.) Did you try another PC Card, i.e. ethernet?
2.) How are your settings for IDE in your kernel configuration?
3.) I think I remember that I had to change something about the request_irq /
request_8xxirq.
I think the oops comes because the driver can't request the irq!!!

Could you please show us you're oops!?

Steven


Alex Zeffertt wrote:
>
> All,
>
> Has anybody had any luck getting PCMCIA to work on an MPC860?
>
> I have a custom MPC860 board, with a single PCMCIA socket connected to Slot 
> B.  This is what I have
> so far done:
>
> 1.
> Downloaded pcmcia-cs-3.2.0.tar.gz
> 2.
> Added board specific definitions in modules/m8xx_pcmcia.c for
> hardware_enable()
> hardware_disable()
> voltage_set()
> socket_get()
> 3.
> Cross compiled for the 8xx.
> 4.
> In my kernel (linux-2.4.4-2001-11-24 from Denx) I added the following lines
> include/asm-ppc/.h:
> /* define IO_BASE for pcmcia */
> #define _IO_BASE 0x8000
> #define _IO_BASE_SIZE (1024*64)
> arch/ppc/mm/init.c:
> void __init MMU_init(void) {
> ...
> ioremap(_IO_BASE,_IO_BASE_SIZE);
>
> ...as suggested by Magnus Damm in
> http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html
>
> HOWEVER,
>
> 5.  When I boot my board with a Flash card in the PCMCIA slot, and I run:
> /etc/rc.d/rc.pcmcia start
> I find that ide_cs.o causes an Oops when it calls ide_register().  
> "cardctl status"
> and "cardctl ident" work though.
>
> Can anybody suggest what I'm doing wrong?
>
> Thanks in advance,
>
> Alex
>

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





PCMCIA on an MPC860

2002-08-23 Thread Alex Zeffertt

Steven,


Thanks for your reply.  I did try an ethernet card as well.  With that
I got a different problem -
after insmodding the client driver I got the following error message:
eth1: command 0x5800 did not complete!

I also got this error whenever I tried to ping.


My Kernel IDE config is as follows:

# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y

#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
(everything else IDE related is not set)

Here's my Oops:


Oops: kernel access of bad area, sig: 11
NIP: C00C0A0C XER: C37F LR: C00C0A00 SP: C1763460 REGS: c17633b0
TRAP: 0300
MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 40009E9A, DSISR: 0409
TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math  last
altivec 
GPR00: C00C0A00 C1763460 C1762000 9B78 00EC  C01C838C
C0009E9A GPR08: 9032 40009E9A C0009E9A C01C8360 53935E95 1002205C
 100B9E90 GPR16: 100BA770 0001 007FFF00  C17636D8
C1C9D670 0002 C404 GPR24: C404 010E 0100 C01C84B8
  C01C83C8 00EC Call backtrace: C00C0A00 C00C0F04
C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0
C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC
100032C0 10004764 0FED9DBC 

Does this look familiar?  :-/

Thanks,

Alex


On 2002.08.23 09:09 Steven Scholz wrote:
>
> Alex,
>
> actually I had the Card Service running on MPC855/860 systems with
> Ethernet,
> WaveLAN and ATA Cards.
>
> It's a while back so I try to remember realy hard now!
>
> I had this problem too.
>
> 1.) Did you try another PC Card, i.e. ethernet?
> 2.) How are your settings for IDE in your kernel configuration?
> 3.) I think I remember that I had to change something about the
> request_irq /
> request_8xxirq.
> I think the oops comes because the driver can't request the irq!!!
>
> Could you please show us you're oops!?
>
> Steven
>
>
> Alex Zeffertt wrote:
> >
> > All,
> >
> > Has anybody had any luck getting PCMCIA to work on an MPC860?
> >
> > I have a custom MPC860 board, with a single PCMCIA socket connected
> to Slot B.  This is what I have
> > so far done:
> >
> > 1.
> > Downloaded pcmcia-cs-3.2.0.tar.gz
> > 2.
> > Added board specific definitions in modules/m8xx_pcmcia.c for
> > hardware_enable()
> > hardware_disable()
> > voltage_set()
> > socket_get()
> > 3.
> > Cross compiled for the 8xx.
> > 4.
> > In my kernel (linux-2.4.4-2001-11-24 from Denx) I added the
> following lines
> > include/asm-ppc/.h:
> > /* define IO_BASE for pcmcia */
> > #define _IO_BASE 0x8000
> > #define _IO_BASE_SIZE (1024*64)
> > arch/ppc/mm/init.c:
> > void __init MMU_init(void) {
> > ...
> > ioremap(_IO_BASE,_IO_BASE_SIZE);
> >
> > ...as suggested by Magnus Damm in
> >
> http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html
> >
> > HOWEVER,
> >
> > 5.  When I boot my board with a Flash card in the PCMCIA slot,
> and I run:
> > /etc/rc.d/rc.pcmcia start
> > I find that ide_cs.o causes an Oops when it calls
> ide_register().  "cardctl status"
> > and "cardctl ident" work though.
> >
> > Can anybody suggest what I'm doing wrong?
> >
> > Thanks in advance,
> >
> > Alex
> >
>
>

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





PCMCIA on an MPC860

2002-08-22 Thread Alex Zeffertt

All,

Has anybody had any luck getting PCMCIA to work on an MPC860?

I have a custom MPC860 board, with a single PCMCIA socket connected to Slot B.  
This is what I have
so far done:

1.
Downloaded pcmcia-cs-3.2.0.tar.gz
2.
Added board specific definitions in modules/m8xx_pcmcia.c for
hardware_enable()
hardware_disable()
voltage_set()
socket_get()
3.
Cross compiled for the 8xx.
4.
In my kernel (linux-2.4.4-2001-11-24 from Denx) I added the following lines
include/asm-ppc/.h:
/* define IO_BASE for pcmcia */
#define _IO_BASE 0x8000
#define _IO_BASE_SIZE (1024*64)
arch/ppc/mm/init.c:
void __init MMU_init(void) {
...
ioremap(_IO_BASE,_IO_BASE_SIZE);


...as suggested by Magnus Damm in
http://lists.linuxppc.org/linuxppc-embedded/25/msg00227.html


HOWEVER,

5.  When I boot my board with a Flash card in the PCMCIA slot, and I run:
/etc/rc.d/rc.pcmcia start
I find that ide_cs.o causes an Oops when it calls ide_register().  
"cardctl status"
and "cardctl ident" work though.


Can anybody suggest what I'm doing wrong?

Thanks in advance,

Alex


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