]> git.sur5r.net Git - u-boot/blobdiff - board/atmel/at91cap9adk/at91cap9adk.c
Merge branch 'master' of git://www.denx.de/git/u-boot
[u-boot] / board / atmel / at91cap9adk / at91cap9adk.c
index a3eaf1922412a7e603b852417257367c615fe2d8..c5082a0925e8ee0348cf0f9efe789c48c71a70c4 100644 (file)
@@ -196,7 +196,7 @@ static void at91cap9_macb_hw_init(void)
 
        /* Need to reset PHY -> 500ms reset */
        at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
-                                    AT91_RSTC_ERSTL | (0x0D << 8) |
+                                    (AT91_RSTC_ERSTL & (0x0D << 8)) |
                                     AT91_RSTC_URSTEN);
 
        at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
@@ -204,6 +204,11 @@ static void at91cap9_macb_hw_init(void)
        /* Wait for end hardware reset */
        while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
 
+       /* Restore NRST value */
+       at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
+                                    (AT91_RSTC_ERSTL & (0x0 << 8)) |
+                                    AT91_RSTC_URSTEN);
+
        /* Re-enable pull-up */
        writel(pin_to_mask(AT91_PIN_PB22) |
               pin_to_mask(AT91_PIN_PB25) |