Skip to contentSkip to conversation

Rationalize and consolidate ARMs evaluation boards

PATCH New Russell King - ARM Linux 5 participants 19 messages Jan 27, 2011 – Feb 18, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Rationalize and consolidate ARMs evaluation boards

This series, which applies on top of the CLCD series consolidates some of the code used on ARM platforms, in particular the FPGA interrupt, local timer, and SMP bring up code.

We also add sched_clock() support for Integrator/CP, but only when we're building only for Integrator/CP as Integrator/AP platforms don't have the 24MHz counter. We also move the sched_clock() initialization to the early init callback, along with registering the clock lookups.

As we know how DMA is to be supported with primecells, we no longer need the DMA definitions which aren't used, so these are removed.

#1 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

Initialize the clock tree early.

---
 arch/arm/mach-integrator/common.h        |    1 +
 arch/arm/mach-integrator/core.c          |    7 +++++--
 arch/arm/mach-integrator/integrator_ap.c |    3 ++-
 arch/arm/mach-integrator/integrator_cp.c |   11 +++++++++--
 4 files changed, 17 insertions(+), 5 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
 void integrator_reserve(void);
arch/arm/mach-integrator/core.c +5 -2
index b8e884b..77315b9 100644
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
 	}
 };
 
+void __init integrator_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+
 static int __init integrator_init(void)
 {
 	int i;
 
-	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
-
 	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
 		struct amba_device *d = amba_devs[i];
 		amba_device_register(d, &iomem_resource);
arch/arm/mach-integrator/integrator_ap.c +2 -1
index b666443..4f06b5d 100644
@@ -499,8 +499,9 @@ static struct sys_timer ap_timer = {
 MACHINE_START(INTEGRATOR, "ARM-Integrator")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.boot_params	= 0x00000100,
-	.map_io		= ap_map_io,
 	.reserve	= integrator_reserve,
+	.map_io		= ap_map_io,
+	.init_early	= integrator_init_early,
 	.init_irq	= ap_init_irq,
 	.timer		= &ap_timer,
 	.init_machine	= ap_init,
arch/arm/mach-integrator/integrator_cp.c +9 -2
index 9c02037..e6700aa 100644
@@ -520,11 +520,17 @@ static struct amba_device *amba_devs[] __initdata = {
 	&clcd_device,
 };
 
+static void __init intcp_init_early(void)
+{
+	clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
+
+	integrator_init_early();
+}
+
 static void __init intcp_init(void)
 {
 	int i;
 
-	clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
 	platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs));
 
 	for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
@@ -554,8 +560,9 @@ static struct sys_timer cp_timer = {
 MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.boot_params	= 0x00000100,
-	.map_io		= intcp_map_io,
 	.reserve	= integrator_reserve,
+	.map_io		= intcp_map_io,
+	.init_early	= intcp_init_early,
 	.init_irq	= intcp_init_irq,
 	.timer		= &cp_timer,
 	.init_machine	= intcp_init,
Signature · 1 line
1.6.2.5
#2 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

Russell,

Quoted 22 lines · Russell King - ARM Linux

Initialize the clock tree early.

---
  arch/arm/mach-integrator/common.h        |    1 +
  arch/arm/mach-integrator/core.c          |    7 +++++--
  arch/arm/mach-integrator/integrator_ap.c |    3 ++-
  arch/arm/mach-integrator/integrator_cp.c |   11 +++++++++--
  4 files changed, 17 insertions(+), 5 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
  void integrator_reserve(void);
arch/arm/mach-integrator/core.c +0 -0
index b8e884b..77315b9 100644

arch/arm/mach-integrator/core.c static struct clk_lookup lookups[] = { · line 151

Quoted 8 lines
arch/arm/mach-integrator/core.c +5 -0
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
  	}
  };
 
+void __init integrator_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+

One potential issue with init_early is kmalloc is not up yet. So moving clock init here will be an issue when/if clocks are converted to device tree or if any platforms do dynamic allocations for their clock tree.

Rob

#3 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

Quoted 31 lines · Rob Herring

Russell,

Quoted 28 lines · Russell King - ARM Linux

Initialize the clock tree early.

---

?arch/arm/mach-integrator/common.h ? ? ? ?| ? ?1 +
?arch/arm/mach-integrator/core.c ? ? ? ? ?| ? ?7 +++++--
?arch/arm/mach-integrator/integrator_ap.c | ? ?3 ++-
?arch/arm/mach-integrator/integrator_cp.c | ? 11 +++++++++--

?4 files changed, 17 insertions(+), 5 deletions(-)

arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
 ?void integrator_reserve(void);
arch/arm/mach-integrator/core.c +0 -0
index b8e884b..77315b9 100644
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
 ? ? ? ?}
 ?};
 
Quoted 9 lines

arch/arm/mach-integrator/core.c static struct clk_lookup lookups[] = { · line 151

Quoted 5 lines
arch/arm/mach-integrator/core.c +5 -0
+void __init integrator_init_early(void)
+{
+ ? ? ? clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+

One potential issue with init_early is kmalloc is not up yet. So moving clock init here will be an issue when/if clocks are converted to device tree or if any platforms do dynamic allocations for their clock tree.

If needed we can do alloc_bootmem(). I don't see this as a showstopper.

g.

Quoted 3 lines

Rob

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#4 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

In reply to Rob Herring
Quoted 28 lines · Rob Herring

Russell,

Quoted 25 lines · Russell King - ARM Linux

Initialize the clock tree early.

---
  arch/arm/mach-integrator/common.h        |    1 +
  arch/arm/mach-integrator/core.c          |    7 +++++--
  arch/arm/mach-integrator/integrator_ap.c |    3 ++-
  arch/arm/mach-integrator/integrator_cp.c |   11 +++++++++--
  4 files changed, 17 insertions(+), 5 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
  void integrator_reserve(void);
arch/arm/mach-integrator/core.c +0 -0
index b8e884b..77315b9 100644
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
  	}
  };
 
Quoted 9 lines

arch/arm/mach-integrator/core.c static struct clk_lookup lookups[] = { · line 151

Quoted 5 lines
arch/arm/mach-integrator/core.c +5 -0
+void __init integrator_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+

One potential issue with init_early is kmalloc is not up yet. So moving clock init here will be an issue when/if clocks are converted to device tree or if any platforms do dynamic allocations for their clock tree.

That can't be avoided, because the long term plan is to move the sp804 and twd timers over to using the clk API - and system timers are initialized prior to kmalloc.

#5 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

Russell,

Quoted 39 lines · Russell King - ARM Linux
Quoted 28 lines · Rob Herring

Russell,

Quoted 25 lines · Russell King - ARM Linux

Initialize the clock tree early.

---
   arch/arm/mach-integrator/common.h        |    1 +
   arch/arm/mach-integrator/core.c          |    7 +++++--
   arch/arm/mach-integrator/integrator_ap.c |    3 ++-
   arch/arm/mach-integrator/integrator_cp.c |   11 +++++++++--
   4 files changed, 17 insertions(+), 5 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
   void integrator_reserve(void);
arch/arm/mach-integrator/core.c +0 -0
index b8e884b..77315b9 100644
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
   	}
   };
 
Quoted 9 lines

