How to use earlycon and earlyprintk on Samsung S3C24xx

victorascroft at gmail.com victorascroft at gmail.com
Wed Mar 2 00:38:56 EST 2016


Hi,

On 16-03-01 21:07:09, Woody Wu wrote:
> On Friday, February 26, 2016, <victorascroft at gmail.com> wrote:
> 
> > Hi,
> >
> > On 16-02-26 00:55:40, Woody Wu wrote:
> > > Hi,
> > >
> > > It seems, at least in 4.4.2 kernel, earlyprintk parameter supports
> > > something like 's3c24xx,<addr>'. But I dont know where to find out the
> > addr
> > > value of the first uart port on my *s3c2416* based board.  Can someone
> > > please tell me?
> > >
> > > Also, I desire to know if the earlycon parameter supports the Samsung
> > > S3C24xx uarts, if so, what should the value of the parameter look like?
> >
> > Have a look in the documentation here
> > https://www.kernel.org/doc/Documentation/kernel-parameters.txt
> >
> > The kernels kernel-parameter.txt documentation file lists the supported
> > drivers.
> >
> > Generally the UART0 port is used for debugging but I guess there is
> > no such hard and fast rule.
> >
> > For your particular board, you can check which UART port is used
> > as the debug serial console and then get the address for the concerned
> > UART by checking the relevant dtsi file in
> > arch/arm/boot/dts/s3c24xx.dtsi or perhaps one of the exynosX.dtsi files?
> >
> > UART0 port seems to have address of 0x50000000?
> >
> > Regards,
> > Sanchayan.
> 
> 
> Thanks for you pointing me to the dtsi files, very informational ! And,
> yes, the uart0 address os 0x50000000 and I has made it work via
> 'earlyprintk=serial,0x50000000,115200'.  By the way, is this a physical
> address or mmap-ed address?

The addresses specified in the DTS files are always physical addresses. So
0x50000000 is a physical address. This address will be mapped using one of
the ioremap calls by the driver and used further by kernel using readl/writel
calls.

You can see the earlycon support declaration here
http://lxr.free-electrons.com/source/drivers/tty/serial/samsung.c#L2452

s3c24xx_serial_probe
-->s3c24xx_serial_init_port
---->Call to devm_ioremap

http://lxr.free-electrons.com/source/drivers/tty/serial/samsung.c#L1705

- Sanchayan.


> 
> >
> > >
> > > Thank in advance,
> > >
> > > -woody
> > >
> > >
> > > --
> > > Life is the only flaw in an otherwise perfect nonexistence
> > >     -- Schopenhauer
> > >
> > > woody
> > > public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com
> > <javascript:;>)
> >
> > > _______________________________________________
> > > Kernelnewbies mailing list
> > > Kernelnewbies at kernelnewbies.org <javascript:;>
> > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
> >
> 
> -- 
> Life is the only flaw in an otherwise perfect nonexistence
>     -- Schopenhauer
> 
> woody
> public key at http://subkeys.pgp.net:11371 (narkewoody at gmail.com)



More information about the Kernelnewbies mailing list