summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/ingenic-timer.c
Commit message (Collapse)AuthorAgeFilesLines
* clocksource/drivers/ingenic-timer: Use pm_sleep_ptr() macroPaul Cercueil2023-06-191-6/+4
| | | | | | | | | | | The use of the pm_sleep_ptr() macro allows the compiler to always see the dev_pm_ops structure and related functions, while still allowing the unused code to be removed, without the need for the __maybe_unused markings. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230618153937.96649-1-paul@crapouillou.net
* clocksource: ingenic: Add explicit include for cpuhotplug.hRob Herring2023-04-131-2/+1
| | | | | | | | | | | | | | | Removing include of cpu.h from of_device.h (included by of_platform.h) causes an error in ingenic-timer: drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’: drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’ The of_platform.h header is not necessary either, so it and of_address.h can be dropped. Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-11-581e2605fe47@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
* clocksource/drivers/ingenic: Add support for the JZ4760Paul Cercueil2021-04-081-0/+2
| | | | | | | | | Add support for the TCU (Timer/Counter Unit) of the JZ4760 and JZ4760B SoCs. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210308212302.10288-2-paul@crapouillou.net
* clocksource/drivers/ingenic: Fix section mismatchDaniel Lezcano2020-12-031-1/+1
| | | | | | | | | | | | | | | | | The function ingenic_tcu_get_clock() is annotated for the __init section but it is actually called from the online cpu callback. That will lead to a crash if a CPU is hotplugged after boot time. Remove the __init annotation for the ingenic_tcu_get_clock() function. Fixes: f19d838d08fc (clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT) Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezcano@linaro.org
* clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT.周琰杰 (Zhou Yanjie)2020-07-231-58/+124
| | | | | | | | | | | | | | Enable clock event handling on per CPU core basis. Make sure that interrupts raised on the first core execute event handlers on the correct CPU core. This driver is required by Ingenic processors that support SMP/SMT, such as JZ4780 and X2000. Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Tested-by: Paul Boddie <paul@boddie.org.uk> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200624170749.31762-2-zhouyanjie@wanyeetech.com
* clocksource/drivers/ingenic: Add support for TCU of X1000周琰杰 (Zhou Yanjie)2020-02-271-1/+2
| | | | | | | | | X1000 has a different TCU containing OST, since X1000, OST has been independent of TCU. This patch is prepare for later OST driver. Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/1582100974-129559-5-git-send-email-zhouyanjie@wanyeetech.com
* clocksource: Add a new timer-ingenic driverPaul Cercueil2019-08-081-0/+356
This driver handles the TCU (Timer Counter Unit) present on the Ingenic JZ47xx SoCs, and provides the kernel with a system timer, a clocksource and a sched_clock. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Tested-by: Mathieu Malaterre <malat@debian.org> Tested-by: Artur Rojek <contact@artur-rojek.eu> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Lee Jones <lee.jones@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: od@zcrc.me