PCMCIA on an MPC860
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/<board>.h:
/* define IO_BASE for pcmcia */
#define _IO_BASE 0x80000000
#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/200005/msg00227.htmlHOWEVER,
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/
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
Quoted 39 lines · 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 inmodules/m8xx_pcmcia.cfor
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 linesinclude/asm-ppc/<board>.h: /* define IO_BASE for pcmcia */ #define _IO_BASE 0x80000000 #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/200005/msg00227.htmlHOWEVER,
5. When I boot my board with a Flash card in the PCMCIA slot, and I run:
/etc/rc.d/rc.pcmciastart
I find that ide_cs.o causes an Oops when it callside_register(). "cardctl status" and "cardctl ident" work though.
Quoted 6 lines
Can anybody suggest what I'm doing wrong?
Thanks in advance,
Alex
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
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 setCONFIG_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: C000037F LR: C00C0A00 SP: C1763460 REGS: c17633b0
TRAP: 0300
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 40009E9A, DSISR: 00000409
TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math 00000000 last altivec 00000000
GPR00: C00C0A00 C1763460 C1762000 00009B78 000000EC 00000000 C01C838C C0009E9A GPR08: 00009032 40009E9A C0009E9A C01C8360 53935E95 1002205C 00000000 100B9E90 GPR16: 100BA770 00000001 007FFF00 00000000 C17636D8 C1C9D670 00000002 C4040000 GPR24: C4040000 0000010E 00000100 C01C84B8 00000000 00000000 C01C83C8 000000EC Call backtrace: C00C0A00 C00C0F04 C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0 C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC 100032C0 10004764 0FED9DBC 00000000
Does this look familiar? :-/
Thanks,
Alex
Quoted 59 lines · 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 therequest_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
Quoted 6 lines · 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
Quoted 14 lines
so far done:
1.
Downloaded pcmcia-cs-3.2.0.tar.gz
2.
Added board specific definitions inmodules/m8xx_pcmcia.cfor
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 thefollowing lines
Quoted 11 lines
include/asm-ppc/<board>.h: /* define IO_BASE for pcmcia */ #define _IO_BASE 0x80000000 #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 inhttp://lists.linuxppc.org/linuxppc-embedded/200005/msg00227.html
Quoted 1 line
Quoted 17 lines
Quoted 3 lines
HOWEVER,
5. When I boot my board with a Flash card in the PCMCIA slot,
and I run:
Quoted 2 lines
/etc/rc.d/rc.pcmciastart
I find that ide_cs.o causes an Oops when it calls
ide_register(). "cardctl status"Quoted 8 lines
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/
Quoted 43 lines · 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_IDEis not set
#CONFIG_BLK_DEV_HDis not setCONFIG_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: C000037F LR: C00C0A00 SP: C1763460 REGS: c17633b0TRAP: 0300
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 40009E9A, DSISR: 00000409
TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math 00000000 last altivec 00000000
GPR00: C00C0A00 C1763460 C1762000 00009B78 000000EC 00000000 C01C838C C0009E9A GPR08: 00009032 40009E9A C0009E9A C01C8360 53935E95 1002205C 00000000 100B9E90 GPR16: 100BA770 00000001 007FFF00 00000000 C17636D8 C1C9D670 00000002 C4040000 GPR24: C4040000 0000010E 00000100 C01C84B8 00000000 00000000 C01C83C8 000000EC Call backtrace: C00C0A00 C00C0F04 C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0 C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC 100032C0 10004764 0FED9DBC 00000000
Quoted 1 line
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/
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" <[email protected]>
Cc: <[email protected]>
Sent: Friday, August 23, 2002 4:51 PM
Subject: Re: PCMCIA on an MPC860
Quoted 46 lines
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: command0x5800did 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_IDEis not set
#CONFIG_BLK_DEV_HDis not setCONFIG_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: C000037F LR: C00C0A00 SP: C1763460 REGS: c17633b0TRAP: 0300
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 40009E9A, DSISR: 00000409
TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math 00000000 last altivec 00000000
GPR00: C00C0A00 C1763460 C1762000 00009B78 000000EC 00000000 C01C838C C0009E9A GPR08: 00009032 40009E9A C0009E9A C01C8360 53935E95 1002205C 00000000 100B9E90 GPR16: 100BA770 00000001 007FFF00 00000000 C17636D8 C1C9D670 00000002 C4040000 GPR24: C4040000 0000010E 00000100 C01C84B8 00000000 00000000 C01C83C8 000000EC Call backtrace: C00C0A00 C00C0F04 C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4 C403FBE0 C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C 10002BAC 100032C0 10004764 0FED9DBC 00000000
Quoted 86 lines
Does this look familiar? :-/
Thanks,
Alex
Quoted 76 lines · 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 therequest_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
Quoted 6 lines · 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
Quoted 14 lines
so far done:
1.
Downloaded pcmcia-cs-3.2.0.tar.gz
2.
Added board specific definitions inmodules/m8xx_pcmcia.cfor
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 thefollowing lines
Quoted 11 lines
include/asm-ppc/<board>.h: /* define IO_BASE for pcmcia */ #define _IO_BASE 0x80000000 #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 inhttp://lists.linuxppc.org/linuxppc-embedded/200005/msg00227.html
Quoted 4 lines
HOWEVER,
5. When I boot my board with a Flash card in the PCMCIA slot,
and I run:
Quoted 2 lines
/etc/rc.d/rc.pcmciastart
I find that ide_cs.o causes an Oops when it calls
ide_register(). "cardctl status"Quoted 8 lines
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/
Quoted 7 lines · 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:
Quoted 1 line
Quoted 1 line
NIP;
c00c0a0c<create_proc_ide_interfaces+208/3670> <=====
Trace; c00c0a00 <create_proc_ide_interfaces+1fc/3670> Trace; c00c0f04 <create_proc_ide_interfaces+700/3670> Trace; c00c10ec <create_proc_ide_interfaces+8e8/3670> Trace; c00c188c <create_proc_ide_interfaces+1088/3670> Trace; c00c221c <create_proc_ide_interfaces+1a18/3670> Trace; c00bbfd4 <ide_revalidate_disk+228/450> Trace; c00bcaac <ide_register_hw+140/18c> Trace; c00bcb4c <ide_register+54/68>
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/
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · On 2002.08.23 10:09 Wolfgang Denk wrote:
In message <[email protected]> you
Quoted 10 lines · wrote:
Here's my Oops:
Oops: kernel access of bad area, sig: 11 NIP: C00C0A0C XER: C000037F LR: C00C0A00 SP: C1763460 REGS: c17633b0TRAP: 0300
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 40009E9A, DSISR: 00000409
TASK = c1762000[117] 'cardmgr' Last syscall: 54 last math 00000000last
Quoted 2 lines
altivec 00000000
GPR00: C00C0A00 C1763460 C1762000 00009B78 000000EC 00000000C01C838C
Quoted 1 line
C0009E9A GPR08: 00009032 40009E9A C0009E9A C01C8360 53935E95
1002205C
Quoted 1 line
00000000 100B9E90 GPR16: 100BA770 00000001 007FFF00 00000000
C17636D8
Quoted 1 line
C1C9D670 00000002 C4040000 GPR24: C4040000 0000010E 00000100
C01C84B8
Quoted 1 line
00000000 00000000 C01C83C8 000000EC Call backtrace: C00C0A00
C00C0F04
Quoted 1 line
C00C10EC C00C188C C00C221C C00BBFD4 C00BCAAC C00BCB4C C403F7A4
C403FBE0
Quoted 9 lines
Quoted 1 line
C40031BC C4004808 C403F18C C400F874 C40105B4 C00435C8 C000259C
10002BAC
Quoted 3 lines
100032C0 10004764 0FED9DBC 00000000
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/200005/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
Quoted 7 lines
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] The software required `Windows 95 or better', so I installed Linux.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
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
Quoted 39 lines · 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 inmodules/m8xx_pcmcia.cfor
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 linesinclude/asm-ppc/<board>.h: /* define IO_BASE for pcmcia */ #define _IO_BASE 0x80000000 #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/200005/msg00227.htmlHOWEVER,
5. When I boot my board with a Flash card in the PCMCIA slot, and I run:
/etc/rc.d/rc.pcmciastart
I find that ide_cs.o causes an Oops when it callside_register(). "cardctl status" and "cardctl ident" work though.
Quoted 5 lines
Can anybody suggest what I'm doing wrong?
Thanks in advance,
Alex
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/