Re: [PATCH/RFC] net: ravb: Add MII support for R-Car V4M

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

 



On 6/14/24 6:25 PM, Geert Uytterhoeven wrote:

> All EtherAVB instances on R-Car Gen3/Gen4 SoCs support the RGMII
> interface.  In addition, the first two EtherAVB instances on R-Car V4M
> also support the MII interface, but this is not yet supported by the
> driver.
> 
> Add support for MII to the R-Car Gen3/Gen4-specific EMAC initialization
> function, by selecting the MII clock instead of the RGMII clock when the

   But why are you adding such code to the ge3 function? According to the gen3
manual I have, gen3 SoCs don't have MII support...

> PHY interface is MII.  Note that all implementations of EtherAVB on
> R-Car Gen3/Gen4 SoCs have the APSR register, but only MII-capable
> instances are documented to have the MIISELECT bit, which has a
> documented value of zero when reserved.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index c1546b916e4ef581..cbe2709e0ace871f 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -579,6 +579,16 @@ static void ravb_emac_init_rcar(struct net_device *ndev)
>  	ravb_write(ndev, ECSIPR_ICDIP | ECSIPR_MPDIP | ECSIPR_LCHNGIP, ECSIPR);
>  }
>  
> +static void ravb_emac_init_rcar_apsr(struct net_device *ndev)

   No, this name doesn't match the currently used naming scheme (which
has the SoC type as a last word... I'm suggesting something like ravb_emac_init_rcar_gen4() instead.

[...]
> @@ -2657,7 +2667,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
>  	.set_rate = ravb_set_rate_rcar,
>  	.set_feature = ravb_set_features_rcar,
>  	.dmac_init = ravb_dmac_init_rcar,
> -	.emac_init = ravb_emac_init_rcar,
> +	.emac_init = ravb_emac_init_rcar_apsr,

   I'm afraid we'll have to add the new ravb_gen4_hw_info variable. We already
have the gen4-specific compatible in ravb_match_table[]...

[...]

MBR, Sergey




[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