All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support
@ 2017-01-18  4:03 Lokesh Vutla
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

This series adds earlycon support for all am33xx, am43xx, am57xx, dra7xx
based TI platforms. With this series just passing "earlycon" in bootargs
is sufficient for early debug.

Tested with omap2plus_defconfig + CONFIG_SERIAL_8250_OMAP.

Changes since v1:
- Dropped searching for /chosen@0 node as pointed out by Mark.

Lokesh Vutla (5):
  ARM: OMAP2+: omap_hwmod: Add support for earlycon
  ARM: dts: am33xx: Add stdout-path property
  ARM: dts: am43xx: Add stdout-path property
  ARM: dts: am57xx: Add stdout-path property
  ARM: dts: dra7xx: Add stdout-path property

 arch/arm/boot/dts/am335x-evm.dts                |  4 +++
 arch/arm/boot/dts/am335x-evmsk.dts              |  4 +++
 arch/arm/boot/dts/am335x-icev2.dts              |  4 +++
 arch/arm/boot/dts/am437x-gp-evm.dts             |  4 +++
 arch/arm/boot/dts/am437x-idk-evm.dts            |  4 +++
 arch/arm/boot/dts/am437x-sk-evm.dts             |  4 +++
 arch/arm/boot/dts/am43x-epos-evm.dts            |  4 +++
 arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi |  4 +++
 arch/arm/boot/dts/am57xx-idk-common.dtsi        |  4 +++
 arch/arm/boot/dts/dra7-evm.dts                  |  4 +++
 arch/arm/boot/dts/dra72-evm-common.dtsi         |  4 +++
 arch/arm/mach-omap2/omap_hwmod.c                | 33 +++++++++++++++++++++++++
 12 files changed, 77 insertions(+)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 1/5] ARM: OMAP2+: omap_hwmod: Add support for earlycon
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
@ 2017-01-18  4:03   ` Lokesh Vutla
  2017-01-18  4:03   ` [PATCH v2 2/5] ARM: dts: am33xx: Add stdout-path property Lokesh Vutla
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

