* [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
@ 2008-03-17 16:41 John Linn
2008-03-17 19:47 ` Grant Likely
0 siblings, 1 reply; 9+ messages in thread
From: John Linn @ 2008-03-17 16:41 UTC (permalink / raw)
To: linuxppc-dev, jwboyer; +Cc: John Linn
The UART 16550 initialization was not setting up the registers
correctly. Code was added to pull the frequency and speed from
the device tree and initialize the registers using those values.
The boot code was not and is still not using the cmd line
to setup up the uart. The frequency of the clock driving the
UART must be specified in the device tree so that the baud
rate generator can be setup.
---
Please pull this patch for 2.6.26.
---
arch/powerpc/boot/ns16550.c | 69 +++++++++++++++++++++++++++++++++---------
1 files changed, 54 insertions(+), 15 deletions(-)
diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
index f8f1b2f..d8edd48 100644
--- a/arch/powerpc/boot/ns16550.c
+++ b/arch/powerpc/boot/ns16550.c
@@ -15,23 +15,47 @@
#include "io.h"
#include "ops.h"
-#define UART_DLL 0 /* Out: Divisor Latch Low */
-#define UART_DLM 1 /* Out: Divisor Latch High */
-#define UART_FCR 2 /* Out: FIFO Control Register */
-#define UART_LCR 3 /* Out: Line Control Register */
-#define UART_MCR 4 /* Out: Modem Control Register */
-#define UART_LSR 5 /* In: Line Status Register */
-#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
-#define UART_LSR_DR 0x01 /* Receiver data ready */
-#define UART_MSR 6 /* In: Modem Status Register */
-#define UART_SCR 7 /* I/O: Scratch Register */
-
-static unsigned char *reg_base;
-static u32 reg_shift;
+#define UART_DLL 0 /* Out: Divisor Latch Low */
+#define UART_DLM 1 /* Out: Divisor Latch High */
+#define UART_FCR 2 /* Out: FIFO Control Register */
+#define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */
+#define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */
+#define UART_LCR 3 /* Out: Line Control Register */
+#define UART_MCR 4 /* Out: Modem Control Register */
+#define UART_MCR_RTS 0x02 /* RTS complement */
+#define UART_MCR_DTR 0x01 /* DTR complement */
+#define UART_LSR 5 /* In: Line Status Register */
+#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
+#define UART_LSR_DR 0x01 /* Receiver data ready */
+#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */
+#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */
+#define UART_MSR 6 /* In: Modem Status Register */
+#define UART_SCR 7 /* I/O: Scratch Register */
+
+volatile static unsigned char *reg_base;
+volatile static u32 reg_shift;
+volatile static u16 divisor;
static int ns16550_open(void)
{
- out_8(reg_base + (UART_FCR << reg_shift), 0x06);
+
+ /* Access baud rate */
+ out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_DLAB);
+
+ /* Baud rate based on input clock */
+ out_8(reg_base + (UART_DLL << reg_shift), divisor & 0xFF);
+ out_8(reg_base + (UART_DLM << reg_shift), divisor >> 8);
+
+ /* 8 data, 1 stop, no parity */
+ out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_WLEN8);
+
+ /* RTS/DTR */
+ out_8(reg_base + (UART_MCR << reg_shift), UART_MCR_RTS | UART_MCR_DTR);
+
+ /* Clear transmitter and receiver */
+ out_8(reg_base + (UART_FCR << reg_shift),
+ UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR);
+
return 0;
}
@@ -56,6 +80,7 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
{
int n;
unsigned long reg_phys;
+ u32 clk, spd;
n = getprop(devp, "virtual-reg", ®_base, sizeof(reg_base));
if (n != sizeof(reg_base)) {
@@ -65,9 +90,23 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
reg_base = (void *)reg_phys;
}
- n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift));
+ n = getprop(devp, "reg-shift", (void *)®_shift, sizeof(reg_shift));
if (n != sizeof(reg_shift))
reg_shift = 0;
+
+ /* the base address has to change for devices with odd reg spacing */
+ reg_base = reg_base + ((1 << reg_shift) - 1);
+
+ n = getprop(devp, "current-speed", (void *)&spd, sizeof(spd));
+ if (n != sizeof(spd))
+ spd = 9600;
+
+ /* should there be a default clock rate?*/
+ n = getprop(devp, "clock-frequency", (void *)&clk, sizeof(clk));
+ if (n != sizeof(clk))
+ return -1;
+
+ divisor = clk / (16 * spd);
scdp->open = ns16550_open;
scdp->putc = ns16550_putc;
--
1.5.2.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 16:41 [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization John Linn
@ 2008-03-17 19:47 ` Grant Likely
2008-03-17 19:57 ` John Linn
0 siblings, 1 reply; 9+ messages in thread
From: Grant Likely @ 2008-03-17 19:47 UTC (permalink / raw)
To: John Linn; +Cc: linuxppc-dev
On Mon, Mar 17, 2008 at 10:41 AM, John Linn <john.linn@xilinx.com> wrote:
> The UART 16550 initialization was not setting up the registers
> correctly. Code was added to pull the frequency and speed from
> the device tree and initialize the registers using those values.
>
> The boot code was not and is still not using the cmd line
> to setup up the uart. The frequency of the clock driving the
> UART must be specified in the device tree so that the baud
> rate generator can be setup.
The bootwrapper makes the assumption that the firmware has already
initialized the serial device and it should not be fiddled with so
that there is less chance of messing up a working output
configuration.
For platforms such as the virtex which don't have firmware the serial
port should be setup earlier in the boot process (in the appropriate
platform_init() function).
Cheers,
g.
>
> ---
>
> Please pull this patch for 2.6.26.
> ---
> arch/powerpc/boot/ns16550.c | 69 +++++++++++++++++++++++++++++++++---------
> 1 files changed, 54 insertions(+), 15 deletions(-)
>
> diff --git a/arch/powerpc/boot/ns16550.c b/arch/powerpc/boot/ns16550.c
> index f8f1b2f..d8edd48 100644
> --- a/arch/powerpc/boot/ns16550.c
> +++ b/arch/powerpc/boot/ns16550.c
> @@ -15,23 +15,47 @@
> #include "io.h"
> #include "ops.h"
>
> -#define UART_DLL 0 /* Out: Divisor Latch Low */
> -#define UART_DLM 1 /* Out: Divisor Latch High */
> -#define UART_FCR 2 /* Out: FIFO Control Register */
> -#define UART_LCR 3 /* Out: Line Control Register */
> -#define UART_MCR 4 /* Out: Modem Control Register */
> -#define UART_LSR 5 /* In: Line Status Register */
> -#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
> -#define UART_LSR_DR 0x01 /* Receiver data ready */
> -#define UART_MSR 6 /* In: Modem Status Register */
> -#define UART_SCR 7 /* I/O: Scratch Register */
> -
> -static unsigned char *reg_base;
> -static u32 reg_shift;
> +#define UART_DLL 0 /* Out: Divisor Latch Low */
> +#define UART_DLM 1 /* Out: Divisor Latch High */
> +#define UART_FCR 2 /* Out: FIFO Control Register */
> +#define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */
> +#define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */
> +#define UART_LCR 3 /* Out: Line Control Register */
> +#define UART_MCR 4 /* Out: Modem Control Register */
> +#define UART_MCR_RTS 0x02 /* RTS complement */
> +#define UART_MCR_DTR 0x01 /* DTR complement */
> +#define UART_LSR 5 /* In: Line Status Register */
> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
> +#define UART_LSR_DR 0x01 /* Receiver data ready */
> +#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */
> +#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */
> +#define UART_MSR 6 /* In: Modem Status Register */
> +#define UART_SCR 7 /* I/O: Scratch Register */
> +
> +volatile static unsigned char *reg_base;
> +volatile static u32 reg_shift;
> +volatile static u16 divisor;
>
> static int ns16550_open(void)
> {
> - out_8(reg_base + (UART_FCR << reg_shift), 0x06);
> +
> + /* Access baud rate */
> + out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_DLAB);
> +
> + /* Baud rate based on input clock */
> + out_8(reg_base + (UART_DLL << reg_shift), divisor & 0xFF);
> + out_8(reg_base + (UART_DLM << reg_shift), divisor >> 8);
> +
> + /* 8 data, 1 stop, no parity */
> + out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_WLEN8);
> +
> + /* RTS/DTR */
> + out_8(reg_base + (UART_MCR << reg_shift), UART_MCR_RTS | UART_MCR_DTR);
> +
> + /* Clear transmitter and receiver */
> + out_8(reg_base + (UART_FCR << reg_shift),
> + UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR);
> +
> return 0;
> }
>
> @@ -56,6 +80,7 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
> {
> int n;
> unsigned long reg_phys;
> + u32 clk, spd;
>
> n = getprop(devp, "virtual-reg", ®_base, sizeof(reg_base));
> if (n != sizeof(reg_base)) {
> @@ -65,9 +90,23 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
> reg_base = (void *)reg_phys;
> }
>
> - n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift));
> + n = getprop(devp, "reg-shift", (void *)®_shift, sizeof(reg_shift));
> if (n != sizeof(reg_shift))
> reg_shift = 0;
> +
> + /* the base address has to change for devices with odd reg spacing */
> + reg_base = reg_base + ((1 << reg_shift) - 1);
> +
> + n = getprop(devp, "current-speed", (void *)&spd, sizeof(spd));
> + if (n != sizeof(spd))
> + spd = 9600;
> +
> + /* should there be a default clock rate?*/
> + n = getprop(devp, "clock-frequency", (void *)&clk, sizeof(clk));
> + if (n != sizeof(clk))
> + return -1;
> +
> + divisor = clk / (16 * spd);
>
> scdp->open = ns16550_open;
> scdp->putc = ns16550_putc;
> --
> 1.5.2.1
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread* RE: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 19:47 ` Grant Likely
@ 2008-03-17 19:57 ` John Linn
2008-03-17 20:08 ` Grant Likely
0 siblings, 1 reply; 9+ messages in thread
From: John Linn @ 2008-03-17 19:57 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
That makes sense. Since I'm not using a boot loader I didn't realize
that.
I'm not sure how hard it will be to get the data from the device tree at
that time.
I'll look into the details more.
What about checking to see if it's setup assuming that's possible by
looking at registers, and then not messing with it if it's already
setup, otherwise do what my patch does.
Thanks,
John
-----Original Message-----
From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On Behalf Of
Grant Likely
Sent: Monday, March 17, 2008 1:48 PM
To: John Linn
Cc: linuxppc-dev@ozlabs.org; jwboyer@linux.vnet.ibm.com
Subject: Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART
initialization
On Mon, Mar 17, 2008 at 10:41 AM, John Linn <john.linn@xilinx.com>
wrote:
> The UART 16550 initialization was not setting up the registers
> correctly. Code was added to pull the frequency and speed from
> the device tree and initialize the registers using those values.
>
> The boot code was not and is still not using the cmd line
> to setup up the uart. The frequency of the clock driving the
> UART must be specified in the device tree so that the baud
> rate generator can be setup.
The bootwrapper makes the assumption that the firmware has already
initialized the serial device and it should not be fiddled with so
that there is less chance of messing up a working output
configuration.
For platforms such as the virtex which don't have firmware the serial
port should be setup earlier in the boot process (in the appropriate
platform_init() function).
Cheers,
g.
>
> ---
>
> Please pull this patch for 2.6.26.
> ---
> arch/powerpc/boot/ns16550.c | 69
+++++++++++++++++++++++++++++++++---------
> 1 files changed, 54 insertions(+), 15 deletions(-)
>
> diff --git a/arch/powerpc/boot/ns16550.c
b/arch/powerpc/boot/ns16550.c
> index f8f1b2f..d8edd48 100644
> --- a/arch/powerpc/boot/ns16550.c
> +++ b/arch/powerpc/boot/ns16550.c
> @@ -15,23 +15,47 @@
> #include "io.h"
> #include "ops.h"
>
> -#define UART_DLL 0 /* Out: Divisor Latch Low */
> -#define UART_DLM 1 /* Out: Divisor Latch High */
> -#define UART_FCR 2 /* Out: FIFO Control Register */
> -#define UART_LCR 3 /* Out: Line Control Register */
> -#define UART_MCR 4 /* Out: Modem Control Register */
> -#define UART_LSR 5 /* In: Line Status Register */
> -#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
> -#define UART_LSR_DR 0x01 /* Receiver data ready */
> -#define UART_MSR 6 /* In: Modem Status Register */
> -#define UART_SCR 7 /* I/O: Scratch Register */
> -
> -static unsigned char *reg_base;
> -static u32 reg_shift;
> +#define UART_DLL 0 /* Out: Divisor Latch Low */
> +#define UART_DLM 1 /* Out: Divisor Latch High */
> +#define UART_FCR 2 /* Out: FIFO Control Register
*/
> +#define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */
> +#define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */
> +#define UART_LCR 3 /* Out: Line Control Register
*/
> +#define UART_MCR 4 /* Out: Modem Control
Register */
> +#define UART_MCR_RTS 0x02 /* RTS complement */
> +#define UART_MCR_DTR 0x01 /* DTR complement */
> +#define UART_LSR 5 /* In: Line Status Register
*/
> +#define UART_LSR_THRE 0x20 /* Transmit-hold-register
empty */
> +#define UART_LSR_DR 0x01 /* Receiver data ready */
> +#define UART_LCR_DLAB 0x80 /* Divisor latch access bit
*/
> +#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */
> +#define UART_MSR 6 /* In: Modem Status Register
*/
> +#define UART_SCR 7 /* I/O: Scratch Register */
> +
> +volatile static unsigned char *reg_base;
> +volatile static u32 reg_shift;
> +volatile static u16 divisor;
>
> static int ns16550_open(void)
> {
> - out_8(reg_base + (UART_FCR << reg_shift), 0x06);
> +
> + /* Access baud rate */
> + out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_DLAB);
> +
> + /* Baud rate based on input clock */
> + out_8(reg_base + (UART_DLL << reg_shift), divisor & 0xFF);
> + out_8(reg_base + (UART_DLM << reg_shift), divisor >> 8);
> +
> + /* 8 data, 1 stop, no parity */
> + out_8(reg_base + (UART_LCR << reg_shift), UART_LCR_WLEN8);
> +
> + /* RTS/DTR */
> + out_8(reg_base + (UART_MCR << reg_shift), UART_MCR_RTS |
UART_MCR_DTR);
> +
> + /* Clear transmitter and receiver */
> + out_8(reg_base + (UART_FCR << reg_shift),
> + UART_FCR_CLEAR_XMIT |
UART_FCR_CLEAR_RCVR);
> +
> return 0;
> }
>
> @@ -56,6 +80,7 @@ int ns16550_console_init(void *devp, struct
serial_console_data *scdp)
> {
> int n;
> unsigned long reg_phys;
> + u32 clk, spd;
>
> n =3D getprop(devp, "virtual-reg", ®_base, =
sizeof(reg_base));
> if (n !=3D sizeof(reg_base)) {
> @@ -65,9 +90,23 @@ int ns16550_console_init(void *devp, struct
serial_console_data *scdp)
> reg_base =3D (void *)reg_phys;
> }
>
> - n =3D getprop(devp, "reg-shift", ®_shift,
sizeof(reg_shift));
> + n =3D getprop(devp, "reg-shift", (void *)®_shift,
sizeof(reg_shift));
> if (n !=3D sizeof(reg_shift))
> reg_shift =3D 0;
> +
> + /* the base address has to change for devices with odd reg
spacing */
> + reg_base =3D reg_base + ((1 << reg_shift) - 1);
> +
> + n =3D getprop(devp, "current-speed", (void *)&spd,
sizeof(spd));
> + if (n !=3D sizeof(spd))
> + spd =3D 9600;
> +
> + /* should there be a default clock rate?*/
> + n =3D getprop(devp, "clock-frequency", (void *)&clk,
sizeof(clk));
> + if (n !=3D sizeof(clk))
> + return -1;
> +
> + divisor =3D clk / (16 * spd);
>
> scdp->open =3D ns16550_open;
> scdp->putc =3D ns16550_putc;
> --
> 1.5.2.1
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 19:57 ` John Linn
@ 2008-03-17 20:08 ` Grant Likely
2008-03-17 20:10 ` John Linn
2008-03-17 20:17 ` Stephen Neuendorffer
0 siblings, 2 replies; 9+ messages in thread
From: Grant Likely @ 2008-03-17 20:08 UTC (permalink / raw)
To: John Linn; +Cc: linuxppc-dev
On Mon, Mar 17, 2008 at 1:57 PM, John Linn <John.Linn@xilinx.com> wrote:
> That makes sense. Since I'm not using a boot loader I didn't realize
> that.
>
> I'm not sure how hard it will be to get the data from the device tree at
> that time.
You should be good. It is now possible to read data from the device
tree at platform_init() time.
Cheers,
g.
> What about checking to see if it's setup assuming that's possible by
> looking at registers, and then not messing with it if it's already
> setup, otherwise do what my patch does.
Ugh. The old arch/ppc code used to do this and it was kind of ugly
and fragile. I'd rather avoid doing it again.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 20:08 ` Grant Likely
@ 2008-03-17 20:10 ` John Linn
2008-03-17 20:13 ` Grant Likely
2008-03-17 20:17 ` Stephen Neuendorffer
1 sibling, 1 reply; 9+ messages in thread
From: John Linn @ 2008-03-17 20:10 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
Great, I'll do that.
Does this also apply to my other patch, Adding 8250 console support to
OF serial, as it's not clear to me when to assume the UART is already
setup or not?
Thanks,
John
-----Original Message-----
From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On Behalf Of
Grant Likely
Sent: Monday, March 17, 2008 2:08 PM
To: John Linn
Cc: linuxppc-dev@ozlabs.org; jwboyer@linux.vnet.ibm.com
Subject: Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART
initialization
On Mon, Mar 17, 2008 at 1:57 PM, John Linn <John.Linn@xilinx.com> wrote:
> That makes sense. Since I'm not using a boot loader I didn't realize
> that.
>
> I'm not sure how hard it will be to get the data from the device tree
at
> that time.
You should be good. It is now possible to read data from the device
tree at platform_init() time.
Cheers,
g.
> What about checking to see if it's setup assuming that's possible by
> looking at registers, and then not messing with it if it's already
> setup, otherwise do what my patch does.
Ugh. The old arch/ppc code used to do this and it was kind of ugly
and fragile. I'd rather avoid doing it again.
Cheers,
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 20:10 ` John Linn
@ 2008-03-17 20:13 ` Grant Likely
0 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2008-03-17 20:13 UTC (permalink / raw)
To: John Linn; +Cc: linuxppc-dev
On Mon, Mar 17, 2008 at 2:10 PM, John Linn <John.Linn@xilinx.com> wrote:
> Great, I'll do that.
>
> Does this also apply to my other patch, Adding 8250 console support to
> OF serial, as it's not clear to me when to assume the UART is already
> setup or not?
I haven't reviewed that one yet. I'll get to it this afternoon.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 20:08 ` Grant Likely
2008-03-17 20:10 ` John Linn
@ 2008-03-17 20:17 ` Stephen Neuendorffer
2008-03-17 20:24 ` Grant Likely
1 sibling, 1 reply; 9+ messages in thread
From: Stephen Neuendorffer @ 2008-03-17 20:17 UTC (permalink / raw)
To: Grant Likely, John Linn; +Cc: linuxppc-dev
Grant,
If you have working platform code using libfdt, can you publish it?
Steve
> -----Original Message-----
> From: =
linuxppc-dev-bounces+stephen.neuendorffer=3Dxilinx.com@ozlabs.org
[mailto:linuxppc-dev-
> bounces+stephen.neuendorffer=3Dxilinx.com@ozlabs.org] On Behalf Of =
Grant
Likely
> Sent: Monday, March 17, 2008 1:08 PM
> To: John Linn
> Cc: linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART
initialization
>=20
> On Mon, Mar 17, 2008 at 1:57 PM, John Linn <John.Linn@xilinx.com>
wrote:
> > That makes sense. Since I'm not using a boot loader I didn't
realize
> > that.
> >
> > I'm not sure how hard it will be to get the data from the device
tree at
> > that time.
>=20
> You should be good. It is now possible to read data from the device
> tree at platform_init() time.
>=20
> Cheers,
> g.
>=20
> > What about checking to see if it's setup assuming that's possible
by
> > looking at registers, and then not messing with it if it's already
> > setup, otherwise do what my patch does.
>=20
> Ugh. The old arch/ppc code used to do this and it was kind of ugly
> and fragile. I'd rather avoid doing it again.
>=20
> Cheers,
> g.
>=20
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 20:17 ` Stephen Neuendorffer
@ 2008-03-17 20:24 ` Grant Likely
2008-03-17 20:25 ` Stephen Neuendorffer
0 siblings, 1 reply; 9+ messages in thread
From: Grant Likely @ 2008-03-17 20:24 UTC (permalink / raw)
To: Stephen Neuendorffer; +Cc: John Linn, linuxppc-dev
On Mon, Mar 17, 2008 at 2:17 PM, Stephen Neuendorffer
<stephen.neuendorffer@xilinx.com> wrote:
> Grant,
>
> If you have working platform code using libfdt, can you publish it?
Yes,
I've actually already published it once. I'll post v2 this afternoon.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization
2008-03-17 20:24 ` Grant Likely
@ 2008-03-17 20:25 ` Stephen Neuendorffer
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Neuendorffer @ 2008-03-17 20:25 UTC (permalink / raw)
To: Grant Likely; +Cc: John Linn, linuxppc-dev
Sorry, guess I missed it...
Steve
> -----Original Message-----
> From: glikely@secretlab.ca [mailto:glikely@secretlab.ca] On Behalf Of
Grant Likely
> Sent: Monday, March 17, 2008 1:25 PM
> To: Stephen Neuendorffer
> Cc: John Linn; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART
initialization
>=20
> On Mon, Mar 17, 2008 at 2:17 PM, Stephen Neuendorffer
> <stephen.neuendorffer@xilinx.com> wrote:
> > Grant,
> >
> > If you have working platform code using libfdt, can you publish it?
>=20
> Yes,
>=20
> I've actually already published it once. I'll post v2 this afternoon.
>=20
> g.
>=20
>=20
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-03-17 20:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 16:41 [PATCH] [POWERPC] Xilinx: Boot: Fix 16550 UART initialization John Linn
2008-03-17 19:47 ` Grant Likely
2008-03-17 19:57 ` John Linn
2008-03-17 20:08 ` Grant Likely
2008-03-17 20:10 ` John Linn
2008-03-17 20:13 ` Grant Likely
2008-03-17 20:17 ` Stephen Neuendorffer
2008-03-17 20:24 ` Grant Likely
2008-03-17 20:25 ` Stephen Neuendorffer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox