Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
[snip] 
> Can you halt the processor with JTAG and look at the contents of __log_buf?
Ok I'll try that as soon as I can get CodeWarrior to work again...

> > 1. Is it possible ?
> 
> Yes, I believe so, but I haven't tried.
Ok 
> 
> > 2. Do you have any idea how it can be achieve ?
> 
> You should be doing the right thing.  Are your userspace init scripts
> trying to start a getty on the non-existent console device?
> 
Nope and using init=/bin/sh 
gave me /bin/sh: can't access tty; job control turned off
And then 
/ # tty
not a tty

Is helpful ? This is while using console=ttyS1,115200 (so when I know
it's working)

> > 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
> 
> no
Ok :) 
> 
> > 4. The 'chosen' node is empty in my dts, does it require something to be
> > set ?
> 
> no
Good to know 
> 
> I think your best bet is to figure out some way to get at __log_buf to
> retrieve the kernel output after the failed boot.
Ok I'll try to revive CodeWarrior (I would better appreciate a BDI2000,
but I'm stuck with a Freescale USB TAP that require CodeWarrior)

> 
> Cheers,
> g.
> 
Thank you

Sylvain
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
Hi Albrecht,

> > 1. Is it possible ?
> 
> Yes!  I tried this with several kernel versions (currently 2.6.33), using the 
> option 'console=tty0'.  Works just fine...
> 
Happy to know that it can be done !

> > 2. Do you have any idea how it can be achieve ?
> 
> Hmmm, iirc, I also saw the effect you have.  I *think* the solution was to 
> ensure that all /dev/* files were created manually in the jffs image, not by 
> running mdev (if you use busybox).  But I might be wrong here, sorry.  Being 
> at home, I don't have access to the device, but I can re-check tomorrow.
> 
Humm I see, here is the node I'm creating in the initial ramdisk, so
they are there before mdev is launched in one of my init scripts.

console   c   5   1
null  c   1   3
zero  c   1   5
ptmx  c   5   2
tty   c   5   0
randomc   1   8
urandom   c   1   9
initrdb   1   250
ram0  b   1   0
ram1  b   1   1
ram2  b   1   2
ram3  b   1   3
ramdisk -> ram0
ram -> ram0
loop0 b   7   0
loop1 b   7   1


I think I have all the necessary device for boot, but if you could
double check with yours I would appreciated it.

> > 3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
> 
> Not sure if I used *exactly* that version w/o serial console, but (iirc) 
> 2.6.28.something, and then many different up to .33 - they all work!

Ok

> 
> Best, Albrecht.

Thank you 

Sylvain
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Boot hang when setting console=none with MPC5200B custom board

2010-04-22 Thread Sylvain Lamontagne
Hi everybody,

I'm trying to remove the console from a custom board based on a
MPC5200B. During development we used console=ttyS1,115200 in our bootcmd
for the kernel, but now that the product is ready to be shipped we want
to use ttyS1 for something else and would like to deactivate completely
the console. So the unit would be accessible only by ssh if needed.

(I'm not really confortable with this since a network problem would
prevent us of even debugging the platform... but I've been ask to do
it.)

Anyway, whenever I try to change console= to null or to tty1 or anything
else, the boot is hanging somewhere ( I know that, because some leds are
not flashing like they should on a normal boot and I can't login in with
ssh).

I've tried to use tty1, none, null, zero and I've tried to completely
remove the console= arguments... but nothing work, its hanging there
without any flashing leds.

I've tried redirecting another "real" serial port and it worked, so
console=ttyPSC2,115200 work... but we need it also... so it can't do.

I've also tried the U-Boot's silent variable trick ... but it did not
work and I had to erase the environment of U-Boot with a JTAG to recover
back my default setting of ttyS1.

I'm now at a point where I think I have try everything that I know, and
since I have no way of "seeing" what is going on ... it's pretty hard to
debug. 

The kernel is 2.6.29.2 and can't really be changed... (but it may be
patch)
This board doesn't have a framebuffer or a graphic chipset, everything
was done with a serial connection and now we want to remove this serial
connection (console) before sending it to a customer.

1. Is it possible ?
2. Do you have any idea how it can be achieve ?
3. Do you know a bug in 2.6.29.2 that could prevent this to work ?
4. The 'chosen' node is empty in my dts, does it require something to be
set ?

Thank you for your help ( I hope ;) )

Sylvain Lamontagne
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Need advice on changing MPC5200B UART prescaler

2009-12-17 Thread Sylvain Lamontagne
Hi all,

I would like to be able to set a baud rate of 460800 for modem that we are
testing. With the actual prescaler of 32 and a IPB frequency of 84MHz
I got a 5.1% error (437500) vs a 0.9% error (456522) if I could use the
prescaler of 4. See MPC5200B user manual page 15-46 for the calculation
formula and page 15-12 for the CSR description.

Currently the code for the kernel we are using here, (2.6.29.2) seams not to
take a prescaler of 4 into account.
Line 249 of mpc52xx_uart.c
http://lxr.linux.no/linux+v2.6.29.2/drivers/serial/mpc52xx_uart.c#L249

/* Search for bus-frequency property in this node or a parent */
static unsigned long mpc52xx_getuartclk(void *p)
{
/*
 * 5200 UARTs have a / 32 prescaler
 * but the generic serial code assumes 16
 * so return ipb freq / 2
 */
return mpc52xx_find_ipb_freq(p) / 2;
}

How could I make it use the prescaler of 4 without breaking anything that we
currently have working ?
I doubt that simply doing  return mpc52xx_find_ipb_freq(p) / 4 would do the
trick ...
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Installation on a MPC5200 based custom board

2008-07-11 Thread Sylvain Lamontagne
Greetings

We are currently trying to put a Kernel 2.6.26 on a custom board based
on the MPC5200 processor and the designed of the board was based on the
lite5200b evaluation board.

We would like to have some advice regarding the installation process for
this kernel. The hardware currently work (still buggy, but work) with a
kernel 2.6.23 compiled with ARCH ppc running on a U-Boot 1.1.6. For what
I understand now, the ARCH ppc if kind of deprecated and we have to
switch to ARCH powerpc. I'm new to the concept of device tree, do I have
to modify it myself or the file wild be generated automatically ?

Should it be better for us to upgrade our version of U-Boot to 1.3.* to
get the support of device tree? Currently we tried with the wrapper
trick of using cuImage.lite5200b and the v1.1.6 but it doesn't seem to
work.

Also, we would like to know if we have to recompile everything on the
board (U-Boot/Kernel/Busybox) since we switched ARCH from ppc to
powerpc?

We are also wondering what is the cross-compilation tools that you are
using? Or do you have any good advice on a choice? Currently we are
building with gcc-4.1.0-glibc-2.3.6 for ppc on an x86 host running
Ubuntu 8.04 or we also have a Fedora Core 7 laptop but, I have see a
kernel compilation warning regarding gcc 4.1 saying that it's known to
brake the kernel.

Should we upgrade everything (U-Boot/Kernel/Busybox) and recreate a new
Ramdisk ?

Anybody know a good development tools to use with a CodeWarrior USB TAP
from freescale ? The CodeWarrior IDE doesn't seems to work properly for
us.

This is a lot of questions and they maybe unclear since I'm new to all
this, but if you need any more information I can provide them.

Best Regards,

-- 
Sylvain Lamontagne

Software Developer
Novariant Canada
Ext.: 4940
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev