# HG changeset patch # User jld # Date 1280735949 0 # Node ID 2713c1ff33acca1be8a9a8358a155a021c3616c2 # Parent 0ee78d0821abb7873b1844398604e7d5e6e5360a * src/if_at91.c: Invert test for NSR IDLE bit. Issue reported by Will Wagner. diff --git a/packages/devs/eth/arm/at91/current/ChangeLog b/packages/devs/eth/arm/at91/current/ChangeLog --- a/packages/devs/eth/arm/at91/current/ChangeLog +++ b/packages/devs/eth/arm/at91/current/ChangeLog @@ -1,3 +1,8 @@ +2010-08-02 John Dallaway + + * src/if_at91.c: Invert test for NSR IDLE bit. Issue reported by + Will Wagner. + 2007-04-08 Uwe Kindler * cdl/at91_eth.cdl: Fixed typo. (Removed AT91RM9200 from @@ -11,19 +16,19 @@ 2007-03-23 John Eigelaar - * src/if_at91.c * include/at91_eth.cdl: Working implementation + * src/if_at91.c, include/at91_eth.cdl: Working implementation of a device driver for the AT91 EMAC device. 2006-06-02 Andrew Lunn - * src/if_at91.c * include/at91_eth.cdl: Partially implementation + * src/if_at91.c, include/at91_eth.cdl: Partially implementation of a device driver for the AT91 EMAC device. //=========================================================================== // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2006 Free Software Foundation, Inc. +// Copyright (C) 2006, 2010 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/packages/devs/eth/arm/at91/current/src/if_at91.c b/packages/devs/eth/arm/at91/current/src/if_at91.c --- a/packages/devs/eth/arm/at91/current/src/if_at91.c +++ b/packages/devs/eth/arm/at91/current/src/if_at91.c @@ -8,7 +8,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 2010 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -224,7 +224,7 @@ at91_write_phy(int reg_addr, int phy_add HAL_WRITE_UINT32(AT91_EMAC + AT91_EMAC_MAN, val); - /* Wait until IDLE bit in Network Status register is cleared */ + /* Wait until IDLE bit in Network Status register is set */ while (cnt < 1000000) { HAL_READ_UINT32((AT91_EMAC + AT91_EMAC_NSR), val); @@ -252,11 +252,11 @@ at91_read_phy(int reg_addr, int phy_addr HAL_WRITE_UINT32(AT91_EMAC + AT91_EMAC_MAN, val); - /* Wait until IDLE bit in Network Status register is cleared */ + /* Wait until IDLE bit in Network Status register is set */ do { HAL_READ_UINT32((AT91_EMAC + AT91_EMAC_NSR), val); - }while(val & AT91_EMAC_NSR_IDLE); + }while(!(val & AT91_EMAC_NSR_IDLE)); HAL_DELAY_US(50);