summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-23 21:23:45 +0100
committerWolfgang Denk <wd@denx.de>2011-11-23 21:23:45 +0100
commitfdbe8b9a2d1858ba35dd6214315563ad44d4a0e3 (patch)
tree98c39a0594ef02e08d5842cfff1f1d6bcc5a8eda /drivers/net
parentbd0f5ca806c73f9e1ef4a2a0416233ab7e257df9 (diff)
parentd780e74fc3abe6a8b9a01357720c15d974d83dae (diff)
downloadu-boot-imx-fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3.zip
u-boot-imx-fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3.tar.gz
u-boot-imx-fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3.tar.bz2
Merge branch 'hs@denx.de' of git://git.denx.de/u-boot-staging
* 'hs@denx.de' of git://git.denx.de/u-boot-staging: drivers/net/dnet.c: Fix GCC 4.6 warnings board/xaeniax/flash.c: Fix GCC 4.6 warnings net/bootp.c: Fix GCC 4.6 warning common/cmd_bootm.c: Fix GCC 4.6 warnings board/mx1ads/mx1ads.c: Fix GCC 4.6 warning board/mx1ads/syncflash.c: Fix GCC 4.6 warnings board/lubbock/flash.c: Fix GCC 4.6 warnings drivers/net/cs8900.c: Fix GCC 4.6 warning arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings drivers/net/lan91c96.c: Fix GCC 4.6 warning board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cs8900.c11
-rw-r--r--drivers/net/dnet.c12
-rw-r--r--drivers/net/lan91c96.c7
3 files changed, 12 insertions, 18 deletions
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 9424fb2..e04a784 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -66,15 +66,14 @@
static u16 get_reg_init_bus(struct eth_device *dev, int regno)
{
/* force 16 bit busmode */
- volatile u8 c;
struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv);
uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase;
- c = readb(iob);
- c = readb(iob + 1);
- c = readb(iob);
- c = readb(iob + 1);
- c = readb(iob);
+ readb(iob);
+ readb(iob + 1);
+ readb(iob);
+ readb(iob + 1);
+ readb(iob);
REG_WRITE(regno, &priv->regs->pptr);
return REG_READ(&priv->regs->pdata);
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index bfe87fa..15d0a6e 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -20,6 +20,7 @@
#include <miiphy.h>
#include <asm/io.h>
+#include <asm/unaligned.h>
#include "dnet.h"
@@ -133,15 +134,12 @@ static int dnet_send(struct eth_device *netdev, volatile void *packet,
int length)
{
struct dnet_device *dnet = to_dnet(netdev);
- int i, len, wrsz;
+ int i, wrsz;
unsigned int *bufp;
unsigned int tx_cmd;
debug(DRIVERNAME "[%s] Sending %u bytes\n", __func__, length);
- /* frame size (words) */
- len = (length + 3) >> 2;
-
bufp = (unsigned int *) (((u32)packet) & 0xFFFFFFFC);
wrsz = (u32)length + 3;
wrsz += ((u32)packet) & 0x3;
@@ -206,11 +204,11 @@ static void dnet_set_hwaddr(struct eth_device *netdev)
struct dnet_device *dnet = to_dnet(netdev);
u16 tmp;
- tmp = cpu_to_be16(*((u16 *)netdev->enetaddr));
+ tmp = get_unaligned_be16(netdev->enetaddr);
dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_0_REG, tmp);
- tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 2)));
+ tmp = get_unaligned_be16(&netdev->enetaddr[2]);
dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_1_REG, tmp);
- tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 4)));
+ tmp = get_unaligned_be16(&netdev->enetaddr[4]);
dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_2_REG, tmp);
}
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 883f3a7..24b28da 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,6 +63,7 @@
#include <malloc.h>
#include "lan91c96.h"
#include <net.h>
+#include <linux/compiler.h>
/*------------------------------------------------------------------------
*
@@ -154,7 +155,7 @@ static void smc_set_mac_addr(const unsigned char *addr)
***********************************************/
void dump_memory_info(struct eth_device *dev)
{
- word mem_info;
+ __maybe_unused word mem_info;
word old_bank;
old_bank = SMC_inw(dev, LAN91C96_BANK_SELECT) & 0xF;
@@ -317,7 +318,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet,
int packet_length)
{
byte packet_no;
- unsigned long ioaddr;
byte *buf;
int length;
int numPages;
@@ -381,9 +381,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet,
dev->name, try);
/* I can send the packet now.. */
-
- ioaddr = dev->iobase;
-
buf = (byte *) packet;
/* If I get here, I _know_ there is a packet slot waiting for me */