]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/smc911x.h
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
[karo-tx-uboot.git] / drivers / net / smc911x.h
index 05e007c6de2f86e0006e1abf011f91a79fe6e4ec..a290073bb8b42814c8129aba4f25647c3ea93b7f 100644 (file)
@@ -384,6 +384,7 @@ static inline void smc911x_reg_write(struct eth_device *dev,
 #define WUCSR_MPEN                     0x00000002
 
 /* Chip ID values */
+#define CHIP_89218     0x218a
 #define CHIP_9115      0x115
 #define CHIP_9116      0x116
 #define CHIP_9117      0x117
@@ -402,6 +403,7 @@ struct chip_id {
 };
 
 static const struct chip_id chip_ids[] =  {
+       { CHIP_89218, "LAN89218" },
        { CHIP_9115, "LAN9115" },
        { CHIP_9116, "LAN9116" },
        { CHIP_9117, "LAN9117" },
@@ -469,8 +471,11 @@ static void smc911x_reset(struct eth_device *dev)
 {
        int timeout;
 
-       /* Take out of PM setting first */
-       if (smc911x_reg_read(dev, PMT_CTRL) & PMT_CTRL_READY) {
+       /*
+        *  Take out of PM setting first
+        *  Device is already wake up if PMT_CTRL_READY bit is set
+        */
+       if ((smc911x_reg_read(dev, PMT_CTRL) & PMT_CTRL_READY) == 0) {
                /* Write to the bytetest will take out of powerdown */
                smc911x_reg_write(dev, BYTE_TEST, 0x0);