arch/arm/mach-integrator/core.c static struct clk_lookup lookups[] = { · line 151

Quoted 5 lines
arch/arm/mach-integrator/core.c +5 -0
+void __init integrator_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+

One potential issue with init_early is kmalloc is not up yet. So moving clock init here will be an issue when/if clocks are converted to device tree or if any platforms do dynamic allocations for their clock tree.

Quoted 3 lines

That can't be avoided, because the long term plan is to move the sp804 and twd timers over to using the clk API - and system timers are initialized prior to kmalloc.

setup_arch is before mm_init, and init_IRQ and time_init are after mm_init. My testing shows OF clock init works fine in the timer init.

Rob

#6 lore raw

PATCH 1/11 ARM: integrator: use new init_early for clock tree init

Quoted 42 lines · Rob Herring

Russell,

Quoted 39 lines · Russell King - ARM Linux
Quoted 37 lines · Rob Herring

Russell,

Quoted 22 lines · Russell King - ARM Linux

Initialize the clock tree early.

---
   arch/arm/mach-integrator/common.h        |    1 +
   arch/arm/mach-integrator/core.c          |    7 +++++--
   arch/arm/mach-integrator/integrator_ap.c |    3 ++-
   arch/arm/mach-integrator/integrator_cp.c |   11 +++++++++--
   4 files changed, 17 insertions(+), 5 deletions(-)
arch/arm/mach-integrator/common.h +1 -0
index 5f96e15..a08f9b0 100644
@@ -1 +1,2 @@
+void integrator_init_early(void);
   void integrator_reserve(void);
arch/arm/mach-integrator/core.c +0 -0
index b8e884b..77315b9 100644

arch/arm/mach-integrator/core.c static struct clk_lookup lookups[] = { · line 151

Quoted 8 lines
arch/arm/mach-integrator/core.c +5 -0
@@ -144,12 +144,15 @@ static struct clk_lookup lookups[] = {
   	}
   };
 
+void __init integrator_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+}
+

One potential issue with init_early is kmalloc is not up yet. So moving clock init here will be an issue when/if clocks are converted to device tree or if any platforms do dynamic allocations for their clock tree.

Quoted 6 lines
Quoted 3 lines

That can't be avoided, because the long term plan is to move the sp804 and twd timers over to using the clk API - and system timers are initialized prior to kmalloc.

setup_arch is before mm_init, and init_IRQ and time_init are after mm_init. My testing shows OF clock init works fine in the timer init.

The general point still applies.

We can either leave stuff as is and bodgerate sp804 and twd so that we sort of sometimes use the clk API to maybe get the clock rate for these devices on some platforms, or we can move everyone over.

I don't regard sticking clk API initialization into stuff like .map_io (as some platforms do), timer initialization (like other platforms do) or an initcall as sane.

In any case, clkdev stuff is static based lookups, not DT based lookups. So surely the clkdev stuff shouldn't be used with DT lookups?

#7 lore raw

PATCH 2/11 ARM: versatile: use new init_early for clock tree and sched_clock init

In reply to Russell King - ARM Linux

Initialize the clock tree and our sched_clock() early.

---
 arch/arm/mach-versatile/core.c         |   23 +++++++++++------------
 arch/arm/mach-versatile/core.h         |    1 +
 arch/arm/mach-versatile/versatile_ab.c |    1 +
 arch/arm/mach-versatile/versatile_pb.c |    1 +
 4 files changed, 14 insertions(+), 12 deletions(-)
arch/arm/mach-versatile/core.c +11 -12
index b4f1f17..606e046 100644
@@ -762,14 +762,21 @@ static void versatile_leds_event(led_event_t ledevt)
 }
 #endif	/* CONFIG_LEDS */
 
-void __init versatile_init(void)
+/* Early initializations */
+void __init versatile_init_early(void)
 {
-	int i;
-
-	osc4_clk.vcoreg	= __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET;
+	void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
 
+	osc4_clk.vcoreg	= sys + VERSATILE_SYS_OSCCLCD_OFFSET;
 	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 
+	versatile_sched_clock_init(sys + VERSATILE_SYS_24MHz_OFFSET, 24000000);
+}
+
+void __init versatile_init(void)
+{
+	int i;
+
 	platform_device_register(&versatile_flash_device);
 	platform_device_register(&versatile_i2c_device);
 	platform_device_register(&smc91x_device);
@@ -786,12 +793,6 @@ void __init versatile_init(void)
 }
 
 /*
- * The sched_clock counter
- */
-#define REFCOUNTER		(__io_address(VERSATILE_SYS_BASE) + \
-				 VERSATILE_SYS_24MHz_OFFSET)
-
-/*
  * Where is the timer (VA)?
  */
 #define TIMER0_VA_BASE		 __io_address(VERSATILE_TIMER0_1_BASE)
@@ -806,8 +807,6 @@ static void __init versatile_timer_init(void)
 {
 	u32 val;
 
-	versatile_sched_clock_init(REFCOUNTER, 24000000);
-
 	/* 
 	 * set clock frequency: 
 	 *	VERSATILE_REFCLK is 32KHz
arch/arm/mach-versatile/core.h +1 -0
index 9d39886..e04768a 100644
@@ -25,6 +25,7 @@
 #include <linux/amba/bus.h>
 
 extern void __init versatile_init(void);
+extern void __init versatile_init_early(void);
 extern void __init versatile_init_irq(void);
 extern void __init versatile_map_io(void);
 extern struct sys_timer versatile_timer;
arch/arm/mach-versatile/versatile_ab.c +1 -0
index aa9730f..f8ae64b 100644
@@ -37,6 +37,7 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.boot_params	= 0x00000100,
 	.map_io		= versatile_map_io,
+	.init_early	= versatile_init_early,
 	.init_irq	= versatile_init_irq,
 	.timer		= &versatile_timer,
 	.init_machine	= versatile_init,
arch/arm/mach-versatile/versatile_pb.c +1 -0
index bf46964..97fb306 100644
@@ -110,6 +110,7 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.boot_params	= 0x00000100,
 	.map_io		= versatile_map_io,
+	.init_early	= versatile_init_early,
 	.init_irq	= versatile_init_irq,
 	.timer		= &versatile_timer,
 	.init_machine	= versatile_pb_init,
Signature · 1 line
1.6.2.5
#8 lore raw

PATCH 3/11 ARM: realview: use new init_early for clock tree and sched_clock init

In reply to Russell King - ARM Linux

Initialize the clock tree and our sched_clock() early.

---
 arch/arm/mach-realview/core.c            |   19 ++++++-------------
 arch/arm/mach-realview/core.h            |    1 +
 arch/arm/mach-realview/realview_eb.c     |    1 +
 arch/arm/mach-realview/realview_pb1176.c |    1 +
 arch/arm/mach-realview/realview_pb11mp.c |    1 +
 arch/arm/mach-realview/realview_pba8.c   |    1 +
 arch/arm/mach-realview/realview_pbx.c    |    1 +
 7 files changed, 12 insertions(+), 13 deletions(-)
arch/arm/mach-realview/core.c +6 -13
index a18a5a6..75dbc87 100644
@@ -360,18 +360,19 @@ static struct clk_lookup lookups[] = {
 	}
 };
 
-static int __init clk_init(void)
+void __init realview_init_early(void)
 {
+	void __iomem *sys = __io_address(REALVIEW_SYS_BASE);
+
 	if (machine_is_realview_pb1176())
-		oscvco_clk.vcoreg = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC0_OFFSET;
+		oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC0_OFFSET;
 	else
-		oscvco_clk.vcoreg = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET;
+		oscvco_clk.vcoreg = sys + REALVIEW_SYS_OSC4_OFFSET;
 
 	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
 
-	return 0;
+	versatile_sched_clock_init(sys + REALVIEW_SYS_24MHz_OFFSET, 24000000);
 }
-core_initcall(clk_init);
 
 /*
  * CLCD support.
@@ -510,12 +511,6 @@ void realview_leds_event(led_event_t ledevt)
 #endif	/* CONFIG_LEDS */
 
 /*
- * The sched_clock counter
- */
-#define REFCOUNTER		(__io_address(REALVIEW_SYS_BASE) + \
-				 REALVIEW_SYS_24MHz_OFFSET)
-
-/*
  * Where is the timer (VA)?
  */
 void __iomem *timer0_va_base;
