projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git]
/
drivers
/
net
/
ethoc.c
diff --git
a/drivers/net/ethoc.c
b/drivers/net/ethoc.c
index 34cc47f39230d13f38caae1d58b5b31e224bc530..edb3c808fa18f8f3d6d02cbb2843ead23048c1c3 100644
(file)
--- a/
drivers/net/ethoc.c
+++ b/
drivers/net/ethoc.c
@@
-189,12
+189,12
@@
struct ethoc_bd {
u32 addr;
};
u32 addr;
};
-static inline u32 ethoc_read(struct eth_device *dev,
loff
_t offset)
+static inline u32 ethoc_read(struct eth_device *dev,
size
_t offset)
{
return readl(dev->iobase + offset);
}
{
return readl(dev->iobase + offset);
}
-static inline void ethoc_write(struct eth_device *dev,
loff
_t offset, u32 data)
+static inline void ethoc_write(struct eth_device *dev,
size
_t offset, u32 data)
{
writel(data, dev->iobase + offset);
}
{
writel(data, dev->iobase + offset);
}
@@
-202,7
+202,7
@@
static inline void ethoc_write(struct eth_device *dev, loff_t offset, u32 data)
static inline void ethoc_read_bd(struct eth_device *dev, int index,
struct ethoc_bd *bd)
{
static inline void ethoc_read_bd(struct eth_device *dev, int index,
struct ethoc_bd *bd)
{
-
loff
_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
+
size
_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
bd->stat = ethoc_read(dev, offset + 0);
bd->addr = ethoc_read(dev, offset + 4);
}
bd->stat = ethoc_read(dev, offset + 0);
bd->addr = ethoc_read(dev, offset + 4);
}
@@
-210,7
+210,7
@@
static inline void ethoc_read_bd(struct eth_device *dev, int index,
static inline void ethoc_write_bd(struct eth_device *dev, int index,
const struct ethoc_bd *bd)
{
static inline void ethoc_write_bd(struct eth_device *dev, int index,
const struct ethoc_bd *bd)
{
-
loff
_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
+
size
_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
ethoc_write(dev, offset + 0, bd->stat);
ethoc_write(dev, offset + 4, bd->addr);
}
ethoc_write(dev, offset + 0, bd->stat);
ethoc_write(dev, offset + 4, bd->addr);
}
@@
-267,11
+267,11
@@
static int ethoc_init_ring(struct eth_device *dev)
bd.stat = RX_BD_EMPTY | RX_BD_IRQ;
for (i = 0; i < priv->num_rx; i++) {
bd.stat = RX_BD_EMPTY | RX_BD_IRQ;
for (i = 0; i < priv->num_rx; i++) {
- bd.addr = (u32)
NetRxP
ackets[i];
+ bd.addr = (u32)
net_rx_p
ackets[i];
if (i == priv->num_rx - 1)
bd.stat |= RX_BD_WRAP;
if (i == priv->num_rx - 1)
bd.stat |= RX_BD_WRAP;
- flush_dcache
(bd.addr,
PKTSIZE_ALIGN);
+ flush_dcache
_range(bd.addr, bd.addr +
PKTSIZE_ALIGN);
ethoc_write_bd(dev, priv->num_tx + i, &bd);
}
ethoc_write_bd(dev, priv->num_tx + i, &bd);
}
@@
-372,11
+372,11
@@
static int ethoc_rx(struct eth_device *dev, int limit)
if (ethoc_update_rx_stats(&bd) == 0) {
int size = bd.stat >> 16;
size -= 4; /* strip the CRC */
if (ethoc_update_rx_stats(&bd) == 0) {
int size = bd.stat >> 16;
size -= 4; /* strip the CRC */
-
NetReceive
((void *)bd.addr, size);
+
net_process_received_packet
((void *)bd.addr, size);
}
/* clear the buffer descriptor so it can be reused */
}
/* clear the buffer descriptor so it can be reused */
- flush_dcache
(bd.addr,
PKTSIZE_ALIGN);
+ flush_dcache
_range(bd.addr, bd.addr +
PKTSIZE_ALIGN);
bd.stat &= ~RX_BD_STATS;
bd.stat |= RX_BD_EMPTY;
ethoc_write_bd(dev, entry, &bd);
bd.stat &= ~RX_BD_STATS;
bd.stat |= RX_BD_EMPTY;
ethoc_write_bd(dev, entry, &bd);
@@
-414,7
+414,7
@@
static void ethoc_tx(struct eth_device *dev)
(void)ethoc_update_tx_stats(&bd);
}
(void)ethoc_update_tx_stats(&bd);
}
-static int ethoc_send(struct eth_device *dev, vo
latile vo
id *packet, int length)
+static int ethoc_send(struct eth_device *dev, void *packet, int length)
{
struct ethoc *priv = (struct ethoc *)dev->priv;
struct ethoc_bd bd;
{
struct ethoc *priv = (struct ethoc *)dev->priv;
struct ethoc_bd bd;
@@
-430,7
+430,7
@@
static int ethoc_send(struct eth_device *dev, volatile void *packet, int length)
bd.stat &= ~TX_BD_PAD;
bd.addr = (u32)packet;
bd.stat &= ~TX_BD_PAD;
bd.addr = (u32)packet;
- flush_dcache
(bd.addr,
length);
+ flush_dcache
_range(bd.addr, bd.addr +
length);
bd.stat &= ~(TX_BD_STATS | TX_BD_LEN_MASK);
bd.stat |= TX_BD_LEN(length);
ethoc_write_bd(dev, entry, &bd);
bd.stat &= ~(TX_BD_STATS | TX_BD_LEN_MASK);
bd.stat |= TX_BD_LEN(length);
ethoc_write_bd(dev, entry, &bd);