From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1BD710E0; Fri, 6 Dec 2024 14:47:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733496424; cv=none; b=CF/acdrb0UGL5garDDjxZUvD91tk5zExvjUfEPRIaI2jDN9C78e6+zFbAJOvbRDTyUryuEAQL/5i2aM+hT4TLq4BP28pvEYWscvZU+QWYiCjbRm4OfWfSkbZPARWfvf8L9z9LBCSBAZR8D/SKpJQaB8SvmVrptEdHQcHJYNFvXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733496424; c=relaxed/simple; bh=ucvVBNMAUMt7Lml+NMgA2Sod/DLbi/U7EPAgROQ9yOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b/TqE350f2jXF9+fMjiayytxJGhfvo9S1N59lBTzgQJZ86RJm+3/0QVjOByCWRlARMXl9ccHRmIw3XGiUzdwyfhPl9ROFtZWt2EiCfHQpk97bz7zN5KU2w9Ip+MH2CGLmjYMyHYhT5qQ0EmMTF8M2gk6Jt+7YADPgpHT/W3/vPo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dEaLeaBe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dEaLeaBe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 320CFC4CED1; Fri, 6 Dec 2024 14:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733496424; bh=ucvVBNMAUMt7Lml+NMgA2Sod/DLbi/U7EPAgROQ9yOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dEaLeaBeM5y+fVToJRots3cYvQKzbTzaxPC099uDujsKpzBwYQ2JsT4028YKHQhcD t4NaJqABYmguL3+tcf6WLum1M8XGuc9kR9VMW1BL8STjT8kcn70RuneSMVIN5MYeMY ze1wDYnuzQJyoEPQhOK2RiOduFAUoK1jtNj24kks= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Frank Li , Rafael Beims , Francesco Dolcini , =?UTF-8?q?Cs=C3=B3k=C3=A1s, =20Bence?= , Paolo Abeni Subject: [PATCH 6.12 118/146] net: fec: make PPS channel configurable Date: Fri, 6 Dec 2024 15:37:29 +0100 Message-ID: <20241206143532.197665488@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241206143527.654980698@linuxfoundation.org> References: <20241206143527.654980698@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Francesco Dolcini commit 566c2d83887f0570056833102adc5b88e681b0c7 upstream. Depending on the SoC where the FEC is integrated into the PPS channel might be routed to different timer instances. Make this configurable from the devicetree. When the related DT property is not present fallback to the previous default and use channel 0. Reviewed-by: Frank Li Tested-by: Rafael Beims Signed-off-by: Francesco Dolcini Reviewed-by: Csókás, Bence Signed-off-by: Paolo Abeni Signed-off-by: Csókás, Bence Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/fec_ptp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -523,8 +523,6 @@ static int fec_ptp_enable(struct ptp_clo unsigned long flags; int ret = 0; - fep->pps_channel = DEFAULT_PPS_CHANNEL; - if (rq->type == PTP_CLK_REQ_PPS) { fep->reload_period = PPS_OUPUT_RELOAD_PERIOD; @@ -706,12 +704,16 @@ void fec_ptp_init(struct platform_device { struct net_device *ndev = platform_get_drvdata(pdev); struct fec_enet_private *fep = netdev_priv(ndev); + struct device_node *np = fep->pdev->dev.of_node; int irq; int ret; fep->ptp_caps.owner = THIS_MODULE; strscpy(fep->ptp_caps.name, "fec ptp", sizeof(fep->ptp_caps.name)); + fep->pps_channel = DEFAULT_PPS_CHANNEL; + of_property_read_u32(np, "fsl,pps-channel", &fep->pps_channel); + fep->ptp_caps.max_adj = 250000000; fep->ptp_caps.n_alarm = 0; fep->ptp_caps.n_ext_ts = 0;