linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PCMCIA support for 860
@ 2000-04-03  7:55 Ruedi.Hofer
  2000-04-03 17:01 ` Marcus Sundberg
  0 siblings, 1 reply; 13+ messages in thread
From: Ruedi.Hofer @ 2000-04-03  7:55 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 799 bytes --]

Hi

In the february mailing list I found the PCMCIA patch from Magnus Damm. It looks
very interesting and useful.
>From reading the 'Kernel modification' list I assume that I need some help.

Extract from Mail http://lists.linuxppc.org/listarcs/linuxppc-embedded/200002/msg00093.html:

> 1. First of all you need to ioremap 64KByte at _IO_BASE.
>    This is for the emulated ISA-bus.
>    VIRT must be PHYS and I don't know how to do that
>    from a module.

> 2. All bus operations that are 16 bit or more should be
>    big endian - no swapping. This is the same as APUS in io.h.
>    We need to figure out how this should co-exist with
>    the swapped ISA.

Did someone already integrate those enhancements into the Kernel. If yes, do you mind
sending the affected files??

Cheers, Ruedi Hofer

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Re: PCMCIA support for 860
@ 2000-04-04  9:49 Ruedi Hofer
  2000-04-04 11:54 ` Marcus Sundberg
  0 siblings, 1 reply; 13+ messages in thread
From: Ruedi Hofer @ 2000-04-04  9:49 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: erammsu, kernel


Hi

Thanx for the answers...

I patched the files mpc8xx.h and init.c as you wrote. Then I recompiled the
kernel (2.2.13, including fpu, damm, bossek patches) and restarted it.
Then I used the rc.pcmcia to set the modules up. It fails because of...

sh-2.03# ./rc.pcmcia start
Starting PCMCIA services: modules/lib/modules/2.2.13/pcmcia/pcmcia_core.o:
unresolved symbol request_8xxirq
/lib/modules/2.2.13/pcmcia/i82365.o: /lib/modules/2.2.13/pcmcia/i82365.o: No
such file or directory
/lib/modules/2.2.13/pcmcia/ds.o: unresolved symbol proc_pccard
/lib/modules/2.2.13/pcmcia/ds.o: unresolved symbol CardServices
 cardmgr.
sh-2.03# cardmgr[67]: starting, version is 3.1.10
cardmgr[67]: no pcmcia driver in /proc/devices
cardmgr[67]: exiting


I suppose that I should find the missing request in /proc/ksyms. But there
ain't nothing like this:

sh-2.03# cat /proc/ksyms | grep request
c0019478 request_module
c00e8f50 wait_for_request
c00ac2d0 make_request
c0008d6c request_irq
c000eb04 request_dma
c0016ac0 request_region
c00e5898 io_request_lock
c00acd30 end_that_request_first
c00ace3c end_that_request_last
sh-2.03# cat /proc/ksyms | grep 8xx
sh-2.03#

Does someone have a clue on that? Is request_irq and request_8xxirq related??

--
Best regards

Ruedi Hofer

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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Re: PCMCIA support for 860
@ 2000-04-04 11:52 Ruedi Hofer
  2000-04-04 13:23 ` Marcus Sundberg
  0 siblings, 1 reply; 13+ messages in thread
From: Ruedi Hofer @ 2000-04-04 11:52 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: erammsu, kernel


Hi

Well, I found out that I have to add in kernel/ksyms.c the line
EXPORT_SYMBOL(request_irq);

Now I'm able to load the different kernel modules, but

sh-2.03#
sh-2.03# insmod pcmcia_core
Linux PCMCIA Card Services 3.1.10
  kernel build: 2.2.13 #85 Tue Apr 4 10:26:49 CEST 2000
  options:  none
sh-2.03# insmod m8xx_pcmcia
m8xx_pcmcia: Version 0.03, 14-Feb-2000, Magnus Damm
m8xx_pcmcia: ADS using SLOT_A with IRQ 13.
sh-2.03# insmod ds
sh-2.03# insmod ide_cs
/lib/modules/2.2.13/pcmcia/ide_cs.o: unresolved symbol ide_unregister
/lib/modules/2.2.13/pcmcia/ide_cs.o: unresolved symbol ide_register
sh-2.03#

... I can't add the module ide_cs. For that reason, do I have to
enable 'Enhanced IDE support' in the kernel options??

If I do so, I get the following compile errors:

m8xx_setup.c: In function `m8xx_init_IRQ':
m8xx_setup.c:286: warning: implicit declaration of function `cpm_interrupt_init'
m8xx_setup.c: In function `m8xx_ide_init_hwif_ports':
m8xx_setup.c:390: warning: unused variable `port'
m8xx_setup.c: In function `m8xx_init':
m8xx_setup.c:522: structure has no member named `ide_request_irq'
make[1]: *** [m8xx_setup.o] Error 1
make[1]: Leaving directory
`/usr/src/linux-mpc8xx-2.2.13-damm-bossek-fpu-pcmcia/arch/ppc/kernel'
make: *** [_dir_arch/ppc/kernel] Error 2

