public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] sequoia uarts
@ 2008-08-01 20:19 Steven A. Falco
  2008-08-01 20:30 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Steven A. Falco @ 2008-08-01 20:19 UTC (permalink / raw)
  To: u-boot

I have verified that the Sequoia (440EPx) does not have its UARTs
properly configured.  The attached patch corrects this by setting three
bits in SDR0_PFC1 to enable 4-wire mode, and to select cts/rts
functionality for the UARTs.  Also, I modified the GPIO settings for
pins 34-37 to conform to the tables in section 31 of the 440EPx users
manual.

Here is a dump of the registers once the patch was made.  I've verified
that these match the users manual.  Also, my Sequoia board works. :-)

=> getidcr e.f 4101
000e.000f-4101 Read  034c100f
=> md.l ef600c00 1
ef600c00: 00000000    ....
=> md.l ef600c04 1
ef600c04: d6000000    ....
=> md.l ef600c08 1
ef600c08: 52180000    R...
=> md.l ef600c10 1
ef600c10: 00000000    ....
=>  md.l ef600c40 1
ef600c40: 00000000    ....
=> md.l ef600c38 1
ef600c38: 04010000    ....
=>  md.l ef600c30 1
ef600c30: 00405550    . at UP

    Signed-off-by: Steven A. Falco <sfalco@harris.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sequoia.patch
Type: text/x-patch
Size: 2521 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080801/f196eceb/attachment.bin 

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

* [U-Boot-Users] [PATCH] sequoia uarts
  2008-08-01 20:19 [U-Boot-Users] [PATCH] sequoia uarts Steven A. Falco
@ 2008-08-01 20:30 ` Wolfgang Denk
  2008-08-04 13:45   ` Steven A. Falco
  2008-08-06  9:46   ` Stefan Roese
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-08-01 20:30 UTC (permalink / raw)
  To: u-boot

In message <48936FD4.3010802@harris.com> you wrote:
> 
> I have verified that the Sequoia (440EPx) does not have its UARTs
> properly configured.  The attached patch corrects this by setting three
> bits in SDR0_PFC1 to enable 4-wire mode, and to select cts/rts
> functionality for the UARTs.  Also, I modified the GPIO settings for

We definitely do NOT want any hardware handshake on the serial
console. Never.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I'm frequently appalled by the low regard you Earthmen have for life.
	-- Spock, "The Galileo Seven", stardate 2822.3

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

* [U-Boot-Users] [PATCH] sequoia uarts
  2008-08-01 20:30 ` Wolfgang Denk
@ 2008-08-04 13:45   ` Steven A. Falco
  2008-08-06  9:46   ` Stefan Roese
  1 sibling, 0 replies; 6+ messages in thread
From: Steven A. Falco @ 2008-08-04 13:45 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <48936FD4.3010802@harris.com> you wrote:
>   
>> I have verified that the Sequoia (440EPx) does not have its UARTs
>> properly configured.  The attached patch corrects this by setting three
>> bits in SDR0_PFC1 to enable 4-wire mode, and to select cts/rts
>> functionality for the UARTs.  Also, I modified the GPIO settings for
>>     
>
> We definitely do NOT want any hardware handshake on the serial
> console. Never.
>
> Best regards,
>
> Wolfgang Denk
>   

Perhaps my comments were not clear.  Please let me try again:  The
schematic for the Sequoia shows two uarts.  U-boot leaves the
SDR0_PFC1[U0IM] bit cleared to 0, which means that the 440EPx will only
have one uart, operating in 8-wire mode.  So, U-boot does not set the
CPU to the correct mode to enable two uarts.  This is independent of
whether you want RTS/CTS or not, and as far as I can see, it must be
fixed if both uart ports are going to work.

