All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] serial init
@ 2010-03-18 10:33 Valentin Ecker
  2010-03-18 11:31 ` Michael Zaidman
  0 siblings, 1 reply; 8+ messages in thread
From: Valentin Ecker @ 2010-03-18 10:33 UTC (permalink / raw)
  To: u-boot

Hi!

I have some problems with understanding the serial initialization.  
Maybe someone can help me out here...

In my case I want to use a second serial console on a DM365 davinci  
dvevm which is provided on an external chip through EMIF. The use case  
would be then to switch from the internal SoC serial (ns16550) to the  
second external console and back during runtime.

So here is my question:

While board initialization, serial_init() gets called, which calls the  
driver specific (hardware, etc...) init stuff. The default is that the  
default serial (in my case the SoC ns16550 ) will be initialized. So  
my extra serial port stays uninitialized because it's not default.

When i switch stdout/stdin/stderr to the second serial port during  
runtime, serial_assign() gets called, but without calling serial_init 
() of the second serial port first.

This confuses me, or am I misunderstanding the architecture / how  
serial interfaces work in uboot?


Thanks for your help,
Valentin

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

* [U-Boot] serial init
  2010-03-18 10:33 [U-Boot] serial init Valentin Ecker
@ 2010-03-18 11:31 ` Michael Zaidman
  2010-03-18 12:21   ` Valentin Ecker
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Zaidman @ 2010-03-18 11:31 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 18, 2010 at 12:33 PM, Valentin Ecker
<valentin.ecker.dev@gmail.com> wrote:
...
> While board initialization, serial_init() gets called, which calls the
> driver specific (hardware, etc...) init stuff. The default is that the
> default serial (in my case the SoC ns16550 ) will be initialized. So
> my extra serial port stays uninitialized because it's not default.
Did you add the CONFIG_SYS_NS16550_COM2 in your board
configuration file?

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

* [U-Boot] serial init
  2010-03-18 11:31 ` Michael Zaidman
@ 2010-03-18 12:21   ` Valentin Ecker
  2010-03-18 14:37     ` Michael Zaidman
  0 siblings, 1 reply; 8+ messages in thread
From: Valentin Ecker @ 2010-03-18 12:21 UTC (permalink / raw)
  To: u-boot

well, i don't want to use the second com port of the ns16550. Im using  
an external serial chip over EMIF.
so -> no, i don't, wouldn't make any sense to me...

thx for the help


On 18.03.2010, at 12:31, Michael Zaidman wrote:

> On Thu, Mar 18, 2010 at 12:33 PM, Valentin Ecker
> <valentin.ecker.dev@gmail.com> wrote:
> ...
>> While board initialization, serial_init() gets called, which calls  
>> the
>> driver specific (hardware, etc...) init stuff. The default is that  
>> the
>> default serial (in my case the SoC ns16550 ) will be initialized. So
>> my extra serial port stays uninitialized because it's not default.
> Did you add the CONFIG_SYS_NS16550_COM2 in your board
> configuration file?

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

* [U-Boot] serial init
  2010-03-18 12:21   ` Valentin Ecker
@ 2010-03-18 14:37     ` Michael Zaidman
  2010-03-18 14:58       ` Valentin Ecker
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Zaidman @ 2010-03-18 14:37 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 18, 2010 at 2:21 PM, Valentin Ecker
<valentin.ecker.dev@gmail.com> wrote:
> well, i don't want to use the second com port of the ns16550. Im using an
> external serial chip over EMIF.

I am not familiar with Davinci architecture and probably my case is
completely different from yours but on our board we have dual uart on
mpc8349 chip + external quad uart ns16554 chip connected via local
bus. The current u-boot code supports up to 4  ns16550 devices, i.e.
from COM1 to COM4. So I extended the serial_ports array to 6 entries
and in this way got ability to communicate via COM5 and COM6.

Michael.

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

* [U-Boot] serial init
  2010-03-18 14:37     ` Michael Zaidman
@ 2010-03-18 14:58       ` Valentin Ecker
  2010-03-18 15:23         ` Michael Zaidman
  0 siblings, 1 reply; 8+ messages in thread
From: Valentin Ecker @ 2010-03-18 14:58 UTC (permalink / raw)
  To: u-boot

I see...I think we have a very similar setup, and I see how you init  
your ports. Although I'm not sure if this is suitable for me, since  
editing the ns16550-files to support/init an external COM-chip is not  
a really clean/nice implementation.