Why that?

--
Best regards

Ruedi Hofer

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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: PCMCIA support for 860
@ 2000-04-05 16:21 Ruedi.Hofer
  2000-04-06  9:07 ` Marcus Sundberg
  0 siblings, 1 reply; 13+ messages in thread
From: Ruedi.Hofer @ 2000-04-05 16:21 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: erammsu, kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 908 bytes --]

Hi

Thanx for all the support. I've added now Marcus' patchfiles.
Compiling works fine now.

Unfortunately, when I enable the IDE stuff in the kernel config
(Block devices -> Enhanced IDE support)
it won't boot anymore!

Why?

Is there something else necessary in the kernel config?

(As mentioned in the patch, I've disabled
MPC8xx CPM options -> Configure IDE driver for ATA on PCMCIA....

The kernel output:

entry 0x100000, phoff 0x34, shoff 0x829fc
phnum 0x1, shnum 0x9
p_offset 0x10000, p_vaddr 0x100000, p_paddr 0x100000
p_filesz 0x530c, p_memsz 0xb1cc
Loading at 0x10c000
Starting 0x11c000
loaded at:     0011C000 001271CC
relocated to:  00100000 0010B1CC
board data at: 01FF0000 01FF001C
relocated to:  0010C100 0010C11C
zimage at:     00122000 0018E9C0
avail ram:     0018F000 02000000

Linux/PPC load:
Uncompressing Linux...done.
Now booting the kernel
<crash><crash><crash><crash><crash>

Ruedi


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: PCMCIA support for 860
@ 2000-04-06 10:39 Ruedi.Hofer
  2000-04-06 12:23 ` Marcus Sundberg
  0 siblings, 1 reply; 13+ messages in thread
From: Ruedi.Hofer @ 2000-04-06 10:39 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: erammsu, kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1611 bytes --]

Hi

Kernel boot problem:
Obviousely the kernel was too large. When reduce its size and put some
extensions into modules, it starts up fine.

But there are 2 other problems:

Ethernet Card:

- When I insert a Xircom Ethernet card, it is detected and the modules are loaded.
But somehow it affects the NFS connection in such a bad way, that it looses connection
to the server. Everything gets very slow. When I plug the pc card out, NFS works fine again.

>sh-2.03# cardmgr[30]: initializing socket 0
>cardmgr[30]: socket 0: Xircom CE3-10/100 Fast Ethernet
>cardmgr[30]: executing: 'insmod /lib/modules/2.2.13/pcmcia/xirc2ps_cs.o'
>xirc2ps_cs.c 1.31 1998/12/09 19:32:55 (dd9jn+kvh)
>eth1: Xircom: port 0x300, irq 9, hwaddr 00:80:C7:86:E4:DF
>cardmgr[30]: executing: './network start eth1'
>sh-2.03# eth1: media 10BaseT, silicon revision 7
>sh-2.03# cardmgr[30]: + SIOCADDRT: File exists
>sh-2.03# lsmod
>nfs: server 10.1.20.2 not responding, still trying
>nfs: task 1574 can't get a request slot

