No console output when booting M54455EVB linux from uboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No console output when booting M54455EVB linux from uboot

2,095 Views
mikeqin
Contributor I
Dear guys,

Currently, I am trying to build a linux image for my custom board with MCF5445x processor. I take M54455EVB linux image as a start point. I bootm the M54455EVB linux image from uboot (I use uboot-1.3.2). The uboot works well, the kernel booting hit the start_kernel(). But there is nothing output from console!!

With debugger, I saw that the printk() functions were called many times without any console output. Tracing into the kernel source code, I found that the printk() called "con->write" operation... Still puzzled.

Can anyone guide me to solve this?

Mike


Message Edited by mikeqin on 2008-06-03 04:34 PM
Labels (1)
0 Kudos
Reply
3 Replies

643 Views
mikeqin
Contributor I
I'd like to report that the console output is fine now. I changed the default port index when init the console structure, then it work for the register_console() in printk.c.  

-mike
0 Kudos
Reply

642 Views
kmahan
Contributor I
Hi Mike,

What you are running into is that the console driver has not been initialized yet.  All your output is going into the printk buffer and when the console driver gets initialized all that output will get sent out the serial port.

The console is enabled in linux/arch/m68k/coldfire/config.c config_coldfire() at the bottom of the routine via a call to register_console().

This can be annoying when you are trying to bring up the kernel.  When I've got a hardware debugger like a BDI I drop halt instructions along the way.  If you've gotten out of head.S and into the C inits the C code is asm("halt"); .  Other ways are the tried and true "flash an LED" method.

--Kurt


0 Kudos
Reply

643 Views
mikeqin
Contributor I
Thanks, Kurt. I understood more about the printk().

I figured out the problem would be that I use UART 2 as the console output port while M54455EVB linux use UART 0 as default output. I used to think that Linux kernel will not re-initialization the port after Uboot, but seems it will. So, according to the comment below, I edited the drivers/serial/mcfserial.c as follows:
1610 #elif defined(CONFIG_M54455)
1611         volatile unsigned char *uartp;
1612         uartp = info->addr;
1613         switch (info->line) {
1614         case 0:
1615                 MCF_GPIO_PAR_UART |= 0x000F;
1616                 break;
1617         case 1:
1618                 MCF_GPIO_PAR_UART |= 0x0FF0;
1619                 break;
1620         case 2:
1621                 /* GPIOs also must be initalized, depends on board */
1622                 MCF_GPIO_PAR_TIMER = (MCF_GPIO_PAR_TIMER_T3IN_U2RXD | MCF_GPIO_PAR_TIMER_T2IN_U2TXD);
1623                 break;
1624         }

The console still not working, can you advise what else I need to modify?

Best Regards,
Mike
0 Kudos
Reply