Commit 83b9dda8 authored by Diogo Ivo's avatar Diogo Ivo Committed by Paolo Abeni
Browse files

net: ti: icss-iep: fix setting counter value



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: c1e0230e ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: default avatarDiogo Ivo <diogo.ivo@siemens.com>
Link: https://lore.kernel.org/r/20231107120037.1513546-1-diogo.ivo@siemens.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 1bea2c3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);