* [PATCH 00/04] ARM: shmobile: TWD update
@ 2013-03-06 0:22 Magnus Damm
2013-03-06 0:22 ` [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c Magnus Damm
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Magnus Damm @ 2013-03-06 0:22 UTC (permalink / raw)
To: linux-arm-kernel
ARM: shmobile: TWD update
[PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
[PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
[PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
[PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.
These patches are the first attempt to update the state of
mach-shmobile TWD support. Patch 01/04 adds shared mach-shmobile
code to allow TWD support via DT, patch 02/04 and 03/04 add TWD
support to EMEV2 and the KZM9D board. Finally patch 04/04 removes
unnecessary forward declaration.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Written against -next in renesas.git.
arch/arm/boot/dts/emev2.dtsi | 6 ++++++
arch/arm/mach-shmobile/board-kzm9d.c | 2 +-
arch/arm/mach-shmobile/clock-emev2.c | 5 ++++-
arch/arm/mach-shmobile/include/mach/common.h | 2 --
arch/arm/mach-shmobile/include/mach/emev2.h | 1 +
arch/arm/mach-shmobile/setup-emev2.c | 12 ++++++++++--
arch/arm/mach-shmobile/smp-emev2.c | 9 +++++++++
arch/arm/mach-shmobile/timer.c | 1 +
8 files changed, 32 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
@ 2013-03-06 0:22 ` Magnus Damm
2013-03-06 0:22 ` [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init Magnus Damm
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2013-03-06 0:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add a call to twd_local_timer_of_register() in
the function shmobile_timer_init(). In case we
have TWD device information provided via DT this
will make sure the TWD driver gets registered.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/timer.c | 1 +
1 file changed, 1 insertion(+)
--- 0001/arch/arm/mach-shmobile/timer.c
+++ work/arch/arm/mach-shmobile/timer.c 2013-03-05 17:55:48.000000000 +0900
@@ -65,4 +65,5 @@ void __init shmobile_timer_init(void)
{
arch_timer_of_register();
arch_timer_sched_clock_init();
+ twd_local_timer_of_register();
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
2013-03-06 0:22 ` [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c Magnus Damm
@ 2013-03-06 0:22 ` Magnus Damm
2013-03-06 0:22 ` [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support Magnus Damm
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2013-03-06 0:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add a emev2_timer_init() function to the EMEV2 setup
code. This is preparation work for EMEV2 TWD support.
To allow registration of the TWD driver from
the ->timer_init() callback the init code for EMEV2
clocks is from ->init_machine() to ->init_time().
This affects EMEV2 clock init order on the KZM9D board
but leaves the generic EMEV2 DT case as-is due to
no setup code for clocks in the DT case.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/board-kzm9d.c | 2 +-
arch/arm/mach-shmobile/include/mach/emev2.h | 1 +
arch/arm/mach-shmobile/setup-emev2.c | 8 ++++++--
3 files changed, 8 insertions(+), 3 deletions(-)
--- 0001/arch/arm/mach-shmobile/board-kzm9d.c
+++ work/arch/arm/mach-shmobile/board-kzm9d.c 2013-03-05 18:31:45.000000000 +0900
@@ -90,6 +90,6 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d")
.init_irq = emev2_init_irq,
.init_machine = kzm9d_add_standard_devices,
.init_late = shmobile_init_late,
- .init_time = shmobile_timer_init,
+ .init_time = emev2_timer_init,
.dt_compat = kzm9d_boards_compat_dt,
MACHINE_END
--- 0001/arch/arm/mach-shmobile/include/mach/emev2.h
+++ work/arch/arm/mach-shmobile/include/mach/emev2.h 2013-03-05 18:31:45.000000000 +0900
@@ -5,6 +5,7 @@ extern void emev2_map_io(void);
extern void emev2_init_irq(void);
extern void emev2_add_early_devices(void);
extern void emev2_add_standard_devices(void);
+extern void emev2_timer_init(void);
extern void emev2_clock_init(void);
extern void emev2_set_boot_vector(unsigned long value);
--- 0004/arch/arm/mach-shmobile/setup-emev2.c
+++ work/arch/arm/mach-shmobile/setup-emev2.c 2013-03-05 18:34:09.000000000 +0900
@@ -395,8 +395,6 @@ static struct platform_device *emev2_lat
void __init emev2_add_standard_devices(void)
{
- emev2_clock_init();
-
platform_add_devices(emev2_early_devices,
ARRAY_SIZE(emev2_early_devices));
@@ -404,6 +402,12 @@ void __init emev2_add_standard_devices(v
ARRAY_SIZE(emev2_late_devices));
}
+void __init emev2_timer_init(void)
+{
+ emev2_clock_init();
+ shmobile_timer_init();
+}
+
static void __init emev2_init_delay(void)
{
shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
2013-03-06 0:22 ` [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c Magnus Damm
2013-03-06 0:22 ` [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init Magnus Damm
@ 2013-03-06 0:22 ` Magnus Damm
2013-03-06 0:22 ` [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.h Magnus Damm
2013-03-06 1:51 ` [PATCH 00/04] ARM: shmobile: TWD update Simon Horman
4 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2013-03-06 0:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Add TWD support for the EMEV2 SoC and the KZM9D board.
TWD data is added via C for the KZM9D board and also
via DT for the generic EMEV2 DT board support.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/boot/dts/emev2.dtsi | 6 ++++++
arch/arm/mach-shmobile/clock-emev2.c | 5 ++++-
arch/arm/mach-shmobile/setup-emev2.c | 4 ++++
arch/arm/mach-shmobile/smp-emev2.c | 9 +++++++++
4 files changed, 23 insertions(+), 1 deletion(-)
--- 0001/arch/arm/boot/dts/emev2.dtsi
+++ work/arch/arm/boot/dts/emev2.dtsi 2013-03-05 18:37:48.000000000 +0900
@@ -30,6 +30,12 @@
};
};
+ timer at e0030600 {
+ compatible = "arm,cortex-a9-twd-timer";
+ reg = <0xe0030600 0x20>;
+ interrupts = <1 1 0xf04>;
+ };
+
gic: interrupt-controller at e0020000 {
compatible = "arm,cortex-a9-gic";
interrupt-controller;
--- 0001/arch/arm/mach-shmobile/clock-emev2.c
+++ work/arch/arm/mach-shmobile/clock-emev2.c 2013-03-05 18:37:30.000000000 +0900
@@ -31,6 +31,7 @@
#define USIBU2_RSTCTRL 0x0b0
#define USIBU3_RSTCTRL 0x0b4
#define STI_RSTCTRL 0x124
+#define INTAGCLKCTRL 0x40c
#define USIAU0GCLKCTRL 0x4a0
#define USIBU1GCLKCTRL 0x4b8
#define USIBU2GCLKCTRL 0x4bc
@@ -105,7 +106,7 @@ static struct clk sclkdiv_clks[SCLKDIV_N
};
enum { GCLK_USIAU0_SCLK, GCLK_USIBU1_SCLK, GCLK_USIBU2_SCLK, GCLK_USIBU3_SCLK,
- GCLK_STI_SCLK,
+ GCLK_STI_SCLK, GCLK_INTA_CLK,
GCLK_NR };
#define GCLK_SCLK(_parent, _reg) \
@@ -125,6 +126,7 @@ static struct clk gclk_clks[GCLK_NR] = {
[GCLK_USIBU3_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU3],
USIBU3GCLKCTRL),
[GCLK_STI_SCLK] = GCLK_SCLK(&c32k_clk, STIGCLKCTRL),
+ [GCLK_INTA_CLK] = GCLK_SCLK(&c32k_clk, INTAGCLKCTRL),
};
static int emev2_gclk_enable(struct clk *clk)
@@ -200,6 +202,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("e1050000.uart", &gclk_clks[GCLK_USIBU3_SCLK]),
CLKDEV_DEV_ID("em_sti.0", &gclk_clks[GCLK_STI_SCLK]),
CLKDEV_DEV_ID("e0180000.sti", &gclk_clks[GCLK_STI_SCLK]),
+ CLKDEV_DEV_ID("smp_twd", &gclk_clks[GCLK_INTA_CLK]),
};
void __init emev2_clock_init(void)
--- 0006/arch/arm/mach-shmobile/setup-emev2.c
+++ work/arch/arm/mach-shmobile/setup-emev2.c 2013-03-05 18:37:30.000000000 +0900
@@ -402,10 +402,14 @@ void __init emev2_add_standard_devices(v
ARRAY_SIZE(emev2_late_devices));
}
+/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
+void __init __weak emev2_register_twd(void) { }
+
void __init emev2_timer_init(void)
{
emev2_clock_init();
shmobile_timer_init();
+ emev2_register_twd();
}
static void __init emev2_init_delay(void)
--- 0001/arch/arm/mach-shmobile/smp-emev2.c
+++ work/arch/arm/mach-shmobile/smp-emev2.c 2013-03-05 18:37:30.000000000 +0900
@@ -28,9 +28,18 @@
#include <mach/emev2.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>
+#include <asm/smp_twd.h>
#define EMEV2_SCU_BASE 0x1e000000
+#ifdef CONFIG_HAVE_ARM_TWD
+static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xe0030600, 17);
+void __init emev2_register_twd(void)
+{
+ twd_local_timer_register(&twd_local_timer);
+}
+#endif
+
static void __cpuinit emev2_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.h
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
` (2 preceding siblings ...)
2013-03-06 0:22 ` [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support Magnus Damm
@ 2013-03-06 0:22 ` Magnus Damm
2013-03-06 1:51 ` [PATCH 00/04] ARM: shmobile: TWD update Simon Horman
4 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2013-03-06 0:22 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Remove unnecessary r8a7779_register_twd() from common.h
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/include/mach/common.h | 2 --
1 file changed, 2 deletions(-)
--- 0001/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h 2013-03-05 18:38:07.000000000 +0900
@@ -71,8 +71,6 @@ extern void r8a7779_pinmux_init(void);
extern void r8a7779_pm_init(void);
extern void r8a7740_meram_workaround(void);
-extern void r8a7779_register_twd(void);
-
#ifdef CONFIG_SUSPEND
int shmobile_suspend_init(void);
#else
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 00/04] ARM: shmobile: TWD update
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
` (3 preceding siblings ...)
2013-03-06 0:22 ` [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.h Magnus Damm
@ 2013-03-06 1:51 ` Simon Horman
2013-03-19 3:11 ` Simon Horman
4 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2013-03-06 1:51 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 06, 2013 at 09:22:14AM +0900, Magnus Damm wrote:
> ARM: shmobile: TWD update
> [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
> [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
> [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
> [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.
>
> These patches are the first attempt to update the state of
> mach-shmobile TWD support. Patch 01/04 adds shared mach-shmobile
> code to allow TWD support via DT, patch 02/04 and 03/04 add TWD
> support to EMEV2 and the KZM9D board. Finally patch 04/04 removes
> unnecessary forward declaration.
Hi Magnus,
these seem fine to me. Let me know when they have stabilised.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 00/04] ARM: shmobile: TWD update
2013-03-06 1:51 ` [PATCH 00/04] ARM: shmobile: TWD update Simon Horman
@ 2013-03-19 3:11 ` Simon Horman
2013-03-19 5:17 ` Magnus Damm
0 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2013-03-19 3:11 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 06, 2013 at 10:51:22AM +0900, Simon Horman wrote:
> On Wed, Mar 06, 2013 at 09:22:14AM +0900, Magnus Damm wrote:
> > ARM: shmobile: TWD update
> > [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
> > [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
> > [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
> > [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.
> >
> > These patches are the first attempt to update the state of
> > mach-shmobile TWD support. Patch 01/04 adds shared mach-shmobile
> > code to allow TWD support via DT, patch 02/04 and 03/04 add TWD
> > support to EMEV2 and the KZM9D board. Finally patch 04/04 removes
> > unnecessary forward declaration.
>
> Hi Magnus,
>
> these seem fine to me. Let me know when they have stabilised.
Ping.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 00/04] ARM: shmobile: TWD update
2013-03-19 3:11 ` Simon Horman
@ 2013-03-19 5:17 ` Magnus Damm
2013-03-19 7:04 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Magnus Damm @ 2013-03-19 5:17 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 19, 2013 at 12:11 PM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Mar 06, 2013 at 10:51:22AM +0900, Simon Horman wrote:
>> On Wed, Mar 06, 2013 at 09:22:14AM +0900, Magnus Damm wrote:
>> > ARM: shmobile: TWD update
>> > [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
>> > [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
>> > [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
>> > [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.
>> >
>> > These patches are the first attempt to update the state of
>> > mach-shmobile TWD support. Patch 01/04 adds shared mach-shmobile
>> > code to allow TWD support via DT, patch 02/04 and 03/04 add TWD
>> > support to EMEV2 and the KZM9D board. Finally patch 04/04 removes
>> > unnecessary forward declaration.
>>
>> Hi Magnus,
>>
>> these seem fine to me. Let me know when they have stabilised.
>
> Ping.
Please wait with these for now. TWD by itself is OK, but it seems that
the combination of TWD and STI doesn't work as I expected. Need to
look into the clocks on EMEV2 in more detail, but no time for that at
this point.
Thanks,
/ magnus
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 00/04] ARM: shmobile: TWD update
2013-03-19 5:17 ` Magnus Damm
@ 2013-03-19 7:04 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-03-19 7:04 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 19, 2013 at 02:17:38PM +0900, Magnus Damm wrote:
> On Tue, Mar 19, 2013 at 12:11 PM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Mar 06, 2013 at 10:51:22AM +0900, Simon Horman wrote:
> >> On Wed, Mar 06, 2013 at 09:22:14AM +0900, Magnus Damm wrote:
> >> > ARM: shmobile: TWD update
> >> > [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c
> >> > [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init
> >> > [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support
> >> > [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.
> >> >
> >> > These patches are the first attempt to update the state of
> >> > mach-shmobile TWD support. Patch 01/04 adds shared mach-shmobile
> >> > code to allow TWD support via DT, patch 02/04 and 03/04 add TWD
> >> > support to EMEV2 and the KZM9D board. Finally patch 04/04 removes
> >> > unnecessary forward declaration.
> >>
> >> Hi Magnus,
> >>
> >> these seem fine to me. Let me know when they have stabilised.
> >
> > Ping.
>
> Please wait with these for now. TWD by itself is OK, but it seems that
> the combination of TWD and STI doesn't work as I expected. Need to
> look into the clocks on EMEV2 in more detail, but no time for that at
> this point.
Thanks. Please either ping me or repost the patches if this status changes.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-03-19 7:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 0:22 [PATCH 00/04] ARM: shmobile: TWD update Magnus Damm
2013-03-06 0:22 ` [PATCH 01/04] ARM: shmobile: Register DT TWD from timer.c Magnus Damm
2013-03-06 0:22 ` [PATCH 02/04] ARM: shmobile: Add EMEV2 specific timer_init Magnus Damm
2013-03-06 0:22 ` [PATCH 03/04] ARM: shmobile: Add EMEV2 TWD support Magnus Damm
2013-03-06 0:22 ` [PATCH 04/04] ARM: shmobile: Remove r8a7779_register_twd() from common.h Magnus Damm
2013-03-06 1:51 ` [PATCH 00/04] ARM: shmobile: TWD update Simon Horman
2013-03-19 3:11 ` Simon Horman
2013-03-19 5:17 ` Magnus Damm
2013-03-19 7:04 ` Simon Horman
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).