@@ -530,8 +525,6 @@ void __init realview_timer_init(unsigned int timer_irq)
 {
 	u32 val;
 
-	versatile_sched_clock_init(REFCOUNTER, 24000000);
-
 	/* 
 	 * set clock frequency: 
 	 *	REALVIEW_REFCLK is 32KHz
arch/arm/mach-realview/core.h +1 -0
index 693239d..27c9273 100644
@@ -63,6 +63,7 @@ extern void realview_timer_init(unsigned int timer_irq);
 extern int realview_flash_register(struct resource *res, u32 num);
 extern int realview_eth_register(const char *name, struct resource *res);
 extern int realview_usb_register(struct resource *res);
+extern void realview_init_early(void);
 extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags,
 			   char **from, struct meminfo *meminfo);
 extern void (*realview_reset)(char);
arch/arm/mach-realview/realview_eb.c +1 -0
index 6ef5c5e..c00e527 100644
@@ -487,6 +487,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_eb_map_io,
+	.init_early	= realview_init_early,
 	.init_irq	= gic_init_irq,
 	.timer		= &realview_eb_timer,
 	.init_machine	= realview_eb_init,
arch/arm/mach-realview/realview_pb1176.c +1 -0
index cbdc97a..f0447bb 100644
@@ -382,6 +382,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pb1176_fixup,
 	.map_io		= realview_pb1176_map_io,
+	.init_early	= realview_init_early,
 	.init_irq	= gic_init_irq,
 	.timer		= &realview_pb1176_timer,
 	.init_machine	= realview_pb1176_init,
arch/arm/mach-realview/realview_pb11mp.c +1 -0
index 8e8ab7d..3b4f788 100644
@@ -384,6 +384,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pb11mp_map_io,
+	.init_early	= realview_init_early,
 	.init_irq	= gic_init_irq,
 	.timer		= &realview_pb11mp_timer,
 	.init_machine	= realview_pb11mp_init,
arch/arm/mach-realview/realview_pba8.c +1 -0
index 841118e..f98d4fa 100644
@@ -334,6 +334,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pba8_map_io,
+	.init_early	= realview_init_early,
 	.init_irq	= gic_init_irq,
 	.timer		= &realview_pba8_timer,
 	.init_machine	= realview_pba8_init,
arch/arm/mach-realview/realview_pbx.c +1 -0
index 02b755b..b0521e1 100644
@@ -417,6 +417,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pbx_fixup,
 	.map_io		= realview_pbx_map_io,
+	.init_early	= realview_init_early,
 	.init_irq	= gic_init_irq,
 	.timer		= &realview_pbx_timer,
 	.init_machine	= realview_pbx_init,
Signature · 1 line
1.6.2.5
#9 lore raw

PATCH 4/11 ARM: vexpress: use new init_early for clock tree and sched_clock init

In reply to Russell King - ARM Linux

Initialize the clock tree and our sched_clock() early.

---
 arch/arm/mach-vexpress/core.h     |    1 +
 arch/arm/mach-vexpress/ct-ca9x4.c |   10 ++++++++--
 arch/arm/mach-vexpress/v2m.c      |    6 ++++--
 3 files changed, 13 insertions(+), 4 deletions(-)
arch/arm/mach-vexpress/core.h +1 -0
index 362780d..e0312a1 100644
@@ -21,4 +21,5 @@ struct amba_device name##_device = {		\
 struct map_desc;
 
 void v2m_map_io(struct map_desc *tile, size_t num);
+void v2m_init_early(void);
 extern struct sys_timer v2m_timer;
arch/arm/mach-vexpress/ct-ca9x4.c +8 -2
index 27baed1..ff48ebc 100644
@@ -180,6 +180,13 @@ static struct platform_device pmu_device = {
 	.resource	= pmu_resources,
 };
 
+static void __init ct_ca9x4_init_early(void)
+{
+	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+
+	v2m_init_early();
+}
+
 static void __init ct_ca9x4_init(void)
 {
 	int i;
@@ -194,8 +201,6 @@ static void __init ct_ca9x4_init(void)
 	l2x0_init(l2x0_base, 0x00400000, 0xfe0fffff);
 #endif
 
-	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
-
 	for (i = 0; i < ARRAY_SIZE(ct_ca9x4_amba_devs); i++)
 		amba_device_register(ct_ca9x4_amba_devs[i], &iomem_resource);
 
@@ -206,6 +211,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
 	.boot_params	= PHYS_OFFSET + 0x00000100,
 	.map_io		= ct_ca9x4_map_io,
 	.init_irq	= ct_ca9x4_init_irq,
+	.init_early	= ct_ca9x4_init_early,
 #if 0
 	.timer		= &ct_ca9x4_timer,
 #else
arch/arm/mach-vexpress/v2m.c +4 -2
index f35d646..63ef663 100644
@@ -49,13 +49,15 @@ void __init v2m_map_io(struct map_desc *tile, size_t num)
 	iotable_init(tile, num);
 }
 
+void __init v2m_init_early(void)
+{
+	versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
+}
 
 static void __init v2m_timer_init(void)
 {
 	u32 scctrl;
 
-	versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
-
 	/* Select 1MHz TIMCLK as the reference clock for SP804 timers */
 	scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL));
 	scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK;
Signature · 1 line
1.6.2.5
#10 lore raw

PATCH 5/11 ARM: versatile: remove old AMBA device DMA definitions

In reply to Russell King - ARM Linux

The AMBA DMA macro definitions are not used, and the AMBA Primecell DMA support makes no use of them either, so they can be removed.

---
 arch/arm/mach-versatile/core.c         |   18 ------------------
 arch/arm/mach-versatile/core.h         |    1 -
 arch/arm/mach-versatile/versatile_pb.c |    5 -----
 3 files changed, 0 insertions(+), 24 deletions(-)
arch/arm/mach-versatile/core.c +0 -18
index 606e046..630a1c9 100644
@@ -634,53 +634,35 @@ static struct pl022_ssp_controller ssp0_plat_data = {
 };
 
 #define AACI_IRQ	{ IRQ_AACI, NO_IRQ }
-#define AACI_DMA	{ 0x80, 0x81 }
 #define MMCI0_IRQ	{ IRQ_MMCI0A,IRQ_SIC_MMCI0B }
-#define MMCI0_DMA	{ 0x84, 0 }
 #define KMI0_IRQ	{ IRQ_SIC_KMI0, NO_IRQ }
-#define KMI0_DMA	{ 0, 0 }
 #define KMI1_IRQ	{ IRQ_SIC_KMI1, NO_IRQ }
-#define KMI1_DMA	{ 0, 0 }
 
 /*
  * These devices are connected directly to the multi-layer AHB switch
  */
 #define SMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define SMC_DMA		{ 0, 0 }
 #define MPMC_IRQ	{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA	{ 0, 0 }
 #define CLCD_IRQ	{ IRQ_CLCDINT, NO_IRQ }
-#define CLCD_DMA	{ 0, 0 }
 #define DMAC_IRQ	{ IRQ_DMAINT, NO_IRQ }
-#define DMAC_DMA	{ 0, 0 }
 
 /*
  * These devices are connected via the core APB bridge
  */
 #define SCTL_IRQ	{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA	{ 0, 0 }
 #define WATCHDOG_IRQ	{ IRQ_WDOGINT, NO_IRQ }
-#define WATCHDOG_DMA	{ 0, 0 }
 #define GPIO0_IRQ	{ IRQ_GPIOINT0, NO_IRQ }
-#define GPIO0_DMA	{ 0, 0 }
 #define GPIO1_IRQ	{ IRQ_GPIOINT1, NO_IRQ }
-#define GPIO1_DMA	{ 0, 0 }
 #define RTC_IRQ		{ IRQ_RTCINT, NO_IRQ }
-#define RTC_DMA		{ 0, 0 }
 
 /*
  * These devices are connected via the DMA APB bridge
  */
 #define SCI_IRQ		{ IRQ_SCIINT, NO_IRQ }
-#define SCI_DMA		{ 7, 6 }
 #define UART0_IRQ	{ IRQ_UARTINT0, NO_IRQ }
-#define UART0_DMA	{ 15, 14 }
 #define UART1_IRQ	{ IRQ_UARTINT1, NO_IRQ }
-#define UART1_DMA	{ 13, 12 }
 #define UART2_IRQ	{ IRQ_UARTINT2, NO_IRQ }
-#define UART2_DMA	{ 11, 10 }
 #define SSP_IRQ		{ IRQ_SSPINT, NO_IRQ }
-#define SSP_DMA		{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,  "fpga:04", AACI,     NULL);
arch/arm/mach-versatile/core.h +0 -1
index e04768a..fd6404e 100644
@@ -45,7 +45,6 @@ static struct amba_device name##_device = {			\
 	},							\
 	.dma_mask	= ~0,					\
 	.irq		= base##_IRQ,				\
-	/* .dma		= base##_DMA,*/				\
 }
 
 #endif
arch/arm/mach-versatile/versatile_pb.c +0 -5
index 97fb306..37c23df 100644
@@ -59,19 +59,14 @@ static struct pl061_platform_data gpio3_plat_data = {
 };
 
 #define UART3_IRQ	{ IRQ_SIC_UART3, NO_IRQ }
-#define UART3_DMA	{ 0x86, 0x87 }
 #define SCI1_IRQ	{ IRQ_SIC_SCI3, NO_IRQ }
-#define SCI1_DMA	{ 0x88, 0x89 }
 #define MMCI1_IRQ	{ IRQ_MMCI1A, IRQ_SIC_MMCI1B }
-#define MMCI1_DMA	{ 0x85, 0 }
 
 /*
  * These devices are connected via the core APB bridge
  */
 #define GPIO2_IRQ	{ IRQ_GPIOINT2, NO_IRQ }
-#define GPIO2_DMA	{ 0, 0 }
 #define GPIO3_IRQ	{ IRQ_GPIOINT3, NO_IRQ }
-#define GPIO3_DMA	{ 0, 0 }
 
 /*
  * These devices are connected via the DMA APB bridge
Signature · 1 line
1.6.2.5
#11 lore raw

PATCH 6/11 ARM: realview: remove old AMBA device DMA definitions

In reply to Russell King - ARM Linux

The AMBA DMA macro definitions are not used, and the AMBA Primecell DMA support makes no use of them either, so they can be removed.

---
 arch/arm/mach-realview/core.h            |    1 -
 arch/arm/mach-realview/realview_eb.c     |   21 ---------------------
 arch/arm/mach-realview/realview_pb1176.c |   21 ---------------------
 arch/arm/mach-realview/realview_pb11mp.c |   21 ---------------------
 arch/arm/mach-realview/realview_pba8.c   |   21 ---------------------
 arch/arm/mach-realview/realview_pbx.c    |   21 ---------------------
 6 files changed, 0 insertions(+), 106 deletions(-)
arch/arm/mach-realview/core.h +0 -1
index 27c9273..5c83d1e 100644
@@ -42,7 +42,6 @@ static struct amba_device name##_device = {			\
 	},							\
 	.dma_mask	= ~0,					\
 	.irq		= base##_IRQ,				\
-	/* .dma		= base##_DMA,*/				\
 }
 
 struct machine_desc;
arch/arm/mach-realview/realview_eb.c +0 -21
index c00e527..d0f851b 100644
@@ -144,60 +144,39 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  * These devices are connected via the core APB bridge
  */
 #define GPIO2_IRQ	{ IRQ_EB_GPIO2, NO_IRQ }
-#define GPIO2_DMA	{ 0, 0 }
 #define GPIO3_IRQ	{ IRQ_EB_GPIO3, NO_IRQ }
-#define GPIO3_DMA	{ 0, 0 }
 
 #define AACI_IRQ	{ IRQ_EB_AACI, NO_IRQ }
-#define AACI_DMA	{ 0x80, 0x81 }
 #define MMCI0_IRQ	{ IRQ_EB_MMCI0A, IRQ_EB_MMCI0B }
-#define MMCI0_DMA	{ 0x84, 0 }
 #define KMI0_IRQ	{ IRQ_EB_KMI0, NO_IRQ }
-#define KMI0_DMA	{ 0, 0 }
 #define KMI1_IRQ	{ IRQ_EB_KMI1, NO_IRQ }
-#define KMI1_DMA	{ 0, 0 }
 
 /*
  * These devices are connected directly to the multi-layer AHB switch
  */
 #define EB_SMC_IRQ	{ NO_IRQ, NO_IRQ }
-#define EB_SMC_DMA	{ 0, 0 }
 #define MPMC_IRQ	{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA	{ 0, 0 }
 #define EB_CLCD_IRQ	{ IRQ_EB_CLCD, NO_IRQ }
-#define EB_CLCD_DMA	{ 0, 0 }
 #define DMAC_IRQ	{ IRQ_EB_DMA, NO_IRQ }
-#define DMAC_DMA	{ 0, 0 }
 
 /*
  * These devices are connected via the core APB bridge
  */
 #define SCTL_IRQ	{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA	{ 0, 0 }
 #define EB_WATCHDOG_IRQ	{ IRQ_EB_WDOG, NO_IRQ }
-#define EB_WATCHDOG_DMA	{ 0, 0 }
 #define EB_GPIO0_IRQ	{ IRQ_EB_GPIO0, NO_IRQ }
-#define EB_GPIO0_DMA	{ 0, 0 }
 #define GPIO1_IRQ	{ IRQ_EB_GPIO1, NO_IRQ }
-#define GPIO1_DMA	{ 0, 0 }
 #define EB_RTC_IRQ	{ IRQ_EB_RTC, NO_IRQ }
-#define EB_RTC_DMA	{ 0, 0 }
 
 /*
  * These devices are connected via the DMA APB bridge
  */
 #define SCI_IRQ		{ IRQ_EB_SCI, NO_IRQ }
-#define SCI_DMA		{ 7, 6 }
 #define EB_UART0_IRQ	{ IRQ_EB_UART0, NO_IRQ }
-#define EB_UART0_DMA	{ 15, 14 }
 #define EB_UART1_IRQ	{ IRQ_EB_UART1, NO_IRQ }
-#define EB_UART1_DMA	{ 13, 12 }
 #define EB_UART2_IRQ	{ IRQ_EB_UART2, NO_IRQ }
-#define EB_UART2_DMA	{ 11, 10 }
 #define EB_UART3_IRQ	{ IRQ_EB_UART3, NO_IRQ }
-#define EB_UART3_DMA	{ 0x86, 0x87 }
 #define EB_SSP_IRQ	{ IRQ_EB_SSP, NO_IRQ }
-#define EB_SSP_DMA	{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,  "fpga:aaci",  AACI,     NULL);
arch/arm/mach-realview/realview_pb1176.c +0 -21
index f0447bb..61f6a9d 100644
@@ -134,47 +134,26 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  * RealView PB1176 AMBA devices
  */
 #define GPIO2_IRQ	{ IRQ_PB1176_GPIO2, NO_IRQ }
-#define GPIO2_DMA	{ 0, 0 }
 #define GPIO3_IRQ	{ IRQ_PB1176_GPIO3, NO_IRQ }
-#define GPIO3_DMA	{ 0, 0 }
 #define AACI_IRQ	{ IRQ_PB1176_AACI, NO_IRQ }
-#define AACI_DMA	{ 0x80, 0x81 }
 #define MMCI0_IRQ	{ IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B }
-#define MMCI0_DMA	{ 0x84, 0 }
 #define KMI0_IRQ	{ IRQ_PB1176_KMI0, NO_IRQ }
-#define KMI0_DMA	{ 0, 0 }
 #define KMI1_IRQ	{ IRQ_PB1176_KMI1, NO_IRQ }
-#define KMI1_DMA	{ 0, 0 }
 #define PB1176_SMC_IRQ	{ NO_IRQ, NO_IRQ }
-#define PB1176_SMC_DMA	{ 0, 0 }
 #define MPMC_IRQ	{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA	{ 0, 0 }
 #define PB1176_CLCD_IRQ	{ IRQ_DC1176_CLCD, NO_IRQ }
-#define PB1176_CLCD_DMA	{ 0, 0 }
 #define SCTL_IRQ	{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA	{ 0, 0 }
 #define PB1176_WATCHDOG_IRQ	{ IRQ_DC1176_WATCHDOG, NO_IRQ }
-#define PB1176_WATCHDOG_DMA	{ 0, 0 }
 #define PB1176_GPIO0_IRQ	{ IRQ_PB1176_GPIO0, NO_IRQ }
-#define PB1176_GPIO0_DMA	{ 0, 0 }
 #define GPIO1_IRQ	{ IRQ_PB1176_GPIO1, NO_IRQ }
-#define GPIO1_DMA	{ 0, 0 }
 #define PB1176_RTC_IRQ	{ IRQ_DC1176_RTC, NO_IRQ }
-#define PB1176_RTC_DMA	{ 0, 0 }
 #define SCI_IRQ		{ IRQ_PB1176_SCI, NO_IRQ }
-#define SCI_DMA		{ 7, 6 }
 #define PB1176_UART0_IRQ	{ IRQ_DC1176_UART0, NO_IRQ }
-#define PB1176_UART0_DMA	{ 15, 14 }
 #define PB1176_UART1_IRQ	{ IRQ_DC1176_UART1, NO_IRQ }
-#define PB1176_UART1_DMA	{ 13, 12 }
 #define PB1176_UART2_IRQ	{ IRQ_DC1176_UART2, NO_IRQ }
-#define PB1176_UART2_DMA	{ 11, 10 }
 #define PB1176_UART3_IRQ	{ IRQ_DC1176_UART3, NO_IRQ }
-#define PB1176_UART3_DMA	{ 0x86, 0x87 }
 #define PB1176_UART4_IRQ	{ IRQ_PB1176_UART4, NO_IRQ }
-#define PB1176_UART4_DMA	{ 0, 0 }
 #define PB1176_SSP_IRQ		{ IRQ_DC1176_SSP, NO_IRQ }
-#define PB1176_SSP_DMA		{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,	"fpga:aaci",	AACI,		NULL);
arch/arm/mach-realview/realview_pb11mp.c +0 -21
index 3b4f788..27bfeca 100644
@@ -136,47 +136,26 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  */
 
 #define GPIO2_IRQ		{ IRQ_PB11MP_GPIO2, NO_IRQ }
-#define GPIO2_DMA		{ 0, 0 }
 #define GPIO3_IRQ		{ IRQ_PB11MP_GPIO3, NO_IRQ }
-#define GPIO3_DMA		{ 0, 0 }
 #define AACI_IRQ		{ IRQ_TC11MP_AACI, NO_IRQ }
-#define AACI_DMA		{ 0x80, 0x81 }
 #define MMCI0_IRQ		{ IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B }
-#define MMCI0_DMA		{ 0x84, 0 }
 #define KMI0_IRQ		{ IRQ_TC11MP_KMI0, NO_IRQ }
-#define KMI0_DMA		{ 0, 0 }
 #define KMI1_IRQ		{ IRQ_TC11MP_KMI1, NO_IRQ }
-#define KMI1_DMA		{ 0, 0 }
 #define PB11MP_SMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define PB11MP_SMC_DMA		{ 0, 0 }
 #define MPMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA		{ 0, 0 }
 #define PB11MP_CLCD_IRQ		{ IRQ_PB11MP_CLCD, NO_IRQ }
-#define PB11MP_CLCD_DMA		{ 0, 0 }
 #define DMAC_IRQ		{ IRQ_PB11MP_DMAC, NO_IRQ }
-#define DMAC_DMA		{ 0, 0 }
 #define SCTL_IRQ		{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA		{ 0, 0 }
 #define PB11MP_WATCHDOG_IRQ	{ IRQ_PB11MP_WATCHDOG, NO_IRQ }
-#define PB11MP_WATCHDOG_DMA	{ 0, 0 }
 #define PB11MP_GPIO0_IRQ	{ IRQ_PB11MP_GPIO0, NO_IRQ }
-#define PB11MP_GPIO0_DMA	{ 0, 0 }
 #define GPIO1_IRQ		{ IRQ_PB11MP_GPIO1, NO_IRQ }
-#define GPIO1_DMA		{ 0, 0 }
 #define PB11MP_RTC_IRQ		{ IRQ_TC11MP_RTC, NO_IRQ }
-#define PB11MP_RTC_DMA		{ 0, 0 }
 #define SCI_IRQ			{ IRQ_PB11MP_SCI, NO_IRQ }
-#define SCI_DMA			{ 7, 6 }
 #define PB11MP_UART0_IRQ	{ IRQ_TC11MP_UART0, NO_IRQ }
-#define PB11MP_UART0_DMA	{ 15, 14 }
 #define PB11MP_UART1_IRQ	{ IRQ_TC11MP_UART1, NO_IRQ }
-#define PB11MP_UART1_DMA	{ 13, 12 }
 #define PB11MP_UART2_IRQ	{ IRQ_PB11MP_UART2, NO_IRQ }
-#define PB11MP_UART2_DMA	{ 11, 10 }
 #define PB11MP_UART3_IRQ	{ IRQ_PB11MP_UART3, NO_IRQ }
-#define PB11MP_UART3_DMA	{ 0x86, 0x87 }
 #define PB11MP_SSP_IRQ		{ IRQ_PB11MP_SSP, NO_IRQ }
-#define PB11MP_SSP_DMA		{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,	"fpga:aaci",	AACI,		NULL);
arch/arm/mach-realview/realview_pba8.c +0 -21
index f98d4fa..11972df 100644
@@ -126,47 +126,26 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  */
 
 #define GPIO2_IRQ		{ IRQ_PBA8_GPIO2, NO_IRQ }
-#define GPIO2_DMA		{ 0, 0 }
 #define GPIO3_IRQ		{ IRQ_PBA8_GPIO3, NO_IRQ }
-#define GPIO3_DMA		{ 0, 0 }
 #define AACI_IRQ		{ IRQ_PBA8_AACI, NO_IRQ }
-#define AACI_DMA		{ 0x80, 0x81 }
 #define MMCI0_IRQ		{ IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B }
-#define MMCI0_DMA		{ 0x84, 0 }
 #define KMI0_IRQ		{ IRQ_PBA8_KMI0, NO_IRQ }
-#define KMI0_DMA		{ 0, 0 }
 #define KMI1_IRQ		{ IRQ_PBA8_KMI1, NO_IRQ }
-#define KMI1_DMA		{ 0, 0 }
 #define PBA8_SMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define PBA8_SMC_DMA		{ 0, 0 }
 #define MPMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA		{ 0, 0 }
 #define PBA8_CLCD_IRQ		{ IRQ_PBA8_CLCD, NO_IRQ }
-#define PBA8_CLCD_DMA		{ 0, 0 }
 #define DMAC_IRQ		{ IRQ_PBA8_DMAC, NO_IRQ }
-#define DMAC_DMA		{ 0, 0 }
 #define SCTL_IRQ		{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA		{ 0, 0 }
 #define PBA8_WATCHDOG_IRQ	{ IRQ_PBA8_WATCHDOG, NO_IRQ }
-#define PBA8_WATCHDOG_DMA	{ 0, 0 }
 #define PBA8_GPIO0_IRQ		{ IRQ_PBA8_GPIO0, NO_IRQ }
-#define PBA8_GPIO0_DMA		{ 0, 0 }
 #define GPIO1_IRQ		{ IRQ_PBA8_GPIO1, NO_IRQ }
-#define GPIO1_DMA		{ 0, 0 }
 #define PBA8_RTC_IRQ		{ IRQ_PBA8_RTC, NO_IRQ }
-#define PBA8_RTC_DMA		{ 0, 0 }
 #define SCI_IRQ			{ IRQ_PBA8_SCI, NO_IRQ }
-#define SCI_DMA			{ 7, 6 }
 #define PBA8_UART0_IRQ		{ IRQ_PBA8_UART0, NO_IRQ }
-#define PBA8_UART0_DMA		{ 15, 14 }
 #define PBA8_UART1_IRQ		{ IRQ_PBA8_UART1, NO_IRQ }
-#define PBA8_UART1_DMA		{ 13, 12 }
 #define PBA8_UART2_IRQ		{ IRQ_PBA8_UART2, NO_IRQ }
