]> git.sur5r.net Git - u-boot/blobdiff - cpu/ppc4xx/miiphy.c
ppc/85xx: add cpu init config file for boot from NAND
[u-boot] / cpu / ppc4xx / miiphy.c
index 84b1bbe54d5cca642bbe729d3a9a5dc1aa02fc69..fa3bfc8d9f51f4e438613c9462424e18e39774d7 100644 (file)
@@ -1,4 +1,6 @@
 /*-----------------------------------------------------------------------------+
+  |   This source code is dual-licensed.  You may use it under the terms of the
+  |   GNU General Public License version 2, or under the license below.
   |
   |      This source code has been made available to you by IBM on an AS-IS
   |      basis.  Anyone receiving this source is licensed under IBM
@@ -301,7 +303,7 @@ static int emac_miiphy_command(u8 addr, u8 reg, int cmd, u16 value)
 
        sta_reg = reg;          /* reg address */
 
-       /* set clock (50Mhz) and read flags */
+       /* set clock (50MHz) and read flags */
 #if defined(CONFIG_440GX) || defined(CONFIG_440SPE) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
@@ -348,7 +350,7 @@ int emac4xx_miiphy_read (char *devname, unsigned char addr, unsigned char reg,
                return -1;
 
        sta_reg = in_be32((void *)EMAC_STACR + emac_reg);
-       *value = *(u16 *)(&sta_reg);
+       *value = sta_reg >> 16;
 
        return 0;
 }