linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support
@ 2013-02-18 11:35 Afzal Mohammed
  2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:35 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

(Resending, since it seems, LAKML doesn't accept patches with subject
prefix only as "RFC", but requires "PATCH" prefix also)

Hi,

This series adds minimal support to boot Linux on platforms having
AM43 based SoC's.

This is being sent as an RFC to seek opinion about modification in
twd to register percpu local timer clock event for scheduler tick in
the case of one core SMP.

AM43 SoC's are based on ARM Cortex-A9. It is an ARM Cortex-A9 SMP
configuration with one core (not uniprocessor configuration). AM43 is
similar to AM335x in it's peripheral capabilities, with many of the
peripheral register mapping's similar like that of uart.

AM43 is in pre-silicon stage and currently there are no public
documents.

This series has been tested on a pre-silicon platform that emulates
AM43 SoC, changes proposed here are minimal - to get it booting.
Kernel was directly run without the help of bootloader - Images were
directly loaded onto a pre-initialized RAM and ARM registers updated
as required for booting.

Changes have been made over linux-next (next-20130213) with three "OF"
related reverts (which otherwise causes problem in other platforms
also) and compiled with omap2plus_defconfig. Multiplatform option was
enabled, while most of CONFIG options were deselected for a faster
boot. Beagle bone boots as earlier with these changes.

An interesting observation is that it may be possible to boot this
platform to console without any platform specific modification to
proper Kernel (by that I mean excluding DT sources) using Arnd's,

"[PATCH,RFC] default machine descriptor for multiplatform",

along with a "CLOCKSOURCE_OF_DECLARE" for smp twd.

But later on to make SoC do any really useful work or to get done
things that the SoC is meant to do, platform changes like omap-hwmod,
handling power management, clock tree, detecting SoC capabilities etc
would have to be made, necessitating DT_MACHINE_START at least in
the foreseeable future.

Patch - 8 that makes AM43 boot on pre-silicon platform would be
replaced later by a one for original board.

Last but not least, thanks to Ankur Kishore <a-kishore@ti.com>
(who first made Linux to boot on AM43) for all the help that made
Linux bringup easier.

Regards
Afzal


Afzal Mohammed (8):
  ARM: localtimer: return percpu clkevt on register
  ARM: twd: register clock event for 1 core SMP
  ARM: twd: clock rate from DT (if no DT clk tree)
  ARM: am33xx: ll debug config help
  ARM: OMAP2+: am43: Kconfig
  ARM: OMAP2+: am43: basic dt support
  ARM: dts: am4372: initial support
  ARM: dts: am43-pre-silicon support

 Documentation/devicetree/bindings/arm/twd.txt |  7 +++-
 arch/arm/Kconfig.debug                        |  3 ++
 arch/arm/boot/dts/Makefile                    |  3 +-
 arch/arm/boot/dts/am43-pre-silicon.dts        | 31 +++++++++++++++
 arch/arm/boot/dts/am4372.dtsi                 | 55 +++++++++++++++++++++++++++
 arch/arm/include/asm/localtimer.h             |  7 ++--
 arch/arm/kernel/smp.c                         |  8 ++--
 arch/arm/kernel/smp_twd.c                     | 16 +++++++-
 arch/arm/mach-omap2/Kconfig                   | 11 ++++++
 arch/arm/mach-omap2/board-generic.c           | 18 +++++++++
 10 files changed, 148 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/boot/dts/am43-pre-silicon.dts
 create mode 100644 arch/arm/boot/dts/am4372.dtsi

