UDMA for Compact Flash over PC Card?

Piotras piotras at gmail.com
Thu Apr 5 18:10:18 EDT 2007

Hi Steve,

Thanks for your replay.

My device supports 250ns cycle (according to CIS). I set it up
for MMIO (PCMCIA) using the Thomas Kleffel's patch and verified
the settings of the window registers in PCMCIA bridge. The
measured throughput for reading from the CF does not exceed 2MB/s.

I verified the actual time for MMIO reads from data register
by the CPU. The average time for reading 16-bits word is about
1us (it's consistent with the throughput). When I was changing
the cycle timing, the measured time for reads changed accordingly
(~750ns + cycle time). I cannot verify what causes this ~750ns
delay. Maybe it's the propagation delay introduced by the two
bridges (CPU-PCI and PCI-PCMCIA). If it would be the case, the
DMA by PCMCIA bridge could give significant improvement.

After I send the previous email I realized that the PCMCIA bridge
datasheet is older then ATA specification that introduced UDMA.
I think that the DMA supported by the PCMCIA bridge is something
similar to single-word/multi-word DMA. The Compact Flash
Specification does not specify any of these for PCMCIA. Still some
vendors could possibly implement it...

Piotr Krysiuk

On 4/4/07, Steven Newbury <s_j_newbury at yahoo.co.uk> wrote:
> --- Piotras <piotras at gmail.com> wrote:
> > Hi all,
> >
> > I already asked about this on comp.os.linux.hardware, but didn't
> > get any responses.
> >
> > CF+ and Compact Flash Specification (rev 4.0) specifies Ultra DMA
> > as an optional protocol for PC Card:
> >    "Ultra DMA operations can take place in any of the three basic
> >    interface modes: PC Card Memory mode, PC Card I/O mode, and True
> >    IDE (the original mode to support UDMA)." (page 54)
> >
> > Has anyone tried this? What specific CF memory cards are know to
> > implement UDMA in PC Card Memory or I/O mode?
> >
> > I'm looking into experimenting with improving performance of CF
> > memory card when using a passive adapter under PowerBook G3.
> > The PC Card is bridged with TI PCI1131. In the datasheet for
> > PCI1131 I found that it "supports 16-Bit Distributed Direct Memory
> > Access (DMA) on both PC Card sockets". Also signal names match
> > the CF specification. I don't have access to the PC Card (obsolete)
> > specification so cannot check the details there. Does anyone know
> > of reasons why CF UDMA should work with this controller?
> >
> > I already experimented with using PC Card Memory mode in ide_cs
> > (reusing patch from Thomas Kleffel [1]) with Kingston CF/512-S
> > on Linux 2.6.20. This didn't give any significant performance
> > improvements. I measured that both common memory and I/O access
> > time for reading data is around 1us (or longer when wait states
> > are enabled). It's much more that what I would expect looking
> > at the PC Card timing diagrams. Is it possible that PCI-PC Card
> > bridge give such a significant latency in signal propagation?
> >
> > Also when working with the patch from Thomas Kleffel I noticed
> > that it probes ide devices in I/O mode!
> >
> The only way of getting CF devices to run in (U)DMA mode is to physically
> attach them to an IDE controller.  CF devices can electrically operate as
> either PCMCIA-like or IDE devices.  If operating as a PCMCIA device it can only
> be accessed with IO or MMIO.  If you want more performance than the 300ns cycle
> IO access time you need to use MMIO **and set the access speed to the correct
> value for that CF device**, you'll then get much higher performace (upto
> 20MB/s).  Using a variation on Thomas Kleffel's patch I've tried before, not
> completely managed to get it working, see this lists archives.  I couldn't get
> the interrupt working for some reason.
> Steve
> ___________________________________________________________
> Now you can have your favourite RSS headlines come to you with the all new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

More information about the linux-pcmcia mailing list