Download O`reilly Building Embedded Linux Systems

Transcript
Unlike ISA, PCI requires software support to enable it to be used by device drivers. The first
part of this support is required to initialize and configure the PCI devices upon bootup. On PC
systems, this is traditionally done by the BIOS. However, the kernel is capable of carrying out
this task itself. If the BIOS has carried out the initialization, the kernel will browse the BIOS's
table to retrieve the PCI information. In both cases, the kernel provides device drivers with an
API to access information regarding the devices on the PCI bus and act on these devices.
There are also a number of user tools for manipulating PCI devices. In short, the level of
support for PCI in Linux is fairly complete and mature.
The Linux Device Drivers book mentioned above provides very good insight about PCI
development in Linux and how the PCI bus operates in general. The PCI System Architecture
book by Shanely and Anderson (Addison Wesley) gives in-depth information on the PCI bus
for software developers. Of course, you can always get the official PCI specification from the
PCI-SIG. Official specifications, however, tend to make for very dry reading material. Finally,
there is the Linux PCI-HOWTO, available from the Linux Documentation Project (LDP) at http://
www.tldp.org/, which discusses the caveats of using certain PCI devices with Linux and the
support provided to PCI devices by Linux in general.
3.2.3 PCMCIA
Personal Computer Memory Card International Association (PCMCIA) is both the common
name of a bus and the name of the organization that promotes and maintains related
standards. Since the publication of the initial standard, which supported only 16-bit cards, other
standards have been published, including the 32-bit CardBus and the USB CardBay
specifications. When part of an embedded system, PCMCIA renders it flexible and easy to
extend. On the iPAQ, for instance, it enables users to connect to a LAN using a wireless
networking card. In other systems, it makes large permanent storage space available through
the use of CompactFlash cards.
The extent of Linux support for PCMCIA can be confusing. First and foremost, there is the
main Linux PCMCIA project, which is hosted on SourceForge at http://pcmcia-cs.sourceforge.
net/ and is maintained by David Hinds. The package made available by this project supports a
large number of cards, listed at http://pcmcia-cs.sourceforge.net/ftp/SUPPORTED.CARDS.
Linux support for PCMCIA is quite mature for the i386 architecture and available in part for the
PPC, but unfortunately, it's still in its infancy for other chips at the time of this writing. Apart
from the package maintained by Hinds, the official kernel contains support for a portion of the
PCMCIA cards supported by the Hinds' package. The developers' intent is to have the official
kernel become the main source for PCMCIA support. Until then, the best choice is to use
Hinds' distribution for production systems. It includes the necessary system tools to configure
the automatic loading and unloading of the appropriate PCMCIA device drivers when a card is
inserted or removed from a PCMCIA slot.
Apart from the official PC Card Standard available from the PCMCIA association itself, there