public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] UART2 Console in u-boot
@ 2009-04-17  8:28 prathika
  2009-04-17  9:07 ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: prathika @ 2009-04-17  8:28 UTC (permalink / raw)
  To: u-boot

hi all,
this might a little silly question. but still wanted to confirm with you 
all.

i  have a board with PPC440 EP where I load u-boot configuring for 
yosemite as my design is similar to that.
I want the console to configured for the UART's second channel.
Is it enough if I change the base address to second channel..Because 
there are UART base address defined only for UART0 and UART1 even if 
CONFIG_SERIAL_MULTI is defined.

Some one please clarify my doubt.

Thanks & Regards,
Prathika R

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

* [U-Boot] UART2 Console in u-boot
  2009-04-17  8:28 [U-Boot] UART2 Console in u-boot prathika
@ 2009-04-17  9:07 ` Stefan Roese
  2009-04-17  9:27   ` prathika
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2009-04-17  9:07 UTC (permalink / raw)
  To: u-boot

On Friday 17 April 2009, prathika wrote:
> this might a little silly question. but still wanted to confirm with you
> all.
>
> i  have a board with PPC440 EP where I load u-boot configuring for
> yosemite as my design is similar to that.

You shouldn't just change an existing board configuration but port U-Boot to 
your board. In nearly all cases the differences to the eval boards are too 
big to just change things in the eval board files. And you have no chance of 
upstream acceptance this way.

> I want the console to configured for the UART's second channel.
> Is it enough if I change the base address to second channel.

No, please don't! Because...

> Because 
> there are UART base address defined only for UART0 and UART1 even if
> CONFIG_SERIAL_MULTI is defined.
>
> Some one please clarify my doubt.

This should do what you need. Add this to your board config header:

#define CONFIG_UART1_CONSOLE

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] UART2 Console in u-boot
  2009-04-17  9:07 ` Stefan Roese
@ 2009-04-17  9:27   ` prathika
  2009-04-17  9:37     ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: prathika @ 2009-04-17  9:27 UTC (permalink / raw)
  To: u-boot

hi,
Thanks for that reply.
i have ported u-boot this way to my board with few changes in the u-boot 
source code and the board is up and i have tested stand alone 
application execution also.

Now as my requirement is that my console should be on UART2 as my UART0 
and UART1 are coming out as RS 422 lines and only UART2 is RS232. I did 
some patch up work on UART0 lines and tested my u-boot porting.

I added a line

#define UART2_BASE	CFG_PERIPHERAL_BASE + 0x500

I have now changed as below and I commented checking for #define 
UART0_CONSOLE and #define UART1_CONSOLE:

#define UARTBASE	UART2_BASE

Is this OK??

Thanks & Regards,
Prathika R

Stefan Roese wrote:
> On Friday 17 April 2009, prathika wrote:
>> this might a little silly question. but still wanted to confirm with you
>> all.
>>
>> i  have a board with PPC440 EP where I load u-boot configuring for
>> yosemite as my design is similar to that.
> 
> You shouldn't just change an existing board configuration but port U-Boot to 
> your board. In nearly all cases the differences to the eval boards are too 
> big to just change things in the eval board files. And you have no chance of 
> upstream acceptance this way.
> 
>> I want the console to configured for the UART's second channel.
>> Is it enough if I change the base address to second channel.
> 
> No, please don't! Because...
> 
>> Because 
>> there are UART base address defined only for UART0 and UART1 even if
>> CONFIG_SERIAL_MULTI is defined.
>>
>> Some one please clarify my doubt.
> 
> This should do what you need. Add this to your board config header:
> 
> #define CONFIG_UART1_CONSOLE
> 
> Best regards,
> Stefan
> 
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> =====================================================================

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

* [U-Boot] UART2 Console in u-boot
  2009-04-17  9:27   ` prathika
@ 2009-04-17  9:37     ` Stefan Roese
  2009-04-20  3:50       ` prathika
  2009-04-25  4:10       ` prathika
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Roese @ 2009-04-17  9:37 UTC (permalink / raw)
  To: u-boot

