david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

5682 Commits

Author SHA1 Message Date
Michael Brown ce8dea0dff Separate out bus-scanning and device-probing logic. 2005-04-14 13:33:03 +00:00
Michael Brown 4c0d5a0b71 Split 3c509.c into 3c509.9 and 3c529.c, with shared code in 3c5x9.c.
Probe mechanisms now use standard EISA and MCA bus methods, with 3c509.c
defining a custom ISA bus to handle the 3c509 contention resolution logic.
2005-04-14 12:23:12 +00:00
Michael Brown 1f26be34b8 Allow for multiple BOOT_DRIVER()s in the same file, provided that they
have different probe functions.
2005-04-14 12:02:19 +00:00
Michael Brown 44c7cc8c12 Standardised debug mechanism in place now. 2005-04-14 11:55:57 +00:00
Michael Brown e44e5c7247 compiler.h is now always included on the command line. 2005-04-14 11:50:26 +00:00
Michael Brown bc85cf756d We need the ISA product ID mask available separately for 3c509.c. 2005-04-14 11:47:30 +00:00
Michael Brown 305daba48a Always include compiler.h.
Add bin/%.rebuild rule to quickly force a rebuild of any file.

Add bin/%.o.dbg rule to build a debugging-enabled version of the object.
2005-04-14 11:45:37 +00:00
Michael Brown dcd573afcb Automatically create DBG() macro based on debug_<object> macro. 2005-04-14 11:35:45 +00:00
Michael Brown 75d864432c Use the magic of common symbols to allow struct dev to effectively grow at
link time to accommodate whatever bus objects are included.
2005-04-14 10:10:54 +00:00
Michael Brown 0dc98309b2 Stripped references to variables in C code. 2005-04-13 13:48:26 +00:00
Michael Brown e294a1ddce EISA support now provided by eisa.c
MCA support now provided by mca.c
2005-04-13 13:06:56 +00:00
Michael Brown 200b39a645 Extraced from 3c509.c 2005-04-13 12:45:38 +00:00
Michael Brown a4f1a058a4 Add EISA as a bus type. 2005-04-13 12:20:59 +00:00
Michael Brown 4ae83f28f2 Don't use htons, for compatibility with PCI :( 2005-04-13 12:15:14 +00:00
Michael Brown 4ecbc63296 Use __bswap_16, since we're not dealing with quantities to go onto the network. 2005-04-13 12:11:21 +00:00
Michael Brown 5b8e549c83 htons was used in ISAPnP code just due to ISAPnP storing bytes in
reverse order.
2005-04-13 12:06:33 +00:00
Michael Brown 9711f50e20 Created separate isa_ids.h file and a utility function to print out ISA
IDs in a human-readable format.
2005-04-13 12:01:44 +00:00
Michael Brown ac1c0a753d Add MCA devices 2005-04-13 03:00:50 +00:00
Michael Brown 677cda3263 Minor fixups 2005-04-13 03:00:30 +00:00
Michael Brown 1aee4e8001 Extracted from 3c509.c 2005-04-13 02:59:13 +00:00
Michael Brown e27ebad4b2 Whoops 2005-04-13 02:05:43 +00:00
Michael Brown 7cc6366a84 Finished by hand 2005-04-13 02:02:08 +00:00
Michael Brown 951e305081 Finished by hand 2005-04-13 01:45:20 +00:00
Michael Brown f39cc6d978 Finished by hand 2005-04-13 01:31:44 +00:00
Michael Brown f16ac2d87e Fix type of dummy_irq() 2005-04-13 01:28:43 +00:00
Michael Brown 9848135950 Finished by hand 2005-04-13 01:01:33 +00:00
Michael Brown 3616de915e Hand-finished 2005-04-13 00:21:59 +00:00
Michael Brown 6e8878c1fa Avoid compiler warnings. 2005-04-13 00:19:01 +00:00
Michael Brown 266dae4034 Use NIC's connect method. 2005-04-13 00:18:35 +00:00
Michael Brown 17d69d8930 Add mbps and duplex to struct nic, since some drivers (e.g. rtl8139)
can fill them in.
2005-04-13 00:16:42 +00:00
Michael Brown 28590d718b Hand-finished 2005-04-13 00:15:45 +00:00
Michael Brown 91e46ed588 Automatically updated using
perl -pi -0777 -e 's/^(\s*)dev->disable(\s*)=\s*(\w+)_disable;\s*nic->poll\s*=\s*(\w+);\s*nic->transmit\s*=\s*(\w+);\s*nic->irq\s*=\s*(\w+);/static struct nic_operations ${3}_operations;\nstatic struct nic_operations ${3}_operations = {\n\t.connect\t= dummy_connect,\n\t.poll\t\t= $4,\n\t.transmit\t= $5,\n\t.irq\t\t= $6,\n\t.disable\t= ${3}_disable,\n};${1}nic->nic_op\t= &${3}_operations;/msg' *.c
2005-04-13 00:02:40 +00:00
Michael Brown d9c64c9422 Manual tweaks to get all drivers to follow the "disable, poll, transmit,
irq" pattern.
2005-04-12 23:47:52 +00:00
Michael Brown 881023e9ca Automatically updated using
perl -pi -e 's/(_probe\s*\(\s*struct )dev \*.*?(\s*\);)/${1}dev *dev$2/' *.c

