lkml.org 
[lkml]   [2021]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 1/2] clocksource/drivers/exynos_mct_v2: introduce Exynos MCT version 2 driver for next Exynos SoC
From
Date
On 21/10/2021 08:18, Youngmin Nam wrote:
> Exynos MCT version 2 is composed of 1 FRC and 12 comparators.
> The 12 comparators can produces interrupts independently,
> so they can be used as local timer of each CPU.
>

...

> +
> +static void exynos_mct_comp_start(struct mct_clock_event_device *mevt,
> + bool periodic, unsigned long cycles)
> +{
> + unsigned int index = mevt->comp_index;
> + unsigned int comp_enable;
> + unsigned int loop_cnt = 0;
> +
> + comp_enable = readl_relaxed(reg_base + EXYNOS_MCT_COMP_ENABLE(index));
> + if (comp_enable == MCT_COMP_ENABLE)
> + exynos_mct_comp_stop(mevt);
> +
> + if (periodic)
> + writel_relaxed(MCT_COMP_CIRCULAR_MODE, reg_base + EXYNOS_MCT_COMP_MODE(index));
> +
> + writel_relaxed(cycles, reg_base + EXYNOS_MCT_COMP_PERIOD(index));

This is unsigned long, so 64-bit on your platform. Use writeq_relaxed or
handle it somehow.


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2021-10-27 10:39    [W:0.440 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site