[U-Boot] PPC405 with XMD boot

Rommel,
I am using your recently posted patch to boot my custom Virtex4 board with XMD. Execution gets stuck in the NS16550_init() function. It gets stuck at this line:
#if (!defined(CONFIG_SYS_NS16550_BROKEN_TEMT)) while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT)) ; #endif
If I define CONFIG_SYS_NS16550_BROKEN_TEMT, it gets stuck in the while loop in NS16550_putc:
while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) ; serial_out(c, &com_port->thr);
From the GDB output, I can see it is using the correct address for the the
serial port (0x84000000)
(gdb) target remote localhost:1234 Remote debugging using localhost:1234 NS16550_putc (com_port=0x84000000, c=13 '\r') at ns16550.c:91 91 while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) (gdb)
In your opinion, is your patch providing everything that I need to boot with XMD? Can you suggest what I might be doing wrong?
Thanks for any insight you may have, Frank

Dear Frank,
On 2013.02/05, Frank Lombardo wrote:
Rommel,
I am using your recently posted patch to boot my custom Virtex4 board with XMD. Execution gets stuck in the NS16550_init() function. It gets stuck at this line:
So you're not jumping to random addresses anymore.
#if (!defined(CONFIG_SYS_NS16550_BROKEN_TEMT)) while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT)) ; #endif
If I define CONFIG_SYS_NS16550_BROKEN_TEMT, it gets stuck in the while loop in NS16550_putc:
while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) ; serial_out(c, &com_port->thr);
From the GDB output, I can see it is using the correct address for the the serial port (0x84000000)
Hmmn. I've seen that before, I think. Don't define CONFIG_SYS_NS16550_BROKEN_TEMT.
Make sure you use CTS/RTS (h/w flow) control with your terminal application.
HTH.
All the best, Rommel
(gdb) target remote localhost:1234 Remote debugging using localhost:1234 NS16550_putc (com_port=0x84000000, c=13 '\r') at ns16550.c:91 91 while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) (gdb)
In your opinion, is your patch providing everything that I need to boot with XMD? Can you suggest what I might be doing wrong?
Thanks for any insight you may have, Frank

On 02/06/2013 12:13 PM, Rommel G Custodio wrote:
If I define CONFIG_SYS_NS16550_BROKEN_TEMT, it gets stuck in the while loop in NS16550_putc:
while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) ; serial_out(c, &com_port->thr);
From the GDB output, I can see it is using the correct address for the the serial port (0x84000000)
Hmmn. I've seen that before, I think. Don't define CONFIG_SYS_NS16550_BROKEN_TEMT.
That should not be necessary.
Make sure you use CTS/RTS (h/w flow) control with your terminal application.
Are you sure that all clocks, especially those related with the UART controller, are configured correctly?
Thanks, Stefan

Thanks for the responses guys. I got to work. What I found was that the address being passed to the driver code was 0x84000000. This is the base address of the UART. However, the registers of the XPS 16550 UART are offset by 0x1000 from the base. I changed the base address in my xparameters.h file, but I wonder, should this be taken care of in a better way?
On Wed, Feb 6, 2013 at 9:08 AM, Stefan Roese sr@denx.de wrote:
On 02/06/2013 12:13 PM, Rommel G Custodio wrote:
If I define CONFIG_SYS_NS16550_BROKEN_TEMT, it gets stuck in the while
loop
in NS16550_putc:
while ((serial_in(&com_port->lsr) & UART_LSR_THRE) == 0) ; serial_out(c, &com_port->thr);
From the GDB output, I can see it is using the correct address for the
the
serial port (0x84000000)
Hmmn. I've seen that before, I think. Don't define CONFIG_SYS_NS16550_BROKEN_TEMT.
That should not be necessary.
Make sure you use CTS/RTS (h/w flow) control with your terminal application.
Are you sure that all clocks, especially those related with the UART controller, are configured correctly?
Thanks, Stefan

On 02/07/2013 04:20 AM, Frank Lombardo wrote:
Thanks for the responses guys. I got to work. What I found was that the address being passed to the driver code was 0x84000000. This is the base address of the UART. However, the registers of the XPS 16550 UART are offset by 0x1000 from the base. I changed the base address in my xparameters.h file, but I wonder, should this be taken care of in a better way?
I'm afraid, but I have never really worked with the Xilinx PPC4xx FPGA's. So my knowledge here is "limited". Sorry, but I can't help more.
Thanks,Stefan

Stefan Roese <sr <at> denx.de> writes:
On 02/07/2013 04:20 AM, Frank Lombardo wrote:
Thanks for the responses guys. I got to work. What I found was that the address being passed to the driver code was 0x84000000. This is the base address of the UART. However, the registers of the XPS 16550 UART are offset by 0x1000 from the base. I changed the base address in my xparameters.h file, but I wonder, should this be taken care of in a better way?
I'm afraid, but I have never really worked with the Xilinx PPC4xx FPGA's. So my knowledge here is "limited". Sorry, but I can't help more.
I think include/configs/microblaze-generic.h includes code for this.
The ML-series all now use UARTlite in the configs. Though maybe it won't hurt to add code similar to the MB in the ML-series headers as a fallback.
All the best, Rommel
participants (4)
-
Frank Lombardo
-
Rommel Custodio
-
Rommel G Custodio
-
Stefan Roese