This is a rework of the DM9000 driver to support registering interfaces dynamically (i.e. determine how many ethernet chips we have at boot and register 0, 1, 2, or more). It was tested on a yet-to-be-submitted board which is based on the PXA270 + 0, 1, or 2 DM9000 chips.
To maintain backwards compatibility with older board files, we add a new initialize function taking the io address, data address, and availability of a SROM chip. The old initialize function is now a shim around this new initialize function but provides the parameters based on the old DM9000 preprocessor symbols. I have compile-tested this on the following: at91sam9261ek_dataflash_cs0_defconfig davinci_dm355evm_defconfig davinci_dm355leopard_defconfig lp8x4x_defconfig pm9261_defconfig scb9328_defconfig devkit8000_defconfig colibri_pxa270_defconfig trizepsiv_defconfig vpac270_nor_128_defconfig I have not compile-tested the following: M5253DEMO ip04 I have board tested this on a yet-to-be-upstreamed port of a pxa270 board that reads an i2c eeprom to determine which (and how many) ethernet chips are enabled. Cc: Joe Hershberger <joe.hershber...@gmail.com> Andrew Ruder (5): dm9000: whitespace cleanups dm9000: mark dump_regs() function as unused dm9000: Add struct eth_device * to SROM functions dm9000: dm9000_initialize stub dm9000: rework dm9000 to support multiple devices board/altera/nios2-generic/nios2-generic.c | 3 +- board/atmel/at91sam9261ek/at91sam9261ek.c | 2 +- board/davinci/dm355evm/dm355evm.c | 2 +- board/davinci/dm355leopard/dm355leopard.c | 2 +- board/freescale/m5253demo/m5253demo.c | 2 +- board/icpdas/lp8x4x/lp8x4x.c | 2 +- board/ip04/ip04.c | 2 +- board/ronetix/pm9261/pm9261.c | 2 +- board/scb9328/scb9328.c | 2 +- board/timll/devkit8000/devkit8000.c | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 2 +- board/trizepsiv/conxs.c | 2 +- board/trizepsiv/eeprom.c | 5 +- board/vpac270/vpac270.c | 2 +- drivers/net/dm9000x.c | 457 +++++++++++++++----------- include/configs/M5253DEMO.h | 1 + include/configs/at91sam9261ek.h | 3 +- include/configs/colibri_pxa270.h | 1 + include/configs/davinci_dm355evm.h | 1 + include/configs/davinci_dm355leopard.h | 1 + include/configs/devkit8000.h | 3 +- include/configs/ip04.h | 2 +- include/configs/lp8x4x.h | 2 + include/configs/pm9261.h | 2 +- include/configs/scb9328.h | 1 + include/configs/trizepsiv.h | 1 + include/configs/vpac270.h | 1 + include/dm9000.h | 8 +- include/netdev.h | 2 +- 29 files changed, 290 insertions(+), 228 deletions(-) -- 2.1.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot