[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFqsqr7i7cdR5-I0@mai.linaro.org>
Date: Tue, 24 Jun 2025 15:48:26 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Will McVicker <willmcvicker@...gle.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Krzysztof Kozlowski <krzk@...nel.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Rob Herring <robh@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Donghoon Yu <hoony.yu@...sung.com>,
Hosung Kim <hosung0.kim@...sung.com>, kernel-team@...roid.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
John Stultz <jstultz@...gle.com>,
Youngmin Nam <youngmin.nam@...sung.com>,
Peter Griffin <peter.griffin@...aro.org>,
Tudor Ambarus <tudor.ambarus@...aro.org>,
André Draszik <andre.draszik@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
linux-samsung-soc@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v4 5/6] clocksource/drivers/exynos_mct: Add module support
On Fri, Jun 20, 2025 at 11:17:08AM -0700, Will McVicker wrote:
> From: Donghoon Yu <hoony.yu@...sung.com>
>
> On Arm64 platforms the Exynos MCT driver can be built as a module. On
> boot (and even after boot) the arch_timer is used as the clocksource and
> tick timer. Once the MCT driver is loaded, it can be used as the wakeup
> source for the arch_timer.
>
> Signed-off-by: Donghoon Yu <hoony.yu@...sung.com>
> Signed-off-by: Youngmin Nam <youngmin.nam@...sung.com>
> [original commit from https://android.googlesource.com/kernel/gs/+/8a52a8288ec7d88ff78f0b37480dbb0e9c65bbfd]
> Reviewed-by: Youngmin Nam <youngmin.nam@...sung.com>
> Tested-by: Youngmin Nam <youngmin.nam@...sung.com>
> Signed-off-by: Will McVicker <willmcvicker@...gle.com>
> ---
...
> -static int __init mct_init_spi(struct device_node *np)
__init_or_module
> +static int mct_init_spi(struct device_node *np)
> {
> return mct_init_dt(np, MCT_INT_SPI);
> }
>
> -static int __init mct_init_ppi(struct device_node *np)
> +static int mct_init_ppi(struct device_node *np)
> {
> return mct_init_dt(np, MCT_INT_PPI);
> }
> -TIMER_OF_DECLARE(exynos4210, "samsung,exynos4210-mct", mct_init_spi);
> -TIMER_OF_DECLARE(exynos4412, "samsung,exynos4412-mct", mct_init_ppi);
Are you sure this is not going to hurt the ARM platforms ? Here the
timer is enabled very early in the boot process while with this change
the timer will be available later.
> +static int exynos4_mct_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + int (*mct_init)(struct device_node *np);
> +
> + mct_init = of_device_get_match_data(dev);
> + if (!mct_init)
> + return -EINVAL;
> +
> + return mct_init(dev->of_node);
> +}
> +
> +static const struct of_device_id exynos4_mct_match_table[] = {
> + { .compatible = "samsung,exynos4210-mct", .data = &mct_init_spi, },
> + { .compatible = "samsung,exynos4412-mct", .data = &mct_init_ppi, },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, exynos4_mct_match_table);
> +
> +static struct platform_driver exynos4_mct_driver = {
> + .probe = exynos4_mct_probe,
> + .driver = {
> + .name = "exynos-mct",
> + .of_match_table = exynos4_mct_match_table,
> + },
> +};
> +module_platform_driver(exynos4_mct_driver);
> +
> +MODULE_DESCRIPTION("Exynos Multi Core Timer Driver");
> +MODULE_LICENSE("GPL");
> --
> 2.50.0.rc2.761.g2dc52ea45b-goog
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists