Introduce netdev.h header file and remove externs
PATCH v2 1/1 Introduce netdev.h header file and remove externs
This addresses all drivers whose initializers have already been moved to board_eth_init()/cpu_eth_init().
Signed-off-by Ben Warren <[email protected]>
---
v2 fixes some sloppiness in the first version. This patch will be applied to u-boot-net/testing
board/atmel/atngw100/atngw100.c | 3 +- board/atmel/atstk1000/atstk1000.c | 3 +- board/bf537-stamp/bf537-stamp.c | 3 +- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 3 +- board/sl8245/sl8245.c | 3 +- cpu/leon2/cpu.c | 3 +- cpu/leon3/cpu.c | 2 +- cpu/mcf523x/cpu.c | 3 +- cpu/mcf52x2/cpu.c | 3 +- cpu/mcf532x/cpu.c | 3 +- cpu/mcf5445x/cpu.c | 3 +- cpu/mcf547x_8x/cpu.c | 4 +-- cpu/mpc83xx/cpu.c | 3 +- cpu/mpc85xx/cpu.c | 3 +- cpu/mpc86xx/cpu.c | 3 +- include/netdev.h | 54 +++++++++++++++++++++++++++++ 16 files changed, 69 insertions(+), 30 deletions(-) create mode 100644 include/netdev.h
board/atmel/atngw100/atngw100.c +1 -2
@@ -26,6 +26,7 @@#include <asm/arch/clk.h> #include <asm/arch/gpio.h> #include <asm/arch/hmatrix.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -90,8 +91,6 @@ void board_init_info(void) gd->bd->bi_phy_id[1 ] =0x03 ; } -extern int macb_eth_initialize (int id,void *regs,unsigned int phy_addr); -#ifdef CONFIG_CMD_NET int board_eth_init (bd_t *bi) {
board/atmel/atstk1000/atstk1000.c +1 -2
@@ -26,6 +26,7 @@#include <asm/arch/clk.h> #include <asm/arch/gpio.h> #include <asm/arch/hmatrix.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -116,8 +117,6 @@ void board_init_info(void) gd->bd->bi_phy_id[1 ] =0x11 ; } -extern int macb_eth_initialize (int id,void *regs,unsigned int phy_addr); -#ifdef CONFIG_CMD_NET int board_eth_init (bd_t *bi) {
board/bf537-stamp/bf537-stamp.c +1 -2
@@ -32,6 +32,7 @@#include <asm/io.h> #include <net.h> #include <asm/mach-common/bits/bootrom.h> +#include <netdev.h> /** * is_valid_ether_addr - Determine if the given Ethernet address is valid
@@ -156,8 +157,6 @@ int misc_init_r(void)#if defined(CONFIG_BFIN_MAC ) -extern int bfin_EMAC_initialize (bd_t *bis); -int board_eth_init (bd_t *bis) {return bfin_EMAC_initialize (bis);
board/freescale/mpc8610hpcd/mpc8610hpcd.c +1 -2
@@ -31,6 +31,7 @@#include <libfdt.h> #include <fdt_support.h> #include <spd_sdram.h> +#include <netdev.h> #include "../common/pixis.h"
@@ -516,8 +517,6 @@ get_board_sys_clk(ulong dummy)return val; } -extern int uli526x_initialize (bd_t *); -int board_eth_init (bd_t *bis) {#if defined(CONFIG_ULI526 )
board/sl8245/sl8245.c +1 -2
@@ -24,6 +24,7 @@#include <common.h> #include <mpc824x.h> #include <pci.h> +#include <netdev.h> int checkboard (void ) {
@@ -67,8 +68,6 @@ void pci_init_board(void)pci_mpc824x_init (&hose); } -extern int skge_initialize (bd_t *bis); -int board_eth_init (bd_t *bis) {int rc =0 ;
cpu/leon2/cpu.c +1 -2
@@ -25,6 +25,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -57,8 +58,6 @@ int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])/* ------------------------------------------------------------------------- */ -extern int greth_initialize (bd_t *bis); -#ifdef CONFIG_GRETH int cpu_eth_init (bd_t *bis) {
cpu/leon3/cpu.c +1 -1
@@ -25,6 +25,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> #include <asm/io.h> #include <asm/processor.h>
@@ -65,7 +66,6 @@ u64 flash_read64(void *addr) }/* ------------------------------------------------------------------------- */ -extern int greth_initialize (bd_t *bis);#ifdef CONFIG_GRETH int cpu_eth_init (bd_t *bis)
cpu/mcf523x/cpu.c +1 -2
@@ -28,6 +28,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> #include <asm/immap.h>
@@ -114,8 +115,6 @@ int watchdog_init(void)* int board_eth_init(bd_t *bis) */ -extern int mcffec_initialize (bd_t *); -int cpu_eth_init (bd_t *bis) {return mcffec_initialize (bis);
cpu/mcf52x2/cpu.c +1 -2
@@ -32,6 +32,7 @@#include <watchdog.h> #include <command.h> #include <asm/immap.h> +#include <netdev.h> #ifdef CONFIG_M5271 /*
@@ -328,8 +329,6 @@ int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])* int board_eth_init(bd_t *bis) */ -extern int mcffec_initialize (bd_t *); -int cpu_eth_init (bd_t *bis) {return mcffec_initialize (bis);
cpu/mcf532x/cpu.c +1 -2
@@ -28,6 +28,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> #include <asm/immap.h>
@@ -136,8 +137,6 @@ int watchdog_init(void)* int board_eth_init(bd_t *bis) */ -extern int mcffec_initialize (bd_t *); -int cpu_eth_init (bd_t *bis) {return mcffec_initialize (bis);
cpu/mcf5445x/cpu.c +1 -2
@@ -28,6 +28,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> #include <asm/immap.h>
@@ -102,8 +103,6 @@ int checkcpu(void)* int board_eth_init(bd_t *bis) */ -extern int mcffec_initialize (bd_t *); -int cpu_eth_init (bd_t *bis) {return mcffec_initialize (bis);
cpu/mcf547x_8x/cpu.c +1 -3
@@ -28,6 +28,7 @@#include <common.h> #include <watchdog.h> #include <command.h> +#include <netdev.h> #include <asm/immap.h>
@@ -148,9 +149,6 @@ int watchdog_init(void)* int board_eth_init(bd_t *bis) */ -extern int mcdmafec_initialize (bd_t *bis); -extern int mcffec_initialize (bd_t *); -int cpu_eth_init (bd_t *bis) {#if defined(CONFIG_FSLDMAFEC )
cpu/mpc83xx/cpu.c +1 -2
@@ -32,6 +32,7 @@#include <mpc83xx.h> #include <asm/processor.h> #include <libfdt.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -365,8 +366,6 @@ int dma_xfer(void *dest, u32 count, void *src)* int board_eth_init(bd_t *bis) */ -extern int tsec_initialize (bd_t * bis,int index,char *devname); -int cpu_eth_init (bd_t *bis) {#if defined(CONFIG_TSEC1 )
cpu/mpc85xx/cpu.c +1 -2
@@ -30,6 +30,7 @@#include <command.h> #include <asm/cache.h> #include <asm/io.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -360,8 +361,6 @@ void upmconfig (uint upm, uint * table, uint size)* int board_eth_init(bd_t *bis) */ -extern int tsec_initialize (bd_t * bis,int index,char *devname); -int cpu_eth_init (bd_t *bis) {#if defined(CONFIG_TSEC1 )
cpu/mpc86xx/cpu.c +1 -2
@@ -29,6 +29,7 @@#include <asm/mmu.h> #include <mpc86xx.h> #include <asm/fsl_law.h> +#include <netdev.h> int
@@ -297,8 +298,6 @@ void mpc86xx_reginfo(void)* int board_eth_init(bd_t *bis) */ -extern int tsec_initialize (bd_t * bis,int index,char *devname); -int cpu_eth_init (bd_t *bis) {#if defined(CONFIG_TSEC1 )
include/netdev.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.5.4.3