|
AquilaOS documentation
How it works, and its code
|
The platform's devices: those that no bus can find (see dev/platform.h). More...
Go to the source code of this file.
Functions | |
| const struct platform_device * | platform_device_get (const char *name, int index) |
| Finds one of the platform's devices by its driver's name. | |
| int | platform_device_io (const struct platform_device *pd, struct ioaddr *io) |
| Gets a device's registers, ready for io_in8() and the others. | |
The platform's devices: those that no bus can find (see dev/platform.h).
Each platform lists them in its own table, platform_devices[], and a driver looks up the devices it drives there by name.
Definition in file platform.c.
| const struct platform_device * platform_device_get | ( | const char * | name, |
| int | index ) |
Finds one of the platform's devices by its driver's name.
| name | the driver's name ("8250", "pl011", "i8042", ...) |
| index | which of the devices with that name: 0 for the first |
Definition at line 21 of file platform.c.
References platform_device::name, NULL, platform_device_get(), and platform_devices.
Referenced by i8042_init(), pl011_init(), platform_device_get(), and uart_8250_init().
| int platform_device_io | ( | const struct platform_device * | pd, |
| struct ioaddr * | io ) |
Gets a device's registers, ready for io_in8() and the others.
Ports are used as they are; memory-mapped registers are mapped first.
| pd | the device |
| io | set to its registers |
Definition at line 38 of file platform.c.
References ioaddr::addr, arch_mmio_map(), platform_device::io, IOADDR_PORT, platform_device_io(), platform_device::size, and ioaddr::type.
Referenced by i8042_init(), pl011_init(), platform_device_io(), and uart_8250_attach().