* [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards
@ 2015-02-20 15:59 Hans de Goede
2015-02-21 10:18 ` Ian Campbell
2015-02-21 12:32 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2015-02-20 15:59 UTC (permalink / raw)
To: u-boot
While discussing with some people how to get the Linux kernel to do the
right thing wrt sending output to both the serial console and the
hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
that there already is a solution for this.
All we need to do is set the /chosen/stdout-path fdt property, and if no
console= arguments were specified on the kernel commandline the kernel
will honor this and add this device as a console (next to the primary
video output on hdmi).
And u-boot already has support for setting this, all we need to do is
define OF_STDOUT_PATH and then everything will just work ootb, without
people needing to meddle with adding console= arguments in extlinux.conf .
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
include/configs/sunxi-common.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 20e11cf..cd02baf 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -263,6 +263,20 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_CONS_INDEX 1 /* UART0 */
#endif
+#if CONFIG_CONS_INDEX == 1
+#ifdef CONFIG_MACH_SUN9I
+#define OF_STDOUT_PATH "/soc/serial at 07000000:115200"
+#else
+#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01c28000:115200"
+#endif
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
+#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01c28400:115200"
+#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
+#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01f02800:115200"
+#else
+#error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
+#endif
+
/* GPIO */
#define CONFIG_SUNXI_GPIO
#define CONFIG_SPL_GPIO_SUPPORT
--
2.3.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards
2015-02-20 15:59 [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards Hans de Goede
@ 2015-02-21 10:18 ` Ian Campbell
2015-02-21 12:32 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-02-21 10:18 UTC (permalink / raw)
To: u-boot
On Fri, 2015-02-20 at 16:59 +0100, Hans de Goede wrote:
> While discussing with some people how to get the Linux kernel to do the
> right thing wrt sending output to both the serial console and the
> hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
> that there already is a solution for this.
>
> All we need to do is set the /chosen/stdout-path fdt property, and if no
> console= arguments were specified on the kernel commandline the kernel
> will honor this and add this device as a console (next to the primary
> video output on hdmi).
>
> And u-boot already has support for setting this, all we need to do is
> define OF_STDOUT_PATH and then everything will just work ootb, without
> people needing to meddle with adding console= arguments in extlinux.conf .
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards
2015-02-20 15:59 [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards Hans de Goede
2015-02-21 10:18 ` Ian Campbell
@ 2015-02-21 12:32 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-02-21 12:32 UTC (permalink / raw)
To: u-boot
On Fri, Feb 20, 2015 at 04:59:09PM +0100, Hans de Goede wrote:
> While discussing with some people how to get the Linux kernel to do the
> right thing wrt sending output to both the serial console and the
> hdmi out / lcd screen when booting on ARM devices, Grant Likely pointed out
> that there already is a solution for this.
>
> All we need to do is set the /chosen/stdout-path fdt property, and if no
> console= arguments were specified on the kernel commandline the kernel
> will honor this and add this device as a console (next to the primary
> video output on hdmi).
>
> And u-boot already has support for setting this, all we need to do is
> define OF_STDOUT_PATH and then everything will just work ootb, without
> people needing to meddle with adding console= arguments in extlinux.conf .
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> include/configs/sunxi-common.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 20e11cf..cd02baf 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -263,6 +263,20 @@ extern int soft_i2c_gpio_scl;
> #define CONFIG_CONS_INDEX 1 /* UART0 */
> #endif
>
> +#if CONFIG_CONS_INDEX == 1
> +#ifdef CONFIG_MACH_SUN9I
> +#define OF_STDOUT_PATH "/soc/serial at 07000000:115200"
> +#else
> +#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01c28000:115200"
> +#endif
> +#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
> +#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01c28400:115200"
> +#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
> +#define OF_STDOUT_PATH "/soc at 01c00000/serial at 01f02800:115200"
> +#else
> +#error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
> +#endif
> +
> /* GPIO */
> #define CONFIG_SUNXI_GPIO
> #define CONFIG_SPL_GPIO_SUPPORT
Long term we need to make this not be a hard-coded define perhaps? But
for today,
Reviewed-by: Tom Rini <trini@ti.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150221/487c8f36/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-21 12:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 15:59 [U-Boot] [PATCH] sunxi: Set the /chosen/stdout-path fdt property for sunxi boards Hans de Goede
2015-02-21 10:18 ` Ian Campbell
2015-02-21 12:32 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox