Re: [PATCH net-next 01/15] net: sparx5: add support for lan969x SKU's and core clock

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

 



On Mon, Oct 21, 2024 at 03:58:38PM +0200, Daniel Machon wrote:
> In preparation for lan969x, add lan969x SKU's (Stock Keeping Unit) to
> sparx5_target_chiptype and set the core clock frequency for these
> throughout. Lan969x only supports a core clock frequency of 328MHz.
> 
> Reviewed-by: Steen Hegelund <Steen.Hegelund@xxxxxxxxxxxxx>
> Signed-off-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>

...

> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> index d1e9bc030c80..f48b5769e1b3 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> @@ -475,6 +475,20 @@ static int sparx5_init_coreclock(struct sparx5 *sparx5)
>  		else if (sparx5->coreclock == SPX5_CORE_CLOCK_250MHZ)
>  			freq = 0; /* Not supported */
>  		break;
> +	case SPX5_TARGET_CT_LAN9694:
> +	case SPX5_TARGET_CT_LAN9691VAO:
> +	case SPX5_TARGET_CT_LAN9694TSN:
> +	case SPX5_TARGET_CT_LAN9694RED:
> +	case SPX5_TARGET_CT_LAN9696:
> +	case SPX5_TARGET_CT_LAN9692VAO:
> +	case SPX5_TARGET_CT_LAN9696TSN:
> +	case SPX5_TARGET_CT_LAN9696RED:
> +	case SPX5_TARGET_CT_LAN9698:
> +	case SPX5_TARGET_CT_LAN9693VAO:
> +	case SPX5_TARGET_CT_LAN9698TSN:
> +	case SPX5_TARGET_CT_LAN9698RED:
> +		freq = SPX5_CORE_CLOCK_328MHZ;
> +		break;

Hi Daniel,

It is addressed in patch 12/15, but until then pol_upd_int will
be used uninitialised later on in this function when this case it hit.

Flagged by Smatch.

>  	default:
>  		dev_err(sparx5->dev, "Target (%#04x) not supported\n",
>  			sparx5->target_ct);

...




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux