Tuple and base-address question

Matthias Wenzel linux-pcmcia at mazzoo.de
Thu Nov 9 07:15:19 EST 2006


Hi,

as a pcmcia-newbie I try to write a driver for a DECT-basestation.
It is based on an ISA-bus-design, and interfaced to PCMCIA through a
National Semiconductor PCM16C010 [0].

So far the driver only dumps what is in the tuples. Following tuples are
used:
         *  0x01 - CISTPL_DEVICE
         *  0x14 - CISTPL_NO_LINK
         *  0x15 - CISTPL_VERS_1
         *  0x1a - CISTPL_CONFIG
         *  0x1b - CISTPL_CFTABLE_ENTRY
         *  0x21 - CISTPL_FUNCID

Tuple contents, see [1]
I am trying to read more tuples with pcmcia_get_next_tuple() but
seemingly there's only one tuple for each entry, and I believe I dump
everything(?).

How do I derive a memory baseaddress from the values in [1]. Does
cftable_entry[0].mem.win[*] make any sense? Two areas of 0x1000 _both_
starting at 0x0000... but the datasheet [0] has two areas 0x0000-0x0800
and 0x1000-0x1060.

How would I calculate a 32-(or 64-)bit address for accessing that mem?
Or should I plainly use config.base (0x1020) as 32 bit base address
(0x00001020)?

thanks for any help,

Matthias


[0] http://eshop.engineering.uiowa.edu/NI/pdfs/01/21/DS012147.pdf
[1]
com_on_air_cs: card in slot        pcmcia0.0
com_on_air_cs: prod_id[0]          DECTDataDevice
com_on_air_cs: prod_id[1]          PCMCIA
com_on_air_cs: device.ndev         0x1
com_on_air_cs: device.dev[0].type  0x0d
com_on_air_cs: device.dev[0].wp    0x00
com_on_air_cs: device.dev[0].speed 0x01f4
com_on_air_cs: device.dev[0].size  0x0400
com_on_air_cs: version_1.major     0x4
com_on_air_cs: version_1.minor     0x1
com_on_air_cs: version_1.ns        0x2
com_on_air_cs: version_1.ofs[0]    0x0
com_on_air_cs: version_1.ofs[1]    0xf
com_on_air_cs: version_1.ofs[2]    0x0
com_on_air_cs: version_1.ofs[3]    0xe3
com_on_air_cs: version_1.str       DECTDataDevice
com_on_air_cs: config.last_idx     0x5
com_on_air_cs: config.base         0x1020
com_on_air_cs: config.rmask[0]     0x1
com_on_air_cs: config.rmask[1]     0x0
com_on_air_cs: config.rmask[2]     0x0
com_on_air_cs: config.rmask[3]     0x0
com_on_air_cs: config.subtuples    0x0
com_on_air_cs: cftable_entry[0].index        0x5
com_on_air_cs: cftable_entry[0].flags        0x19
com_on_air_cs: cftable_entry[0].interface    0x1
com_on_air_cs: cftable_entry[0].vcc.present  0x37
com_on_air_cs: cftable_entry[0].vpp1.present 0x0
com_on_air_cs: cftable_entry[0].vpp2.present 0x0
com_on_air_cs: cftable_entry[0].timing.wait  0x2710
com_on_air_cs: cftable_entry[0].timing.ready 0x989680
com_on_air_cs: cftable_entry[0].io.flags     0x4
com_on_air_cs: cftable_entry[0].io.nwin      0x0
com_on_air_cs: cftable_entry[0].irq.IRQInfo1 0x70
com_on_air_cs: cftable_entry[0].irq.IRQInfo2 0xffff
com_on_air_cs: cftable_entry[0].mem.flags    0xc9
com_on_air_cs: cftable_entry[0].mem.nwin     0x2
com_on_air_cs: cftable_entry[0].mem.win[0].len       0x1000
com_on_air_cs: cftable_entry[0].mem.win[0].card_addr 0x0
com_on_air_cs: cftable_entry[0].mem.win[0].host_addr 0x0
com_on_air_cs: cftable_entry[0].mem.win[1].len       0x1000
com_on_air_cs: cftable_entry[0].mem.win[1].card_addr 0x0
com_on_air_cs: cftable_entry[0].mem.win[1].host_addr 0x0
com_on_air_cs: cftable_entry done after 1 tuples
com_on_air_cs: funcid.func         0xfe
com_on_air_cs: funcid.sysinit      0x0



More information about the linux-pcmcia mailing list