MPC860FADS port, HowTo?

Ports
2001-06-20
2002-05-28
  • Michael Habermann

    I tried to compile the pcmcia-cs version 3.1.26
    for a FADS board and an MPC855T CPU.
    The kernel I use is 2.4.4 from ftp.denx.de

    The port seems to miss a lot of defines in the kernel source. Which kernel does the port expect to be compiled for? Or better how to compile it?

     
    • Matthew Locke

      Matthew Locke - 2001-06-20

      The kernel guys don't want the defines in kernel headers, so I think I will move into m8xx_pcmcia.c.  there is a patch to 2.2.14 at ftp.mvista.com/pub/Area51/ppc_8xx you can grab the defines from there.  You also need to set _IO_BASE properly before any of the client modules will work.  If that doesn't help,  post the actual error messages you are seeing.

       
      • Michael Habermann

        I've adapted pcmcia-cs 3.1.26 to kernel 2.4.4 now.

        'cardctl' detects my card properly, but the client driver doesn't load. Do you know which value I have to use for _IO_BASE for a FADS? The current is 0.

        The output of the init.d script is:
        cardmgr[33]: executing: 'insmod /lib/modules/2.4.4/pcmcia/wvlan_cs.o'
        wvlan_cs: WaveLAN/IEEE PCMCIA driver v1.0.6
        wvlan_cs: (c) Andreas Neuhaus <andy@fasta.fh-dortmund.de>
        wvlan_cs: index 0x01: Vcc 5.0, irq 9, io 0x0100-0x013f
        wvlan_cs: Registered netdevice eth1
        Oops: kernel access of bad area, sig: 11
        NIP: C1040AB4 XER: 20000040 LR: C10413F0 SP: C0905990 REGS: c09058e0 TRAP: 0300
        MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
        DAR: 00000100, DSISR: 00013120
        TASK = c0904000[33] 'cardmgr' Last syscall: 54
        last math 00000000 last altivec 00000000
        GPR00: 00020000 C0905990 C0904000 00000005 0000000F C091D404 C0120000 00000024
        GPR08: C091D438 00000100 C1040554 00020000 84422024 100231F8 00BD8000 00000000
        GPR16: 00000001 007FFEC0 0000001D 00000000 00009032 00905E80 00000000 C1040000
        GPR24: C0002400 10030B58 C01DE88C C01BD400 C01DEC9C 00000001 00000000 C091D438
        Call backtrace:
        00000000 C1040564 C103C1C0 C103FDF4 C10021EC C100387C C103FCF8
        C100E894 C100F614 C00431F4 C000245C 100033F0 10003E20 10005B54
        0FEDE068 00000000
        Segmentation fault

         
        • Matthew Locke

          Matthew Locke - 2001-06-29

          I set _IO_BASE to 0x80000000 for the Embedded Planet boards without PCI.  You need to find the memory window which doesn't conflict with anything else.  If the FADS does not have PCI, 0x80000000 might work for you.

           
          • Michael Habermann

            Do I understand it right? The _IO_BASE can be any area, as long as the area is not occupied by some other ressources. _IO_BASE doesn't depend on the board.

            The FADS doesn't have PCI, but setting _IO_BASE to 0x80000000 didn't help.

            Here's the output in /var/log/messages (sorry, it's a lot):

            Dec 19 23:49:40 192 daemon.debug klogd: -> wvlan_event(card insertion, 0, 0xc086f2ac)
            Dec 19 23:49:40 192 daemon.debug klogd: -> wvlan_config(0xc086f170)
            Dec 19 23:49:40 192 daemon.debug klogd: _IO_BASE=0x80000000
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(GetFirstTuple, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(GetTupleData, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: read_cis_mem(1, 0xa2, 7)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 8, 0xc01b6870)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Socket 0: Mapped memory window 0 at 0xe0000000, OR = 0xb8013411.
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: cs:  0x03 0x01 0xe0 0x03 ...
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(ParseTuple, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(GetConfigurationInfo, 0xc086f270, 0xc08f1828)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(GetFirstTuple, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(GetTupleData, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: read_cis_mem(1, 0xab, 16)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 8, 0xc01b6870)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Socket 0: Mapped memory window 0 at 0xe0000000, OR = 0xb8013411.
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: cs:  0xc1 0x01 0x19 0x77 ...
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(ParseTuple, 0xc086f270, 0xc08f1638)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(RequestIO, 0xc086f270, 0xc086f1a0)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(RequestIRQ, 0xc086f270, 0xc086f1b4)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: CardServices(RequestConfiguration, 0xc086f270, 0xc086f1cc)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 4, 0xc01b680c)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetSocket(0, flags 0x200, Vcc 50, Vpp 0, io_irq 0, csc_mask 0x80)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 4, 0xc01b680c)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetSocket(0, flags 0x220, Vcc 50, Vpp 0, io_irq 9, csc_mask 0x80)
            Dec 19 23:49:40 192 daemon.debug klogd: cs: write_cis_mem(1, 0x1f0, 1)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 8, 0xc01b6870)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Socket 0: Mapped memory window 0 at 0xe0000000, OR = 0xb8013411.
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetMemMap(0, 0, 0x21, 300 ns, 0xe0000000-0xe0000000, 0x00000)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Service(0, 6, 0xc08f15e0)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: SetIOMap(0, 0, 0x03, 0 ns, 0x0100-0x013f)
            Dec 19 23:49:40 192 daemon.debug klogd: m8xx_pcmcia: Socket 0: Mapped io window 0 at 0x80000100, OR = 0x280133d9.
            Dec 19 23:49:40 192 daemon.info klogd: wvlan_cs: index 0x01: Vcc 5.0, irq 9, io 0x0100-0x013f
            Dec 19 23:49:40 192 daemon.info klogd: wvlan_cs: Registered netdevice eth1
            Dec 19 23:49:40 192 daemon.info klogd: mh1
            Dec 19 23:49:40 192 daemon.info klogd: mh2
            Dec 19 23:49:40 192 daemon.info klogd: mh3
            Dec 19 23:49:40 192 daemon.info klogd:  wvlan_config()
            Dec 19 23:49:40 192 daemon.info klogd: mh4
            Dec 19 23:49:41 192 daemon.debug klogd: -> wvlan_hw_config(eth1)
            Dec 19 23:49:41 192 daemon.warn klogd: Oops: kernel access of bad area, sig: 11
            Dec 19 23:49:41 192 daemon.warn klogd: NIP: C10431E8 XER: 20000051 LR: C1043B64 SP: C08F1980 REGS: c08f18d0 TRAP: 0300
            Dec 19 23:49:41 192 daemon.warn klogd: MSR: 00001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
            Dec 19 23:49:41 192 daemon.warn klogd: DAR: 80000100, DSISR: 00013120
            Dec 19 23:49:41 192 daemon.warn klogd: TASK = c08f0000[35] 'cardmgr' Last syscall: 54
            Dec 19 23:49:41 192 daemon.warn klogd: last math 00000000 last altivec 00000000
            Dec 19 23:49:41 192 daemon.warn klogd: GPR00: 00020000 C08F1980 C08F0000 00000005 0000000F 00000001 C0120000 C0120000
            Dec 19 23:49:41 192 daemon.warn klogd: GPR08: C0916038 80000100 C1042C60 00020000 84422024 100231F8 00BD8000 00000000
            Dec 19 23:49:41 192 daemon.warn klogd: GPR16: 00000001 007FFEC0 0000001F 00000000 00009032 008F1E80 00000000 C00026D8
            Dec 19 23:49:41 192 daemon.warn klogd: GPR24: C1040000 C0916038 C086F19C 00000000 C01BD400 00000001 00000000 C0916038
            Dec 19 23:49:41 192 daemon.warn klogd: Call backtrace:
            Dec 19 23:49:41 192 daemon.warn klogd: 1003DBC C1042244
            Dec 19 23:49:41 192 daemon.warn klogd: C100F938 C101085C C00431F4 C000245C 100033F0 10003E20 10005B54
            Dec 19 23:49:41 192 daemon.warn klogd: 0FEDE068 00000000

             
        • jacky wang

          jacky wang - 2002-05-16

          Hi Micheal,

          would you mind tell me which packages you using for the porting job?

          BTW, Would you mind share the mini-package about your initialization file system?

          Cause it is a headache issue for me to work with pcmcia and linux kernel.

          Jacky

           
          • Michael Habermann

            I've used pcmcia-cs-3.1.26 and the linux-2.4.4 kernel from www.denx.de.

            pcmcia-cs needs to be adapted, because a lot of defines are missing. I mainly included the config_FADS860T.h from ppcboot into the sources. This produces a lot of warnings, but it works.

            For the 850, you additionally need to search for references to the PCMCIA slot A and change it to slot B.

             
    • Michael Habermann

      O.k, I've go it. Inserting the following in
      linux/arch/ppc/mm/init.c solved the problem.

      ioremap(_IO_BASE,_IO_BASE_SIZE);

       
    • Eung-Shik Kim

      Eung-Shik Kim - 2001-10-29

      I use pcmcia-cs-3.1.29 and kernel hardhatlinux 2.0 Journeyman edition for embedded-planet RPXLite.

      I've insert ioremap in arch/ppc/mm/init.c
      and I found _IO_BASE(0x80000000) in rpxlite.h.

      However I still got the OOPS messages exactly as Michael's dmesg...

      I completely lost...help

       
    • Nguyen Trung Thanh

      I hope that I could help you,
      but I did it quite a long time ago.

      Pls check file: wireless/wvlan_cs.c
      Find these line:
              // Feed the netdevice with this info
              dev->irq = link->irq.AssignedIRQ;
              dev->base_addr = link->io.BasePort1;
              netif_start_queue(dev);
      And hack like this:
              // Feed the netdevice with this info
              dev->irq = link->irq.AssignedIRQ;
              //dev->base_addr = link->io.BasePort1;
              dev->base_addr = link->io.BasePort1 + (unsigned int)0x80000000L; //jari       
              netif_start_queue(dev);

      ;-) just do it, and don't ask why.
      Jari Nguyen Trung Thanh

       
      • Eung-Shik Kim

        Eung-Shik Kim - 2001-10-29

        Thank for help but I've still got these:

        Machine check in kernel mode.
        Caused by (from SRR1=9032): Unknown values in msr
        Oops: machine check, sig: 7
        NIP: C2A4D090 XER: E000627F LR: C2A4B5A4 SP: C0131A50 REGS: c01319a0 TRAP: 0200
        MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
        TASK = c0130010[0] 'swapper' Last syscall: 120
        last math 00000000 last altivec 00000000
        GPR00: 0000C800 C0131A50 C0130010 C0E0FC38 00001032 00000001 C0150000 00000000
        GPR08: C0150000 80000128 00000001 00000100 55003034 1001F3E0 00FFB800 007FFF0D
        GPR16: 00000000 00000001 007FFEC0 007FFF00 00001032 C0130000 C0E0FC38 00000006
        GPR24: C0140060 C01321A0 C0170000 C2A50000 C2A50000 C0E0FC00 00000800 C0E0FC38
        Call backtrace:
        C0131B20 C2A4B5A4 C0003904 C0003A30 C0002810 C0174A08 C00AFBFC
        C00AFDDC C2A4ACEC C00B8B1C C00B23E4 C00B6ED8 C00C2178 C00B845C
        C00C2078 C00BF450 C00B845C C00BF324 C00BE2FC C00B845C C00BDEF4
        C00B2BAC C0014C54 C000285C C0003F84 C0003F98 C01417D8 C00021E4
        Kernel panic: Aiee, killing interrupt handler
        In interrupt handler - not syncing

        Have ever seen these messages?
        I've just ping through wavelan.

        So I followed call back trace with ksymoops.
        'ksymoops' read followings:

        >>NIP; c2a4d08c <[wvlan_cs]hcf_service_nic+48/1e8>   <=====
        Trace; c0131c10 <init_task_union+1c00/2000>
        Trace; c2a4b5a4 <[wvlan_cs]wvlan_interrupt+11c/420>
        Trace; c0003904 <ppc_irq_dispatch_handler+1a4/250>
        Trace; c0003a30 <do_IRQ+80/c8>
        Trace; c0002810 <ret_from_intercept+0/8>
        Trace; c000fb28 <printk+84/264>
        Trace; c2a4ad08 <[wvlan_cs]wvlan_tx+328/35c>
        Trace; c00b8b1c <qdisc_restart+74/158>
        Trace; c00b23e4 <dev_queue_xmit+60/1c8>
        Trace; c00dcba0 <arp_send+1dc/224>
        Trace; c00dce78 <arp_rcv+268/4ac>
        Trace; c00b2bac <net_rx_action+204/378>
        Trace; c0014c54 <do_softirq+a0/f4>
        Trace; c000285c <do_bottom_half_ret+0/34>
        Trace; c0003f84 <idled+c4/c8>
        Trace; c0003f98 <cpu_idle+10/24>
        Trace; c01417d8 <start_kernel+1a4/1b8>
        Trace; c00021e4 <start_here+64/c4>

         
        • Nguyen Trung Thanh

          Did you just ping?
          Did it mean that you could make wireless lan card work?

          I have no idea for that bunch of debug messages, if you can, pls explain what you're doing now?
          Jari Nguyen Trung Thanh

           
          • Eung-Shik Kim

            Eung-Shik Kim - 2001-10-29

            I've compiled pcmcia-cs  and insert it into RPXLite target board. Seems almost everything work fine well, unless using that modules.

            After reboot target with wvlan, I kept alive unless using network such as ping, ftp, telnet...etc

            I think there's some problem in m8xx_pcmcia modules, target was hanged on pcmcia even when I test with 3c589 pccard. Difference between wvlan and 3c589, there is no OOPS messages and just hang on system till eject the pccard.

             
            • Nguyen Trung Thanh

              Hi,

              I no longer work with pcmcia and RPXLite, because I had moved to my custom board, quite a long time ago.

              Last time, I figured out that the design of RPXlite is not good for PCMCIA.
              It does not seperate 4 signals IOR, IOW.. when the chipselect signal is inactive.
              Some pcmcia card will be confused when it receive those signals without active chipselect.
              Nokia cardphone is one of those. I don't know about your pcmcia card.

              But you could see that the pcmcia code is quite good, because I could make it work with several wireless lan cards.
              BTW, I just want to thank David Hinds, and others in PCMCIA devel.

              Best regards,
              Jari Nguyen Trung Thanh

               
              • Matthew Locke

                Matthew Locke - 2001-10-29

                I have not successfully used a wvlan card on the rpx-lite. When using PCMCIA on the EP 8xx boards, you need to have SYPCR set to the disable value in the bootrom.

                 
                • Eung-Shik Kim

                  Eung-Shik Kim - 2001-10-30

                  Thanks for you brief and accurate help, Matthew !!!
                  The kernel panic problem is complete solved.

                   

Log in to post a comment.