From: fu.wei@linaro.org (fu.wei at linaro.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/6] clocksource: move some enums to arm_arch_timer.h
Date: Tue, 2 Feb 2016 04:26:56 +0800 [thread overview]
Message-ID: <1454358418-5157-5-git-send-email-fu.wei@linaro.org> (raw)
In-Reply-To: <1454358418-5157-1-git-send-email-fu.wei@linaro.org>
From: Fu Wei <fu.wei@linaro.org>
The patch move enum ppi_nr from arm_arch_timer.c
to arm_arch_timer.h, and add enum spi_nr.
Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
drivers/clocksource/arm_arch_timer.c | 13 ++-----------
include/clocksource/arm_arch_timer.h | 14 ++++++++++++++
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 3792fd6..90d17ef 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -52,15 +52,6 @@ struct arch_timer {
#define to_arch_timer(e) container_of(e, struct arch_timer, evt)
static u32 arch_timer_rate;
-
-enum ppi_nr {
- PHYS_SECURE_PPI,
- PHYS_NONSECURE_PPI,
- VIRT_PPI,
- HYP_PPI,
- MAX_TIMER_PPI
-};
-
static int arch_timer_ppi[MAX_TIMER_PPI];
static struct clock_event_device __percpu *arch_timer_evt;
@@ -798,9 +789,9 @@ static void __init arch_timer_mem_init(struct device_node *np)
}
if (arch_timer_mem_use_virtual)
- irq = irq_of_parse_and_map(best_frame, 1);
+ irq = irq_of_parse_and_map(best_frame, VIRT_SPI);
else
- irq = irq_of_parse_and_map(best_frame, 0);
+ irq = irq_of_parse_and_map(best_frame, PHYS_SPI);
of_node_put(best_frame);
if (!irq) {
pr_err("arch_timer: Frame missing %s irq",
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h
index 7a6d6dc..7bb5c1e 100644
--- a/include/clocksource/arm_arch_timer.h
+++ b/include/clocksource/arm_arch_timer.h
@@ -32,6 +32,20 @@ enum arch_timer_reg {
ARCH_TIMER_REG_TVAL,
};
+enum ppi_nr {
+ PHYS_SECURE_PPI,
+ PHYS_NONSECURE_PPI,
+ VIRT_PPI,
+ HYP_PPI,
+ MAX_TIMER_PPI
+};
+
+enum spi_nr {
+ PHYS_SPI,
+ VIRT_SPI,
+ MAX_TIMER_SPI
+};
+
#define ARCH_TIMER_PHYS_ACCESS 0
#define ARCH_TIMER_VIRT_ACCESS 1
#define ARCH_TIMER_MEM_PHYS_ACCESS 2
--
2.5.0
next prev parent reply other threads:[~2016-02-01 20:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 20:26 [PATCH v3 0/6] acpi, clocksource, kvm: add GTDT and ARM memory-mapped timer support fu.wei at linaro.org
2016-02-01 20:26 ` [PATCH v3 1/6] ACPI: add GTDT table parse driver into ACPI driver fu.wei at linaro.org
2016-02-01 20:26 ` [PATCH v3 2/6] clocksource: simplify ACPI code in arm_arch_timer.c fu.wei at linaro.org
2016-02-01 20:26 ` [PATCH v3 3/6] clocksource: add memory-mapped timer support " fu.wei at linaro.org
2016-02-01 20:26 ` fu.wei at linaro.org [this message]
2016-02-01 20:26 ` [PATCH v3 5/6] kvm: arm64: wrapping DT support for virt arch timer fu.wei at linaro.org
2016-02-01 20:26 ` [PATCH v3 6/6] kvm: arm64: Add ACPI " fu.wei at linaro.org
2016-02-07 13:30 ` kbuild test robot
2016-02-08 17:10 ` Marc Zyngier
2016-02-21 16:35 ` Fu Wei
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=1454358418-5157-5-git-send-email-fu.wei@linaro.org \
--to=fu.wei@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).