]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: gem: Sync driver with mainline
authorMichal Simek <michal.simek@xilinx.com>
Thu, 26 Nov 2015 09:34:41 +0000 (10:34 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 26 Nov 2015 10:03:51 +0000 (11:03 +0100)
Fix one comment, remove unused macro and remove inline from
wait_for_bit.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/zynq_gem.c

index afa565c3cb7ffa8bc64074f5f8d2206a01baa9c5..7c9aacd00d483282f4682156ff8fee6dee8f3e05 100644 (file)
@@ -314,7 +314,7 @@ static int zynq_gem_setup_mac(struct eth_device *dev)
 static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
 {
        u32 i;
-       unsigned long __maybe_unused clk_rate = 0;
+       unsigned long clk_rate = 0;
        struct phy_device *phydev;
        struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
        struct zynq_gem_priv *priv = dev->priv;
@@ -368,10 +368,7 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
                /* Setup for Network Control register, MDIO, Rx and Tx enable */
                setbits_le32(&regs->nwctrl, ZYNQ_GEM_NWCTRL_MDEN_MASK);
 
-               /*
-                * Disable the second priority queue.
-                * FIXME: Consider GEMs with more than 2 queues.
-                */
+               /* Disable the second priority queue */
                dummy_tx_bd->addr = 0;
                dummy_tx_bd->status = ZYNQ_GEM_TXBUF_WRAP_MASK |
                                ZYNQ_GEM_TXBUF_LAST_MASK|
@@ -444,13 +441,13 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
        return 0;
 }
 
-static inline int wait_for_bit(const char *func, u32 *reg, const u32 mask,
-                              bool set, unsigned int timeout)
+static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
+                       bool set, unsigned int timeout)
 {
        u32 val;
        unsigned long start = get_timer(0);
 
-       while(1) {
+       while (1) {
                val = readl(reg);
 
                if (!set)
@@ -467,7 +464,6 @@ static inline int wait_for_bit(const char *func, u32 *reg, const u32 mask,
                        return -1;
                }
 
-
                udelay(1);
        }