-
Notifications
You must be signed in to change notification settings - Fork 0
CardBus
PCMCIA CardBus support for 32-bit PCMCIA cards, bridging PCI and the PCMCIA bus.
CardBus is a 32-bit parallel bus standard (PC Card-16 was 16-bit) that provides PCMCIA support for modern 32-bit devices in laptops and embedded systems. In JNode, CardBus devices are discovered through PCI enumeration — a CardBus controller is itself a PCI device (a PCI-to-CardBus bridge). Once the bridge is started, it manages the CardBus bus and the cards inserted into its sockets.
| Class / File | Role |
|---|---|
core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDriver.java |
Driver for the CardBus controller (PCI-to-CardBus bridge) |
core/src/driver/org/jnode/driver/bus/pcmcia/CardBusDevice.java |
A CardBus device discovered on the bus |
core/src/driver/org/jnode/driver/bus/pcmcia/CardBusBus.java |
The CardBus bus implementation |
core/src/driver/org/jnode/driver/bus/pci/PCIHeaderType2.java |
PCI configuration header type 2 (CardBus bridge) |
CardBusDriver is bound to a PCI device identified as a CardBus bridge. On
startDevice(), it extracts the PCIHeaderType2 configuration header and
creates a CardBusBus:
protected void startDevice() throws DriverException {
final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
dm.rename(device, getDevicePrefix(), true);
PCIHeaderType2 header = ((PCIDevice) device).getConfig().asHeaderType2();
this.bus = new CardBusBus(this, header.getCardBus());
}CardBusBus manages one or more CardBus sockets. It can probe each socket
for a card and enumerate card functions as CardBusDevice instances. Cards
inserted into a socket appear as child devices on the bus.
CardBus bridges are enumerated via PCI depth-first traversal. The PCI layer
calls CardBusDriver for devices matching the bridge class code, which then
manages the CardBus bus. This is described in Bus-Drivers.
- CardBus controllers vary between manufacturers; the current driver is based on the TI PCI4451
- The
stopDevice()method is not yet implemented — stopping a CardBus controller requires socket shutdown and card eject handling - Cards can be hot-plugged; device discovery may occur at runtime rather than only at boot
- Bus-Drivers — PCMCIA/CardBus, PCI, USB, SMBus bus drivers
- Driver-Framework — Driver framework overview
- DeviceManager — Device registration and driver binding
- Resource-Management — Hardware resource allocation
- PCI-Capability-Structure — PCI capabilities on the bridge device