[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <117dfec8-e417-642b-7647-9d17592826ad@canonical.com>
Date: Wed, 27 Oct 2021 10:38:09 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Youngmin Nam <youngmin.nam@...sung.com>
Cc: daniel.lezcano@...aro.org, tglx@...utronix.de,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, pullip.cho@...sung.com,
hoony.yu@...sung.com, hajun.sung@...sung.com,
myung-su.cha@...sung.com
Subject: Re: [PATCH v1 1/2] clocksource/drivers/exynos_mct_v2: introduce
Exynos MCT version 2 driver for next Exynos SoC
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
Powered by blists - more mailing lists