linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* What's wrong with the serial port?
@ 2005-08-11 22:41 Shawn Jin
  2005-08-11 23:14 ` Eugene Surovegin
  2005-08-17  1:53 ` Shawn Jin
  0 siblings, 2 replies; 7+ messages in thread
From: Shawn Jin @ 2005-08-11 22:41 UTC (permalink / raw)
  To: ppcembed

Hi,

I'm porting linux 2.6.11.4 to a custom SoC with ppc440 core. The UART
is 16550 compatible. U-Boot is already running fine.

When the kernel is booting, it gets to the point where console_init()
is called, which calls individual early console initialization
functions. In my case it's serial8250_console_init(). Before
register_console() is called in serial8250_console_init(), everything
seems fine because the debugging logs are printed on the serial port.
But once register_console() is called, the serial port continues
spitting out =E0. See the following message. What's wrong?

Any hints are appreciated!

Boot reached stage 4                                                       =
    =20
Boot reached stage 5                                                       =
    =20
Boot reached stage 6                                                       =
    =20
OK                                                                         =
    =20
Boot reached stage 7                                                       =
    =20
Boot reached stage 8                                                       =
    =20
## Current stack ends at 0x01FC6B80 =3D> set upper limit to 0x00800000     =
      =20
## cmdline at 0x007FFF00 ... 0x007FFF10                                    =
    =20
bd address  =3D 0x01FC6F90                                                 =
      =20
memstart    =3D 0x00000000                                                 =
      =20
memsize     =3D 0x02000000                                                 =
      =20
flashstart  =3D 0x00000000                                                 =
      =20
flashsize   =3D 0x00000000                                                 =
      =20
flashoffset =3D 0x00000000                                                 =
      =20
sramstart   =3D 0x00000000                                                 =
      =20
sramsize    =3D 0x00000000                                                 =
      =20
bootflags   =3D 0x00000000                                                 =
      =20
intfreq     =3D    400 MHz                                                 =
      =20
busfreq     =3D    266 MHz                                                 =
      =20
ethaddr     =3D 00:00:00:00:00:00                                          =
      =20
IP addr     =3D 0.0.0.0                                                    =
      =20
baudrate    =3D 115200 bps                                                 =
      =20
Boot reached stage 14                                                      =
    =20
No initrd                                                                  =
    =20
## Transferring control to Linux (at address 00000000) ...                 =
    =20
Boot reached stage 15                                                      =
    =20
id mach(): done                                                            =
    =20
MMU:enter                                                                  =
    =20
MMU:hw init                                                                =
    =20
MMU:mapin                                                                  =
    =20
MMU:setio                                                                  =
    =20
MMU:exit                                                                   =
    =20
setup_arch: enter                                                          =
    =20
setup_arch: bootmem                                                        =
    =20
arch: exit                                                                 =
    =20
=E0=E0=E0=E0=E0=E0                                             =20

-Shawn.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
  2005-08-11 22:41 What's wrong with the serial port? Shawn Jin
@ 2005-08-11 23:14 ` Eugene Surovegin
  2005-08-11 23:17   ` Eugene Surovegin
  2005-08-17  1:53 ` Shawn Jin
  1 sibling, 1 reply; 7+ messages in thread
From: Eugene Surovegin @ 2005-08-11 23:14 UTC (permalink / raw)
  To: Shawn Jin; +Cc: ppcembed

On Thu, Aug 11, 2005 at 03:41:21PM -0700, Shawn Jin wrote:
> Hi,
> 
> I'm porting linux 2.6.11.4 to a custom SoC with ppc440 core. The UART
> is 16550 compatible. U-Boot is already running fine.
> 
> When the kernel is booting, it gets to the point where console_init()
> is called, which calls individual early console initialization
> functions. In my case it's serial8250_console_init(). Before
> register_console() is called in serial8250_console_init(), everything
> seems fine because the debugging logs are printed on the serial port.
> But once register_console() is called, the serial port continues
> spitting out ?. See the following message. What's wrong?
> 
> Any hints are appreciated!
> 
> Boot reached stage 4                                                            
> Boot reached stage 5                                                            
> Boot reached stage 6                                                            
> OK                                                                              
> Boot reached stage 7                                                            
> Boot reached stage 8                                                            
> ## Current stack ends at 0x01FC6B80 => set upper limit to 0x00800000            
> ## cmdline at 0x007FFF00 ... 0x007FFF10                                         
> bd address  = 0x01FC6F90                                                        
> memstart    = 0x00000000                                                        
> memsize     = 0x02000000                                                        
> flashstart  = 0x00000000                                                        
> flashsize   = 0x00000000                                                        
> flashoffset = 0x00000000                                                        
> sramstart   = 0x00000000                                                        
> sramsize    = 0x00000000                                                        
> bootflags   = 0x00000000                                                        
> intfreq     =    400 MHz                                                        
> busfreq     =    266 MHz                                                        
> ethaddr     = 00:00:00:00:00:00                                                 
> IP addr     = 0.0.0.0                                                           
> baudrate    = 115200 bps                                                        
> Boot reached stage 14                                                           
> No initrd                                                                       
> ## Transferring control to Linux (at address 00000000) ...                      
> Boot reached stage 15                                                           
> id mach(): done                                                                 
> MMU:enter                                                                       
> MMU:hw init                                                                     
> MMU:mapin                                                                       
> MMU:setio                                                                       
> MMU:exit                                                                        
> setup_arch: enter                                                               
> setup_arch: bootmem                                                             
> arch: exit                                                                      
> ??????                                              

Try disabling early text debugging (all that "MMU:..." stuff).

-- 
Eugene

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
  2005-08-11 23:14 ` Eugene Surovegin
@ 2005-08-11 23:17   ` Eugene Surovegin
  2005-08-12 21:28     ` Shawn Jin
  0 siblings, 1 reply; 7+ messages in thread
From: Eugene Surovegin @ 2005-08-11 23:17 UTC (permalink / raw)
  To: Shawn Jin, ppcembed

On Thu, Aug 11, 2005 at 04:14:54PM -0700, Eugene Surovegin wrote:
> > MMU:exit                                                                        
> > setup_arch: enter                                                               
> > setup_arch: bootmem                                                             
> > arch: exit                                                                      
> > ??????                                              
> 
> Try disabling early text debugging (all that "MMU:..." stuff).
> 

Also, make sure you pass correct "console=..." line to the kernel 
(with correct device name and baud rate).

-- 
Eugene

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
@ 2005-08-12  5:01 Debora Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Debora Liu @ 2005-08-12  5:01 UTC (permalink / raw)
  To: Shawn Jin; +Cc: Linuxppc-embedded

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

Hello, Shawn Jin

In message <2005-08-12 06:41:21 shawnxjin@gmail.com> you wrote:

>Hi,
>
>I'm porting linux 2.6.11.4 to a custom SoC with ppc440 core. The UART
>is 16550 compatible. U-Boot is already running fine.

Please check your uboot bootargs console rate setting.

= = = = = = = = = = = = = = = = = = = =
				 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Debora Liu
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡deboralh@fel.com.cn
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-08-12

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
  2005-08-11 23:17   ` Eugene Surovegin
@ 2005-08-12 21:28     ` Shawn Jin
  2005-08-12 21:38       ` Shawn Jin
  0 siblings, 1 reply; 7+ messages in thread
From: Shawn Jin @ 2005-08-12 21:28 UTC (permalink / raw)
  To: ppcembed

On 8/11/05, Eugene Surovegin <ebs@ebshome.net> wrote:
> On Thu, Aug 11, 2005 at 04:14:54PM -0700, Eugene Surovegin wrote:
> > > MMU:exit
> > > setup_arch: enter
> > > setup_arch: bootmem
> > > arch: exit
> > > ??????
> >
> > Try disabling early text debugging (all that "MMU:..." stuff).
> >
>=20
> Also, make sure you pass correct "console=3D..." line to the kernel
> (with correct device name and baud rate).

After early text debugging is disabled and the correct "console=3DttyS0,
115200" option is passed to kernel, the problem still exists. Also I'm
sure the divisor set to UART is also correct because they are the same
values when U-Boot sets up the port.

Has the serial port enabled interrupt so far at this stage?

Thanks,
-Shawn.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
  2005-08-12 21:28     ` Shawn Jin
@ 2005-08-12 21:38       ` Shawn Jin
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Jin @ 2005-08-12 21:38 UTC (permalink / raw)
  To: ppcembed

> Has the serial port enabled interrupt so far at this stage?

Don't bother. I found the answer. console_init() is before
local_irq_enable(). So no interrupt is enabled before
local_irq_enable().

-Shawn.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: What's wrong with the serial port?
  2005-08-11 22:41 What's wrong with the serial port? Shawn Jin
  2005-08-11 23:14 ` Eugene Surovegin
@ 2005-08-17  1:53 ` Shawn Jin
  1 sibling, 0 replies; 7+ messages in thread
From: Shawn Jin @ 2005-08-17  1:53 UTC (permalink / raw)
  To: ppcembed

> When the kernel is booting, it gets to the point where console_init()
> is called, which calls individual early console initialization
> functions. In my case it's serial8250_console_init(). Before
> register_console() is called in serial8250_console_init(), everything
> seems fine because the debugging logs are printed on the serial port.
> But once register_console() is called, the serial port continues
> spitting out =E0. See the following message. What's wrong?

FYI. The problem was caused by the endianess of io mem access. My
16550-compatible uart port is on a 32-bit bus. The io mem is big
endian. The current serial8250 driver always call read*/write*() to
access uart control registers. These functions are implemented for
little endian access only. So I have to add some awful #ifdef in the
driver to call big endian access functions.

Regards,
-Shawn.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-17  1:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 22:41 What's wrong with the serial port? Shawn Jin
2005-08-11 23:14 ` Eugene Surovegin
2005-08-11 23:17   ` Eugene Surovegin
2005-08-12 21:28     ` Shawn Jin
2005-08-12 21:38       ` Shawn Jin
2005-08-17  1:53 ` Shawn Jin
  -- strict thread matches above, loose matches on Subject: below --
2005-08-12  5:01 Debora Liu

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).