Mercurial > nand-ecoscentric
changeset 3041:2713c1ff33ac
* src/if_at91.c: Invert test for NSR IDLE bit. Issue reported by
Will Wagner.
| author | jld |
|---|---|
| date | Mon, 02 Aug 2010 07:59:09 +0000 |
| parents | 0ee78d0821ab |
| children | 93b4b6fbee30 |
| files | packages/devs/eth/arm/at91/current/ChangeLog packages/devs/eth/arm/at91/current/src/if_at91.c |
| diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <john@dallaway.org.uk> + + * src/if_at91.c: Invert test for NSR IDLE bit. Issue reported by + Will Wagner. + 2007-04-08 Uwe Kindler <uwe_kindler@web.de> * cdl/at91_eth.cdl: Fixed typo. (Removed AT91RM9200 from @@ -11,19 +16,19 @@ 2007-03-23 John Eigelaar <jeigelaar@mw 2007-01-17 John Eigelaar <jeigelaar@mweb.co.za> - * 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 <andrew.lunn@ascom.ch> - * 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
--- 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);
