On Sat, Mar 04, 2017 at 02:22:26PM +0100, smesgr wrote: > Hi everyone, > > I would like to have an advice on a pcmcia/pc card issue. > > short request: > > According to the Xscale developer documentation the processor is capable of > accessing PCMCIA in 16-bit. > > "nPCE2 and nPCE1 are byte select high and low for a 16-bit data bus" (6.2.3 > 16-Bit PC Card / Compact Flash Interface @ Intel PXA 255 Processor > Developer's Manual) > > "[...] that the upper half of the data bus (MD[15:8]) are used for the > transfer, and nPCE1 to indicate that the lower half of the data bus > (MD[7:0]) are used. nPCE1 and nPCE2 are asserted for 16-bit accesses." > (6.8.3 @same document) > > The wdc_pcmcia.c driver always set the capability to 32bit if > PCMCIA_IFTYPE_MEMORY is not set. > > sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_DATA32; > > I would like to add an additional switch based on the capaiblities of the > pcic (in this case pxa2x0_pcic). What would be the best data structure to > pass this flag to wdc_pcmcia?
I guess a device property would be appropriate in this case. The parent sets the property and the device query for the property. Look for "device_properties" in sys/dev/pci/ for examples. -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --