* Early UART setup on 2.6 kernel for mpc85xx
@ 2007-08-11 1:43 mike zheng
0 siblings, 0 replies; 3+ messages in thread
From: mike zheng @ 2007-08-11 1:43 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
Hi All,
In order to debug the kernel 2.6, I want setup serial port with UART on
mpc85xx as early as possible. I add the register access code at the
beginning of platform_init(). For example, I try to write THR
register(0xe0004500). However the system just hanging there with this line.
If I comment out this line, everything works fine.
Here is the code my mpc85xx_cds_common.c:
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
....
}
[-- Attachment #2: Type: text/html, Size: 858 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Early UART setup on 2.6 kernel for mpc85xx
[not found] <mailman.1.1186797602.26064.linuxppc-dev@ozlabs.org>
@ 2007-08-13 11:09 ` Morrison, Tom
2007-08-13 15:53 ` Scott Wood
0 siblings, 1 reply; 3+ messages in thread
From: Morrison, Tom @ 2007-08-13 11:09 UTC (permalink / raw)
To: linuxppc-dev
>> In order to debug the kernel 2.6, I want setup serial port with=20
>> UART on mpc85xx as early as possible. I add the register access=20
>> code at the beginning of platform_init(). For example, I try=20
>> to write THR register(0xe0004500). However the system just=20
>> hanging there with this line.
<snip everything else>
If you are using a relatively new kernel like I am starting=20
up with - you don't need to add anything - you can use the
"Early Debugging/Early Console" which defines PPC_EARLY_DEBUG
You can find this in the kernel hacking options when you=20
go in and configure your linux kernel.
This causes the udbg serial driver to be initialized, and=20
99% of the early debug output is already put to the screen.
This hands the serial port over to the console driver later
on in the boot, and it works great (good job whoever wrote
this piece - more than a helpful tool!).
FWIW, you really can't debug the earliest init code=20
because most of that is in assembly. Get a JTAG emulator
(BDI or Lauterbach) and start stepping through.
Tom Morrison
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Early UART setup on 2.6 kernel for mpc85xx
2007-08-13 11:09 ` Morrison, Tom
@ 2007-08-13 15:53 ` Scott Wood
0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2007-08-13 15:53 UTC (permalink / raw)
To: Morrison, Tom; +Cc: linuxppc-dev
On Mon, Aug 13, 2007 at 07:09:40AM -0400, Morrison, Tom wrote:
> >> In order to debug the kernel 2.6, I want setup serial port with
> >> UART on mpc85xx as early as possible. I add the register access
> >> code at the beginning of platform_init(). For example, I try
> >> to write THR register(0xe0004500). However the system just
> >> hanging there with this line.
Make sure there's a mapping in the TLB for that address.
> FWIW, you really can't debug the earliest init code
> because most of that is in assembly. Get a JTAG emulator
> (BDI or Lauterbach) and start stepping through.
It's quite possible to debug assembly code without JTAG. :-)
-Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-13 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-11 1:43 Early UART setup on 2.6 kernel for mpc85xx mike zheng
[not found] <mailman.1.1186797602.26064.linuxppc-dev@ozlabs.org>
2007-08-13 11:09 ` Morrison, Tom
2007-08-13 15:53 ` Scott Wood
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).