Re: [PATCH net-next v2 5/9] net: pcs: rzn1-miic: move port range handling into SoC data

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

 



On Thu, Sep 04, 2025 at 12:41:59PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> 
> Define per-SoC miic_port_start and miic_port_max fields in struct
> miic_of_data and use them to validate the device-tree "reg" port number
> and to compute the driver's internal zero-based port index as
> (port - miic_port_start). Replace uses of the hard-coded MIIC_MAX_NR_PORTS
> with the SoC-provided miic_port_max when iterating over ports.
> 
> On RZ/N1 the MIIC ports are numbered 1..5, whereas RZ/T2H numbers its MIIC
> ports 0..3. By making the port base and range part of the OF data the
> driver no longer assumes a fixed numbering scheme and can support SoCs that
> enumerate ports from either zero or one and that expose different numbers
> of ports.
> 
> This change is preparatory work for adding RZ/T2H support.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

    Andrew




[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