-#define PBA8_UART2_DMA		{ 11, 10 }
 #define PBA8_UART3_IRQ		{ IRQ_PBA8_UART3, NO_IRQ }
-#define PBA8_UART3_DMA		{ 0x86, 0x87 }
 #define PBA8_SSP_IRQ		{ IRQ_PBA8_SSP, NO_IRQ }
-#define PBA8_SSP_DMA		{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,	"fpga:aaci",	AACI,		NULL);
arch/arm/mach-realview/realview_pbx.c +0 -21
index b0521e1..73ab3ca 100644
@@ -148,47 +148,26 @@ static struct pl022_ssp_controller ssp0_plat_data = {
  */
 
 #define GPIO2_IRQ		{ IRQ_PBX_GPIO2, NO_IRQ }
-#define GPIO2_DMA		{ 0, 0 }
 #define GPIO3_IRQ		{ IRQ_PBX_GPIO3, NO_IRQ }
-#define GPIO3_DMA		{ 0, 0 }
 #define AACI_IRQ		{ IRQ_PBX_AACI, NO_IRQ }
-#define AACI_DMA		{ 0x80, 0x81 }
 #define MMCI0_IRQ		{ IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B }
-#define MMCI0_DMA		{ 0x84, 0 }
 #define KMI0_IRQ		{ IRQ_PBX_KMI0, NO_IRQ }
-#define KMI0_DMA		{ 0, 0 }
 #define KMI1_IRQ		{ IRQ_PBX_KMI1, NO_IRQ }
-#define KMI1_DMA		{ 0, 0 }
 #define PBX_SMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define PBX_SMC_DMA		{ 0, 0 }
 #define MPMC_IRQ		{ NO_IRQ, NO_IRQ }
-#define MPMC_DMA		{ 0, 0 }
 #define PBX_CLCD_IRQ		{ IRQ_PBX_CLCD, NO_IRQ }
-#define PBX_CLCD_DMA		{ 0, 0 }
 #define DMAC_IRQ		{ IRQ_PBX_DMAC, NO_IRQ }
-#define DMAC_DMA		{ 0, 0 }
 #define SCTL_IRQ		{ NO_IRQ, NO_IRQ }
-#define SCTL_DMA		{ 0, 0 }
 #define PBX_WATCHDOG_IRQ	{ IRQ_PBX_WATCHDOG, NO_IRQ }
-#define PBX_WATCHDOG_DMA	{ 0, 0 }
 #define PBX_GPIO0_IRQ		{ IRQ_PBX_GPIO0, NO_IRQ }
-#define PBX_GPIO0_DMA		{ 0, 0 }
 #define GPIO1_IRQ		{ IRQ_PBX_GPIO1, NO_IRQ }
-#define GPIO1_DMA		{ 0, 0 }
 #define PBX_RTC_IRQ		{ IRQ_PBX_RTC, NO_IRQ }
-#define PBX_RTC_DMA		{ 0, 0 }
 #define SCI_IRQ			{ IRQ_PBX_SCI, NO_IRQ }
-#define SCI_DMA			{ 7, 6 }
 #define PBX_UART0_IRQ		{ IRQ_PBX_UART0, NO_IRQ }
-#define PBX_UART0_DMA		{ 15, 14 }
 #define PBX_UART1_IRQ		{ IRQ_PBX_UART1, NO_IRQ }
-#define PBX_UART1_DMA		{ 13, 12 }
 #define PBX_UART2_IRQ		{ IRQ_PBX_UART2, NO_IRQ }
-#define PBX_UART2_DMA		{ 11, 10 }
 #define PBX_UART3_IRQ		{ IRQ_PBX_UART3, NO_IRQ }
-#define PBX_UART3_DMA		{ 0x86, 0x87 }
 #define PBX_SSP_IRQ		{ IRQ_PBX_SSP, NO_IRQ }
-#define PBX_SSP_DMA		{ 9, 8 }
 
 /* FPGA Primecells */
 AMBA_DEVICE(aaci,	"fpga:aaci",	AACI,		NULL);
Signature · 1 line
1.6.2.5
#12 lore raw

PATCH 6/11 ARM: realview: remove old AMBA device DMA definitions

2011/1/27 Russell King - ARM Linux <[email protected]>:

Quoted 2 lines

The AMBA DMA macro definitions are not used, and the AMBA Primecell DMA support makes no use of them either, so they can be removed.

I've contemplated adding DMA channel info (one tx and one rx channel should suffice for anything I've seen) and a filter function to struct amba_device instead of having it as platform data selectively for each PrimeCell as we have now.

I don't know if it's a good idea.

Yours,
Linus Walleij

#13 lore raw

PATCH 7/11 ARM: rationalize versatile family Kconfig/Makefile

In reply to Russell King - ARM Linux

Move leds and sched_clock build conditionals out of the Makefile into the Kconfig file. Move selection of HAVE_SCHED_CLOCK into the platform Kconfig rather than duplicating it three times in the main architecture Kconfig.

---
 arch/arm/Kconfig                 |    3 ---
 arch/arm/plat-versatile/Kconfig  |    8 ++++++++
 arch/arm/plat-versatile/Makefile |   10 +++-------
 3 files changed, 11 insertions(+), 10 deletions(-)
arch/arm/Kconfig +0 -3
index 4f0e83e..fe8d6fa 100644
@@ -236,7 +236,6 @@ config ARCH_REALVIEW
 	bool "ARM Ltd. RealView family"
 	select ARM_AMBA
 	select CLKDEV_LOOKUP
-	select HAVE_SCHED_CLOCK
 	select ICST
 	select GENERIC_CLOCKEVENTS
 	select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -252,7 +251,6 @@ config ARCH_VERSATILE
 	select ARM_AMBA
 	select ARM_VIC
 	select CLKDEV_LOOKUP
-	select HAVE_SCHED_CLOCK
 	select ICST
 	select GENERIC_CLOCKEVENTS
 	select ARCH_WANT_OPTIONAL_GPIOLIB
@@ -270,7 +268,6 @@ config ARCH_VEXPRESS
 	select CLKDEV_LOOKUP
 	select GENERIC_CLOCKEVENTS
 	select HAVE_CLK
-	select HAVE_SCHED_CLOCK
 	select HAVE_PATA_PLATFORM
 	select ICST
 	select PLAT_VERSATILE
arch/arm/plat-versatile/Kconfig +8 -0
index 22540f5..c5e2cd0 100644
@@ -3,4 +3,12 @@ if PLAT_VERSATILE
 config PLAT_VERSATILE_CLCD
 	bool
 
+config PLAT_VERSATILE_LEDS
+	def_bool y if LEDS_CLASS
+	depends on ARCH_REALVIEW || ARCH_VERSATILE
+
+config PLAT_VERSATILE_SCHED_CLOCK
+	def_bool y if !ARCH_INTEGRATOR
+	select HAVE_SCHED_CLOCK
+
 endif
arch/arm/plat-versatile/Makefile +3 -7
index 8b3341c..de6f42f 100644
@@ -1,9 +1,5 @@
 obj-y	:= clock.o
-ifneq ($(CONFIG_ARCH_INTEGRATOR),y)
-obj-y	+= sched-clock.o
-endif
-ifeq ($(CONFIG_LEDS_CLASS),y)
-obj-$(CONFIG_ARCH_REALVIEW) += leds.o
-obj-$(CONFIG_ARCH_VERSATILE) += leds.o
-endif
 obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
+obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
+obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
+
Signature · 1 line
1.6.2.5
#14 lore raw

PATCH 8/11 ARM: integrator/versatile: consolidate FPGA IRQ handling code

In reply to Russell King - ARM Linux

Consolidate the FPGA IRQ handling code. Integrator/AP and Versatile have one FPGA-based IRQ handler each. Integrator/CP has three.

