RE: [PATCH rza_u-boot-2017.05 1/2] net: sh_eth: Fix port offset on RZ/A2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

Thank you!

Applied.

Chris


On Thu, Jul 04, 2019 1, Geert Uytterhoeven wrote:
> The sh_eth driver assumes a hardcoded offset of 0x800 between multiple
> port instances, which is incorrect on RZ/A2.
> 
> Fix this by making the port offset configurable, depending on SoC type.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
>  drivers/net/sh_eth.h | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h
> index 906d93d8e7e0421f..d20abc7873e45850 100644
> --- a/drivers/net/sh_eth.h
> +++ b/drivers/net/sh_eth.h
> @@ -366,8 +366,13 @@ static const u16
> sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = {
>  #define BASE_IO_ADDR	0xE8203000
>  #elif defined(CONFIG_R7S9210)
>  #define SH_ETH_TYPE_RZ
> -#define BASE_IO_ADDR	0xE8204000	/* EDMAC0 + ETHERC0 */
> -//#define BASE_IO_ADDR	0xE8204200	/* EDMAC1 + ETHERC1 */
> +#define BASE_IO_ADDR	0xE8204000
> +#endif
> +
> +#if defined(CONFIG_R7S9210)
> +#define PORT_OFFSET	0x200
> +#else
> +#define PORT_OFFSET	0x800
>  #endif
> 
>  /*
> @@ -674,7 +679,7 @@ static inline unsigned long sh_eth_reg_addr(struct
> sh_eth_dev *eth,
>  #else
>  #error
>  #endif
> -	return BASE_IO_ADDR + reg_offset[enum_index] + 0x800 * eth->port;
> +	return BASE_IO_ADDR + reg_offset[enum_index] + PORT_OFFSET * eth-
> >port;
>  }
> 
>  static inline void sh_eth_write(struct sh_eth_dev *eth, unsigned long
> data,
> --
> 2.17.1





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux