* [U-Boot-Users] [PATCH] PPC440: Add flow control for serial port (Third try)
@ 2007-12-03 13:17 Niklaus Giger
2007-12-17 16:33 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Niklaus Giger @ 2007-12-03 13:17 UTC (permalink / raw)
To: u-boot
This has be layouten tested on our HCU5 PPC440EPx based board, where we
have only one serial port. Changes compared to my last try are:
- HW-flow control is off by default.
- returns the correct state of the hwflow
- coding style corrected
Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
---
cpu/ppc4xx/serial.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/cpu/ppc4xx/serial.c b/cpu/ppc4xx/serial.c
index 60712b1..8f36fef 100644
--- a/cpu/ppc4xx/serial.c
+++ b/cpu/ppc4xx/serial.c
@@ -490,6 +490,31 @@ static void serial_divs (int baudrate, unsigned long *pudiv,
}
#endif /* defined(CONFIG_440) && !defined(CFG_EXT_SERIAL_CLK) */
+#if defined(CONFIG_CMD_HWFLOW) && defined(CONFIG_440) && !defined(CONFIG_SERIAL_MULTI)
+static int hwflow = 0; /* turned off by default */
+int hwflow_onoff(int on)
+{
+ switch(on) {
+ case 0:
+ default:
+ break; /* return current */
+ case 1:
+ /* The OUT2 bit may be written and read
+ * but it provides no function
+ */
+ out8(UART_BASE + UART_MCR, 0x0b);
+ hwflow = 1; /* turn on */
+ break;
+ case -1:
+ /* no modem control DTR RTS */
+ out8(UART_BASE + UART_MCR, 0x00);
+ hwflow = 0; /* turn off */
+ break;
+ }
+ return hwflow;
+}
+#endif
+
/*
* Minimal serial functions needed to use one of the SMC ports
* as serial console interface.
--
1.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot-Users] [PATCH] PPC440: Add flow control for serial port (Third try)
2007-12-03 13:17 [U-Boot-Users] [PATCH] PPC440: Add flow control for serial port (Third try) Niklaus Giger
@ 2007-12-17 16:33 ` Stefan Roese
2008-01-09 14:04 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2007-12-17 16:33 UTC (permalink / raw)
To: u-boot
On Monday 03 December 2007, Niklaus Giger wrote:
> This has be layouten tested on our HCU5 PPC440EPx based board, where we
> have only one serial port. Changes compared to my last try are:
> - HW-flow control is off by default.
> - returns the correct state of the hwflow
> - coding style corrected
I'm (finally) trying to integrate your patches into the u-boot-ppc4xx
custodian repository for upstream merge. Unfortunately my repo changed quite
a bit lately and your patches don't apply anymore. So could you please rebase
this patchset against the "for-1.3.2" branch of the 4xx repo:
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-ppc4xx.git;a=shortlog;h=for-1.3.2
I promise to commit soon so that you don't have to rework again.
Unfortunately this is valid also for this patch too:
[U-Boot-Users] PPC440EPx: Make Sequoia boot vxWorks
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] 3+ messages in thread
* [U-Boot-Users] [PATCH] PPC440: Add flow control for serial port (Third try)
2007-12-17 16:33 ` Stefan Roese
@ 2008-01-09 14:04 ` Stefan Roese
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2008-01-09 14:04 UTC (permalink / raw)
To: u-boot
Hi Niklaus,
On Monday 17 December 2007, Stefan Roese wrote:
> On Monday 03 December 2007, Niklaus Giger wrote:
> > This has be layouten tested on our HCU5 PPC440EPx based board, where we
> > have only one serial port. Changes compared to my last try are:
> > - HW-flow control is off by default.
> > - returns the correct state of the hwflow
> > - coding style corrected
>
> I'm (finally) trying to integrate your patches into the u-boot-ppc4xx
> custodian repository for upstream merge. Unfortunately my repo changed
> quite a bit lately and your patches don't apply anymore. So could you
> please rebase this patchset against the "for-1.3.2" branch of the 4xx repo:
>
> http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-ppc4xx.git;a=shortlog
>;h=for-1.3.2
>
> I promise to commit soon so that you don't have to rework again.
>
> Unfortunately this is valid also for this patch too:
>
> [U-Boot-Users] PPC440EPx: Make Sequoia boot vxWorks
Could you please re-check which patches of yours are still missing in the
current official mainline U-Boot repository? And please rebase all missing
patches and resend them. Then I'll try to get them in while we are still in
this looooong merge-window.
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] 3+ messages in thread
end of thread, other threads:[~2008-01-09 14:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 13:17 [U-Boot-Users] [PATCH] PPC440: Add flow control for serial port (Third try) Niklaus Giger
2007-12-17 16:33 ` Stefan Roese
2008-01-09 14:04 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox