* [PATCH] autodetect serial console on efika
@ 2007-03-31 15:08 Olaf Hering
2007-03-31 17:06 ` Grant Likely
` (3 more replies)
0 siblings, 4 replies; 17+ messages in thread
From: Olaf Hering @ 2007-03-31 15:08 UTC (permalink / raw)
To: Paul Mackeras, linuxppc-dev
Efika boards have to be booted with console=ttyPSC0 unless there is a
graphics card plugged in. Detect if the firmware stdout is the serial
connector.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
arch/powerpc/platforms/52xx/efika.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
Index: b/arch/powerpc/platforms/52xx/efika.c
===================================================================
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -21,6 +21,7 @@
#include <linux/initrd.h>
#include <linux/timer.h>
#include <linux/pci.h>
+#include <linux/console.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -221,12 +222,37 @@ static int __init efika_probe(void)
return 1;
}
+static void __init efika_init_early(void)
+{
+#ifdef CONFIG_SERIAL_MPC52xx
+ struct device_node *stdout_node;
+ const char *device_type;
+
+ if (strstr(cmd_line, "console="))
+ return;
+ /* find the boot console from /chosen/stdout */
+ if (!of_chosen)
+ return;
+ device_type = get_property(of_chosen, "linux,stdout-path", NULL);
+ if (!device_type)
+ return;
+ stdout_node = of_find_node_by_path(device_type);
+ if (stdout_node) {
+ device_type = get_property(stdout_node, "device_type", NULL);
+ if (device_type && strcmp(device_type, "serial") == 0)
+ add_preferred_console("ttyPSC", 0, NULL);
+ of_node_put(stdout_node);
+ }
+#endif
+}
+
define_machine(efika)
{
.name = EFIKA_PLATFORM_NAME,
.probe = efika_probe,
.setup_arch = efika_setup_arch,
.init = mpc52xx_declare_of_platform_devices,
+ .init_early = efika_init_early,
.show_cpuinfo = efika_show_cpuinfo,
.init_IRQ = mpc52xx_init_irq,
.get_irq = mpc52xx_get_irq,
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-03-31 15:08 [PATCH] autodetect serial console on efika Olaf Hering
@ 2007-03-31 17:06 ` Grant Likely
2007-04-09 12:56 ` Matt Sealey
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Grant Likely @ 2007-03-31 17:06 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
On 3/31/07, Olaf Hering <olaf@aepfle.de> wrote:
> Efika boards have to be booted with console=ttyPSC0 unless there is a
> graphics card plugged in. Detect if the firmware stdout is the serial
> connector.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-03-31 15:08 [PATCH] autodetect serial console on efika Olaf Hering
2007-03-31 17:06 ` Grant Likely
@ 2007-04-09 12:56 ` Matt Sealey
2007-04-10 16:52 ` Olaf Hering
2007-04-12 15:59 ` Olaf Hering
2008-01-21 15:29 ` Olaf Hering
3 siblings, 1 reply; 17+ messages in thread
From: Matt Sealey @ 2007-04-09 12:56 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
Can I suggest a further update to this patch; the serial redirection should
be done on the basis of the node *name* too. The only serial output device
that is 'tied' to the serial console that way is the /failsafe node (if this
is in fact the chosen stdout/stdin device).
It is entirely possible that a user may redirect the OF console output to
the PSC6 controller or another internal or external serial device (PCI
serial controller or so). In this case, the boot console will simply switch
to the UART on the back, which may be some other custom device and not a
valid console.
It is also entirely possible that we move failsafe, too, however. Is it
possible to check the PSC numbering and ensure that it only uses ttyPSC0
for the serial console, if it is in fact using the PSC connected to the
RS232 port on the back of the board (this is in the device tree isn't it?
If not.. can someone suggest how we report this information?? :)
Please tell me if that's an insane suggestion or too much like a fringe
benefit for users and not a useful actual feature?
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
Olaf Hering wrote:
> Efika boards have to be booted with console=ttyPSC0 unless there is a
> graphics card plugged in. Detect if the firmware stdout is the serial
> connector.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> ---
> arch/powerpc/platforms/52xx/efika.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> Index: b/arch/powerpc/platforms/52xx/efika.c
> ===================================================================
> --- a/arch/powerpc/platforms/52xx/efika.c
> +++ b/arch/powerpc/platforms/52xx/efika.c
> @@ -21,6 +21,7 @@
> #include <linux/initrd.h>
> #include <linux/timer.h>
> #include <linux/pci.h>
> +#include <linux/console.h>
>
> #include <asm/io.h>
> #include <asm/irq.h>
> @@ -221,12 +222,37 @@ static int __init efika_probe(void)
> return 1;
> }
>
> +static void __init efika_init_early(void)
> +{
> +#ifdef CONFIG_SERIAL_MPC52xx
> + struct device_node *stdout_node;
> + const char *device_type;
> +
> + if (strstr(cmd_line, "console="))
> + return;
> + /* find the boot console from /chosen/stdout */
> + if (!of_chosen)
> + return;
> + device_type = get_property(of_chosen, "linux,stdout-path", NULL);
> + if (!device_type)
> + return;
> + stdout_node = of_find_node_by_path(device_type);
> + if (stdout_node) {
> + device_type = get_property(stdout_node, "device_type", NULL);
> + if (device_type && strcmp(device_type, "serial") == 0)
> + add_preferred_console("ttyPSC", 0, NULL);
> + of_node_put(stdout_node);
> + }
> +#endif
> +}
> +
> define_machine(efika)
> {
> .name = EFIKA_PLATFORM_NAME,
> .probe = efika_probe,
> .setup_arch = efika_setup_arch,
> .init = mpc52xx_declare_of_platform_devices,
> + .init_early = efika_init_early,
> .show_cpuinfo = efika_show_cpuinfo,
> .init_IRQ = mpc52xx_init_irq,
> .get_irq = mpc52xx_get_irq,
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-09 12:56 ` Matt Sealey
@ 2007-04-10 16:52 ` Olaf Hering
2007-04-10 20:25 ` Sylvain Munaut
2007-04-11 18:42 ` Matt Sealey
0 siblings, 2 replies; 17+ messages in thread
From: Olaf Hering @ 2007-04-10 16:52 UTC (permalink / raw)
To: Matt Sealey; +Cc: linuxppc-dev, Paul Mackeras
On Mon, Apr 09, Matt Sealey wrote:
> It is entirely possible that a user may redirect the OF console output to
> the PSC6 controller or another internal or external serial device (PCI
> serial controller or so). In this case, the boot console will simply switch
> to the UART on the back, which may be some other custom device and not a
> valid console.
How many serial drivers are enabled in the public Efika firmware?
With my change, both /failsafe and the /builtin/serial work.
Both have device_type == "serial"
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-10 16:52 ` Olaf Hering
@ 2007-04-10 20:25 ` Sylvain Munaut
2007-04-11 6:17 ` Olaf Hering
2007-04-11 18:47 ` Matt Sealey
2007-04-11 18:42 ` Matt Sealey
1 sibling, 2 replies; 17+ messages in thread
From: Sylvain Munaut @ 2007-04-10 20:25 UTC (permalink / raw)
To: Olaf Hering; +Cc: Paul Mackeras, linuxppc-dev
Olaf Hering wrote:
> On Mon, Apr 09, Matt Sealey wrote:
>
>
>> It is entirely possible that a user may redirect the OF console output to
>> the PSC6 controller or another internal or external serial device (PCI
>> serial controller or so). In this case, the boot console will simply switch
>> to the UART on the back, which may be some other custom device and not a
>> valid console.
>>
>
> How many serial drivers are enabled in the public Efika firmware?
> With my change, both /failsafe and the /builtin/serial work.
> Both have device_type == "serial"
>
If I follow the logic of the patch correctly, as soon as there is no
"console=" in the command line and that the linux,stdout-path has a
device_type "serial", you add ttyPSC0 as console ?
The user could have plugged a console on the IRDA PSC and used a
bootscript to change the OF tree appropriately.
Or he could have put a PCI multi IO card and set the stdout to it ...
In all those cases, the ttyPSC0 is bogus ...
But in those "special cases", I guess it's not too much to ask the user
to provide a "console=" in the command line.
Sylvain
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-10 20:25 ` Sylvain Munaut
@ 2007-04-11 6:17 ` Olaf Hering
2007-04-11 18:47 ` Matt Sealey
1 sibling, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2007-04-11 6:17 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: Paul Mackeras, linuxppc-dev
On Tue, Apr 10, Sylvain Munaut wrote:
> In all those cases, the ttyPSC0 is bogus ...
Thats why I asked for the number of enabled serial console drivers in
the firmware. I suspect there is just a single one for the onboard
connector.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-10 16:52 ` Olaf Hering
2007-04-10 20:25 ` Sylvain Munaut
@ 2007-04-11 18:42 ` Matt Sealey
1 sibling, 0 replies; 17+ messages in thread
From: Matt Sealey @ 2007-04-11 18:42 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
There are 5 pins on the motherboard for PSC6, which if a driver is enabled for it
(and it's put into UART mode) would become a two-wire serial port (it is intended
for IrDA though in the current board revision).
In this case, you set the firmware console to this and the early init will redirect
the Linux console back to the serial port on the back of the case, just because it
shares a serial device type.
There is a big chance that USB serial drivers will be in a later firmware revision,
at which point this will redirect any USB serial output desired to the serial port
on the back of the system.
Both of these are *wrong* and counter-intuitive.
The only safe serial ports to force "ttyPSC" unit 0 onto are /failsafe (although
this may change!) and /builtin/serial. Otherwise you are second-guessing the user's
preferences in the firmware.
I would in theory recommend against doing it on /failsafe as it is NOT a predictable
device. It simply throws output there in the case of a gross exception and lack of
preferred devices, it just happens that this is and always has been the serial port
on the Pegasos and Efika. It could be an nvram buffer, a PCI card, a special OLED
display, or anything we want it to be depending on the configuration of the Efika
and the revision of the firmware. The intention of /failsafe is that the output
goes SOMEWHERE, rather than to the Open Firmware equivalent of /dev/null, and there
is no special significance to the fact that it is marked as a serial device (i.e.
it may not be connected to a serial port, it is just presented as a serial
interface).
However, on the current Efikas, it does go to the back serial port, so in this case
I would set it to ttyPSC0 anyway. But only in the case of /failsafe and /builtin/serial,
any other port present (remember our device tree is dynamically generated on boot,
and it maps *ALL* present devices capable of detection - not just the ones in the
SoC. Get out of the FDT mindset) should not be redirected using this heuristic
unless it gets vastly more intelligent.
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
Olaf Hering wrote:
> On Mon, Apr 09, Matt Sealey wrote:
>
>> It is entirely possible that a user may redirect the OF console output to
>> the PSC6 controller or another internal or external serial device (PCI
>> serial controller or so). In this case, the boot console will simply switch
>> to the UART on the back, which may be some other custom device and not a
>> valid console.
>
> How many serial drivers are enabled in the public Efika firmware?
> With my change, both /failsafe and the /builtin/serial work.
> Both have device_type == "serial"
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-10 20:25 ` Sylvain Munaut
2007-04-11 6:17 ` Olaf Hering
@ 2007-04-11 18:47 ` Matt Sealey
1 sibling, 0 replies; 17+ messages in thread
From: Matt Sealey @ 2007-04-11 18:47 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: linuxppc-dev, Olaf Hering, Paul Mackeras
Sylvain Munaut wrote:
> Olaf Hering wrote:
>> On Mon, Apr 09, Matt Sealey wrote:
>>
>>
>>> It is entirely possible that a user may redirect the OF console output to
>>> the PSC6 controller or another internal or external serial device (PCI
>>> serial controller or so). In this case, the boot console will simply switch
>>> to the UART on the back, which may be some other custom device and not a
>>> valid console.
>>>
>> How many serial drivers are enabled in the public Efika firmware?
>> With my change, both /failsafe and the /builtin/serial work.
>> Both have device_type == "serial"
>>
> If I follow the logic of the patch correctly, as soon as there is no
> "console=" in the command line and that the linux,stdout-path has a
> device_type "serial", you add ttyPSC0 as console ?
>
> The user could have plugged a console on the IRDA PSC and used a
> bootscript to change the OF tree appropriately.
> Or he could have put a PCI multi IO card and set the stdout to it ...
>
> In all those cases, the ttyPSC0 is bogus ...
>
> But in those "special cases", I guess it's not too much to ask the user
> to provide a "console=" in the command line.
I think in this case, output should not be redirected, it should fail out
(the current code doesn't, it only checks device type). It should also be
documented that the behaviour only caters for the /failsafe and /builtin/serial
devices and any other serial consoles will require a console= line.
This should be enough warning for users who have more 'crazy' serial port
setups. Definitely, it is possible these users have something attached to
the serial port on the back of the board and have moved the firmware console
for a good reason. You do not want Linux spamming the serial port if you did
not tell it to, and it is not certain that this is the port they want.
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-03-31 15:08 [PATCH] autodetect serial console on efika Olaf Hering
2007-03-31 17:06 ` Grant Likely
2007-04-09 12:56 ` Matt Sealey
@ 2007-04-12 15:59 ` Olaf Hering
2007-04-13 9:50 ` Matt Sealey
2008-01-21 15:29 ` Olaf Hering
3 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2007-04-12 15:59 UTC (permalink / raw)
To: Paul Mackeras, linuxppc-dev
On Sat, Mar 31, Olaf Hering wrote:
> Efika boards have to be booted with console=ttyPSC0 unless there is a
> graphics card plugged in. Detect if the firmware stdout is the serial
> connector.
Paul, please discard this patch. The optional graphics card may have
also device_type 'serial' if it is in VGA mode.
I will send an updated patch later.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2007-04-12 15:59 ` Olaf Hering
@ 2007-04-13 9:50 ` Matt Sealey
0 siblings, 0 replies; 17+ messages in thread
From: Matt Sealey @ 2007-04-13 9:50 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
That too :D
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
Olaf Hering wrote:
> On Sat, Mar 31, Olaf Hering wrote:
>
>> Efika boards have to be booted with console=ttyPSC0 unless there is a
>> graphics card plugged in. Detect if the firmware stdout is the serial
>> connector.
>
> Paul, please discard this patch. The optional graphics card may have
> also device_type 'serial' if it is in VGA mode.
> I will send an updated patch later.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] autodetect serial console on efika
2007-03-31 15:08 [PATCH] autodetect serial console on efika Olaf Hering
` (2 preceding siblings ...)
2007-04-12 15:59 ` Olaf Hering
@ 2008-01-21 15:29 ` Olaf Hering
2008-01-21 15:37 ` [PATCH] autodetect serial console on pegasos2 Olaf Hering
` (3 more replies)
3 siblings, 4 replies; 17+ messages in thread
From: Olaf Hering @ 2008-01-21 15:29 UTC (permalink / raw)
To: Paul Mackeras, linuxppc-dev
Efika boards have to be booted with console=ttyPSC0 unless there is a
graphics card plugged in. Detect if the firmware stdout is the serial
connector.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
arch/powerpc/platforms/52xx/efika.c | 50 ++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -13,6 +13,7 @@
#include <linux/utsrelease.h>
#include <linux/pci.h>
#include <linux/of.h>
+#include <linux/console.h>
#include <asm/prom.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -208,12 +209,61 @@ static int __init efika_probe(void)
return 1;
}
+/*
+ * Per default, input/output-device points to keyboard/screen
+ * If no card is installed, the built-in serial port is used as a fallback.
+ * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
+ * the the built-in serial node. Instead, a /failsafe node is created.
+ * More advanced hardware configurations cant be detected,
+ * boot with console=xyz123 to point the kernel to the correct device
+ */
+static void __init efika_init_early(void)
+{
+#ifdef CONFIG_SERIAL_MPC52xx
+ struct device_node *stdout_node;
+ const char *property;
+
+ if (strstr(cmd_line, "console="))
+ return;
+ /* find the boot console from /chosen/stdout */
+ if (!of_chosen)
+ return;
+ property = of_get_property(of_chosen, "linux,stdout-path", NULL);
+ if (!property)
+ return;
+ stdout_node = of_find_node_by_path(property);
+ if (!stdout_node)
+ return;
+ property = of_get_property(stdout_node, "device_type", NULL);
+ if (property && strcmp(property, "serial") == 0) {
+ /*
+ * The 9pin connector is either /failsafe or /builtin/serial.
+ * The optional graphics card has also type 'serial' in VGA mode.
+ */
+ property = of_get_property(stdout_node, "name", NULL);
+ if (property) {
+ if (strcmp(property, "failsafe") == 0)
+ add_preferred_console("ttyPSC", 0, NULL);
+ else {
+ if (strcmp(property, "serial") == 0) {
+ property = of_get_property(stdout_node, "model", NULL);
+ if (property && strcmp(property, "mpc5200-serial") == 0)
+ add_preferred_console("ttyPSC", 0, NULL);
+ }
+ }
+ }
+ }
+ of_node_put(stdout_node);
+#endif
+}
+
define_machine(efika)
{
.name = EFIKA_PLATFORM_NAME,
.probe = efika_probe,
.setup_arch = efika_setup_arch,
.init = mpc52xx_declare_of_platform_devices,
+ .init_early = efika_init_early,
.show_cpuinfo = efika_show_cpuinfo,
.init_IRQ = mpc52xx_init_irq,
.get_irq = mpc52xx_get_irq,
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] autodetect serial console on pegasos2
2008-01-21 15:29 ` Olaf Hering
@ 2008-01-21 15:37 ` Olaf Hering
2008-01-21 15:56 ` [PATCH] autodetect serial console on efika Geert Uytterhoeven
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2008-01-21 15:37 UTC (permalink / raw)
To: Paul Mackeras, linuxppc-dev
Autodetect the serial console on Pegasos2.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
arch/powerpc/platforms/chrp/setup.c | 52 ++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -251,6 +251,57 @@ static void briq_restart(char *cmd)
for(;;);
}
+/*
+ * Per default, input/output-device points to the keyboard/screen
+ * If no card is installed, the built-in serial port is used as a fallback.
+ * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
+ * the the built-in serial node. Instead, a /failsafe node is created.
+ */
+static void chrp_init_early(void)
+{
+ struct device_node *node;
+ const char *property;
+
+ if (strstr(cmd_line, "console="))
+ return;
+ /* find the boot console from /chosen/stdout */
+ if (!of_chosen)
+ return;
+ node = of_find_node_by_path("/");
+ if (!node)
+ return;
+ property = of_get_property(node, "model", NULL);
+ if (!property)
+ goto out_put;
+ if (strcmp(property, "Pegasos2"))
+ goto out_put;
+ /* this is a Pegasos2 */
+ property = of_get_property(of_chosen, "linux,stdout-path", NULL);
+ if (!property)
+ goto out_put;
+ of_node_put(node);
+ node = of_find_node_by_path(property);
+ if (!node)
+ return;
+ property = of_get_property(node, "device_type", NULL);
+ if (!property)
+ goto out_put;
+ if (strcmp(property, "serial"))
+ goto out_put;
+ /*
+ * The 9pin connector is either /failsafe
+ * or /pci@80000000/isa@C/serial@i2F8
+ * The optional graphics card has also type 'serial' in VGA mode.
+ */
+ property = of_get_property(node, "name", NULL);
+ if (!property)
+ goto out_put;
+ if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
+ add_preferred_console("ttyS", 0, NULL);
+out_put:
+ of_node_put(node);
+}
+
void __init chrp_setup_arch(void)
{
struct device_node *root = of_find_node_by_path("/");
@@ -594,6 +645,7 @@ define_machine(chrp) {
.probe = chrp_probe,
.setup_arch = chrp_setup_arch,
.init = chrp_init2,
+ .init_early = chrp_init_early,
.show_cpuinfo = chrp_show_cpuinfo,
.init_IRQ = chrp_init_IRQ,
.restart = rtas_restart,
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2008-01-21 15:29 ` Olaf Hering
2008-01-21 15:37 ` [PATCH] autodetect serial console on pegasos2 Olaf Hering
@ 2008-01-21 15:56 ` Geert Uytterhoeven
2008-01-21 16:09 ` Andreas Schwab
2008-01-21 18:45 ` Grant Likely
3 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2008-01-21 15:56 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
[-- Attachment #1: Type: TEXT/PLAIN, Size: 843 bytes --]
On Mon, 21 Jan 2008, Olaf Hering wrote:
> + * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
> + * the the built-in serial node. Instead, a /failsafe node is created.
^^^
to
The same typo is in the pegasos2 patch.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2008-01-21 15:29 ` Olaf Hering
2008-01-21 15:37 ` [PATCH] autodetect serial console on pegasos2 Olaf Hering
2008-01-21 15:56 ` [PATCH] autodetect serial console on efika Geert Uytterhoeven
@ 2008-01-21 16:09 ` Andreas Schwab
2008-01-21 18:45 ` Grant Likely
3 siblings, 0 replies; 17+ messages in thread
From: Andreas Schwab @ 2008-01-21 16:09 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
Olaf Hering <olaf@aepfle.de> writes:
> +/*
> + * Per default, input/output-device points to keyboard/screen
> + * If no card is installed, the built-in serial port is used as a fallback.
> + * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
> + * the the built-in serial node. Instead, a /failsafe node is created.
s/the the/to the/
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2008-01-21 15:29 ` Olaf Hering
` (2 preceding siblings ...)
2008-01-21 16:09 ` Andreas Schwab
@ 2008-01-21 18:45 ` Grant Likely
2008-01-21 20:34 ` Olaf Hering
3 siblings, 1 reply; 17+ messages in thread
From: Grant Likely @ 2008-01-21 18:45 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
On 1/21/08, Olaf Hering <olaf@aepfle.de> wrote:
>
> Efika boards have to be booted with console=ttyPSC0 unless there is a
> graphics card plugged in. Detect if the firmware stdout is the serial
> connector.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Hrrrum; I think this is a good idea, but I'm not thrilled with the
approach. Here are my concerns:
- Determining that linux,stdout-path points to a PSC should should be
done in common code. It's useful for all 5200 boards, not just the
Efika. (However, if 'failsafe' processing is efika specific, then it
can stay in efika.c). This might be best done within the PSC driver
itself, but I'm not sure.
- Recognizing a psc node should be done by inspecting the compatible
property, not by device_type and model properties.
Thanks,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2008-01-21 18:45 ` Grant Likely
@ 2008-01-21 20:34 ` Olaf Hering
2008-01-21 20:38 ` Grant Likely
0 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2008-01-21 20:34 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Paul Mackeras
On Mon, Jan 21, Grant Likely wrote:
> On 1/21/08, Olaf Hering <olaf@aepfle.de> wrote:
> >
> > Efika boards have to be booted with console=ttyPSC0 unless there is a
> > graphics card plugged in. Detect if the firmware stdout is the serial
> > connector.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> Hrrrum; I think this is a good idea, but I'm not thrilled with the
> approach. Here are my concerns:
>
> - Determining that linux,stdout-path points to a PSC should should be
> done in common code. It's useful for all 5200 boards, not just the
> Efika. (However, if 'failsafe' processing is efika specific, then it
> can stay in efika.c). This might be best done within the PSC driver
> itself, but I'm not sure.
> - Recognizing a psc node should be done by inspecting the compatible
> property, not by device_type and model properties.
I dont have any other 5200 hardware to test a different patch.
Please improve my version and submit it for inclusion.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] autodetect serial console on efika
2008-01-21 20:34 ` Olaf Hering
@ 2008-01-21 20:38 ` Grant Likely
0 siblings, 0 replies; 17+ messages in thread
From: Grant Likely @ 2008-01-21 20:38 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Paul Mackeras
On 1/21/08, Olaf Hering <olaf@aepfle.de> wrote:
> On Mon, Jan 21, Grant Likely wrote:
>
> > On 1/21/08, Olaf Hering <olaf@aepfle.de> wrote:
> > >
> > > Efika boards have to be booted with console=ttyPSC0 unless there is a
> > > graphics card plugged in. Detect if the firmware stdout is the serial
> > > connector.
> > >
> > > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> >
> > Hrrrum; I think this is a good idea, but I'm not thrilled with the
> > approach. Here are my concerns:
> >
> > - Determining that linux,stdout-path points to a PSC should should be
> > done in common code. It's useful for all 5200 boards, not just the
> > Efika. (However, if 'failsafe' processing is efika specific, then it
> > can stay in efika.c). This might be best done within the PSC driver
> > itself, but I'm not sure.
> > - Recognizing a psc node should be done by inspecting the compatible
> > property, not by device_type and model properties.
>
> I dont have any other 5200 hardware to test a different patch.
> Please improve my version and submit it for inclusion.
Heh; that's okay, I and others can test on other hardware; but it's
still appropriate for you to move the matching code into the PSC
driver proper. Otherwise, getting it in to mainline for 2.6.25
depends on how much time I get free in the next 2 weeks.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-01-21 20:38 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-31 15:08 [PATCH] autodetect serial console on efika Olaf Hering
2007-03-31 17:06 ` Grant Likely
2007-04-09 12:56 ` Matt Sealey
2007-04-10 16:52 ` Olaf Hering
2007-04-10 20:25 ` Sylvain Munaut
2007-04-11 6:17 ` Olaf Hering
2007-04-11 18:47 ` Matt Sealey
2007-04-11 18:42 ` Matt Sealey
2007-04-12 15:59 ` Olaf Hering
2007-04-13 9:50 ` Matt Sealey
2008-01-21 15:29 ` Olaf Hering
2008-01-21 15:37 ` [PATCH] autodetect serial console on pegasos2 Olaf Hering
2008-01-21 15:56 ` [PATCH] autodetect serial console on efika Geert Uytterhoeven
2008-01-21 16:09 ` Andreas Schwab
2008-01-21 18:45 ` Grant Likely
2008-01-21 20:34 ` Olaf Hering
2008-01-21 20:38 ` Grant Likely
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).