Hwmod core tries to reset and idles each IP that is registered with hwmod.
In case of earlycon, that specific uart IP cannot be reset or keep it in
idle state else earlycon hangs once hwmod resets that uart IP. So add support
to not reset uart that is being used as earlycon only if CONFIG_SERIAL_EARLYCON
is enabled.

Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
---
 arch/arm/mach-omap2/omap_hwmod.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index e8b988714a09..0da4f2ea76c4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3249,6 +3249,36 @@ int __init omap_hwmod_setup_one(const char *oh_name)
 }
 
 /**
+ * omap_hwmod_setup_earlycon_flags - set up flags for early console
+ *
+ * Enable DEBUG_OMAPUART_FLAGS for uart hwmod that is being used as
+ * early concole so that hwmod core doesn't reset and keep it in idle
+ * that specific uart.
+ */
+#ifdef CONFIG_SERIAL_EARLYCON
+static void __init omap_hwmod_setup_earlycon_flags(void)
+{
+	struct device_node *np;
+	struct omap_hwmod *oh;
+	const char *uart;
+
+	np = of_find_node_by_path("/chosen");
+	if (np) {
+		uart = of_get_property(np, "stdout-path", NULL);
+		if (uart) {
+			np = of_find_node_by_path(uart);
+			if (np) {
+				uart = of_get_property(np, "ti,hwmods", NULL);
+				oh = omap_hwmod_lookup(uart);
+				if (oh)
+					oh->flags |= DEBUG_OMAPUART_FLAGS;
+			}
+		}
+	}
+}
+#endif
+
+/**
  * omap_hwmod_setup_all - set up all registered IP blocks
  *
  * Initialize and set up all IP blocks registered with the hwmod code.
@@ -3261,6 +3291,9 @@ static int __init omap_hwmod_setup_all(void)
 	_ensure_mpu_hwmod_is_setup(NULL);
 
 	omap_hwmod_for_each(_init, NULL);
+#ifdef CONFIG_SERIAL_EARLYCON
+	omap_hwmod_setup_earlycon_flags();
+#endif
 	omap_hwmod_for_each(_setup, NULL);
 
 	return 0;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/5] ARM: dts: am33xx: Add stdout-path property
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
  2017-01-18  4:03   ` [PATCH v2 1/5] ARM: OMAP2+: omap_hwmod: Add support for earlycon Lokesh Vutla
@ 2017-01-18  4:03   ` Lokesh Vutla
  2017-01-18  4:03   ` [PATCH v2 3/5] ARM: dts: am43xx: " Lokesh Vutla
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

Add stdout-path property in /chosen node so that earlycon can be
used by just adding earlycon in bootargs.

Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/am335x-evm.dts   | 4 ++++
 arch/arm/boot/dts/am335x-evmsk.dts | 4 ++++
 arch/arm/boot/dts/am335x-icev2.dts | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index c2186ec2834b..1c37a7c1ea17 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -25,6 +25,10 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	vbat: fixedregulator0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vbat";
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index e2548d1ce753..9e43c443738a 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -32,6 +32,10 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	vbat: fixedregulator0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vbat";
diff --git a/arch/arm/boot/dts/am335x-icev2.dts b/arch/arm/boot/dts/am335x-icev2.dts
index 1463df3b5b19..ff9417ce93c0 100644
--- a/arch/arm/boot/dts/am335x-icev2.dts
+++ b/arch/arm/boot/dts/am335x-icev2.dts
@@ -24,6 +24,10 @@
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
 
+	chosen {
+		stdout-path = &uart3;
+	};
+
 	vbat: fixedregulator0 {
 		compatible = "regulator-fixed";
 		regulator-name = "vbat";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 3/5] ARM: dts: am43xx: Add stdout-path property
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
  2017-01-18  4:03   ` [PATCH v2 1/5] ARM: OMAP2+: omap_hwmod: Add support for earlycon Lokesh Vutla
  2017-01-18  4:03   ` [PATCH v2 2/5] ARM: dts: am33xx: Add stdout-path property Lokesh Vutla
@ 2017-01-18  4:03   ` Lokesh Vutla
  2017-01-18  4:03   ` [PATCH v2 4/5] ARM: dts: am57xx: " Lokesh Vutla
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

Add stdout-path property in /chosen node so that earlycon can be
used by just adding earlycon in bootargs.

Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/am437x-gp-evm.dts  | 4 ++++
 arch/arm/boot/dts/am437x-idk-evm.dts | 4 ++++
 arch/arm/boot/dts/am437x-sk-evm.dts  | 4 ++++
 arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++++
 4 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index 957840cc7b78..a4f31739057f 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -23,6 +23,10 @@
 		display0 = &lcd0;
 	};
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	evm_v3_3d: fixedregulator-v3_3d {
 		compatible = "regulator-fixed";
 		regulator-name = "evm_v3_3d";
diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
index b76a7c0264a5..c1f7f9336e64 100644
--- a/arch/arm/boot/dts/am437x-idk-evm.dts
+++ b/arch/arm/boot/dts/am437x-idk-evm.dts
@@ -18,6 +18,10 @@
 	model = "TI AM437x Industrial Development Kit";
 	compatible = "ti,am437x-idk-evm","ti,am4372","ti,am43";
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	v24_0d: fixed-regulator-v24_0d {
 		compatible = "regulator-fixed";
 		regulator-name = "V24_0D";
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 319d94205350..4dc54bee2f36 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -24,6 +24,10 @@
 		display0 = &lcd0;
 	};
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	/* fixed 32k external oscillator clock */
 	clk_32k_rtc: clk_32k_rtc {
 		#clock-cells = <0>;
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 9d35c3f07cad..9acd4ccdec4e 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -24,6 +24,10 @@
 		display0 = &lcd0;
 	};
 
+	chosen {
+		stdout-path = &uart0;
+	};
+
 	vmmcsd_fixed: fixedregulator-sd {
 		compatible = "regulator-fixed";
 		regulator-name = "vmmcsd_fixed";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 4/5] ARM: dts: am57xx: Add stdout-path property
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-01-18  4:03   ` [PATCH v2 3/5] ARM: dts: am43xx: " Lokesh Vutla
@ 2017-01-18  4:03   ` Lokesh Vutla
  2017-01-18  4:03   ` [PATCH v2 5/5] ARM: dts: dra7xx: " Lokesh Vutla
  2017-01-20 18:39   ` [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support Tony Lindgren
  5 siblings, 0 replies; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

Add stdout-path property in /chosen node so that earlycon can be
used by just adding earlycon in bootargs.

Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 4 ++++
 arch/arm/boot/dts/am57xx-idk-common.dtsi        | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
index 78bee26361f1..3a95db7da71f 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
@@ -22,6 +22,10 @@
 		display0 = &hdmi0;
 	};
 
