Re: [PATCH net v1 1/1] net: stmmac: Assign configured channel value to EXTTS event

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

 



On Tue, 2024-06-18 at 09:38 +0200, Oleksij Rempel wrote:
> @@ -243,12 +244,15 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
>  	num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
>  		       GMAC_TIMESTAMP_ATSNS_SHIFT;
>  
> +	acr_value = readl(priv->ptpaddr + PTP_ACR);
> +	channel = ilog2(FIELD_GET(PTP_ACR_MASK, acr_value));

Side note for a possible net-next follow-up: as the driver already has
an equal snippet in stmmac_enable(), you con consider factor it out in
a common, more readable helper.

Cheers,

Paolo






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux