4 FILE_LICENCE ( GPL2_OR_LATER );
7 #include <ipxe/isa_ids.h>
8 #include <ipxe/device.h>
9 #include <ipxe/tables.h>
17 /** Driver for this device */
18 struct isa_driver *driver;
19 /** Driver-private data
21 * Use isa_set_drvdata() and isa_get_drvdata() to access
28 * An individual ISA device, identified by probe address
31 typedef uint16_t isa_probe_addr_t;
37 /** Probe address list */
38 isa_probe_addr_t *probe_addrs;
39 /** Number of entries in probe address list */
40 unsigned int addr_count;
41 /** Manufacturer ID to be assumed for this device */
43 /** Product ID to be assumed for this device */
49 * @v id Matching entry in ID table
50 * @ret rc Return status code
52 int ( * probe ) ( struct isa_device *isa );
58 void ( * remove ) ( struct isa_device *isa );
61 /** ISA driver table */
62 #define ISA_DRIVERS __table ( struct isa_driver, "isa_drivers" )
64 /** Declare an ISA driver */
65 #define __isa_driver __table_entry ( ISA_DRIVERS, 01 )
68 * Set ISA driver-private data
71 * @v priv Private data
73 static inline void isa_set_drvdata ( struct isa_device *isa, void *priv ) {
78 * Get ISA driver-private data
81 * @ret priv Private data
83 static inline void * isa_get_drvdata ( struct isa_device *isa ) {
88 * ISA_ROM is parsed by parserom.pl to generate Makefile rules and
89 * files for rom-o-matic.
92 #define ISA_ROM( IMAGE, DESCRIPTION )