diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-04-19 20:16:01 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-04-19 23:43:39 +0100 |
commit | 8406115834d38bb743e01f35bfd36e835532415e (patch) | |
tree | ee1e3106e2cdc645d911ba5643f8414b21fc4c3e /src/include/ipxe/isa.h | |
parent | 2a36703af228bd10d50a31daec96072fe3a992a3 (diff) | |
download | ipxe-8406115834d38bb743e01f35bfd36e835532415e.tar.gz |
[build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain. Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.
Also update README, LOG and COPYRIGHTS to remove obsolete information.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/isa.h')
-rw-r--r-- | src/include/ipxe/isa.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/src/include/ipxe/isa.h b/src/include/ipxe/isa.h new file mode 100644 index 000000000..6d8f76161 --- /dev/null +++ b/src/include/ipxe/isa.h @@ -0,0 +1,97 @@ +#ifndef ISA_H +#define ISA_H + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <stdint.h> +#include <ipxe/isa_ids.h> +#include <ipxe/device.h> +#include <ipxe/tables.h> + +/** An ISA device */ +struct isa_device { + /** Generic device */ + struct device dev; + /** I/O address */ + uint16_t ioaddr; + /** Driver for this device */ + struct isa_driver *driver; + /** Driver-private data + * + * Use isa_set_drvdata() and isa_get_drvdata() to access + * this field. + */ + void *priv; + /** Driver name */ + const char *driver_name; +}; + +/* + * An individual ISA device, identified by probe address + * + */ +typedef uint16_t isa_probe_addr_t; + +/** An ISA driver */ +struct isa_driver { + /** Name */ + const char *name; + /** Probe address list */ + isa_probe_addr_t *probe_addrs; + /** Number of entries in probe address list */ + unsigned int addr_count; + /** Manufacturer ID to be assumed for this device */ + uint16_t vendor_id; + /** Product ID to be assumed for this device */ + uint16_t prod_id; + /** + * Probe device + * + * @v isa ISA device + * @v id Matching entry in ID table + * @ret rc Return status code + */ + int ( * probe ) ( struct isa_device *isa ); + /** + * Remove device + * + * @v isa ISA device + */ + void ( * remove ) ( struct isa_device *isa ); +}; + +/** ISA driver table */ +#define ISA_DRIVERS __table ( struct isa_driver, "isa_drivers" ) + +/** Declare an ISA driver */ +#define __isa_driver __table_entry ( ISA_DRIVERS, 01 ) + +/** + * Set ISA driver-private data + * + * @v isa ISA device + * @v priv Private data + */ +static inline void isa_set_drvdata ( struct isa_device *isa, void *priv ) { + isa->priv = priv; +} + +/** + * Get ISA driver-private data + * + * @v isa ISA device + * @ret priv Private data + */ +static inline void * isa_get_drvdata ( struct isa_device *isa ) { + return isa->priv; +} + +/* + * ISA_ROM is parsed by parserom.pl to generate Makefile rules and + * files for rom-o-matic. + * + */ +#define ISA_ROM( IMAGE, DESCRIPTION ) + +#endif /* ISA_H */ + |