On Tue, 2015-05-19 at 10:01 -0700, Tim Harvey wrote:
> This reverts commit 17da7120249bfdef877f46be5bbcb3cc01212eb9.
> 
> The i210/i211 do have the SW_FW_SYNC (0x5b5c) register and this is what should
> be used when acquiring the semaphore.
> 
> I believe the issue that this patch was trying to resolve is now resolved
> by properly releasing the semaphore once no longer needed.
> 
> Cc: Marcel Ziswiler <mar...@ziswiler.com>
> Cc: Marek Vasut <ma...@denx.de>
> Cc: Aneesh Bansal <aneesh.ban...@freescale.com>
> Cc: Naveen Burmi <naveenbu...@freescale.com>
> Cc: Po Liu <po....@freescale.com>
> Cc: Bin Meng <bmeng...@gmail.com>
> Cc: Alison Wang <alison.w...@freescale.com>
> Cc: Reinhard Arlt <reinhard.a...@esd-electronics.com>
> Cc: Shengzhou Liu  <shengzhou....@freescale.com>
> Cc: York Sun <york...@freescale.com>
> Signed-off-by: Tim Harvey <thar...@gateworks.com>
> ---
>  drivers/net/e1000.c | 6 ++----
>  drivers/net/e1000.h | 1 -
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
> index a64bc7b..f960024 100644
> --- a/drivers/net/e1000.c
> +++ b/drivers/net/e1000.c
> @@ -1120,10 +1120,7 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t 
> mask)
>               if (e1000_get_hw_eeprom_semaphore(hw))
>                       return -E1000_ERR_SWFW_SYNC;
>  
> -             if (hw->mac_type == e1000_igb)
> -                     swfw_sync = E1000_READ_REG(hw, I210_SW_FW_SYNC);
> -             else
> -                     swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
> +             swfw_sync = E1000_READ_REG(hw, SW_FW_SYNC);
>               if (!(swfw_sync & (fwmask | swmask)))
>                       break;
>  
> @@ -4458,6 +4455,7 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
>  
>               if (hw->mac_type >= e1000_82571)
>                       mdelay(10);
> +
>       } else {
>               /* Read the Extended Device Control Register, assert the 
> PHY_RESET_DIR
>                * bit to put the PHY into reset. Then, take it out of reset.
> diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
> index f3b77b1..232c95d 100644
> --- a/drivers/net/e1000.h
> +++ b/drivers/net/e1000.h
> @@ -2496,7 +2496,6 @@ struct e1000_hw {
>  #define ICH_GFPREG_BASE_MASK       0x1FFF
>  #define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF
>  
> -#define E1000_I210_SW_FW_SYNC 0x5B50 /* Software-Firmware Synchronization - 
> RW */
>  #define E1000_SW_FW_SYNC 0x05B5C /* Software-Firmware Synchronization - RW */
>  
>  /* SPI EEPROM Status Register */

Tested on Apalis T30 1GB V1.1A with properly fused i211
Tested on Apalis T30 2GB V1.1A with iNVM fused i210
Tested on Apalis T30 1GB V1.0A with tools only aka non fused i211
Tested-by: Marcel Ziswiler <marcel.ziswi...@toradex.com>
---
BTW: Still fails on Apalis T30 2GB V1.0E with tools only aka non fused
i210 as follows:
e1000: e1000#0: ERROR: Hardware Initialization Failed
In our downstream production U-Boot we temporarily hacked this as
follows for now:
http://git.toradex.com/cgit/u-boot-toradex.git/commit/?h=2015.04-toradex&id=2d8ea651b6da79047b6fa729863d25b5eb9e15d7

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to