I guess that too many interrupts knock the system out.

ATA Flash card:

- Even worse with the flash card: The system crashes!

>sh-2.03# cardmgr[42]: initializing socket 0
>cardmgr[42]: socket 0: ATA/IDE Fixed Disk
>cardmgr[42]: executing: 'insmod /lib/modules/2.2.13/pcmcia/ide_cs.o'
>hda: SunDisk SDP3B-40, ATA DISK drive
>Kernel panic: request_irq
>Rebooting in 180 seconds..

- Is the request_irq related to the loaded module or to the IDE stuff in the kernel?
  ('Configure IDE for ATA on PCMCIA' is switched off!)
- Is it right that every occurence of request_irq has to replaced with request_8xxirq?

Ruedi


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-19  8:35 Shuangjun Zhu
  0 siblings, 0 replies; 13+ messages in thread
From: Shuangjun Zhu @ 2000-05-19  8:35 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,



I recompiled the kernel (2.2.13, including fpu, damm, bossek patches) and
restarted it.
Then I used the rc.pcmcia to set the modules up. It fails because of...

I found that system acess the illegal address 0x80000000,
in macro SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()

--------------------------------------------------------------------------
bash# ./rc.pcmcia start
Starting PCMCIA services: modulesLinux PCMCIA Card Services 3.1.10
  kernel build: 2.2.13 #496 Fri May 19 11:14:29 CST 2000
  options:  none
m8xx_pcmcia: Version 0.03, 14-Feb-2000, Magnus Damm
m8xx_pcmcia: FADS using SLOT_B with IRQ 13.
 cardmgr.
H<30>Jan  1 00:35:21 cardmgr[131]: starting, version is 3.1.10
bash# A<30>Jan  1 00:35:22 cardmgr[131]: watching 1 sockets
A<30>Jan  1 00:35:22 cardmgr[131]: initializing socket 0
I<30>Jan  1 00:35:22 cardmgr[131]: socket 0: ATA/IDE Fixed Disk
a<30>Jan  1 00:35:22 cardmgr[131]: executing: 'insmod
/lib/modules/2.2.13/pcmci'
probing for hda: present=0, media=32, probetype=ATA


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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-22  9:24 Shuangjun Zhu
  0 siblings, 0 replies; 13+ messages in thread
From: Shuangjun Zhu @ 2000-05-22  9:24 UTC (permalink / raw)
  To: linuxppc-embedded


In arch/ppc/mm/init.c, I have iorempa(_IO_BASE,_IO_BASE_SIZE),
which _IO_BASE = 0x80000000,

in macro SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()
OUT_BYTE((drive)->select.all, hwif->io_ports[IDE_SELECT_OFFSET])
equal to OUT_BYTE((drive)->select.all, 0x80000000),
then system illegal access, so what's wrong?

Thanks in advanced!

>
>Hi,
>
>
>
>I recompiled the kernel (2.2.13, including fpu, damm, bossek patches) and
>restarted it.
>Then I used the rc.pcmcia to set the modules up. It fails because of...
>
>I found that system acess the illegal address 0x80000000,
>in macro SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()
>
>--------------------------------------------------------------------------
>bash# ./rc.pcmcia start
>Starting PCMCIA services: modulesLinux PCMCIA Card Services 3.1.10
>  kernel build: 2.2.13 #496 Fri May 19 11:14:29 CST 2000
>  options:  none
>m8xx_pcmcia: Version 0.03, 14-Feb-2000, Magnus Damm
>m8xx_pcmcia: FADS using SLOT_B with IRQ 13.
> cardmgr.
>H<30>Jan  1 00:35:21 cardmgr[131]: starting, version is 3.1.10
>bash# A<30>Jan  1 00:35:22 cardmgr[131]: watching 1 sockets
>A<30>Jan  1 00:35:22 cardmgr[131]: initializing socket 0
>I<30>Jan  1 00:35:22 cardmgr[131]: socket 0: ATA/IDE Fixed Disk
>a<30>Jan  1 00:35:22 cardmgr[131]: executing: 'insmod
>/lib/modules/2.2.13/pcmci'
>probing for hda: present=0, media=32, probetype=ATA
>
>
>
>


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

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-23  9:58 Shuangjun Zhu
  0 siblings, 0 replies; 13+ messages in thread