---
 arch/arm/Kconfig                                |    2 +
 arch/arm/mach-integrator/integrator_ap.c        |   41 ++-----
 arch/arm/mach-integrator/integrator_cp.c        |  142 +++++------------------
 arch/arm/mach-versatile/core.c                  |   57 +--------
 arch/arm/mach-versatile/include/mach/hardware.h |    2 +-
 arch/arm/plat-versatile/Kconfig                 |    3 +
 arch/arm/plat-versatile/Makefile                |    1 +
 arch/arm/plat-versatile/fpga-irq.c              |   72 ++++++++++++
 arch/arm/plat-versatile/include/plat/fpga-irq.h |   12 ++
 9 files changed, 140 insertions(+), 192 deletions(-)
 create mode 100644 arch/arm/plat-versatile/fpga-irq.c
 create mode 100644 arch/arm/plat-versatile/include/plat/fpga-irq.h
arch/arm/Kconfig +2 -0
index fe8d6fa..a6ccef6 100644
@@ -229,6 +229,7 @@ config ARCH_INTEGRATOR
 	select ICST
 	select GENERIC_CLOCKEVENTS
 	select PLAT_VERSATILE
+	select PLAT_VERSATILE_FPGA_IRQ
 	help
 	  Support for ARM's Integrator platform.
 
@@ -256,6 +257,7 @@ config ARCH_VERSATILE
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select PLAT_VERSATILE
 	select PLAT_VERSATILE_CLCD
+	select PLAT_VERSATILE_FPGA_IRQ
 	select ARM_TIMER_SP804
 	help
 	  This enables support for ARM Ltd Versatile board.
arch/arm/mach-integrator/integrator_ap.c +12 -29

75 lines not on this page · raw message

arch/arm/mach-integrator/integrator_cp.c +31 -111

175 lines not on this page · raw message

arch/arm/mach-versatile/core.c +6 -51

81 lines not on this page · raw message

arch/arm/mach-versatile/include/mach/hardware.h +1 -1
index b5e75bb..6911e1f 100644
@@ -39,6 +39,6 @@
 /* macro to get@IO space when running virtually */
 #define IO_ADDRESS(x)		(((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
 
-#define __io_address(n)		__io(IO_ADDRESS(n))
+#define __io_address(n)		((void __iomem __force *)IO_ADDRESS(n))
 
 #endif
arch/arm/plat-versatile/Kconfig +3 -0
index c5e2cd0..0b27500 100644
@@ -3,6 +3,9 @@ if PLAT_VERSATILE
 config PLAT_VERSATILE_CLCD
 	bool
 
+config PLAT_VERSATILE_FPGA_IRQ
+	bool
+
 config PLAT_VERSATILE_LEDS
 	def_bool y if LEDS_CLASS
 	depends on ARCH_REALVIEW || ARCH_VERSATILE
arch/arm/plat-versatile/Makefile +1 -0
index de6f42f..41f57f4 100644
@@ -1,5 +1,6 @@
 obj-y	:= clock.o
 obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
+obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o
 obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
 obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
 
arch/arm/plat-versatile/fpga-irq.c new file +72 -0

72 lines not on this page · raw message

arch/arm/plat-versatile/include/plat/fpga-irq.h new file +12 -0
new file mode 100644
index 0000000..627fafd
@@ -0,0 +1,12 @@
+#ifndef PLAT_FPGA_IRQ_H
+#define PLAT_FPGA_IRQ_H
+
+struct fpga_irq_data {
+	void __iomem *base;
+	unsigned int irq_start;
+	struct irq_chip chip;
+};
+
+void fpga_irq_init(int, u32, struct fpga_irq_data *);
+
+#endif
Signature · 1 line
1.6.2.5
#15 lore raw

PATCH 9/11 ARM: realview/vexpress: consolidate localtimer support

In reply to Russell King - ARM Linux

Realview and Versatile Express local timer support is identical, so consolidate the implementations.

---
 arch/arm/mach-realview/Makefile      |    1 -
 arch/arm/mach-realview/localtimer.c  |   26 --------------------------
 arch/arm/mach-vexpress/Makefile      |    1 -
 arch/arm/mach-vexpress/localtimer.c  |   26 --------------------------
 arch/arm/plat-versatile/Makefile     |    1 +
 arch/arm/plat-versatile/localtimer.c |   26 ++++++++++++++++++++++++++
 6 files changed, 27 insertions(+), 54 deletions(-)
 delete mode 100644 arch/arm/mach-realview/localtimer.c
 delete mode 100644 arch/arm/mach-vexpress/localtimer.c
 create mode 100644 arch/arm/plat-versatile/localtimer.c
arch/arm/mach-realview/Makefile +0 -1
index a01b76b..ba85e52 100644
@@ -10,4 +10,3 @@ obj-$(CONFIG_MACH_REALVIEW_PBA8)	+= realview_pba8.o
 obj-$(CONFIG_MACH_REALVIEW_PBX)		+= realview_pbx.o
 obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
-obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-realview/localtimer.c deleted +0 -26
deleted file mode 100644
index 60b4e11..0000000
@@ -1,26 +0,0 @@
-/*
- *  linux/arch/arm/mach-realview/localtimer.c
- *
- *  Copyright (C) 2002 ARM Ltd.
- *  All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/clockchips.h>
-
-#include <asm/irq.h>
-#include <asm/smp_twd.h>
-#include <asm/localtimer.h>
-
-/*
- * Setup the local clock events for a CPU.
- */
-void __cpuinit local_timer_setup(struct clock_event_device *evt)
-{
-	evt->irq = IRQ_LOCALTIMER;
-	twd_timer_setup(evt);
-}
arch/arm/mach-vexpress/Makefile +0 -1
index 2c0ac7d..cfe344e 100644
@@ -6,4 +6,3 @@ obj-y					:= v2m.o
 obj-$(CONFIG_ARCH_VEXPRESS_CA9X4)	+= ct-ca9x4.o
 obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
-obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-vexpress/localtimer.c deleted +0 -26
deleted file mode 100644
index c0e3a59..0000000
@@ -1,26 +0,0 @@
-/*
- *  linux/arch/arm/mach-vexpress/localtimer.c
- *
- *  Copyright (C) 2002 ARM Ltd.
- *  All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/clockchips.h>
-
-#include <asm/smp_twd.h>
-#include <asm/localtimer.h>
-#include <mach/irqs.h>
-
-/*
- * Setup the local clock events for a CPU.
- */
-void __cpuinit local_timer_setup(struct clock_event_device *evt)
-{
-	evt->irq = IRQ_LOCALTIMER;
-	twd_timer_setup(evt);
-}
arch/arm/plat-versatile/Makefile +1 -0
index 41f57f4..b511abb 100644
@@ -1,4 +1,5 @@
 obj-y	:= clock.o
+obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
 obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
 obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o
 obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