I'm not sure if there is any way to implement this in a nice way. But  
I will let you know if we find something ;)

thx for your help!
Valentin

On 18.03.2010, at 15:37, Michael Zaidman wrote:

> On Thu, Mar 18, 2010 at 2:21 PM, Valentin Ecker
> <valentin.ecker.dev@gmail.com> wrote:
>> well, i don't want to use the second com port of the ns16550. Im  
>> using an
>> external serial chip over EMIF.
>
> I am not familiar with Davinci architecture and probably my case is
> completely different from yours but on our board we have dual uart on
> mpc8349 chip + external quad uart ns16554 chip connected via local
> bus. The current u-boot code supports up to 4  ns16550 devices, i.e.
> from COM1 to COM4. So I extended the serial_ports array to 6 entries
> and in this way got ability to communicate via COM5 and COM6.
>
> Michael.

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

* [U-Boot] serial init
  2010-03-18 14:58       ` Valentin Ecker
@ 2010-03-18 15:23         ` Michael Zaidman
  2010-03-22 15:23           ` Michael Zaidman
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Zaidman @ 2010-03-18 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 18, 2010 at 4:58 PM, Valentin Ecker
<valentin.ecker.dev@gmail.com> wrote:
> I see...I think we have a very similar setup, and I see how you init your
> ports. Although I'm not sure if this is suitable for me, since editing the
> ns16550-files to support/init an external COM-chip is not a really
> clean/nice implementation.
>
> I'm not sure if there is any way to implement this in a nice way. But I will
> let you know if we find something ;)
>
I implemented it first in board specific code. It added small code
overhead due to necessity to duplicate the serial_ports array and add
uart_init for ports higher then 4. Afterwards, I implemented the same
in common code. Extending the original serial_ports array makes the
code more generic. I also added serial loopback tests availible via
CLI and POST. I am going to post this patch on u-boot-list promptly.

Michael.

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

* [U-Boot] serial init
  2010-03-18 15:23         ` Michael Zaidman
@ 2010-03-22 15:23           ` Michael Zaidman
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Zaidman @ 2010-03-22 15:23 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 18, 2010 at 5:23 PM, Michael Zaidman
<michael.zaidman@gmail.com> wrote:
> On Thu, Mar 18, 2010 at 4:58 PM, Valentin Ecker
> <valentin.ecker.dev@gmail.com> wrote:
>> I see...I think we have a very similar setup, and I see how you init your
>> ports. Although I'm not sure if this is suitable for me, since editing the
>> ns16550-files to support/init an external COM-chip is not a really
>> clean/nice implementation.
>>
>> I'm not sure if there is any way to implement this in a nice way. But I will
>> let you know if we find something ;)
>>
> I implemented it first in board specific code. It added small code
> overhead due to necessity to duplicate the serial_ports array and add
> uart_init for ports higher then 4. Afterwards, I implemented the same
> in common code. Extending the original serial_ports array makes the
> code more generic. I also added serial loopback tests availible via
> CLI and POST. I am going to post this patch on u-boot-list promptly.
>
> Michael.
>

Link to the patches:
http://lists.denx.de/pipermail/u-boot/2010-March/068796.html
http://lists.denx.de/pipermail/u-boot/2010-March/068797.html

Any comments/suggestions/objections?

Regards,
Michael

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

* [U-Boot] Serial init
@ 2014-03-26 11:39 ramya
  0 siblings, 0 replies; 8+ messages in thread
From: ramya @ 2014-03-26 11:39 UTC (permalink / raw)
  To: u-boot

I am trying to do console init before dram init so that I can give inputs
from serial port and then initialize dram and bring up uboot.
But there seems to be some linnking problem. I used serial_init and checked
the makefiles. They seem to be fine. But still when I call serial_init
before dram init, I get undefined reference to serial_init error.
Please help

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

end of thread, other threads:[~2014-03-26 11:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18 10:33 [U-Boot] serial init Valentin Ecker
2010-03-18 11:31 ` Michael Zaidman
2010-03-18 12:21   ` Valentin Ecker
2010-03-18 14:37     ` Michael Zaidman
2010-03-18 14:58       ` Valentin Ecker
2010-03-18 15:23         ` Michael Zaidman
2010-03-22 15:23           ` Michael Zaidman
2014-03-26 11:39 [U-Boot] Serial init ramya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.