On Friday 17 April 2009, prathika wrote:
> i have ported u-boot this way to my board with few changes in the u-boot
> source code and the board is up and i have tested stand alone
> application execution also.

So you did a "real" board port to your custom board? Or did you "just" change 
the yosemite files?

> Now as my requirement is that my console should be on UART2 as my UART0
> and UART1 are coming out as RS 422 lines and only UART2 is RS232. I did
> some patch up work on UART0 lines and tested my u-boot porting.

Ah, I though you wanted the console on UART1. Ok, then my solution does not 
work for you.

> I added a line
>
> #define UART2_BASE	CFG_PERIPHERAL_BASE + 0x500
>
> I have now changed as below and I commented checking for #define
> UART0_CONSOLE and #define UART1_CONSOLE:
>
> #define UARTBASE	UART2_BASE
>
> Is this OK??

Best would be to add the 3rd UART (UART2) to the SERIAL_MULTI infrastructure 
(see end of serial.c) and use this device as "stdin/stdout/.." in your 
default environment.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot] UART2 Console in u-boot
  2009-04-17  9:37     ` Stefan Roese
@ 2009-04-20  3:50       ` prathika
  2009-04-25  4:10       ` prathika
  1 sibling, 0 replies; 7+ messages in thread
From: prathika @ 2009-04-20  3:50 UTC (permalink / raw)
  To: u-boot

hi stefan,

i made just changed few things in yosemite files and it worked for 
me.........
you have mentioned to use UART2 device as "stdin/stdout/..." in my 
default environment...
where can i mention my default stdin and stdout....

Thanks & Regards,
Prathika R

Stefan Roese wrote:
> On Friday 17 April 2009, prathika wrote:
>> i have ported u-boot this way to my board with few changes in the u-boot
>> source code and the board is up and i have tested stand alone
>> application execution also.
> 
> So you did a "real" board port to your custom board? Or did you "just" change 
> the yosemite files?
> 
>> Now as my requirement is that my console should be on UART2 as my UART0
>> and UART1 are coming out as RS 422 lines and only UART2 is RS232. I did
>> some patch up work on UART0 lines and tested my u-boot porting.
> 
> Ah, I though you wanted the console on UART1. Ok, then my solution does not 
> work for you.
> 
>> I added a line
>>
>> #define UART2_BASE	CFG_PERIPHERAL_BASE + 0x500
>>
>> I have now changed as below and I commented checking for #define
>> UART0_CONSOLE and #define UART1_CONSOLE:
>>
>> #define UARTBASE	UART2_BASE
>>
>> Is this OK??
> 
> Best would be to add the 3rd UART (UART2) to the SERIAL_MULTI infrastructure 
> (see end of serial.c) and use this device as "stdin/stdout/.." in your 
> default environment.
> 
> Best regards,
> Stefan
> 
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> =====================================================================

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

* [U-Boot] UART2 Console in u-boot
  2009-04-17  9:37     ` Stefan Roese
  2009-04-20  3:50       ` prathika
@ 2009-04-25  4:10       ` prathika
  2009-04-25  6:31         ` prathika
  1 sibling, 1 reply; 7+ messages in thread
From: prathika @ 2009-04-25  4:10 UTC (permalink / raw)
  To: u-boot

hi,

i did add the UART2 in the serial multi infrastructure at the end of my 
serial.c.
i have also configured GPIO registers for enabling UART2 Tx and Rx lines.
As I understand, these lines are also multiplexed with the boot strap 
lines of the PowerPC 440EP. Will this create any issue in the performance?
As I already mentioned I have enabled #define CONFIG_UART2_CONSOLE and

#define UART2_BASE	CFG_PERIPHERAL_BASE + 0x500

You have mentioned to enable the UART2 as default stdin and stdout...where do I enable that??

Thanks & Regards,
Prathika R


Stefan Roese wrote:
> On Friday 17 April 2009, prathika wrote:
>   
>> i have ported u-boot this way to my board with few changes in the u-boot
>> source code and the board is up and i have tested stand alone
>> application execution also.
>>     
>
> So you did a "real" board port to your custom board? Or did you "just" change 
> the yosemite files?
>
>   
>> Now as my requirement is that my console should be on UART2 as my UART0
>> and UART1 are coming out as RS 422 lines and only UART2 is RS232. I did
>> some patch up work on UART0 lines and tested my u-boot porting.
>>     
>
> Ah, I though you wanted the console on UART1. Ok, then my solution does not 
> work for you.
>
>   
>> I added a line
>>
>> #define UART2_BASE	CFG_PERIPHERAL_BASE + 0x500
>>
>> I have now changed as below and I commented checking for #define
>> UART0_CONSOLE and #define UART1_CONSOLE:
>>
>> #define UARTBASE	UART2_BASE
>>
>> Is this OK??
>>     
>
> Best would be to add the 3rd UART (UART2) to the SERIAL_MULTI infrastructure 
> (see end of serial.c) and use this device as "stdin/stdout/.." in your 
> default environment.
>
> Best regards,
> Stefan
>
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> =====================================================================
>   

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

* [U-Boot] UART2 Console in u-boot
  2009-04-25  4:10       ` prathika
