From: Sascha Hauer <redacted>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
Signed-off-by: Sascha Hauer <redacted>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
Cc: linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Greg Kroah-Hartman <redacted>
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Cc: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: Nicolas Ferre <redacted>
---
drivers/of/base.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
include/linux/of.h | 7 +++++++
2 files changed, 53 insertions(+)
From: Sascha Hauer <s.hauer@pengutronix.de>
Traditionally console support is optional for serial drivers. This
makes it non optional for the i.MX driver since it's not worth
asking questions for a feature virtually every user of this driver
wants to have.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel@pengutronix.de
Cc: Alan Cox <redacted>
Cc: Grant Likely <redacted>
Cc: Nicolas Ferre <redacted>
---
drivers/tty/serial/Kconfig | 16 +---------------
drivers/tty/serial/imx.c | 8 +-------
2 files changed, 2 insertions(+), 22 deletions(-)
@@ -541,26 +541,12 @@ config SERIAL_IMXbool"IMX serial port support"depends onARCH_MXCselectSERIAL_CORE+selectSERIAL_CORE_CONSOLEselectRATIONALhelpIfyouhaveamachinebasedonaMotorolaIMXCPUyoucanenableitsonboardserialportbyenablingthisoption.-configSERIAL_IMX_CONSOLE-bool"Console on IMX serial port"-depends onSERIAL_IMX-selectSERIAL_CORE_CONSOLE-help-IfyouhaveenabledtheserialportontheMotorolaIMX-CPUyoucanmakeittheconsolebyansweringYtothisoption.--EvenifyousayYhere,thecurrentlyvisiblevirtualconsole-(/dev/tty0)willstillbeusedasthesystemconsolebydefault,but-youcanalterthatusingakernelcommandlineoptionsuchas-"console=ttySA0".(Try"man bootparam"orseethedocumentationof-yourbootloader(liloorloadlin)abouthowtopassoptionstothe-kernelatboottime.)-configSERIAL_UARTLITEtristate"Xilinx uartlite serial port support"depends onPPC32||MICROBLAZE||MFD_TIMBERDALE
On Wed, Nov 21, 2012 at 04:57:05PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted hunk
From: Sascha Hauer <s.hauer@pengutronix.de>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel@pengutronix.de
Cc: Alan Cox <redacted>
Cc: Grant Likely <redacted>
Cc: Nicolas Ferre <redacted>
---
drivers/of/base.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
include/linux/of.h | 7 +++++++
2 files changed, 53 insertions(+)
On Wed, Nov 21, 2012 at 04:57:05PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
From: Sascha Hauer <s.hauer@pengutronix.de>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
From: Grant Likely <hidden> Date: 2012-11-21 18:03:29
On Wed, Nov 21, 2012 at 3:57 PM, Jean-Christophe PLAGNIOL-VILLARD
[off-list ref] wrote:
From: Sascha Hauer <s.hauer@pengutronix.de>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
NIce. Looks like the right behaviour, but is a little inefficient.
Since the stdout property doesn't change this code could be called
once right after the tree is unflattened and then cache the pointer to
the node and arguments. Can you add the code to of_alias_scan()?
g.
On Wed, Nov 21, 2012 at 3:57 PM, Jean-Christophe PLAGNIOL-VILLARD
[off-list ref] wrote:
quoted
From: Sascha Hauer <s.hauer@pengutronix.de>
devicetrees may have a linux,stdout-path or stdout-path property
in the chosen node describing the console device. This adds a helper
function to match a device against this property and retrieve the options
so a driver can call add_preferred_console for a matching device.
NIce. Looks like the right behaviour, but is a little inefficient.
Since the stdout property doesn't change this code could be called
once right after the tree is unflattened and then cache the pointer to
the node anarguments. Can you add the code to of_alias_scan()?
do we assume that we can have only one stdout-path?
I think we could have more serial, framebuffer console
Best Regards,
J.