* Re: Re: PCMCIA support for 860
@ 2000-04-04 9:49 Ruedi Hofer
2000-04-04 11:54 ` Marcus Sundberg
0 siblings, 1 reply; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
2000-04-04 9:49 Re: PCMCIA support for 860 Ruedi Hofer
@ 2000-04-04 11:54 ` Marcus Sundberg
2000-04-04 23:33 ` Dan Malek
0 siblings, 1 reply; 14+ messages in thread
From: Marcus Sundberg @ 2000-04-04 11:54 UTC (permalink / raw)
To: Ruedi Hofer; +Cc: linuxppc-embedded
Ruedi Hofer <ruedi.hofer@ascom.ch> writes:
Hi,
> 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
[snip]
> Does someone have a clue on that? Is request_irq and request_8xxirq related??
Just stuff an:
EXPORT_SYMBOL(request_8xxirq);
into arch/ppc/kernel/ppc_ksyms.c and it should work.
//Marcus
--
Signature under construction, please come back later.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PCMCIA support for 860
2000-04-04 11:54 ` Marcus Sundberg
@ 2000-04-04 23:33 ` Dan Malek
0 siblings, 0 replies; 14+ messages in thread
From: Dan Malek @ 2000-04-04 23:33 UTC (permalink / raw)
To: Marcus Sundberg; +Cc: Ruedi Hofer, linuxppc-embedded
Marcus Sundberg wrote:
>
> Ruedi Hofer <ruedi.hofer@ascom.ch> writes:
> > Does someone have a clue on that? Is request_irq and request_8xxirq related??
Sort of. The MPC8xx has an internal interrupt controller. The
Linux community seems to think the world is 8259s and PCI/ISA bus.
Mapping request_irq into the 8xx interrupt controller was attempted,
but didn't provide the proper results. The request_8xxirq function
is used by all integrated device drivers (serial, Ethernet, TDM/audio,
USB, SPI, I2C, PCMCIA, general purpose I/O pins, etc.), as they know
they are using the internal interrupt controller.
In the case of boards with PCI/ISA bridges, the request_irq is also
enabled because there is a downstream 8259 controller. Not defining
this when there is no 8259 causes drivers that would attempt to use
this to fail. It is nice to know this at build time, rather than
wondering why things are crashing or not working once the system is
booted.
This also presents a challenge for PCMCIA devices. All of these drivers
(or supporting functions) want to install interrupt handlers using
request_irq, which doesn't make sense on the 8xx. I have the ATA/IDE
patch to install the interrupt handler, but other devices may also need
interrupt handler patches.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-23 9:58 Shuangjun Zhu
0 siblings, 0 replies; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-22 9:24 Shuangjun Zhu
0 siblings, 0 replies; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
@ 2000-05-19 8:35 Shuangjun Zhu
0 siblings, 0 replies; 14+ 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] 14+ 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; 14+ 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] 14+ messages in thread* Re: PCMCIA support for 860
2000-04-06 10:39 Ruedi.Hofer
@ 2000-04-06 12:23 ` Marcus Sundberg
0 siblings, 0 replies; 14+ messages in thread
From: Marcus Sundberg @ 2000-04-06 12:23 UTC (permalink / raw)
To: Ruedi.Hofer; +Cc: linuxppc-embedded
Ruedi.Hofer@ascom.ch writes:
> 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.
Try changing the PCMCIA configuration files so that it doesn't
bring the interface up automaticly.
> >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.
We have had even more problems with xirc2ps_cs.c, for some reason our
cards generate interrupts before the interface is brought up. This
diff will prevent that from causing problems:
diff -u -r1.1.1.3 xirc2ps_cs.c
--- clients/xirc2ps_cs.c 2000/03/13 14:33:04 1.1.1.3
+++ clients/xirc2ps_cs.c 2000/04/04 14:36:00
@@ -1397,9 +1397,16 @@
* is this something to worry about?
* -- on a laptop?
*/
+ static int badints = 0;
- if (!netif_device_present(dev))
- return;
+ if (!netif_device_present(dev)) {
+ if (badints < 5) {
+ badints++;
+ return;
+ }
+ } else {
+ badints = 0;
+ }
ioaddr = dev->base_addr;
if (lp->mohawk) { /* must disable the interrupt */
> 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?
Ah yes, when using serial or IDE cards the interrupt handler is
requested by drivers/char/serial.c and drivers/block/ide-probe.c
respectively, not by the PCMCIA modules.
You can either change include/asm-ppc/ide.h to use request_8xxirq(),
or you can do like we've done; change arch/ppc/kernel/ppc8xx_pic.c
so that request_irq() looks like this:
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags, const char * devname, void *dev_id)
{
#ifdef CONFIG_MBX
irq += i8259_pic.irq_offset;
#endif
return (request_8xxirq(irq, handler, irqflags, devname, dev_id));
}
//Marcus
--
Signature under construction, please come back later.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ 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; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
2000-04-05 16:21 Ruedi.Hofer
@ 2000-04-06 9:07 ` Marcus Sundberg
0 siblings, 0 replies; 14+ messages in thread
From: Marcus Sundberg @ 2000-04-06 9:07 UTC (permalink / raw)
To: Ruedi.Hofer; +Cc: linuxppc-embedded
Ruedi.Hofer@ascom.ch writes:
> Linux/PPC load:
> Uncompressing Linux...done.
> Now booting the kernel
> <crash><crash><crash><crash><crash>
Does this means that it ceashes somewhere under the boot, or that
nothing happens after uncompressing the kernel?
Did you try a make clean; make dep ?
//Marcus
--
Signature under construction, please come back later.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ 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; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
2000-04-04 11:52 Ruedi Hofer
@ 2000-04-04 13:23 ` Marcus Sundberg
0 siblings, 0 replies; 14+ messages in thread
From: Marcus Sundberg @ 2000-04-04 13:23 UTC (permalink / raw)
To: Ruedi Hofer; +Cc: linuxppc-embedded, kernel
Ruedi Hofer <ruedi.hofer@ascom.ch> writes:
> 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??
Yes, if you want to use ATA flash disks you must do that. Also note
that I haven't got the IDE code to run as modules, so you'll have to
compile it into the kernel.
> 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
The IDE support in Dan's 2.2.13 isn't uptodate.
This first diff puts it in sync with the rest of the kernel:
diff -u -r1.1 -r1.2
--- Config.in 2000/01/11 18:13:30 1.1
+++ Config.in 2000/01/11 18:21:02 1.2
@@ -21,4 +21,8 @@
bool 'RPX-Lite 823(e) LCD Frame Buffer' CONFIG_RPXLCD
+if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then
+ bool 'Configure IDE driver for ATA on PCMCIA' CONFIG_IDE_ATA_FLASH
+fi
+
endmenu
diff -u -u -r1.1 -r1.2
--- m8xx_setup.c 2000/01/11 18:13:31 1.1
+++ m8xx_setup.c 2000/01/11 18:28:29 1.2
@@ -160,7 +160,7 @@
fp = (binfo->bi_intfreq * 1000000) / 16;
freq = fp*60; /* try to make freq/1e6 an integer */
divisor = 60;
- printk("time_init: decrementer frequency = %d/%d\n", freq, divisor);
+ printk("Decrementer frequency: %d/%d\n", freq, divisor);
decrementer_count = freq / HZ / divisor;
count_period_num = divisor;
count_period_den = freq / 1000000;
@@ -300,17 +300,13 @@
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-/* Define this to make a PCMCIA ATA Flash card work.
-*/
-#define ATA_FLASH 1
-
/*
* IDE stuff.
*/
void
m8xx_ide_insw(ide_ioreg_t port, void *buf, int ns)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_IDE_ATA_FLASH
ide_insw(port, buf, ns);
#else
ide_insw(port+_IO_BASE, buf, ns);
@@ -320,7 +316,7 @@
void
m8xx_ide_outsw(ide_ioreg_t port, void *buf, int ns)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_IDE_ATA_FLASH
ide_outsw(port, buf, ns);
#else
ide_outsw(port+_IO_BASE, buf, ns);
@@ -330,7 +326,7 @@
int
m8xx_ide_default_irq(ide_ioreg_t base)
{
-#ifdef ATA_FLASH
+#ifdef CONFIG_IDE_ATA_FLASH
return PCMCIA_INTERRUPT;
#else
return 14;
@@ -362,20 +358,6 @@
{
}
-int
-m8xx_ide_request_irq(unsigned int irq,
- void (*handler)(int, void *, struct pt_regs *),
- unsigned long flags,
- const char *device,
- void *dev_id)
-{
-#ifdef ATA_FLASH
- return request_8xxirq(irq, handler, flags, device, dev_id);
-#else
- return request_irq(irq, handler, flags, device, dev_id);
-#endif
-}
-
void
m8xx_ide_fix_driveid(struct hd_driveid *id)
{
@@ -389,11 +371,11 @@
{
ide_ioreg_t port = base;
int i;
-#ifdef ATA_FLASH
+#ifdef CONFIG_IDE_ATA_FLASH
volatile pcmconf8xx_t *pcmp;
#endif
-#ifdef ATA_FLASH
+#ifdef CONFIG_IDE_ATA_FLASH
*p = 0;
*irq = 0;
@@ -406,6 +388,14 @@
base = (unsigned long) ioremap(PCMCIA_MEM_ADDR, 0x200);
+#if defined(CONFIG_ADS) || defined(CONFIG_FADS)
+ pcmp->pcmc_pbr0 = PCMCIA_MEM_ADDR;
+ pcmp->pcmc_por0 = 0xc00ff051; // 16bit access - read CIS
+ pcmp->pcmc_pgcra = 0;
+ pcmp->pcmc_pgcrb = 0;
+ pcmp->pcmc_por0 = 0xc00ff041; // mem-mapped
+#endif
+
/* 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
@@ -519,7 +509,6 @@
ppc_ide_md.release_region = m8xx_ide_release_region;
ppc_ide_md.fix_driveid = m8xx_ide_fix_driveid;
ppc_ide_md.ide_init_hwif = m8xx_ide_init_hwif_ports;
- ppc_ide_md.ide_request_irq = m8xx_ide_request_irq;
ppc_ide_md.io_base = _IO_BASE;
#endif
Note that you must say _no_ to 'Configure IDE driver for ATA on PCMCIA'
to use the pcmcia-cs package.
This second diff is required to use ATA flash disks, but may break
support for normal IDE controllers on some other bus:
diff -u -b -u -r1.7 -r1.9
--- m8xx_setup.c 2000/03/17 16:17:44 1.7
+++ m8xx_setup.c 2000/03/29 19:14:17 1.9
@@ -379,7 +379,7 @@
/* We can use an external IDE controller or wire the IDE interface to
* the internal PCMCIA controller.
*/
-void __init m8xx_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+void m8xx_ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq)
{
ide_ioreg_t port = base;
int i;
@@ -434,10 +434,23 @@
/* Just a regular IDE drive on some I/O port.
*/
+#if 1
+ if (base < MAX_HWIFS) {
+ /* Don't try to probe for IDE controllers. */
+ *p = 0;
+ *irq = 0;
+ return;
+ }
+#endif
i = 8;
while (i--)
*p++ = port++;
+#if 1
+ *p++ = base + 0x0e;
+ *p++ = base + 0x0a;
+#else
*p++ = base + 0x206;
+#endif
if (irq != NULL)
*irq = 0;
#endif
//Marcus
--
Signature under construction, please come back later.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* PCMCIA support for 860
@ 2000-04-03 7:55 Ruedi.Hofer
2000-04-03 17:01 ` Marcus Sundberg
0 siblings, 1 reply; 14+ 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] 14+ messages in thread
* Re: PCMCIA support for 860
2000-04-03 7:55 Ruedi.Hofer
@ 2000-04-03 17:01 ` Marcus Sundberg
2000-04-03 19:55 ` Dan Malek
0 siblings, 1 reply; 14+ messages in thread
From: Marcus Sundberg @ 2000-04-03 17:01 UTC (permalink / raw)
To: Ruedi.Hofer; +Cc: linuxppc-embedded
Ruedi.Hofer@ascom.ch writes:
> 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.
Hi,
diff -u -b -u -r1.3 -r1.4
--- include/asm-ppc/mpc8xx.h 2000/01/31 16:37:46 1.3
+++ include/asm-ppc/mpc8xx.h 2000/02/28 16:12:36 1.4
@@ -53,7 +53,8 @@
#define _ISA_MEM_BASE PCI_ISA_MEM_ADDR
#define PCI_DRAM_OFFSET 0x80000000
#else
-#define _IO_BASE 0
+#define _IO_BASE 0xf4000000
+#define _IO_BASE_SIZE 0x10000
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
#endif
Then just add:
#ifdef _IO_BASE_SIZE
ioremap(_IO_BASE, _IO_BASE_SIZE);
#endif
together with the other ioremap()s in arch/ppc/mm/init.c.
> > 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.
This proved to be wrong, and is not necessary.
//Marcus
--
Signature under construction, please come back later.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: PCMCIA support for 860
2000-04-03 17:01 ` Marcus Sundberg
@ 2000-04-03 19:55 ` Dan Malek
0 siblings, 0 replies; 14+ messages in thread
From: Dan Malek @ 2000-04-03 19:55 UTC (permalink / raw)
To: Marcus Sundberg; +Cc: Ruedi.Hofer, linuxppc-embedded
Marcus Sundberg wrote:
> -#define _IO_BASE 0
> +#define _IO_BASE 0xf4000000
> +#define _IO_BASE_SIZE 0x10000
> #define _ISA_MEM_BASE 0
You have to be very careful with this. These definitions won't work
on any 8xx with a PCI bridge. I get too many patches from people that
hack these around to suit their configuration and it breaks everything
else.
The correct (as best I have found :-) approach is to continue to make
IO_BASE represent the PCI/ISA space for which it is intended. Then
separately map the PCMCIA and adjust the addresses for those drivers
based upon the IO_BASE (so in/out, and so on work). You can also map
the PCMCIA into the PCI/ISA space as it has address decode priority
over the memory controller.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2000-05-23 9:58 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-04 9:49 Re: PCMCIA support for 860 Ruedi Hofer
2000-04-04 11:54 ` Marcus Sundberg
2000-04-04 23:33 ` Dan Malek
-- strict thread matches above, loose matches on Subject: below --
2000-05-23 9:58 Shuangjun Zhu
2000-05-22 9:24 Shuangjun Zhu
2000-05-19 8:35 Shuangjun Zhu
2000-04-06 10:39 Ruedi.Hofer
2000-04-06 12:23 ` Marcus Sundberg
2000-04-05 16:21 Ruedi.Hofer
2000-04-06 9:07 ` Marcus Sundberg
2000-04-04 11:52 Ruedi Hofer
2000-04-04 13:23 ` Marcus Sundberg
2000-04-03 7:55 Ruedi.Hofer
2000-04-03 17:01 ` Marcus Sundberg
2000-04-03 19:55 ` Dan Malek
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).