This also applies to the GPIOs.  They are not set correctly to connect
the uarts to the I/O pins - the wrong functions and polarities are
selected.  This too is dictated by the schematic.  The wires go where
they go, and the GPIOs should be configured to match the schematic (or
the schematic should be changed to match the software, but we know that
isn't going to happen).  :-)

The remaining point is the SDR0_PFC1[U0ME] and SDR0_PFC1[U1ME] bits,
which determine whether the control signals are RTS/CTS or DCD/DSR. 
These signals are wired to the DB-9 jacks on pins 7 and 8.  According to
the RS232 standard, these pins are RTS/CTS, and there is nothing
software can do to change their meaning.

So, I believe my patch should be applied as written, so that the
software and hardware agree as to function.

That said, /what we choose to do with the lines is up to us/.  If we
don't want to enable RTS/CTS processing in the drivers, that is fine. 
We can leave the function disabled.  But the hardware registers must be
configured to at least match the schematic wiring.  Anything else makes
no sense.

    Steve



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080804/9ff8422c/attachment.htm 

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

* [U-Boot-Users] [PATCH] sequoia uarts
  2008-08-01 20:30 ` Wolfgang Denk
  2008-08-04 13:45   ` Steven A. Falco
@ 2008-08-06  9:46   ` Stefan Roese
  2008-08-06 13:14     ` Steven A. Falco
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Roese @ 2008-08-06  9:46 UTC (permalink / raw)
  To: u-boot

On Friday 01 August 2008, Wolfgang Denk wrote:
> In message <48936FD4.3010802@harris.com> you wrote:
> > I have verified that the Sequoia (440EPx) does not have its UARTs
> > properly configured.  The attached patch corrects this by setting three
> > bits in SDR0_PFC1 to enable 4-wire mode, and to select cts/rts
> > functionality for the UARTs.  Also, I modified the GPIO settings for
>
> We definitely do NOT want any hardware handshake on the serial
> console. Never.

Ack, we don't want hardware handshake enabled in U-Boot. But if I understand 
this correctly, then this patch from Steven configures the RTS/CTS lines 
correctly (they are multiplexed with other signals), so that they *can* be 
used by the OS if needed. It doesn't enable hardware handshake in U-Boot.

Steven please correct me if I am wrong here.

Thanks.

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] 6+ messages in thread

* [U-Boot-Users] [PATCH] sequoia uarts
  2008-08-06  9:46   ` Stefan Roese
@ 2008-08-06 13:14     ` Steven A. Falco
  2008-08-06 14:55       ` Stefan Roese
  0 siblings, 1 reply; 6+ messages in thread
From: Steven A. Falco @ 2008-08-06 13:14 UTC (permalink / raw)
  To: u-boot

Stefan Roese wrote:
> On Friday 01 August 2008, Wolfgang Denk wrote:
>   
>> In message <48936FD4.3010802@harris.com> you wrote:
>>     
>>> I have verified that the Sequoia (440EPx) does not have its UARTs
>>> properly configured.  The attached patch corrects this by setting three
>>> bits in SDR0_PFC1 to enable 4-wire mode, and to select cts/rts
>>> functionality for the UARTs.  Also, I modified the GPIO settings for
>>>       
>> We definitely do NOT want any hardware handshake on the serial
>> console. Never.
>>     
>
> Ack, we don't want hardware handshake enabled in U-Boot. But if I understand 
> this correctly, then this patch from Steven configures the RTS/CTS lines 
> correctly (they are multiplexed with other signals), so that they *can* be 
> used by the OS if needed. It doesn't enable hardware handshake in U-Boot.
>
> Steven please correct me if I am wrong here.
>   

You are correct.  The patch simply configures the lines to match the
schematic - it does not activate hardware handshake within U-Boot.

    Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080806/4056618c/attachment.htm 

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

* [U-Boot-Users] [PATCH] sequoia uarts
  2008-08-06 13:14     ` Steven A. Falco
@ 2008-08-06 14:55       ` Stefan Roese
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Roese @ 2008-08-06 14:55 UTC (permalink / raw)
  To: u-boot

On Wednesday 06 August 2008, Steven A. Falco wrote:
> > Ack, we don't want hardware handshake enabled in U-Boot. But if I
> > understand this correctly, then this patch from Steven configures the
> > RTS/CTS lines correctly (they are multiplexed with other signals), so
> > that they *can* be used by the OS if needed. It doesn't enable hardware
> > handshake in U-Boot.
> >
> > Steven please correct me if I am wrong here.
>
> You are correct.  The patch simply configures the lines to match the
> schematic - it does not activate hardware handshake within U-Boot.

Could you please send a git formatted patch (git-format-patch and 
git-send-email are your friends here :)) with a patch description and a 
signed-off-by line? This makes it easier for me to apply this patch.

Thanks.

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] 6+ messages in thread

end of thread, other threads:[~2008-08-06 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 20:19 [U-Boot-Users] [PATCH] sequoia uarts Steven A. Falco
2008-08-01 20:30 ` Wolfgang Denk
2008-08-04 13:45   ` Steven A. Falco
2008-08-06  9:46   ` Stefan Roese
2008-08-06 13:14     ` Steven A. Falco
2008-08-06 14:55       ` Stefan Roese

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