+	chosen {
+		stdout-path = &uart3;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x80000000 0x0 0x80000000>;
diff --git a/arch/arm/boot/dts/am57xx-idk-common.dtsi b/arch/arm/boot/dts/am57xx-idk-common.dtsi
index 814a720d5c3d..0d341c545b01 100644
--- a/arch/arm/boot/dts/am57xx-idk-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-idk-common.dtsi
@@ -14,6 +14,10 @@
 		rtc1 = &rtc;
 	};
 
+	chosen {
+		stdout-path = &uart3;
+	};
+
 	vmain: fixedregulator-vmain {
 		compatible = "regulator-fixed";
 		regulator-name = "VMAIN";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 5/5] ARM: dts: dra7xx: Add stdout-path property
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-01-18  4:03   ` [PATCH v2 4/5] ARM: dts: am57xx: " Lokesh Vutla
@ 2017-01-18  4:03   ` Lokesh Vutla
  2017-01-20 18:39   ` [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support Tony Lindgren
  5 siblings, 0 replies; 7+ messages in thread
From: Lokesh Vutla @ 2017-01-18  4:03 UTC (permalink / raw)
  To: Tony Lindgren, Linux OMAP Mailing List
  Cc: Device Tree Mailing List, Rob Herring, Mark Rutland, Tero Kristo,
	Sekhar Nori, Nishanth Menon, Vignesh R, Lokesh Vutla

Add stdout-path property in /chosen node so that earlycon can be
used by just adding earlycon in bootargs.

Tested-by: Vignesh R <vigneshr-l0cyMroinI0@public.gmane.org>
Signed-off-by: Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org>
---
 arch/arm/boot/dts/dra7-evm.dts          | 4 ++++
 arch/arm/boot/dts/dra72-evm-common.dtsi | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 132f2be10889..b3923c049edb 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -21,6 +21,10 @@
 		reg = <0x0 0x80000000 0x0 0x60000000>; /* 1536 MB */
 	};
 
+	chosen {
+		stdout-path = &uart1;
+	};
+
 	evm_3v3_sd: fixedregulator-sd {
 		compatible = "regulator-fixed";
 		regulator-name = "evm_3v3_sd";
diff --git a/arch/arm/boot/dts/dra72-evm-common.dtsi b/arch/arm/boot/dts/dra72-evm-common.dtsi
index e50fbeea96e0..45b62138cbde 100644
--- a/arch/arm/boot/dts/dra72-evm-common.dtsi
+++ b/arch/arm/boot/dts/dra72-evm-common.dtsi
@@ -18,6 +18,10 @@
 		display0 = &hdmi0;
 	};
 
+	chosen {
+		stdout-path = &uart1;
+	};
+
 	evm_12v0: fixedregulator-evm12v0 {
 		/* main supply */
 		compatible = "regulator-fixed";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support
       [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-01-18  4:03   ` [PATCH v2 5/5] ARM: dts: dra7xx: " Lokesh Vutla
@ 2017-01-20 18:39   ` Tony Lindgren
  5 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2017-01-20 18:39 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: Linux OMAP Mailing List, Device Tree Mailing List, Rob Herring,
	Mark Rutland, Tero Kristo, Sekhar Nori, Nishanth Menon,
	Vignesh R

* Lokesh Vutla <lokeshvutla-l0cyMroinI0@public.gmane.org> [170117 20:06]:
> This series adds earlycon support for all am33xx, am43xx, am57xx, dra7xx
> based TI platforms. With this series just passing "earlycon" in bootargs
> is sufficient for early debug.

Applying to omap-for-v4.11/soc and the dts into omap-for-v4.11/dt.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-01-20 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18  4:03 [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support Lokesh Vutla
     [not found] ` <20170118040326.29259-1-lokeshvutla-l0cyMroinI0@public.gmane.org>
2017-01-18  4:03   ` [PATCH v2 1/5] ARM: OMAP2+: omap_hwmod: Add support for earlycon Lokesh Vutla
2017-01-18  4:03   ` [PATCH v2 2/5] ARM: dts: am33xx: Add stdout-path property Lokesh Vutla
2017-01-18  4:03   ` [PATCH v2 3/5] ARM: dts: am43xx: " Lokesh Vutla
2017-01-18  4:03   ` [PATCH v2 4/5] ARM: dts: am57xx: " Lokesh Vutla
2017-01-18  4:03   ` [PATCH v2 5/5] ARM: dts: dra7xx: " Lokesh Vutla
2017-01-20 18:39   ` [PATCH v2 0/5] ARM: OMAP2+: Add earlycon support Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.