@ 2009-04-25  6:31         ` prathika
  0 siblings, 0 replies; 7+ messages in thread
From: prathika @ 2009-04-25  6:31 UTC (permalink / raw)
  To: u-boot

hi,
I got things working on UART2 as console....but i still have issues in 
relocating..
its problem in my hardware...so things are going on well...
thank u Mr.Stefan for the help extended........

Thanks & Regards,
Prathika R


prathika wrote:
> hi,
>
> i did add the UART2 in the serial multi infrastructure at the end of 
> my serial.c.
> i have also configured GPIO registers for enabling UART2 Tx and Rx lines.
> As I understand, these lines are also multiplexed with the boot strap 
> lines of the PowerPC 440EP. Will this create any issue in the 
> performance?
> As I already mentioned I have enabled #define CONFIG_UART2_CONSOLE and
>
> #define UART2_BASE    CFG_PERIPHERAL_BASE + 0x500
>
> You have mentioned to enable the UART2 as default stdin and 
> stdout...where do I enable that??
>
> Thanks & Regards,
> Prathika R
>
>
> Stefan Roese wrote:
>> On Friday 17 April 2009, prathika wrote:
>>  
>>> i have ported u-boot this way to my board with few changes in the 
>>> u-boot
>>> source code and the board is up and i have tested stand alone
>>> application execution also.
>>>     
>>
>> So you did a "real" board port to your custom board? Or did you 
>> "just" change the yosemite files?
>>
>>  
>>> Now as my requirement is that my console should be on UART2 as my UART0
>>> and UART1 are coming out as RS 422 lines and only UART2 is RS232. I did
>>> some patch up work on UART0 lines and tested my u-boot porting.
>>>     
>>
>> Ah, I though you wanted the console on UART1. Ok, then my solution 
>> does not work for you.
>>
>>  
>>> I added a line
>>>
>>> #define UART2_BASE    CFG_PERIPHERAL_BASE + 0x500
>>>
>>> I have now changed as below and I commented checking for #define
>>> UART0_CONSOLE and #define UART1_CONSOLE:
>>>
>>> #define UARTBASE    UART2_BASE
>>>
>>> Is this OK??
>>>     
>>
>> Best would be to add the 3rd UART (UART2) to the SERIAL_MULTI 
>> infrastructure (see end of serial.c) and use this device as 
>> "stdin/stdout/.." in your default environment.
>>
>> Best regards,
>> Stefan
>>
>> =====================================================================
>> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
>> =====================================================================
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>   

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

end of thread, other threads:[~2009-04-25  6:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17  8:28 [U-Boot] UART2 Console in u-boot prathika
2009-04-17  9:07 ` Stefan Roese
2009-04-17  9:27   ` prathika
2009-04-17  9:37     ` Stefan Roese
2009-04-20  3:50       ` prathika
2009-04-25  4:10       ` prathika
2009-04-25  6:31         ` prathika

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox