CompactFlash 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. README on the Compact Flash for Card Engines
  2. ============================================
  3. There are three challenges in supporting the CF interface of the Card
  4. Engines. First, every IO operation must be followed with IO to
  5. another memory region. Second, the slot is wired for one-to-one
  6. address mapping *and* it is wired for 16 bit access only. Second, the
  7. interrupt request line from the CF device isn't wired.
  8. The IOBARRIER issue is covered in README.IOBARRIER. This isn't an
  9. onerous problem. Enough said here.
  10. The addressing issue is solved in the
  11. arch/arm/mach-lh7a40x/ide-lpd7a40x.c file with some awkward
  12. work-arounds. We implement a special SELECT_DRIVE routine that is
  13. called before the IDE driver performs its own SELECT_DRIVE. Our code
  14. recognizes that the SELECT register cannot be modified without also
  15. writing a command. It send an IDLE_IMMEDIATE command on selecting a
  16. drive. The function also prevents drive select to the slave drive
  17. since there can be only one. The awkward part is that the IDE driver,
  18. even though we have a select procedure, also attempts to change the
  19. drive by writing directly the SELECT register. This attempt is
  20. explicitly blocked by the OUTB function--not pretty, but effective.
  21. The lack of interrupts is a more serious problem. Even though the CF
  22. card is fast when compared to a normal IDE device, we don't know that
  23. the CF is really flash. A user could use one of the very small hard
  24. drives being shipped with a CF interface. The IDE code includes a
  25. check for interfaces that lack an IRQ. In these cases, submitting a
  26. command to the IDE controller is followed by a call to poll for
  27. completion. If the device isn't immediately ready, it schedules a
  28. timer to poll again later.