perl -pi -e 's/(_disable\s*\(\s*struct )dev \*.*?(\s*\);)/${1}nic *nic$2/' *.c
2005-04-12 23:39:16 +00:00
Michael Brown c87ba23399 Automatically updated using
perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev\s*\)\s*{\s*struct nic \*nic.*?$/_disable ( struct nic *nic ) {/ms' *.c

perl -pi -0777 -e 's/_disable\s*\(\s*struct dev \*dev(\s*__unused)?\)\s*{/_disable ( struct nic *nic$1 ) {/ms' *.c
2005-04-12 23:31:37 +00:00
Michael Brown bd9ae7cc70 Automatically updated using
perl -pi -0777 -e 's/_probe\s*\(\s*struct dev \*dev,\s*struct pci_device \*(\w+?)\s*\)\s*{(\s*)struct nic \*nic.*?$/_probe ( struct dev *dev ) {\n${2}struct nic *nic = nic_device ( dev );\n${2}struct pci_device *$1 = pci_device ( dev );/ms' *.c
2005-04-12 23:24:39 +00:00
Michael Brown 35e6f3e58a Minor regexp tweaks to catch degenerate cases. 2005-04-12 23:13:54 +00:00
Michael Brown 4e3e389200 Auto-updated using
perl -pi -0777 -e 's/static struct pci_driver (\w+) __pci_driver = {.*\.name\s*=\s*(\"\S+\").*\.probe\s*=\s*(\w+).*\.ids\s*=\s*(\w+).*\.class\s*=\s*(\w+).*?};/static struct pci_driver $1 =\n\tPCI_DRIVER ( $2, $4, $5 );\n\nBOOT_DRIVER ( $2, $3 );/ms' *.c

perl -pi -e 's/(PCI_DRIVER \(.*, )0 \);/${1}PCI_NO_CLASS );/' *.c
2005-04-12 23:05:00 +00:00
Michael Brown 241fb0f3cd Use dev's print_info method to print standardised information about
the boot device.
2005-04-12 22:44:02 +00:00
Michael Brown 95da907d5f Add print_info method to dev_operations. 2005-04-12 22:43:25 +00:00
Michael Brown c2a21744f6 We now record a pointer to the struct pci_device, since it's carried
around in struct dev anyway.
2005-04-12 22:42:52 +00:00
Michael Brown e1d0cebfa8 Able to at least compile again now. 2005-04-12 19:11:42 +00:00
Michael Brown d9f34bfdfc Add dummy_connect and dummy_irq 2005-04-12 19:11:13 +00:00
Michael Brown 81320fae4b Remove debugging by default 2005-04-12 18:32:20 +00:00
Michael Brown 27a55b514c Updated to new device API. 2005-04-12 18:23:00 +00:00
Michael Brown 1218698e01 Cope with nic.h being included before (or without) dev.h 2005-04-12 18:21:38 +00:00
Michael Brown 122b025293 Include dev.h, since several drivers just include nic.h 2005-04-12 18:15:12 +00:00
Michael Brown 8fa0e38233 Fixed up PCI-scanning code to use new PCI interface. 2005-04-12 18:13:59 +00:00
Michael Brown 3293c68488 Make adjust_pci_device global, since many drivers call it. 2005-04-12 18:10:57 +00:00
Michael Brown 762fa9a478 Fix up find_pci_device so that it can be used for scanning for devices
*other* than the main boot device.
2005-04-12 18:04:03 +00:00