]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/ethoc.c
net: gem: Use phys_addr_t instead of int for addresses
[karo-tx-uboot.git] / drivers / net / ethoc.c
index af06d4fb8226ef1631296db5f164647ab7b46e91..46c82bbb40014a840231409bfbebd04df34d3075 100644 (file)
@@ -189,12 +189,12 @@ struct ethoc_bd {
        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);
 }
 
-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);
 }
@@ -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)
 {
-       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);
 }
@@ -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)
 {
-       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);
 }