]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/net.h
PPC: Drop mv6436x_eth_initialize() from net/eth.c
[karo-tx-uboot.git] / include / net.h
index d7ff0687ccacc49812fc58b7299e219c1cf26785..1707a7fbec5fff2f64faf1c1f3faf55171297121 100644 (file)
@@ -33,7 +33,8 @@
 
 #define PKTALIGN       32
 
-typedef ulong          IPaddr_t;
+/* IPv4 addresses are always 32 bits in size */
+typedef u32            IPaddr_t;
 
 
 /**
@@ -89,11 +90,13 @@ struct eth_device {
 #endif
        int  (*write_hwaddr) (struct eth_device*);
        struct eth_device *next;
+       int index;
        void *priv;
 };
 
 extern int eth_initialize(bd_t *bis);  /* Initialize network subsystem */
 extern int eth_register(struct eth_device* dev);/* Register network device */
+extern int eth_unregister(struct eth_device *dev);/* Remove network device */
 extern void eth_try_another(int first_restart);        /* Change the device */
 extern void eth_set_current(void);             /* set nterface to ethcur var */
 extern struct eth_device *eth_get_dev(void);   /* get the current device MAC */
@@ -365,8 +368,10 @@ extern int         NetState;               /* Network loop state           */
 
 extern int             NetRestartWrap;         /* Tried all network devices    */
 
-typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
-              TFTPSRV } proto_t;
+enum proto_t {
+       BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
+       TFTPSRV, TFTPPUT
+};
 
 /* from net/net.c */
 extern char    BootFile[128];                  /* Boot File name               */
@@ -392,7 +397,7 @@ extern int NetTimeOffset;                   /* offset time from UTC         */
 #endif
 
 /* Initialize the network adapter */
-extern int     NetLoop(proto_t);
+extern int NetLoop(enum proto_t);
 
 /* Shutdown adapters and cleanup */
 extern void    NetStop(void);
@@ -427,6 +432,12 @@ extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, i
 /* Processes a received packet */
 extern void    NetReceive(volatile uchar *, int);
 
+/*
+ * Check if autoload is enabled. If so, use either NFS or TFTP to download
+ * the boot file.
+ */
+void net_auto_load(void);
+
 /*
  * The following functions are a bit ugly, but necessary to deal with
  * alignment restrictions on ARM.