]> Git Repo - linux.git/commitdiff
net: ti: icss-iep: fix setting counter value
authorDiogo Ivo <[email protected]>
Tue, 7 Nov 2023 12:00:36 +0000 (12:00 +0000)
committerPaolo Abeni <[email protected]>
Thu, 9 Nov 2023 12:15:40 +0000 (13:15 +0100)
Currently icss_iep_set_counter() writes the upper 32-bits of the
counter value to both the lower and upper counter registers, so
fix this by writing the appropriate value to the lower register.

Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Diogo Ivo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
drivers/net/ethernet/ti/icssg/icss_iep.c

index 4cf2a52e43783f229c87e17599bf6896754812bf..3025e9c189702ba7be0cab869f733675e979097a 100644 (file)
@@ -177,7 +177,7 @@ static void icss_iep_set_counter(struct icss_iep *iep, u64 ns)
        if (iep->plat_data->flags & ICSS_IEP_64BIT_COUNTER_SUPPORT)
                writel(upper_32_bits(ns), iep->base +
                       iep->plat_data->reg_offs[ICSS_IEP_COUNT_REG1]);
-       writel(upper_32_bits(ns), iep->base + iep->plat_data->reg_offs[ICSS_IEP_COUNT_REG0]);
+       writel(lower_32_bits(ns), iep->base + iep->plat_data->reg_offs[ICSS_IEP_COUNT_REG0]);
 }
 
 static void icss_iep_update_to_next_boundary(struct icss_iep *iep, u64 start_ns);
This page took 0.069008 seconds and 4 git commands to generate.