net: Remove volatile from net API

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
diff --git a/net/bootp.c b/net/bootp.c
index 9e32476..35654b4 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -586,7 +586,7 @@
 void
 BootpRequest (void)
 {
-	volatile uchar *pkt, *iphdr;
+	uchar *pkt, *iphdr;
 	Bootp_t *bp;
 	int ext_len, pktlen, iplen;
 
@@ -839,7 +839,7 @@
 
 static void DhcpSendRequestPkt(Bootp_t *bp_offer)
 {
-	volatile uchar *pkt, *iphdr;
+	uchar *pkt, *iphdr;
 	Bootp_t *bp;
 	int pktlen, iplen, extlen;
 	IPaddr_t OfferedIP;
diff --git a/net/eth.c b/net/eth.c
index 3eeb908..66a84d4 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -82,8 +82,6 @@
 int board_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init")));
 
 #ifdef CONFIG_API
-extern void (*push_packet)(volatile void *, int);
-
 static struct {
 	uchar data[PKTSIZE];
 	int length;
@@ -407,7 +405,7 @@
 	eth_current->state = ETH_STATE_PASSIVE;
 }
 
-int eth_send(volatile void *packet, int length)
+int eth_send(void *packet, int length)
 {
 	if (!eth_current)
 		return -1;
@@ -424,9 +422,9 @@
 }
 
 #ifdef CONFIG_API
-static void eth_save_packet(volatile void *packet, int length)
+static void eth_save_packet(void *packet, int length)
 {
-	volatile char *p = packet;
+	char *p = packet;
 	int i;
 
 	if ((eth_rcv_last+1) % PKTBUFSRX == eth_rcv_current)
@@ -442,9 +440,9 @@
 	eth_rcv_last = (eth_rcv_last + 1) % PKTBUFSRX;
 }
 
-int eth_receive(volatile void *packet, int length)
+int eth_receive(void *packet, int length)
 {
-	volatile char *p = packet;
+	char *p = packet;
 	void *pp = push_packet;
 	int i;
 
diff --git a/net/net.c b/net/net.c
index c5acf8f..9a0417d 100644
--- a/net/net.c
+++ b/net/net.c
@@ -152,7 +152,7 @@
 /* Server IP addr (0 = unknown) */
 IPaddr_t	NetServerIP;
 /* Current receive packet */
-volatile uchar *NetRxPacket;
+uchar *NetRxPacket;
 /* Current rx packet length */
 int		NetRxPacketLen;
 /* IP packet ID */
@@ -161,7 +161,7 @@
 uchar		NetBcastAddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 uchar		NetEtherNullAddr[6];
 #ifdef CONFIG_API
-void		(*push_packet)(volatile void *, int len) = 0;
+void		(*push_packet)(void *, int len) = 0;
 #endif
 #if defined(CONFIG_CMD_CDP)
 /* Ethernet bcast address */
@@ -208,10 +208,10 @@
 int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len);
 #endif
 
-volatile uchar	PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
+uchar PktBuf[(PKTBUFSRX+1) * PKTSIZE_ALIGN + PKTALIGN];
 
 /* Receive packet */
-volatile uchar *NetRxPackets[PKTBUFSRX];
+uchar *NetRxPackets[PKTBUFSRX];
 
 /* Current RX packet handler */
 static rxhand_f *packetHandler;
@@ -225,7 +225,7 @@
 /* Current timeout value */
 static ulong	timeDelta;
 /* THE transmit packet */
-volatile uchar *NetTxPacket;
+uchar *NetTxPacket;
 
 static int net_check_prereq(enum proto_t protocol);
 
@@ -246,7 +246,7 @@
 
 void ArpRequest(void)
 {
-	volatile uchar *pkt;
+	uchar *pkt;
 	ARP_t *arp;
 
 	debug("ARP broadcast %d\n", NetArpWaitTry);
@@ -705,7 +705,7 @@
 
 
 void
-NetSendPacket(volatile uchar *pkt, int len)
+NetSendPacket(uchar *pkt, int len)
 {
 	(void) eth_send(pkt, len);
 }
@@ -768,8 +768,8 @@
 int PingSend(void)
 {
 	static uchar mac[6];
-	volatile IP_t *ip;
-	volatile ushort *s;
+	IP_t *ip;
+	ushort *s;
 	uchar *pkt;
 
 	/* XXX always send arp request */
@@ -784,7 +784,7 @@
 	pkt = NetArpWaitTxPacket;
 	pkt += NetSetEther(pkt, mac, PROT_IP);
 
-	ip = (volatile IP_t *)pkt;
+	ip = (IP_t *)pkt;
 
 	/*
 	 * Construct an IP and ICMP header.
@@ -936,9 +936,9 @@
 
 int CDPSendTrigger(void)
 {
-	volatile uchar *pkt;
-	volatile ushort *s;
-	volatile ushort *cp;
+	uchar *pkt;
+	ushort *s;
+	ushort *cp;
 	Ethernet_t *et;
 	int len;
 	ushort chksum;
@@ -965,7 +965,7 @@
 	/* CDP header */
 	*pkt++ = 0x02;				/* CDP version 2 */
 	*pkt++ = 180;				/* TTL */
-	s = (volatile ushort *)pkt;
+	s = (ushort *)pkt;
 	cp = s;
 	/* checksum (0 for later calculation) */
 	*s++ = htons(0);
@@ -1439,7 +1439,7 @@
 }
 
 void
-NetReceive(volatile uchar *inpkt, int len)
+NetReceive(uchar *inpkt, int len)
 {
 	Ethernet_t *et;
 	IP_t	*ip;
@@ -1918,7 +1918,7 @@
 }
 
 int
-NetSetEther(volatile uchar *xet, uchar * addr, uint prot)
+NetSetEther(uchar *xet, uchar * addr, uint prot)
 {
 	Ethernet_t *et = (Ethernet_t *)xet;
 	ushort myvlanid;
@@ -1943,7 +1943,7 @@
 }
 
 void
-NetSetIP(volatile uchar *xip, IPaddr_t dest, int dport, int sport, int len)
+NetSetIP(uchar *xip, IPaddr_t dest, int dport, int sport, int len)
 {
 	IP_t *ip = (IP_t *)xip;
 
diff --git a/net/rarp.c b/net/rarp.c
index 097f970..77d63e8 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -71,7 +71,7 @@
 RarpRequest (void)
 {
 	int i;
-	volatile uchar *pkt;
+	uchar *pkt;
 	ARP_t *	rarp;
 
 	printf("RARP broadcast %d\n", ++RarpTry);
diff --git a/net/tftp.c b/net/tftp.c
index 7aa3e23..e62f229 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -310,9 +310,9 @@
 TftpSend(void)
 {
 	uchar *pkt;
-	volatile uchar *xp;
-	int		len = 0;
-	volatile ushort *s;
+	uchar *xp;
+	int len = 0;
+	ushort *s;
 
 #ifdef CONFIG_MCAST_TFTP
 	/* Multicast TFTP.. non-MasterClients do not ACK data. */