-- 
1.7.12


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
@ 2013-02-18 11:36 ` Afzal Mohammed
  2013-02-19 10:22   ` Santosh Shilimkar
  2013-02-19 12:10   ` Felipe Balbi
  2013-02-18 11:37 ` [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP Afzal Mohammed
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:36 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Return percpu clock event on local timer register. It is the boot cpu
that calls this and it can use the returned percpu clock event to
register a clock event in the case of SMP configuration with one core.
This helps to have a booting Kernel even if no other timer is
registered for clock tick.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/include/asm/localtimer.h | 7 ++++---
 arch/arm/kernel/smp.c             | 8 ++++----
 arch/arm/kernel/smp_twd.c         | 5 +++--
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
index f77ffc1..c3f89c0 100644
--- a/arch/arm/include/asm/localtimer.h
+++ b/arch/arm/include/asm/localtimer.h
@@ -23,11 +23,12 @@ struct local_timer_ops {
 /*
  * Register a local timer driver
  */
-int local_timer_register(struct local_timer_ops *);
+struct clock_event_device *local_timer_register(struct local_timer_ops *);
 #else
-static inline int local_timer_register(struct local_timer_ops *ops)
+static inline
+struct clock_event_device *local_timer_register(struct local_timer_ops *ops)
 {
-	return -ENXIO;
+	return ERR_PTR(-ENXIO);
 }
 #endif
 
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 5f73f70..42d95d6 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -491,16 +491,16 @@ static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt)
 static struct local_timer_ops *lt_ops;
 
 #ifdef CONFIG_LOCAL_TIMERS
-int local_timer_register(struct local_timer_ops *ops)
+struct clock_event_device *local_timer_register(struct local_timer_ops *ops)
 {
 	if (!is_smp() || !setup_max_cpus)
-		return -ENXIO;
+		return ERR_PTR(-ENXIO);
 
 	if (lt_ops)
-		return -EBUSY;
+		return ERR_PTR(-EBUSY);
 
 	lt_ops = ops;
-	return 0;
+	return &per_cpu(percpu_clockevent, smp_processor_id());
 }
 #endif
 
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index c092115..616268c 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -315,6 +315,7 @@ static struct local_timer_ops twd_lt_ops __cpuinitdata = {
 static int __init twd_local_timer_common_register(struct device_node *np)
 {
 	int err;
+	struct clock_event_device *evt;
 
 	twd_evt = alloc_percpu(struct clock_event_device *);
 	if (!twd_evt) {
@@ -328,8 +329,8 @@ static int __init twd_local_timer_common_register(struct device_node *np)
 		goto out_free;
 	}
 
-	err = local_timer_register(&twd_lt_ops);
-	if (err)
+	evt = local_timer_register(&twd_lt_ops);
+	if (IS_ERR(evt))
 		goto out_irq;
 
 	twd_get_clock(np);
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
  2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
@ 2013-02-18 11:37 ` Afzal Mohammed
  2013-02-19 10:14   ` Santosh Shilimkar
  2013-02-18 11:37 ` [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree) Afzal Mohammed
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:37 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Register percpu local timer for scheduler tick in the case of one core
SMP configuration. In other cases - secondary cpu's as well as boot
cpu's having more than one core, this is being registered as per
existing boot flow, with a difference that they happens after delay
calibration. Registering the clock for tick in case of one core should
be done before Kernel calibrates delay (this is required to boot,
unless local timer is the only one registered for tick). Registering
twd local timer at init_time (which platforms are doing now) helps
achieve that with the proposed change.

This helps in an almost booting Kernel (minimal) by only relying on
ARM parts for an A9 one core SMP.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/kernel/smp_twd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 616268c..118f4f2 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -335,6 +335,9 @@ static int __init twd_local_timer_common_register(struct device_node *np)
 
 	twd_get_clock(np);
 
+	if (num_possible_cpus() == 1)
+		twd_timer_setup(evt);
+
 	return 0;
 
 out_irq:
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree)
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
  2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
  2013-02-18 11:37 ` [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP Afzal Mohammed
@ 2013-02-18 11:37 ` Afzal Mohammed
  2013-02-19 10:18   ` Santosh Shilimkar
  2013-02-18 11:37 ` [PATCH, RFC 4/8] ARM: am33xx: ll debug config help Afzal Mohammed
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:37 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Add an optional property to find clock-frequency from DT. This helps
as a fallback mechanism in case there is no representation of clock
tree in DT.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 Documentation/devicetree/bindings/arm/twd.txt | 7 ++++++-
 arch/arm/kernel/smp_twd.c                     | 8 ++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/twd.txt b/Documentation/devicetree/bindings/arm/twd.txt
index 75b8610..fdafa4f 100644
--- a/Documentation/devicetree/bindings/arm/twd.txt
+++ b/Documentation/devicetree/bindings/arm/twd.txt
@@ -7,8 +7,9 @@ and watchdog.
 The TWD is usually attached to a GIC to deliver its two per-processor
 interrupts.
 
-** Timer node required properties:
+** Timer node properties:
 
+Required properties:
 - compatible : Should be one of:
 	"arm,cortex-a9-twd-timer"
 	"arm,cortex-a5-twd-timer"
@@ -19,12 +20,16 @@ interrupts.
 - reg : Specify the base address and the size of the TWD timer
 	register window.
 
+Optional property:
+- clock-frequency : frequency(Hz) of peripheral clock fed to timer
+
 Example:
 
 	twd-timer@2c000600 {
 		compatible = "arm,arm11mp-twd-timer"";
 		reg = <0x2c000600 0x20>;
 		interrupts = <1 13 0xf01>;
+		clock-frequency = <300000000>;
 	};
 
 ** Watchdog node properties:
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 118f4f2..aac0f9f 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -247,7 +247,15 @@ static void twd_get_clock(struct device_node *np)
 		twd_clk = clk_get_sys("smp_twd", NULL);
 
 	if (IS_ERR(twd_clk)) {
+		u32 freq;
+
 		pr_err("smp_twd: clock not found %d\n", (int) PTR_ERR(twd_clk));
+
+		/* If there is no representation of clock tree in DT,
+		   provide a fallback option to obtain frequency
+		 */
+		if (np && !of_property_read_u32(np, "clock-frequency", &freq))
+			twd_timer_rate = freq;
 		return;
 	}
 
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 4/8] ARM: am33xx: ll debug config help
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (2 preceding siblings ...)
  2013-02-18 11:37 ` [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree) Afzal Mohammed
@ 2013-02-18 11:37 ` Afzal Mohammed
  2013-02-19 10:25   ` Santosh Shilimkar
  2013-02-18 11:38 ` [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig Afzal Mohammed
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:37 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Selecting DEBUG_AM33XXUART1 routes low level debug messages to first
UART instance of AM335x based SoC's. This selection is valid for
upcoming AM43 based SoC's too. Make this information available upon
configuring.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/Kconfig.debug | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index acdddda..b717b78 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -542,6 +542,9 @@ choice
 
 	config DEBUG_AM33XXUART1
 		bool "AM33XX UART1"
+		help
+		  Route low level debug messages to first uart instance
+		  for boards based on am335 and am43 family of SoC's
 
 	config DEBUG_ZOOM_UART
 		bool "Zoom2/3 UART"
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (3 preceding siblings ...)
  2013-02-18 11:37 ` [PATCH, RFC 4/8] ARM: am33xx: ll debug config help Afzal Mohammed
@ 2013-02-18 11:38 ` Afzal Mohammed
  2013-02-19 10:27   ` Santosh Shilimkar
  2013-02-18 11:38 ` [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support Afzal Mohammed
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:38 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Add Kconfig option for AM43 family of SoC's, these are ARM Cortex A9
based (SMP configuration with 1 core).

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/mach-omap2/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 49ac3df..683fbaa 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -141,6 +141,17 @@ config SOC_AM33XX
 	select MULTI_IRQ_HANDLER
 	select COMMON_CLK
 
+config SOC_AM43
+	bool "TI AM43"
+	depends on ARCH_OMAP2PLUS
+	default y
+	select CPU_V7
+	select HAVE_SMP
+	select LOCAL_TIMERS if SMP
+	select MULTI_IRQ_HANDLER
+	select ARM_GIC
+	select COMMON_CLK
+
 config OMAP_PACKAGE_ZAF
        bool
 
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (4 preceding siblings ...)
  2013-02-18 11:38 ` [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig Afzal Mohammed
@ 2013-02-18 11:38 ` Afzal Mohammed
  2013-02-19 10:32   ` Santosh Shilimkar
  2013-02-18 11:38 ` [PATCH, RFC 7/8] ARM: dts: am4372: initial support Afzal Mohammed
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:38 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

Describe minimal DT boot machine details for AM43 based SoC's. AM43
family of SoC's are ARM Cortex-A9 based with one core in SMP
configuration. Low level debug could be achieved by selecting
DEBUG_AM33XXUART1. To boot AM43 SoC, this change is sufficient w.r.t
Kernel (considering the fact that strictly speaking DT sources does
not classify as a part of Kernel). Here private timer of the one and
only core is being used as clock event (as well as, as time source).

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/mach-omap2/board-generic.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 0274ff7..e083f08 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -15,7 +15,10 @@
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/irqdomain.h>
+#include <linux/irqchip.h>
 
+#include <asm/mach/map.h>
+#include <asm/smp_twd.h>
 #include <asm/mach/arch.h>
 
 #include "common.h"
@@ -182,3 +185,18 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
 	.restart	= omap44xx_restart,
 MACHINE_END
 #endif
+
+#ifdef CONFIG_SOC_AM43
+static const char *am43_boards_compat[] __initdata = {
+	"ti,am43",
+	NULL,
+};
+
+DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
+	.map_io		= debug_ll_io_init,
+	.init_irq	= irqchip_init,
+	.init_machine	= omap_generic_init,
+	.init_time	= twd_local_timer_of_register,
+	.dt_compat	= am43_boards_compat,
+MACHINE_END
+#endif
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 7/8] ARM: dts: am4372: initial support
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (5 preceding siblings ...)
  2013-02-18 11:38 ` [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support Afzal Mohammed
@ 2013-02-18 11:38 ` Afzal Mohammed
  2013-02-18 18:22   ` Felipe Balbi
  2013-02-18 11:38 ` [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support Afzal Mohammed
  2013-02-19 10:09 ` [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Santosh Shilimkar
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:38 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

DT source (minimal) for AM4372 SoC. Those represented here are the
minimal DT nodes necessary to get kernel booting.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/boot/dts/am4372.dtsi | 55 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 arch/arm/boot/dts/am4372.dtsi

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
new file mode 100644
index 0000000..178c41f
--- /dev/null
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -0,0 +1,55 @@
+/*
+ * Device Tree Source for AM4372 SoC
+ *
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "ti,am4372", "ti,am43";
+	interrupt-parent = <&gic>;
+
+
+	aliases {
+		serial0 = &uart1;
+	};
+
+	cpus {
+		cpu@0 {
+			compatible = "arm,cortex-a9";
+		};
+	};
+
+	gic: interrupt-controller@48241000 {
+		compatible = "arm,cortex-a9-gic";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		reg = <0x48241000 0x1000>,
+		      <0x48240100 0x0100>;
+	};
+
+	twd1: local-timer@0x48240600 {
+		compatible = "arm,cortex-a9-twd-timer";
+		reg = <0x48240600 0x20>;
+		interrupts = <1 13 0x304>;
+	};
+
+	ocp {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		uart1: serial@44e09000 {
+			compatible = "ti,am4372-uart","ti,omap2-uart";
+			clock-frequency = <48000000>;
+			reg = <0x44e09000 0x2000>;
+			interrupts = <0 72 0x4>;
+		};
+	};
+};
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (6 preceding siblings ...)
  2013-02-18 11:38 ` [PATCH, RFC 7/8] ARM: dts: am4372: initial support Afzal Mohammed
@ 2013-02-18 11:38 ` Afzal Mohammed
  2013-02-19 10:35   ` Santosh Shilimkar
  2013-02-19 10:09 ` [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Santosh Shilimkar
  8 siblings, 1 reply; 32+ messages in thread
From: Afzal Mohammed @ 2013-02-18 11:38 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel
  Cc: Russell King, Tony Lindgren, Marc Zyngier, Nicolas Pitre,
	Santosh Shilimkar, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

AM43 SoC is in pre-silicon stage, meanwhile it has been modelled in
a pre-silicon platform. To validate and boot Linux in pre-silicon
platform that emulates an AM43 SoC, add DT build support.

As bootloader is not used, bootargs is passed through DT.

Note: This would be replaced by an original board support.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/boot/dts/Makefile             |  3 ++-
 arch/arm/boot/dts/am43-pre-silicon.dts | 31 +++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am43-pre-silicon.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 94d88b9..b434344 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -124,7 +124,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap5-evm.dtb \
 	am335x-evm.dtb \
 	am335x-evmsk.dtb \
-	am335x-bone.dtb
+	am335x-bone.dtb \
+	am43-pre-silicon.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
 dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
 dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
diff --git a/arch/arm/boot/dts/am43-pre-silicon.dts b/arch/arm/boot/dts/am43-pre-silicon.dts
new file mode 100644
index 0000000..b9c6297
--- /dev/null
+++ b/arch/arm/boot/dts/am43-pre-silicon.dts
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+
+/* AM43 Pre Silicon */
+
+/dts-v1/;
+
+/include/ "am4372.dtsi"
+
+/ {
+	model = "TI AM43 Pre Silicon";
+	compatible = "ti,am43-pre-silicon","ti,am4372","ti,am43";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	chosen {
+		bootargs = "console=ttyO0,115200n8 root=/dev/ram rw initrd=0x82000000,32MB earlyprintk";
+	};
+};
+
+&twd1 {
+	clock-frequency = <300000000>;
+};
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 7/8] ARM: dts: am4372: initial support
  2013-02-18 11:38 ` [PATCH, RFC 7/8] ARM: dts: am4372: initial support Afzal Mohammed
@ 2013-02-18 18:22   ` Felipe Balbi
  2013-02-19  9:10     ` Mohammed, Afzal
  0 siblings, 1 reply; 32+ messages in thread
From: Felipe Balbi @ 2013-02-18 18:22 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Santosh Shilimkar, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Hi,

On Mon, Feb 18, 2013 at 05:08:16PM +0530, Afzal Mohammed wrote:
> +		uart1: serial@44e09000 {
> +			compatible = "ti,am4372-uart","ti,omap2-uart";
> +			clock-frequency = <48000000>;
> +			reg = <0x44e09000 0x2000>;
> +			interrupts = <0 72 0x4>;

missing ti,hwmods ??

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH, RFC 7/8] ARM: dts: am4372: initial support
  2013-02-18 18:22   ` Felipe Balbi
@ 2013-02-19  9:10     ` Mohammed, Afzal
  2013-02-19  9:17       ` Felipe Balbi
  0 siblings, 1 reply; 32+ messages in thread
From: Mohammed, Afzal @ 2013-02-19  9:10 UTC (permalink / raw)
  To: Balbi, Felipe
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Shilimkar, Santosh, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Nori, Sekhar,
	Syed Mohammed, Khasim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 705 bytes --]

Hi Felipe,

On Mon, Feb 18, 2013 at 23:52:40, Balbi, Felipe wrote:
> On Mon, Feb 18, 2013 at 05:08:16PM +0530, Afzal Mohammed wrote:

> > +		uart1: serial@44e09000 {
> > +			compatible = "ti,am4372-uart","ti,omap2-uart";
> > +			clock-frequency = <48000000>;
> > +			reg = <0x44e09000 0x2000>;
> > +			interrupts = <0 72 0x4>;
> 
> missing ti,hwmods ??

It is a deliberate omission. For minimal bootconsole booting, hwmod
help is not required. Hwmod details would be added gradually later,
current series doesn't register hwmod.

Regards
Afzal

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 7/8] ARM: dts: am4372: initial support
  2013-02-19  9:10     ` Mohammed, Afzal
@ 2013-02-19  9:17       ` Felipe Balbi
  0 siblings, 0 replies; 32+ messages in thread
From: Felipe Balbi @ 2013-02-19  9:17 UTC (permalink / raw)
  To: Mohammed, Afzal
  Cc: Balbi, Felipe, linux-omap, linux-arm-kernel, devicetree-discuss,
	linux-doc, linux-kernel, Russell King, Tony Lindgren,
	Marc Zyngier, Nicolas Pitre, Shilimkar, Santosh, Will Deacon,
	Linus Walleij, Rob Herring, Grant Likely, Rob Landley, Nori,
	Sekhar, Syed Mohammed, Khasim

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

On Tue, Feb 19, 2013 at 10:10:17AM +0100, Mohammed, Afzal wrote:
> Hi Felipe,
> 
> On Mon, Feb 18, 2013 at 23:52:40, Balbi, Felipe wrote:
> > On Mon, Feb 18, 2013 at 05:08:16PM +0530, Afzal Mohammed wrote:
> 
> > > +		uart1: serial@44e09000 {
> > > +			compatible = "ti,am4372-uart","ti,omap2-uart";
> > > +			clock-frequency = <48000000>;
> > > +			reg = <0x44e09000 0x2000>;
> > > +			interrupts = <0 72 0x4>;
> > 
> > missing ti,hwmods ??
> 
> It is a deliberate omission. For minimal bootconsole booting, hwmod
> help is not required. Hwmod details would be added gradually later,
> current series doesn't register hwmod.

understood, thanks

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support
  2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
                   ` (7 preceding siblings ...)
  2013-02-18 11:38 ` [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support Afzal Mohammed
@ 2013-02-19 10:09 ` Santosh Shilimkar
  2013-02-19 11:24   ` Mohammed, Afzal
  8 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:09 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:05 PM, Afzal Mohammed wrote:
> (Resending, since it seems, LAKML doesn't accept patches with subject
> prefix only as "RFC", but requires "PATCH" prefix also)
>
> Hi,
>
> This series adds minimal support to boot Linux on platforms having
> AM43 based SoC's.
>
> This is being sent as an RFC to seek opinion about modification in
> twd to register percpu local timer clock event for scheduler tick in
> the case of one core SMP.
>
> AM43 SoC's are based on ARM Cortex-A9. It is an ARM Cortex-A9 SMP
> configuration with one core (not uniprocessor configuration). AM43 is
> similar to AM335x in it's peripheral capabilities, with many of the
> peripheral register mapping's similar like that of uart.
>
After looking at the specs, you don't need the SMP mode since ACP
isn't being used.


> AM43 is in pre-silicon stage and currently there are no public
> documents.
>
> This series has been tested on a pre-silicon platform that emulates
> AM43 SoC, changes proposed here are minimal - to get it booting.
> Kernel was directly run without the help of bootloader - Images were
> directly loaded onto a pre-initialized RAM and ARM registers updated
> as required for booting.
>
> Changes have been made over linux-next (next-20130213) with three "OF"
> related reverts (which otherwise causes problem in other platforms
> also) and compiled with omap2plus_defconfig. Multiplatform option was
> enabled, while most of CONFIG options were deselected for a faster
> boot. Beagle bone boots as earlier with these changes.
>
> An interesting observation is that it may be possible to boot this
> platform to console without any platform specific modification to
> proper Kernel (by that I mean excluding DT sources) using Arnd's,
>
> "[PATCH,RFC] default machine descriptor for multiplatform",
>
> along with a "CLOCKSOURCE_OF_DECLARE" for smp twd.
>
TWD use for AM437x is also limited because these times stops in
low power sates and there you will need broad-cast mechanism which
again more of SMP machine feature.

So I suggest to use the wakeup timer(GPT1) clock-event instead
of local timer for the mentioned reason.

Regards,
Santosh


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP
  2013-02-18 11:37 ` [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP Afzal Mohammed
@ 2013-02-19 10:14   ` Santosh Shilimkar
  2013-02-19 12:14     ` Felipe Balbi
  0 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:14 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:07 PM, Afzal Mohammed wrote:
> Register percpu local timer for scheduler tick in the case of one core
> SMP configuration. In other cases - secondary cpu's as well as boot
> cpu's having more than one core, this is being registered as per
> existing boot flow, with a difference that they happens after delay
> calibration. Registering the clock for tick in case of one core should
> be done before Kernel calibrates delay (this is required to boot,
> unless local timer is the only one registered for tick). Registering
> twd local timer at init_time (which platforms are doing now) helps
> achieve that with the proposed change.
>
> This helps in an almost booting Kernel (minimal) by only relying on
> ARM parts for an A9 one core SMP.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
As mentioned in cover-letter, I don't think we have good
reasoning to make TWD to work with UP configuration. Even
you fix the timer code, there are more cascaded dependencies
which is not worth the effort.

Regards,
Samtosh


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree)
  2013-02-18 11:37 ` [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree) Afzal Mohammed
@ 2013-02-19 10:18   ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:18 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:07 PM, Afzal Mohammed wrote:
> Add an optional property to find clock-frequency from DT. This helps
> as a fallback mechanism in case there is no representation of clock
> tree in DT.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
This won't work always because twd clock is CPU dependent and changes
with CPU clock speed. And more importantly to get CPUFreq working, you
need to provide the correct clock-node to TWD library. Refer OMAP4 clock
data for reference.

Regards,
Santosh



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register
  2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
@ 2013-02-19 10:22   ` Santosh Shilimkar
  2013-02-19 12:10   ` Felipe Balbi
  1 sibling, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:22 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:06 PM, Afzal Mohammed wrote:
> Return percpu clock event on local timer register. It is the boot cpu
> that calls this and it can use the returned percpu clock event to
> register a clock event in the case of SMP configuration with one core.
SMP configuration with 1 core is UP :-)
Jokes apart as said already, lets see whether we really need it.

Regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 4/8] ARM: am33xx: ll debug config help
  2013-02-18 11:37 ` [PATCH, RFC 4/8] ARM: am33xx: ll debug config help Afzal Mohammed
@ 2013-02-19 10:25   ` Santosh Shilimkar
  2013-02-19 10:30     ` Mohammed, Afzal
  0 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:25 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:07 PM, Afzal Mohammed wrote:
> Selecting DEBUG_AM33XXUART1 routes low level debug messages to first
> UART instance of AM335x based SoC's. This selection is valid for
> upcoming AM43 based SoC's too. Make this information available upon
> configuring.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>   arch/arm/Kconfig.debug | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index acdddda..b717b78 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -542,6 +542,9 @@ choice
>
>   	config DEBUG_AM33XXUART1
>   		bool "AM33XX UART1"
> +		help
> +		  Route low level debug messages to first uart instance
> +		  for boards based on am335 and am43 family of SoC's
>
>   	config DEBUG_ZOOM_UART
>   		bool "Zoom2/3 UART"
>
With DT, IIRC DEBUGLL is broken. So did you hack debug-macro.S
to get the earlyprintk working ?

Regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig
  2013-02-18 11:38 ` [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig Afzal Mohammed
@ 2013-02-19 10:27   ` Santosh Shilimkar
  2013-02-19 10:56     ` Felipe Balbi
  0 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:27 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
> Add Kconfig option for AM43 family of SoC's, these are ARM Cortex A9
> based (SMP configuration with 1 core).
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>   arch/arm/mach-omap2/Kconfig | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 49ac3df..683fbaa 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -141,6 +141,17 @@ config SOC_AM33XX
>   	select MULTI_IRQ_HANDLER
>   	select COMMON_CLK
>
> +config SOC_AM43
> +	bool "TI AM43"
> +	depends on ARCH_OMAP2PLUS
> +	default y
> +	select CPU_V7
> +	select HAVE_SMP
You don't need this
> +	select LOCAL_TIMERS if SMP
This one as well

> +	select MULTI_IRQ_HANDLER
And this one too I guess.

Rest is fine.

regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH, RFC 4/8] ARM: am33xx: ll debug config help
  2013-02-19 10:25   ` Santosh Shilimkar
@ 2013-02-19 10:30     ` Mohammed, Afzal
  2013-02-19 11:02       ` Santosh Shilimkar
  0 siblings, 1 reply; 32+ messages in thread
From: Mohammed, Afzal @ 2013-02-19 10:30 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 395 bytes --]

Hi Santosh,

On Tue, Feb 19, 2013 at 15:55:59, Shilimkar, Santosh wrote:

> With DT, IIRC DEBUGLL is broken. So did you hack debug-macro.S
> to get the earlyprintk working ?

No, on linux-next, ll debug works properly.

Regards
Afzal 
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support
  2013-02-18 11:38 ` [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support Afzal Mohammed
@ 2013-02-19 10:32   ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:32 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
> Describe minimal DT boot machine details for AM43 based SoC's. AM43
> family of SoC's are ARM Cortex-A9 based with one core in SMP
> configuration. Low level debug could be achieved by selecting
> DEBUG_AM33XXUART1. To boot AM43 SoC, this change is sufficient w.r.t
> Kernel (considering the fact that strictly speaking DT sources does
> not classify as a part of Kernel). Here private timer of the one and
> only core is being used as clock event (as well as, as time source).
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
As discussed already, lets just call this as Cortex-A9 single core
machine to avoid confusion.

>   arch/arm/mach-omap2/board-generic.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 0274ff7..e083f08 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -15,7 +15,10 @@
>   #include <linux/of_irq.h>
>   #include <linux/of_platform.h>
>   #include <linux/irqdomain.h>
> +#include <linux/irqchip.h>
>
> +#include <asm/mach/map.h>
> +#include <asm/smp_twd.h>
>   #include <asm/mach/arch.h>
>
>   #include "common.h"
> @@ -182,3 +185,18 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
>   	.restart	= omap44xx_restart,
>   MACHINE_END
>   #endif
> +
> +#ifdef CONFIG_SOC_AM43
> +static const char *am43_boards_compat[] __initdata = {
> +	"ti,am43",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
> +	.map_io		= debug_ll_io_init,
> +	.init_irq	= irqchip_init,
With Arnds patch [1], the above can be dropped..

> +	.init_machine	= omap_generic_init,
> +	.init_time	= twd_local_timer_of_register,
This one needs to take care of other timers as well from start. So
better to take that approach from start.

Regards,
Santosh

[1] https://patchwork.kernel.org/patch/2074871/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-18 11:38 ` [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support Afzal Mohammed
@ 2013-02-19 10:35   ` Santosh Shilimkar
  2013-02-19 10:52     ` Mohammed, Afzal
  0 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 10:35 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Sekhar Nori, Syed Mohammed Khasim

On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
> AM43 SoC is in pre-silicon stage, meanwhile it has been modelled in
> a pre-silicon platform. To validate and boot Linux in pre-silicon
> platform that emulates an AM43 SoC, add DT build support.
>
> As bootloader is not used, bootargs is passed through DT.
>
> Note: This would be replaced by an original board support.
>
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> ---
>   arch/arm/boot/dts/Makefile             |  3 ++-
>   arch/arm/boot/dts/am43-pre-silicon.dts | 31 +++++++++++++++++++++++++++++++
>   2 files changed, 33 insertions(+), 1 deletion(-)
>   create mode 100644 arch/arm/boot/dts/am43-pre-silicon.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 94d88b9..b434344 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -124,7 +124,8 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
>   	omap5-evm.dtb \
>   	am335x-evm.dtb \
>   	am335x-evmsk.dtb \
> -	am335x-bone.dtb
> +	am335x-bone.dtb \
> +	am43-pre-silicon.dtb
>   dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
>   dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
>   dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
> diff --git a/arch/arm/boot/dts/am43-pre-silicon.dts b/arch/arm/boot/dts/am43-pre-silicon.dts
> new file mode 100644
> index 0000000..b9c6297
> --- /dev/null
> +++ b/arch/arm/boot/dts/am43-pre-silicon.dts

Well the pre-silicon platform and the SOC are very
close and at least the support you are adding here is
exactly same. So lets just use am437x.dtb or something
like that.

Regards,
Santosh


^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-19 10:35   ` Santosh Shilimkar
@ 2013-02-19 10:52     ` Mohammed, Afzal
  2013-02-19 11:00       ` Santosh Shilimkar
  0 siblings, 1 reply; 32+ messages in thread
From: Mohammed, Afzal @ 2013-02-19 10:52 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 976 bytes --]

Hi Santosh,

On Tue, Feb 19, 2013 at 16:05:22, Shilimkar, Santosh wrote:
> On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:

> > AM43 SoC is in pre-silicon stage, meanwhile it has been modelled in
> > a pre-silicon platform. To validate and boot Linux in pre-silicon
> > platform that emulates an AM43 SoC, add DT build support.

> > Note: This would be replaced by an original board support.

> > -	am335x-bone.dtb
> > +	am335x-bone.dtb \
> > +	am43-pre-silicon.dtb

> Well the pre-silicon platform and the SOC are very
> close and at least the support you are adding here is
> exactly same. So lets just use am437x.dtb or something
> like that.

SoC support is already added in patch 7/8. This is board (which doesn't
exist now) support, hence a pre-silicon temporary one to validate it.

Regards
Afzal

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig
  2013-02-19 10:27   ` Santosh Shilimkar
@ 2013-02-19 10:56     ` Felipe Balbi
  2013-02-19 11:01       ` Santosh Shilimkar
  0 siblings, 1 reply; 32+ messages in thread
From: Felipe Balbi @ 2013-02-19 10:56 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Afzal Mohammed, linux-omap, linux-arm-kernel, devicetree-discuss,
	linux-doc, linux-kernel, Russell King, Tony Lindgren,
	Marc Zyngier, Nicolas Pitre, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On Tue, Feb 19, 2013 at 03:57:07PM +0530, Santosh Shilimkar wrote:
> On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
> >Add Kconfig option for AM43 family of SoC's, these are ARM Cortex A9
> >based (SMP configuration with 1 core).
> >
> >Signed-off-by: Afzal Mohammed <afzal@ti.com>
> >---
> >  arch/arm/mach-omap2/Kconfig | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> >diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> >index 49ac3df..683fbaa 100644
> >--- a/arch/arm/mach-omap2/Kconfig
> >+++ b/arch/arm/mach-omap2/Kconfig
> >@@ -141,6 +141,17 @@ config SOC_AM33XX
> >  	select MULTI_IRQ_HANDLER
> >  	select COMMON_CLK
> >
> >+config SOC_AM43
> >+	bool "TI AM43"
> >+	depends on ARCH_OMAP2PLUS
> >+	default y
> >+	select CPU_V7
> >+	select HAVE_SMP
> You don't need this

actually, this is needed for CONFIG_SMP_ON_UP

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-19 10:52     ` Mohammed, Afzal
@ 2013-02-19 11:00       ` Santosh Shilimkar
  2013-02-19 11:03         ` Mohammed, Afzal
  0 siblings, 1 reply; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 11:00 UTC (permalink / raw)
  To: Mohammed, Afzal
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

On Tuesday 19 February 2013 04:22 PM, Mohammed, Afzal wrote:
> Hi Santosh,
>
> On Tue, Feb 19, 2013 at 16:05:22, Shilimkar, Santosh wrote:
>> On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
>
>>> AM43 SoC is in pre-silicon stage, meanwhile it has been modelled in
>>> a pre-silicon platform. To validate and boot Linux in pre-silicon
>>> platform that emulates an AM43 SoC, add DT build support.
>
>>> Note: This would be replaced by an original board support.
>
>>> -	am335x-bone.dtb
>>> +	am335x-bone.dtb \
>>> +	am43-pre-silicon.dtb
>
>> Well the pre-silicon platform and the SOC are very
>> close and at least the support you are adding here is
>> exactly same. So lets just use am437x.dtb or something
>> like that.
>
> SoC support is already added in patch 7/8. This is board (which doesn't
> exist now) support, hence a pre-silicon temporary one to validate it.
>
I mean we can call it am437x-xyxboard.dtb already considering the data
here can be re-used. Boot-args can be used from default kernel config
with CONFIG_CMDLINE_FORCE.

No strong opinion if you still insist to have a pre-silicon dtb.

Regards,
Santosh


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig
  2013-02-19 10:56     ` Felipe Balbi
@ 2013-02-19 11:01       ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 11:01 UTC (permalink / raw)
  To: balbi
  Cc: Afzal Mohammed, linux-omap, linux-arm-kernel, devicetree-discuss,
	linux-doc, linux-kernel, Russell King, Tony Lindgren,
	Marc Zyngier, Nicolas Pitre, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

On Tuesday 19 February 2013 04:26 PM, Felipe Balbi wrote:
> On Tue, Feb 19, 2013 at 03:57:07PM +0530, Santosh Shilimkar wrote:
>> On Monday 18 February 2013 05:08 PM, Afzal Mohammed wrote:
>>> Add Kconfig option for AM43 family of SoC's, these are ARM Cortex A9
>>> based (SMP configuration with 1 core).
>>>
>>> Signed-off-by: Afzal Mohammed <afzal@ti.com>
>>> ---
>>>   arch/arm/mach-omap2/Kconfig | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
>>> index 49ac3df..683fbaa 100644
>>> --- a/arch/arm/mach-omap2/Kconfig
>>> +++ b/arch/arm/mach-omap2/Kconfig
>>> @@ -141,6 +141,17 @@ config SOC_AM33XX
>>>   	select MULTI_IRQ_HANDLER
>>>   	select COMMON_CLK
>>>
>>> +config SOC_AM43
>>> +	bool "TI AM43"
>>> +	depends on ARCH_OMAP2PLUS
>>> +	default y
>>> +	select CPU_V7
>>> +	select HAVE_SMP
>> You don't need this
>
> actually, this is needed for CONFIG_SMP_ON_UP
>
Ahh.. I missed that. Thanks Felipe for pointing it
out.

Regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 4/8] ARM: am33xx: ll debug config help
  2013-02-19 10:30     ` Mohammed, Afzal
@ 2013-02-19 11:02       ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 11:02 UTC (permalink / raw)
  To: Mohammed, Afzal
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

On Tuesday 19 February 2013 04:00 PM, Mohammed, Afzal wrote:
> Hi Santosh,
>
> On Tue, Feb 19, 2013 at 15:55:59, Shilimkar, Santosh wrote:
>
>> With DT, IIRC DEBUGLL is broken. So did you hack debug-macro.S
>> to get the earlyprintk working ?
>
> No, on linux-next, ll debug works properly.
>
Indeed. Tony fixed that now. Some how I missed
this patch on the list.

Regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-19 11:00       ` Santosh Shilimkar
@ 2013-02-19 11:03         ` Mohammed, Afzal
  2013-02-19 11:11           ` Santosh Shilimkar
  0 siblings, 1 reply; 32+ messages in thread
From: Mohammed, Afzal @ 2013-02-19 11:03 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 890 bytes --]

Hi Santosh,

On Tue, Feb 19, 2013 at 16:30:13, Shilimkar, Santosh wrote:
> On Tuesday 19 February 2013 04:22 PM, Mohammed, Afzal wrote:

> > SoC support is already added in patch 7/8. This is board (which doesn't
> > exist now) support, hence a pre-silicon temporary one to validate it.
> >
> I mean we can call it am437x-xyxboard.dtb already considering the data
> here can be re-used. Boot-args can be used from default kernel config
> with CONFIG_CMDLINE_FORCE.
> 
> No strong opinion if you still insist to have a pre-silicon dtb.

This patch would be replaced by original board, once it is known.
This was included to make a working complete series and if someone
wants (internally) to test the series as is.

Regards
Afzal

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support
  2013-02-19 11:03         ` Mohammed, Afzal
@ 2013-02-19 11:11           ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 11:11 UTC (permalink / raw)
  To: Mohammed, Afzal
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

On Tuesday 19 February 2013 04:33 PM, Mohammed, Afzal wrote:
> Hi Santosh,
>
> On Tue, Feb 19, 2013 at 16:30:13, Shilimkar, Santosh wrote:
>> On Tuesday 19 February 2013 04:22 PM, Mohammed, Afzal wrote:
>
>>> SoC support is already added in patch 7/8. This is board (which doesn't
>>> exist now) support, hence a pre-silicon temporary one to validate it.
>>>
>> I mean we can call it am437x-xyxboard.dtb already considering the data
>> here can be re-used. Boot-args can be used from default kernel config
>> with CONFIG_CMDLINE_FORCE.
>>
>> No strong opinion if you still insist to have a pre-silicon dtb.
>
> This patch would be replaced by original board, once it is known.
> This was included to make a working complete series and if someone
> wants (internally) to test the series as is.
>
Ohh. I assumed it is for merge as well.
Thanks for clarification.

Regards,
Santosh


^ permalink raw reply	[flat|nested] 32+ messages in thread

* RE: [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support
  2013-02-19 10:09 ` [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Santosh Shilimkar
@ 2013-02-19 11:24   ` Mohammed, Afzal
  0 siblings, 0 replies; 32+ messages in thread
From: Mohammed, Afzal @ 2013-02-19 11:24 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Will Deacon, Linus Walleij, Rob Herring,
	Grant Likely, Rob Landley, Nori, Sekhar, Syed Mohammed, Khasim

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1395 bytes --]

Hi Santosh,

On Tue, Feb 19, 2013 at 15:39:32, Shilimkar, Santosh wrote:

> After looking at the specs, you don't need the SMP mode since ACP
> isn't being used.

> TWD use for AM437x is also limited because these times stops in
> low power sates and there you will need broad-cast mechanism which
> again more of SMP machine feature.
> 
> So I suggest to use the wakeup timer(GPT1) clock-event instead
> of local timer for the mentioned reason.

Ok, all your remaining comments are w.r.t SMP and usage of TWD
as clock event.

I am not that familiar with SMP things, upon starting on AM43,
observing the fact that it is an SMP with one core configuration
and that as per ARM MP Core TRM it can have local timer, I saw
it as a ray of hope to get Kernel booting early without hwmod,
and I jumped on that idea which I feel was natural. Without
spending too much time on it, though of taking feedback on this
approach, resulting this rfc.

Let me understand more on SMP, TWD, and explore possibility
of using GPT1 instead of TWD for clock event.

>From the beginning I wondered on seeing that as per ARM TRM's
Cortex-A9 can be MP core with 1-4 core (instead of 2-4), while
another uniprocessor A9 configuration is present.

Regards
Afzal

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register
  2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
  2013-02-19 10:22   ` Santosh Shilimkar
@ 2013-02-19 12:10   ` Felipe Balbi
  1 sibling, 0 replies; 32+ messages in thread
From: Felipe Balbi @ 2013-02-19 12:10 UTC (permalink / raw)
  To: Afzal Mohammed
  Cc: linux-omap, linux-arm-kernel, devicetree-discuss, linux-doc,
	linux-kernel, Russell King, Tony Lindgren, Marc Zyngier,
	Nicolas Pitre, Santosh Shilimkar, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Hi,

On Mon, Feb 18, 2013 at 05:06:39PM +0530, Afzal Mohammed wrote:
> @@ -315,6 +315,7 @@ static struct local_timer_ops twd_lt_ops __cpuinitdata = {
>  static int __init twd_local_timer_common_register(struct device_node *np)
>  {
>  	int err;
> +	struct clock_event_device *evt;
>  
>  	twd_evt = alloc_percpu(struct clock_event_device *);
>  	if (!twd_evt) {
> @@ -328,8 +329,8 @@ static int __init twd_local_timer_common_register(struct device_node *np)
>  		goto out_free;
>  	}
>  
> -	err = local_timer_register(&twd_lt_ops);
> -	if (err)
> +	evt = local_timer_register(&twd_lt_ops);
> +	if (IS_ERR(evt))
>  		goto out_irq;

this is wrong. Will return 0 even in the error case. Correct version
would be:

if (IS_ERR(evt)) {
	err = PTR_ERR(evt);
	goto out_irq;
}

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP
  2013-02-19 10:14   ` Santosh Shilimkar
@ 2013-02-19 12:14     ` Felipe Balbi
  2013-02-19 12:20       ` Santosh Shilimkar
  0 siblings, 1 reply; 32+ messages in thread
From: Felipe Balbi @ 2013-02-19 12:14 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Afzal Mohammed, linux-omap, linux-arm-kernel, devicetree-discuss,
	linux-doc, linux-kernel, Russell King, Tony Lindgren,
	Marc Zyngier, Nicolas Pitre, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

On Tue, Feb 19, 2013 at 03:44:14PM +0530, Santosh Shilimkar wrote:
> On Monday 18 February 2013 05:07 PM, Afzal Mohammed wrote:
> >Register percpu local timer for scheduler tick in the case of one core
> >SMP configuration. In other cases - secondary cpu's as well as boot
> >cpu's having more than one core, this is being registered as per
> >existing boot flow, with a difference that they happens after delay
> >calibration. Registering the clock for tick in case of one core should
> >be done before Kernel calibrates delay (this is required to boot,
> >unless local timer is the only one registered for tick). Registering
> >twd local timer at init_time (which platforms are doing now) helps
> >achieve that with the proposed change.
> >
> >This helps in an almost booting Kernel (minimal) by only relying on
> >ARM parts for an A9 one core SMP.
> >
> >Signed-off-by: Afzal Mohammed <afzal@ti.com>
> >---
> As mentioned in cover-letter, I don't think we have good
> reasoning to make TWD to work with UP configuration. Even
> you fix the timer code, there are more cascaded dependencies
> which is not worth the effort.

if CONFIG_SMP_ON_UP is enabled, smp_twd.c can still be compiled, right ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP
  2013-02-19 12:14     ` Felipe Balbi
@ 2013-02-19 12:20       ` Santosh Shilimkar
  0 siblings, 0 replies; 32+ messages in thread
From: Santosh Shilimkar @ 2013-02-19 12:20 UTC (permalink / raw)
  To: balbi
  Cc: Afzal Mohammed, linux-omap, linux-arm-kernel, devicetree-discuss,
	linux-doc, linux-kernel, Russell King, Tony Lindgren,
	Marc Zyngier, Nicolas Pitre, Will Deacon, Linus Walleij,
	Rob Herring, Grant Likely, Rob Landley, Sekhar Nori,
	Syed Mohammed Khasim

On Tuesday 19 February 2013 05:44 PM, Felipe Balbi wrote:
> On Tue, Feb 19, 2013 at 03:44:14PM +0530, Santosh Shilimkar wrote:
>> On Monday 18 February 2013 05:07 PM, Afzal Mohammed wrote:
>>> Register percpu local timer for scheduler tick in the case of one core
>>> SMP configuration. In other cases - secondary cpu's as well as boot
>>> cpu's having more than one core, this is being registered as per
>>> existing boot flow, with a difference that they happens after delay
>>> calibration. Registering the clock for tick in case of one core should
>>> be done before Kernel calibrates delay (this is required to boot,
>>> unless local timer is the only one registered for tick). Registering
>>> twd local timer at init_time (which platforms are doing now) helps
>>> achieve that with the proposed change.
>>>
>>> This helps in an almost booting Kernel (minimal) by only relying on
>>> ARM parts for an A9 one core SMP.
>>>
>>> Signed-off-by: Afzal Mohammed <afzal@ti.com>
>>> ---
>> As mentioned in cover-letter, I don't think we have good
>> reasoning to make TWD to work with UP configuration. Even
>> you fix the timer code, there are more cascaded dependencies
>> which is not worth the effort.
>
> if CONFIG_SMP_ON_UP is enabled, smp_twd.c can still be compiled, right ?
>
Yep though just from deps pesrpective TWD is made available for ARM SMP
machines as below

config HAVE_ARM_TWD
         bool
         depends on SMP

Regards,
Santosh

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-02-19 12:19 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 11:35 [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Afzal Mohammed
2013-02-18 11:36 ` [PATCH, RFC 1/8] ARM: localtimer: return percpu clkevt on register Afzal Mohammed
2013-02-19 10:22   ` Santosh Shilimkar
2013-02-19 12:10   ` Felipe Balbi
2013-02-18 11:37 ` [PATCH, RFC 2/8] ARM: twd: register clock event for 1 core SMP Afzal Mohammed
2013-02-19 10:14   ` Santosh Shilimkar
2013-02-19 12:14     ` Felipe Balbi
2013-02-19 12:20       ` Santosh Shilimkar
2013-02-18 11:37 ` [PATCH, RFC 3/8] ARM: twd: clock rate from DT (if no DT clk tree) Afzal Mohammed
2013-02-19 10:18   ` Santosh Shilimkar
2013-02-18 11:37 ` [PATCH, RFC 4/8] ARM: am33xx: ll debug config help Afzal Mohammed
2013-02-19 10:25   ` Santosh Shilimkar
2013-02-19 10:30     ` Mohammed, Afzal
2013-02-19 11:02       ` Santosh Shilimkar
2013-02-18 11:38 ` [PATCH, RFC 5/8] ARM: OMAP2+: am43: Kconfig Afzal Mohammed
2013-02-19 10:27   ` Santosh Shilimkar
2013-02-19 10:56     ` Felipe Balbi
2013-02-19 11:01       ` Santosh Shilimkar
2013-02-18 11:38 ` [PATCH, RFC 6/8] ARM: OMAP2+: am43: basic dt support Afzal Mohammed
2013-02-19 10:32   ` Santosh Shilimkar
2013-02-18 11:38 ` [PATCH, RFC 7/8] ARM: dts: am4372: initial support Afzal Mohammed
2013-02-18 18:22   ` Felipe Balbi
2013-02-19  9:10     ` Mohammed, Afzal
2013-02-19  9:17       ` Felipe Balbi
2013-02-18 11:38 ` [PATCH, RFC 8/8] ARM: dts: am43-pre-silicon support Afzal Mohammed
2013-02-19 10:35   ` Santosh Shilimkar
2013-02-19 10:52     ` Mohammed, Afzal
2013-02-19 11:00       ` Santosh Shilimkar
2013-02-19 11:03         ` Mohammed, Afzal
2013-02-19 11:11           ` Santosh Shilimkar
2013-02-19 10:09 ` [PATCH, RFC 0/8] ARM: AM43 (OMAP2+) boot support Santosh Shilimkar
2013-02-19 11:24   ` Mohammed, Afzal

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).