From: Baolin Wang <baolin.wang@linaro.org> To: tglx@linutronix.de, john.stultz@linaro.org, daniel.lezcano@linaro.org, arnd@arndb.de, tony@atomide.com, aaro.koskinen@iki.fi, linux@armlinux.org.uk, mark.rutland@arm.com, marc.zyngier@arm.com Cc: baolin.wang@linaro.org, broonie@kernel.org, paulmck@linux.vnet.ibm.com, mlichvar@redhat.com, rdunlap@infradead.org, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, pombredanne@nexb.com, thierry.reding@gmail.com, jonathanh@nvidia.com, heiko@sntech.de, linus.walleij@linaro.org, viresh.kumar@linaro.org, mingo@kernel.org, hpa@zytor.com, peterz@infradead.org, douly.fnst@cn.fujitsu.com, len.brown@intel.com, rajvi.jingar@intel.com, alexandre.belloni@bootlin.com, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 6/8] clocksource: time-pistachio: Register the persistent clock Date: Wed, 13 Jun 2018 19:32:33 +0800 [thread overview] Message-ID: <e00f46be05f74439eecd9c4fb43baa4cd0dae297.1528878545.git.baolin.wang@linaro.org> (raw) In-Reply-To: <cover.1528878545.git.baolin.wang@linaro.org> In-Reply-To: <cover.1528878545.git.baolin.wang@linaro.org> Since the timer on pistachio platform is always available, we can register it as one persistent clock to compensate the suspend time for the OS time. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> --- drivers/clocksource/Kconfig | 1 + drivers/clocksource/time-pistachio.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 3cd136f..af552ba 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -255,6 +255,7 @@ config CLKSRC_PISTACHIO bool "Clocksource for Pistachio SoC" if COMPILE_TEST depends on HAS_IOMEM select TIMER_OF + select PERSISTENT_CLOCK help Enables the clocksource for the Pistachio SoC. diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c index a2dd85d..5c3eb71 100644 --- a/drivers/clocksource/time-pistachio.c +++ b/drivers/clocksource/time-pistachio.c @@ -20,6 +20,7 @@ #include <linux/mfd/syscon.h> #include <linux/of.h> #include <linux/of_address.h> +#include <linux/persistent_clock.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/sched_clock.h> @@ -212,6 +213,8 @@ static int __init pistachio_clksrc_of_init(struct device_node *node) raw_spin_lock_init(&pcs_gpt.lock); sched_clock_register(pistachio_read_sched_clock, 32, rate); + persistent_clock_init_and_register(pistachio_read_sched_clock, + CLOCKSOURCE_MASK(32), rate, 0); return clocksource_register_hz(&pcs_gpt.cs, rate); } TIMER_OF_DECLARE(pistachio_gptimer, "img,pistachio-gptimer", -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: baolin.wang@linaro.org (Baolin Wang) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/8] clocksource: time-pistachio: Register the persistent clock Date: Wed, 13 Jun 2018 19:32:33 +0800 [thread overview] Message-ID: <e00f46be05f74439eecd9c4fb43baa4cd0dae297.1528878545.git.baolin.wang@linaro.org> (raw) In-Reply-To: <cover.1528878545.git.baolin.wang@linaro.org> Since the timer on pistachio platform is always available, we can register it as one persistent clock to compensate the suspend time for the OS time. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> --- drivers/clocksource/Kconfig | 1 + drivers/clocksource/time-pistachio.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 3cd136f..af552ba 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -255,6 +255,7 @@ config CLKSRC_PISTACHIO bool "Clocksource for Pistachio SoC" if COMPILE_TEST depends on HAS_IOMEM select TIMER_OF + select PERSISTENT_CLOCK help Enables the clocksource for the Pistachio SoC. diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c index a2dd85d..5c3eb71 100644 --- a/drivers/clocksource/time-pistachio.c +++ b/drivers/clocksource/time-pistachio.c @@ -20,6 +20,7 @@ #include <linux/mfd/syscon.h> #include <linux/of.h> #include <linux/of_address.h> +#include <linux/persistent_clock.h> #include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/sched_clock.h> @@ -212,6 +213,8 @@ static int __init pistachio_clksrc_of_init(struct device_node *node) raw_spin_lock_init(&pcs_gpt.lock); sched_clock_register(pistachio_read_sched_clock, 32, rate); + persistent_clock_init_and_register(pistachio_read_sched_clock, + CLOCKSOURCE_MASK(32), rate, 0); return clocksource_register_hz(&pcs_gpt.cs, rate); } TIMER_OF_DECLARE(pistachio_gptimer, "img,pistachio-gptimer", -- 1.7.9.5
next prev parent reply other threads:[~2018-06-13 11:32 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-13 11:32 [PATCH 0/8] Add persistent clock support Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-13 11:32 ` [PATCH 1/8] time: " Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-24 0:14 ` Thomas Gleixner 2018-06-24 0:14 ` Thomas Gleixner 2018-06-24 0:14 ` Thomas Gleixner 2018-06-25 16:18 ` Thomas Gleixner 2018-06-25 16:18 ` Thomas Gleixner 2018-06-25 17:23 ` John Stultz 2018-06-25 17:23 ` John Stultz 2018-06-25 17:23 ` John Stultz 2018-06-25 20:06 ` Thomas Gleixner 2018-06-25 20:06 ` Thomas Gleixner 2018-06-25 20:06 ` Thomas Gleixner 2018-06-26 2:12 ` Baolin Wang 2018-06-26 2:12 ` Baolin Wang 2018-06-26 2:12 ` Baolin Wang 2018-06-26 2:08 ` Baolin Wang 2018-06-26 2:08 ` Baolin Wang 2018-06-26 2:08 ` Baolin Wang 2018-06-13 11:32 ` [PATCH 2/8] clocksource: sprd: Add one persistent timer for Spreadtrum platform Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-13 11:32 ` [PATCH 3/8] arm: time: Remove the persistent clock support for ARM architecture Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-24 0:21 ` Thomas Gleixner 2018-06-24 0:21 ` Thomas Gleixner 2018-06-24 0:21 ` Thomas Gleixner 2018-06-13 11:32 ` [PATCH 4/8] clocksource: arm_arch_timer: Register the persistent clock Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-13 11:32 ` [PATCH 5/8] clocksource: timer-ti-32k: " Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-13 11:32 ` Baolin Wang [this message] 2018-06-13 11:32 ` [PATCH 6/8] clocksource: time-pistachio: " Baolin Wang 2018-06-13 11:32 ` [PATCH 7/8] x86: tsc: " Baolin Wang 2018-06-13 11:32 ` Baolin Wang 2018-06-13 11:32 ` [PATCH 8/8] time: timekeeping: Remove time compensating from nonstop clocksources Baolin Wang 2018-06-13 11:32 ` Baolin Wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e00f46be05f74439eecd9c4fb43baa4cd0dae297.1528878545.git.baolin.wang@linaro.org \ --to=baolin.wang@linaro.org \ --cc=aaro.koskinen@iki.fi \ --cc=alexandre.belloni@bootlin.com \ --cc=arnd@arndb.de \ --cc=broonie@kernel.org \ --cc=daniel.lezcano@linaro.org \ --cc=douly.fnst@cn.fujitsu.com \ --cc=gregkh@linuxfoundation.org \ --cc=heiko@sntech.de \ --cc=hpa@zytor.com \ --cc=john.stultz@linaro.org \ --cc=jonathanh@nvidia.com \ --cc=kstewart@linuxfoundation.org \ --cc=len.brown@intel.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=marc.zyngier@arm.com \ --cc=mark.rutland@arm.com \ --cc=mingo@kernel.org \ --cc=mlichvar@redhat.com \ --cc=paulmck@linux.vnet.ibm.com \ --cc=peterz@infradead.org \ --cc=pombredanne@nexb.com \ --cc=rajvi.jingar@intel.com \ --cc=rdunlap@infradead.org \ --cc=tglx@linutronix.de \ --cc=thierry.reding@gmail.com \ --cc=tony@atomide.com \ --cc=viresh.kumar@linaro.org \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.