From: Shuangjun Zhu @ 2000-05-23  9:58 UTC (permalink / raw)
  To: linuxppc-embedded


In arch/ppc/kernel/m8xx_setup.c:m8xx_ide_init_hwif_ports()
==============================================================
 base = (unsigned long) ioremap(PCMCIA_MEM_ADDR, 0x200);

 /* For the M-Systems ATA card, the first 8 registers map 1:1.
  * The following register, control/Altstatus, is located at 0x0e.
  * Following that, the irq offset, is not used, so we place it in
  * an unused location, 0x0a.
  */
 *p++ = base + 8;
=================================================================
This code means that ide_ioreg_t save the value as VMA, such 0xCxxxxxxx,
but in include/asm/io.h, it defined

#define outb(val, port)  out_8((unsigned char *)((port)+_IO_BASE), (val))

it uses the port as register offset, such as 0x10.

So, code access illegal address in macro
 SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()



>
>In arch/ppc/mm/init.c, I have iorempa(_IO_BASE,_IO_BASE_SIZE),
>which _IO_BASE = 0x80000000,
>
>in macro SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()
>OUT_BYTE((drive)->select.all, hwif->io_ports[IDE_SELECT_OFFSET])
>equal to OUT_BYTE((drive)->select.all, 0x80000000),
>then system illegal access, so what's wrong?
>
>Thanks in advanced!
>
>>
>>Hi,
>>
>>
>>
>>I recompiled the kernel (2.2.13, including fpu, damm, bossek patches) and
>>restarted it.
>>Then I used the rc.pcmcia to set the modules up. It fails because of...
>>
>>I found that system acess the illegal address 0x80000000,
>>in macro SELECT_DRIVE in drivers/block/ide-probe.c: do_probe()
>>
>>--------------------------------------------------------------------------
>>bash# ./rc.pcmcia start
>>Starting PCMCIA services: modulesLinux PCMCIA Card Services 3.1.10
>>  kernel build: 2.2.13 #496 Fri May 19 11:14:29 CST 2000
>>  options:  none
>>m8xx_pcmcia: Version 0.03, 14-Feb-2000, Magnus Damm
>>m8xx_pcmcia: FADS using SLOT_B with IRQ 13.
>> cardmgr.
>>H<30>Jan  1 00:35:21 cardmgr[131]: starting, version is 3.1.10
>>bash# A<30>Jan  1 00:35:22 cardmgr[131]: watching 1 sockets
>>A<30>Jan  1 00:35:22 cardmgr[131]: initializing socket 0
>>I<30>Jan  1 00:35:22 cardmgr[131]: socket 0: ATA/IDE Fixed Disk
>>a<30>Jan  1 00:35:22 cardmgr[131]: executing: 'insmod
>>/lib/modules/2.2.13/pcmci'
>>probing for hda: present=0, media=32, probetype=ATA
>>
>>
>>
>>
>
>
>
>


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

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

end of thread, other threads:[~2000-05-23  9:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-03  7:55 PCMCIA support for 860 Ruedi.Hofer
2000-04-03 17:01 ` Marcus Sundberg
2000-04-03 19:55   ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2000-04-04  9:49 Ruedi Hofer
2000-04-04 11:54 ` Marcus Sundberg
2000-04-04 23:33   ` Dan Malek
2000-04-04 11:52 Ruedi Hofer
2000-04-04 13:23 ` Marcus Sundberg
2000-04-05 16:21 Ruedi.Hofer
2000-04-06  9:07 ` Marcus Sundberg
2000-04-06 10:39 Ruedi.Hofer
2000-04-06 12:23 ` Marcus Sundberg
2000-05-19  8:35 Shuangjun Zhu
2000-05-22  9:24 Shuangjun Zhu
2000-05-23  9:58 Shuangjun Zhu

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).