From d0201692988adc5d8cdbbf5e0cbf47e1a09708aa Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Thu, 20 Oct 2011 10:56:59 +0000 Subject: ne2000: Convert to new net-multi model, fixes build of three boards This fixes the build of the two sh boards shmin and r7780mp and qemu-mips which currently fail to build due to dropped pre-CONFIG_NET_MULTI code. This v2 patch minimizes the number of lines in the diff for easy review and to eliminate any possible accidential changes resulting from moving lines of code in the file. This also makes the register function very easy. Any cleanups and improvements are intentionally deferred to follow-up patches to keep this patch as simple and as easy to review as possible. A new driver register function, ne2k_register() calls the existing one-time setup part of the old init function and calls eth_register(). Changes to shmin, r7780mp and qemu-mips: - Call the new ne2k_register() from board_eth_init() of the boards. - Tested using qemu-mips board, - Tested the two renesas / sh boards r7780mp and shmin to compile again, and should work. checkpatch-clean when "--ignore VOLATILE" is added to .checkpatch.conf, and no warnings introduced in none of the three boards using this driver. Signed-off-by: Bernhard Kaindl --- board/shmin/shmin.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'board/shmin') diff --git a/board/shmin/shmin.c b/board/shmin/shmin.c index 8742f10..7348f52 100644 --- a/board/shmin/shmin.c +++ b/board/shmin/shmin.c @@ -28,6 +28,7 @@ #include #include #include +#include int checkboard(void) { @@ -55,6 +56,11 @@ int dram_init(void) return 0; } +int board_eth_init(bd_t *bis) +{ + return ne2k_register(); +} + void led_set_state(unsigned short value) { -- cgit v1.1