ibm_newemac: Correct opb_bus_freq value
authorValentine Barshak <vbarshak@ru.mvista.com>
Wed, 5 Dec 2007 00:14:31 +0000 (11:14 +1100)
committerJeff Garzik <jeff@garzik.org>
Fri, 7 Dec 2007 20:09:06 +0000 (15:09 -0500)
The EMAC4_MR1_OBCI(freq) macro expects freg in MHz,
while opb_bus_freq is kept in Hz. Correct this.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/ibm_newemac/core.c

index a77207f1967175b02d7718df1004e537f6155c79..9642931c66ea7282fc025b1ef4a6e5e0be51ca1f 100644 (file)
@@ -402,7 +402,7 @@ static u32 __emac_calc_base_mr1(struct emac_instance *dev, int tx_size, int rx_s
 static u32 __emac4_calc_base_mr1(struct emac_instance *dev, int tx_size, int rx_size)
 {
        u32 ret = EMAC_MR1_VLE | EMAC_MR1_IST | EMAC4_MR1_TR |
-               EMAC4_MR1_OBCI(dev->opb_bus_freq);
+               EMAC4_MR1_OBCI(dev->opb_bus_freq / 1000000);
 
        DBG2(dev, "__emac4_calc_base_mr1" NL);