CompactFlash cards in TrueIDE mode


CompactFlash cards in TrueIDE mode -- Using CompactFlash cards in TrueIDE mode on the IXP4xx expansion bus


The IXP4xx processor HAL includes support for CompactFlash IDE devices accessed in True IDE mode directly on the IXP4xx expansion bus.

The hardware configuration for attaching the CF IDE devices must follow the specification described in Intel Application Note 30245603: Intel IXP42X Product Line of Network Processors and IXC1100 Control Plane Processor: Using CompactFlash. This describes use of the EXP_CS_N_1 (CS1) and EXP_CS_N_2 (CS2) signals to control the CF IDE device.


Support for CF True IDE devices is contained within the IXP4xx variant HAL and is controlled with the CYGFUN_HAL_IXP4XX_CF_TRUE_IDE_SUPPORT configuration option. It is not possible to include PCI IDE support within the same configuration - eCos only allows one ID controller driver at the present time.

The driver requires the presence of the generic disk layer (CYGPKG_IO_DISK), as well as the IDE disk driver (CYGPKG_DEVS_DISK_IDE).

The block device name used to identify the disk is configured with the option CYGDAT_HAL_IXP4XX_CF_TRUE_IDE_DISK_NAME and defaults to /dev/hd0/. An MBR is expected to be present on the CF card, and individual partitions can be accessed as e.g. /dev/hd0/1, /dev/hd0/2, etc. or the whole device as /dev/hd0/0.

With this support it is possible to access filesystems on the CF IDE card with the further inclusion of the generic file I/O layer package (CYGPKG_IO_FILEIO) along with a standard eCos filesystem implementation such as FAT (CYGPKG_FS_FAT).

Use from RedBoot

Similarly, it is possible for RedBoot to load images from a filesystem using the "file" load method. For example:

RedBoot> fs mount -d /dev/hd0/1 -t fatfs
RedBoot> fs list
   2 -rwxrwxrwx  1 size 3961588 VMLINUX
1937 -rwxrwxrwx  1 size 1588984 ZIMAGE
RedBoot> load -m file -r -b %{freememlo} /ZIMAGE
Raw file loaded 0x00079800-0x001fd6f7, assumed entry at 0x00079800
RedBoot> exec
Using base address 0x00079800 and length 0x00183ef8
Uncompressing Linux......................................................................................................... done, booting the kernel.
Linux version 2.6.12 (root@andy) (gcc version 3.4.4) #43 Tue Nov 15 16:40:04 GMT 2005
CPU: XScale-IXP42x Family [690541c1] revision 1 (ARMv5TE)
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Machine: Intel IXDP425 Development Platform

Implementation details

The implementation assumes that the platform HAL will map memory accesses at 0x51000000 to expansion bus accesses with CS1 enabled, and similarly 0x52000000 to expansion bus accesses with CS2 enabled.

This driver operates in polled mode (PIO) only with no interrupt-driven operation nor DMA, and uses conservative bus configuration timings to allow for maximum compatibility with CF IDE cards. Note that some CF cards are not fully compliant with the CompactFlash standard and do not fully or correctly implement True IDE mode.

Documentation license for this page: eCosPro License