]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: macb: timer adjust mode is not supported
authorConor Dooley <conor.dooley@microchip.com>
Wed, 25 Mar 2026 16:28:15 +0000 (16:28 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 29 Mar 2026 21:34:28 +0000 (14:34 -0700)
The ptp portion of this driver controls the tsu's timer using the
controls for "increment mode", which is not compatible with the hardware
trying to control it via the gem_tsu_inc_ctrl and gem_tsu_ms inputs in
"timer adjust mode". Abort probe if the property signalling that the
relevant signals have been wired up is present.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260325-facebook-chop-cf792c53f1da@spud
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c

index 7deae61a61d4968ecc3f7c7c9a789e5a385d759f..11074938c6bb721e64f8715ab8065e5b26ba3f6b 100644 (file)
@@ -5838,6 +5838,13 @@ static int macb_probe(struct platform_device *pdev)
 
        bp->usrio = macb_config->usrio;
 
+       if (of_property_read_bool(bp->pdev->dev.of_node, "cdns,timer-adjust") &&
+                       IS_ENABLED(CONFIG_MACB_USE_HWSTAMP)) {
+               dev_err(&pdev->dev, "Timer adjust mode is not supported\n");
+               err = -EINVAL;
+               goto err_out_free_netdev;
+       }
+
        /* By default we set to partial store and forward mode for zynqmp.
         * Disable if not set in devicetree.
         */