arch/arm/plat-versatile/localtimer.c new file +26 -0
new file mode 100644
index 0000000..83ebee5
@@ -0,0 +1,26 @@
+/*
+ *  linux/arch/arm/plat-versatile/localtimer.c
+ *
+ *  Copyright (C) 2002 ARM Ltd.
+ *  All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/clockchips.h>
+
+#include <asm/smp_twd.h>
+#include <asm/localtimer.h>
+#include <mach/irqs.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+void __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+	evt->irq = IRQ_LOCALTIMER;
+	twd_timer_setup(evt);
+}
Signature · 1 line
1.6.2.5
#16 lore raw

PATCH 10/11 ARM: realview/vexpress: consolidate SMP bringup code

In reply to Russell King - ARM Linux

Realview and Versatile Express share the same SMP bringup code, so consolidate the two implementations.

---
 arch/arm/mach-realview/Makefile   |    2 +-
 arch/arm/mach-realview/headsmp.S  |   40 --------------
 arch/arm/mach-realview/platsmp.c  |   98 +---------------------------------
 arch/arm/mach-vexpress/Makefile   |    2 +-
 arch/arm/mach-vexpress/headsmp.S  |   40 --------------
 arch/arm/mach-vexpress/platsmp.c  |   94 +--------------------------------
 arch/arm/plat-versatile/Makefile  |    2 +-
 arch/arm/plat-versatile/headsmp.S |   40 ++++++++++++++
 arch/arm/plat-versatile/platsmp.c |  104 +++++++++++++++++++++++++++++++++++++
 9 files changed, 152 insertions(+), 270 deletions(-)
 delete mode 100644 arch/arm/mach-realview/headsmp.S
 delete mode 100644 arch/arm/mach-vexpress/headsmp.S
 create mode 100644 arch/arm/plat-versatile/headsmp.S
 create mode 100644 arch/arm/plat-versatile/platsmp.c
arch/arm/mach-realview/Makefile +1 -1
index ba85e52..541fa4c 100644
@@ -8,5 +8,5 @@ obj-$(CONFIG_MACH_REALVIEW_PB11MP)	+= realview_pb11mp.o
 obj-$(CONFIG_MACH_REALVIEW_PB1176)	+= realview_pb1176.o
 obj-$(CONFIG_MACH_REALVIEW_PBA8)	+= realview_pba8.o
 obj-$(CONFIG_MACH_REALVIEW_PBX)		+= realview_pbx.o
-obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
+obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
arch/arm/mach-realview/headsmp.S deleted +0 -40
deleted file mode 100644
index b34be45..0000000
@@ -1,40 +0,0 @@
-/*
- *  linux/arch/arm/mach-realview/headsmp.S
- *
- *  Copyright (c) 2003 ARM Limited
- *  All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-	__INIT
-
-/*
- * Realview specific entry point for secondary CPUs.  This provides
- * a "holding pen" into which all secondary cores are held until we're
- * ready for them to initialise.
- */
-ENTRY(realview_secondary_startup)
-	mrc	p15, 0, r0, c0, c0, 5
-	and	r0, r0, #15
-	adr	r4, 1f
-	ldmia	r4, {r5, r6}
-	sub	r4, r4, r5
-	add	r6, r6, r4
-pen:	ldr	r7, [r6]
-	cmp	r7, r0
-	bne	pen
-
-	/*
-	 * we've been released from the holding pen: secondary_stack
-	 * should now contain the SVC stack for this core
-	 */
-	b	secondary_startup
-
-	.align
-1:	.long	.
-	.long	pen_release
arch/arm/mach-realview/platsmp.c +3 -95

128 lines not on this page · raw message

arch/arm/mach-vexpress/Makefile +1 -1
index cfe344e..90551b9 100644
@@ -4,5 +4,5 @@
 
 obj-y					:= v2m.o
 obj-$(CONFIG_ARCH_VEXPRESS_CA9X4)	+= ct-ca9x4.o
-obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
+obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
arch/arm/mach-vexpress/headsmp.S deleted +0 -40
deleted file mode 100644
index 7a3f063..0000000
@@ -1,40 +0,0 @@
-/*
- *  linux/arch/arm/mach-vexpress/headsmp.S
- *
- *  Copyright (c) 2003 ARM Limited
- *  All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-	__INIT
-
-/*
- * Versatile Express specific entry point for secondary CPUs.  This
- * provides a "holding pen" into which all secondary cores are held
- * until we're ready for them to initialise.
- */
-ENTRY(vexpress_secondary_startup)
-	mrc	p15, 0, r0, c0, c0, 5
-	and	r0, r0, #15
-	adr	r4, 1f
-	ldmia	r4, {r5, r6}
-	sub	r4, r4, r5
-	add	r6, r6, r4
-pen:	ldr	r7, [r6]
-	cmp	r7, r0
-	bne	pen
-
-	/*
-	 * we've been released from the holding pen: secondary_stack
-	 * should now contain the SVC stack for this core
-	 */
-	b	secondary_startup
-
-	.align
-1:	.long	.
-	.long	pen_release
arch/arm/mach-vexpress/platsmp.c +2 -92

120 lines not on this page · raw message

arch/arm/plat-versatile/Makefile +1 -1
index b511abb..69714db 100644
@@ -4,4 +4,4 @@ obj-$(CONFIG_PLAT_VERSATILE_CLCD) += clcd.o
 obj-$(CONFIG_PLAT_VERSATILE_FPGA_IRQ) += fpga-irq.o
 obj-$(CONFIG_PLAT_VERSATILE_LEDS) += leds.o
 obj-$(CONFIG_PLAT_VERSATILE_SCHED_CLOCK) += sched-clock.o
-
+obj-$(CONFIG_SMP) += headsmp.o platsmp.o
arch/arm/plat-versatile/headsmp.S new file +40 -0
new file mode 100644
index 0000000..d397a1f
@@ -0,0 +1,40 @@
+/*
+ *  linux/arch/arm/plat-versatile/headsmp.S
+ *
+ *  Copyright (c) 2003 ARM Limited
+ *  All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <linux/init.h>
+
+	__INIT
+
+/*
+ * Realview/Versatile Express specific entry point for secondary CPUs.
+ * This provides a "holding pen" into which all secondary cores are held
+ * until we're ready for them to initialise.
+ */
+ENTRY(versatile_secondary_startup)
+	mrc	p15, 0, r0, c0, c0, 5
+	and	r0, r0, #15
+	adr	r4, 1f
+	ldmia	r4, {r5, r6}
+	sub	r4, r4, r5
+	add	r6, r6, r4
+pen:	ldr	r7, [r6]
+	cmp	r7, r0
+	bne	pen
+
+	/*
+	 * we've been released from the holding pen: secondary_stack
+	 * should now contain the SVC stack for this core
+	 */
+	b	secondary_startup
+
+	.align
+1:	.long	.
+	.long	pen_release
arch/arm/plat-versatile/platsmp.c new file +104 -0

104 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#17 lore raw

PATCH 11/11 ARM: integrator: add Integrator/CP sched_clock support

In reply to Russell King - ARM Linux

Integrator/CP has the 24MHz counter which Versatile and later platforms also have, which we use for sched_clock support. Allow this counter to be used when building a kernel targetting Integrator/CP alone. Integrator/AP does not have this counter, so we must exclude support for the Integrator family when this is enabled.

---
 arch/arm/mach-integrator/integrator_cp.c |    7 +++++++
 arch/arm/plat-versatile/Kconfig          |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-integrator/integrator_cp.c +7 -0
index 05da36f..9e3ce26 100644
@@ -44,6 +44,7 @@
 
 #include <plat/clcd.h>
 #include <plat/fpga-irq.h>
+#include <plat/sched_clock.h>
 
 #include "common.h"
 
@@ -440,11 +441,17 @@ static struct amba_device *amba_devs[] __initdata = {
 	&clcd_device,
 };
 
+#define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28)
+
 static void __init intcp_init_early(void)
 {
 	clkdev_add_table(cp_lookups, ARRAY_SIZE(cp_lookups));
 
 	integrator_init_early();
+
+#ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK
+	versatile_sched_clock_init(REFCOUNTER, 24000000);
+#endif
 }
 
 static void __init intcp_init(void)
arch/arm/plat-versatile/Kconfig +1 -1
index 0b27500..52353be 100644
@@ -11,7 +11,7 @@ config PLAT_VERSATILE_LEDS
 	depends on ARCH_REALVIEW || ARCH_VERSATILE
 
 config PLAT_VERSATILE_SCHED_CLOCK
-	def_bool y if !ARCH_INTEGRATOR
+	def_bool y if !ARCH_INTEGRATOR_AP
 	select HAVE_SCHED_CLOCK
 
 endif
Signature · 1 line
1.6.2.5
#18 lore raw

cover Rationalize and consolidate ARMs evaluation boards

In reply to Russell King - ARM Linux
Quoted 11 lines · Russell King - ARM Linux

This series, which applies on top of the CLCD series consolidates some of the code used on ARM platforms, in particular the FPGA interrupt, local timer, and SMP bring up code.

We also add sched_clock() support for Integrator/CP, but only when we're building only for Integrator/CP as Integrator/AP platforms don't have the 24MHz counter. We also move the sched_clock() initialization to the early init callback, along with registering the clock lookups.

As we know how DMA is to be supported with primecells, we no longer need the DMA definitions which aren't used, so these are removed.

The whole series looks fine (acked. if you need one).

Signature · 1 line
Catalin