From: Quchaosheng cc770_get_platform_data() tests priv->cpu_interface for CPUIF_DSC before assigning it from pdata->cir: priv->can.clock.freq = pdata->osc_freq; if (priv->cpu_interface & CPUIF_DSC) priv->can.clock.freq /= 2; priv->clkout = pdata->cor; priv->bus_config = pdata->bcr; priv->cpu_interface = pdata->cir; priv comes from alloc_cc770dev() -> alloc_candev() -> alloc_netdev_mqs(), which uses kvzalloc_flex(), so cpu_interface is still zero here and the test can never match. A board that sets CPUIF_DSC in pdata->cir therefore gets its system clock halved in the hardware but not in can.clock.freq, and the bit timing is computed from twice the real clock. The platform data example in the file header, .cir = 0x41, sets that bit. Assign pdata->cir before the test, as the ISA path in cc770_isa.c already does. Fixes: e285e44d91fe ("can: cc770: add platform bus driver for the CC770 and AN82527") Assisted-by: LLM Signed-off-by: Quchaosheng Link: https://patch.msgid.link/20260917114311.534863-1-quchaosheng000406@163.com Signed-off-by: Marc Kleine-Budde --- drivers/net/can/cc770/cc770_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c index 64fbdf14e8ab..ac81670762c7 100644 --- a/drivers/net/can/cc770/cc770_platform.c +++ b/drivers/net/can/cc770/cc770_platform.c @@ -137,11 +137,11 @@ static int cc770_get_platform_data(struct platform_device *pdev, struct cc770_platform_data *pdata = dev_get_platdata(&pdev->dev); priv->can.clock.freq = pdata->osc_freq; + priv->cpu_interface = pdata->cir; if (priv->cpu_interface & CPUIF_DSC) priv->can.clock.freq /= 2; priv->clkout = pdata->cor; priv->bus_config = pdata->bcr; - priv->cpu_interface = pdata->cir; return 0; } -- 2.53.0