port custom custom PCMCIA adapter on ARM920T

Ports
Evan
2005-01-11
2013-04-08
  • Evan

    Evan - 2005-01-11

    Hi.
    I try to port a custom PCMCIA chip on samsung s3c2410 (ARM 920T).
    Kernel: 2.4.18-rmk7-pxa1
    pcmcia:3.1.22

    my custom chip is CF spec 1.4.and suppot only one memory window and one I/O window.
    I connect it on memory bus(bank 5).
    start address:0x2800_0000 (physical)
    0xd300_0000(virtual)
    memory window:0x2800_8000-0x2800_8fff(physical)
    I/O window:0x2800_9000-0x2800_9fff(physical)

    In socket driver:
    A1)How do I implement SS_SetIOMap
    how to setting pccard_io_map.start and stop?
    it just a short variable...

    A2)How do I implement SS_SetMemMap
    for attribute window
    pccard_mem_map.sys_start = 0x28008000
    pccard_mem_map.sys_stop = 0x280087ff
    for common memory window
    pccard_mem_map.sys_start = 0x28008800
    pccard_mem_map.sys_stop = 0x28008fff

    In /etc/pcmcia/config.opt
    B1)how to setting port & memory?

    I can get CIS data properly, but cardmgr return...

    cardmgr[63]: initializing socket 0
    cardmgr[63]: socket 0: NE2000 Compatible Ethernet
    cardmgr[63]: executing: 'modprobe 8390'
    cardmgr[63]: +Using /lib/modules/2.4.18-rmk7-pxa1/kernel/driver/net/8390.o
    cardmgr[63]: executing: 'modprobe pcnet_cs'
    cardmgr[63]: +Using /lib/modules/2.4.18-rmk7-pxa1/pcmcia/pcnet_cs.o
    driver=c02feaa0
    driver->atach = c48a00e4
    pcnet_cs: RequestIO: No more items
    DS: start get_dev_info
    cardmgr[63] : get dev info on socket 0 failed: No such device.
    =================================
    the system can know it is a NE2000 nic card.but cardmgr can't know what it is.....I can use cardctl
    get information properly like on the laptop.
    any suggestion?
    Thanks very much...

     
    • David Hinds

      David Hinds - 2005-01-18

      Since you've only got one memory and one IO window, you should make these big enough to cover the entire PCMCIA memory and IO address spaces (or at least, say, 1 MB of memory and 1024 IO ports).  And then use the SS_CAP_STATIC_MAP facility.  There are a whole bunch of ARM socket drivers in recent kernels that use this, that you can use as examples.

      - Dave

       

Log in to post a comment.