From: Stephen Boyd <sboyd@codeaurora.org>
To: David Brown <davidb@codeaurora.org>,
Daniel Walker <dwalker@fifo99.com>,
Bryan Huntsman <bryanh@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/11] ARM: msm: Migrate msm_timer to CLOCKSOURCE_OF_DECLARE
Date: Tue, 18 Jun 2013 17:04:35 -0700 [thread overview]
Message-ID: <1371600281-6118-6-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1371600281-6118-1-git-send-email-sboyd@codeaurora.org>
This allows us to remove the init_time callback in the DT machine
descriptors, shrinking the code.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
Unchanged from previous sends.
arch/arm/Kconfig | 1 +
arch/arm/mach-msm/board-dt-8660.c | 1 -
arch/arm/mach-msm/board-dt-8960.c | 1 -
arch/arm/mach-msm/common.h | 1 -
arch/arm/mach-msm/timer.c | 17 +++--------------
5 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index af88c83..430c922 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -622,6 +622,7 @@ config ARCH_MSM
bool "Qualcomm MSM"
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
+ select CLKSRC_OF if OF
select COMMON_CLK
select GENERIC_CLOCKEVENTS
help
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 40523da..f491b9b 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -46,6 +46,5 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
.map_io = debug_ll_io_init,
.init_machine = msm8x60_dt_init,
.init_late = msm8x60_init_late,
- .init_time = msm_dt_timer_init,
.dt_compat = msm8x60_fluid_match,
MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 59b48e7..83be2b8 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -31,7 +31,6 @@ static const char * const msm8960_dt_match[] __initconst = {
DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
.smp = smp_ops(msm_smp_ops),
.map_io = debug_ll_io_init,
- .init_time = msm_dt_timer_init,
.init_machine = msm_dt_init,
.dt_compat = msm8960_dt_match,
MACHINE_END
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index d8f3eac..3776268 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -14,7 +14,6 @@
extern void msm7x01_timer_init(void);
extern void msm7x30_timer_init(void);
-extern void msm_dt_timer_init(void);
extern void qsd8x50_timer_init(void);
extern void msm_map_common_io(void);
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 284313f..1167cf6 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -219,15 +219,8 @@ err:
}
#ifdef CONFIG_OF
-static const struct of_device_id msm_timer_match[] __initconst = {
- { .compatible = "qcom,kpss-timer" },
- { .compatible = "qcom,scss-timer" },
- { },
-};
-
-void __init msm_dt_timer_init(void)
+static void __init msm_dt_timer_init(struct device_node *np)
{
- struct device_node *np;
u32 freq;
int irq;
struct resource res;
@@ -235,12 +228,6 @@ void __init msm_dt_timer_init(void)
void __iomem *base;
void __iomem *cpu0_base;
- np = of_find_matching_node(NULL, msm_timer_match);
- if (!np) {
- pr_err("Can't find msm timer DT node\n");
- return;
- }
-
base = of_iomap(np, 0);
if (!base) {
pr_err("Failed to map event base\n");
@@ -283,6 +270,8 @@ void __init msm_dt_timer_init(void)
msm_timer_init(freq, 32, irq, !!percpu_offset);
}
+CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
+CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
#endif
static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/11] ARM: msm: Migrate msm_timer to CLOCKSOURCE_OF_DECLARE
Date: Tue, 18 Jun 2013 17:04:35 -0700 [thread overview]
Message-ID: <1371600281-6118-6-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1371600281-6118-1-git-send-email-sboyd@codeaurora.org>
This allows us to remove the init_time callback in the DT machine
descriptors, shrinking the code.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
Unchanged from previous sends.
arch/arm/Kconfig | 1 +
arch/arm/mach-msm/board-dt-8660.c | 1 -
arch/arm/mach-msm/board-dt-8960.c | 1 -
arch/arm/mach-msm/common.h | 1 -
arch/arm/mach-msm/timer.c | 17 +++--------------
5 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index af88c83..430c922 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -622,6 +622,7 @@ config ARCH_MSM
bool "Qualcomm MSM"
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
+ select CLKSRC_OF if OF
select COMMON_CLK
select GENERIC_CLOCKEVENTS
help
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 40523da..f491b9b 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -46,6 +46,5 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
.map_io = debug_ll_io_init,
.init_machine = msm8x60_dt_init,
.init_late = msm8x60_init_late,
- .init_time = msm_dt_timer_init,
.dt_compat = msm8x60_fluid_match,
MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 59b48e7..83be2b8 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -31,7 +31,6 @@ static const char * const msm8960_dt_match[] __initconst = {
DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
.smp = smp_ops(msm_smp_ops),
.map_io = debug_ll_io_init,
- .init_time = msm_dt_timer_init,
.init_machine = msm_dt_init,
.dt_compat = msm8960_dt_match,
MACHINE_END
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index d8f3eac..3776268 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -14,7 +14,6 @@
extern void msm7x01_timer_init(void);
extern void msm7x30_timer_init(void);
-extern void msm_dt_timer_init(void);
extern void qsd8x50_timer_init(void);
extern void msm_map_common_io(void);
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 284313f..1167cf6 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -219,15 +219,8 @@ err:
}
#ifdef CONFIG_OF
-static const struct of_device_id msm_timer_match[] __initconst = {
- { .compatible = "qcom,kpss-timer" },
- { .compatible = "qcom,scss-timer" },
- { },
-};
-
-void __init msm_dt_timer_init(void)
+static void __init msm_dt_timer_init(struct device_node *np)
{
- struct device_node *np;
u32 freq;
int irq;
struct resource res;
@@ -235,12 +228,6 @@ void __init msm_dt_timer_init(void)
void __iomem *base;
void __iomem *cpu0_base;
- np = of_find_matching_node(NULL, msm_timer_match);
- if (!np) {
- pr_err("Can't find msm timer DT node\n");
- return;
- }
-
base = of_iomap(np, 0);
if (!base) {
pr_err("Failed to map event base\n");
@@ -283,6 +270,8 @@ void __init msm_dt_timer_init(void)
msm_timer_init(freq, 32, irq, !!percpu_offset);
}
+CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
+CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
#endif
static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-06-19 0:04 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 0:04 [PATCH 00/11] MSM DT based multi-platform support Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 01/11] ARM: msm: Remove unused and unmapped MSM_TLMM_BASE for 8x60 Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 02/11] ARM: msm: Don't compile __msm_ioremap_caller() unless used Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 03/11] ARM: msm: Move debug-macro.S to include/debug Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 04/11] ARM: msm: Remove TMR and TMR0 static mappings Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd [this message]
2013-06-19 0:04 ` [PATCH 05/11] ARM: msm: Migrate msm_timer to CLOCKSOURCE_OF_DECLARE Stephen Boyd
2013-06-19 0:04 ` [PATCH 06/11] ARM: msm: Move mach/board.h contents to common.h Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 07/11] ARM: msm: Remove devices-iommu.c Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [PATCH 08/11] iommu/msm: Move mach includes to iommu directory Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-20 10:00 ` Joerg Roedel
2013-06-20 10:00 ` Joerg Roedel
2013-06-19 0:04 ` [PATCH 09/11] ARM: msm: Only compile io.c on platforms that use it Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [RFC/PATCH 10/11] ARM: msm: Only build clock.c on proc_comm based platforms Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 0:04 ` [RFC/PATCH 11/11] ARM: msm: Move MSM's DT based hardware to multi-platform support Stephen Boyd
2013-06-19 0:04 ` Stephen Boyd
2013-06-19 15:30 ` Arnd Bergmann
2013-06-19 15:30 ` Arnd Bergmann
2013-06-26 15:29 ` Ivan T. Ivanov
2013-06-26 15:29 ` Ivan T. Ivanov
2013-06-26 20:28 ` Stephen Boyd
2013-06-26 20:28 ` Stephen Boyd
2013-06-19 15:42 ` [PATCH 00/11] MSM DT based " Arnd Bergmann
2013-06-19 15:42 ` Arnd Bergmann
2013-06-21 1:37 ` Stephen Boyd
2013-06-21 1:37 ` Stephen Boyd
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=1371600281-6118-6-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=bryanh@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=dwalker@fifo99.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.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: link
Be 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.