* [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection
@ 2008-06-08 15:59 Juergen Kilb
2008-06-19 15:40 ` Felix Radensky
2008-07-05 22:32 ` Wolfgang Denk
0 siblings, 2 replies; 3+ messages in thread
From: Juergen Kilb @ 2008-06-08 15:59 UTC (permalink / raw)
To: u-boot
The Register URXD contains status information in bits [15..8].
With status bit 15 set, CTRL-C was reported as 0x8003 instead
of 0x03. Therefore CTRL-C was not detected.
To solve this, bits [15..8] were masked out now.
Signed-off-by: Juergen Kilb <J.Kilb@gmx.de>
---
cpu/arm1136/mx31/serial.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cpu/arm1136/mx31/serial.c b/cpu/arm1136/mx31/serial.c
index 1cad8f9..f498599 100644
--- a/cpu/arm1136/mx31/serial.c
+++ b/cpu/arm1136/mx31/serial.c
@@ -63,6 +63,7 @@
#define URXD_FRMERR (1<<12)
#define URXD_BRK (1<<11)
#define URXD_PRERR (1<<10)
+#define URXD_RX_DATA (0xFF)
#define UCR1_ADEN (1<<15) /* Auto dectect interrupt */
#define UCR1_ADBR (1<<14) /* Auto detect baud rate */
#define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */
@@ -165,7 +166,7 @@ void serial_setbrg (void)
int serial_getc (void)
{
while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY);
- return __REG(UART_PHYS + URXD);
+ return (__REG(UART_PHYS + URXD) & URXD_RX_DATA); /* mask out status from upper word */
}
void serial_putc (const char c)
--
1.5.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection
2008-06-08 15:59 [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection Juergen Kilb
@ 2008-06-19 15:40 ` Felix Radensky
2008-07-05 22:32 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Felix Radensky @ 2008-06-19 15:40 UTC (permalink / raw)
To: u-boot
Hi, Juergen
I can confirm that this patch fixes the problem with CTRC-C
on my I.MX31ADS evaluation board. I can now abort operations
that previously required system reset.
I hope this patch will be applied before release of 1.3.4
Thanks a lot.
Felix.
Juergen Kilb wrote:
>
> The Register URXD contains status information in bits [15..8].
> With status bit 15 set, CTRL-C was reported as 0x8003 instead
> of 0x03. Therefore CTRL-C was not detected.
> To solve this, bits [15..8] were masked out now.
>
> Signed-off-by: Juergen Kilb <J.Kilb@gmx.de>
> ---
> cpu/arm1136/mx31/serial.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/cpu/arm1136/mx31/serial.c b/cpu/arm1136/mx31/serial.c
> index 1cad8f9..f498599 100644
> --- a/cpu/arm1136/mx31/serial.c
> +++ b/cpu/arm1136/mx31/serial.c
> @@ -63,6 +63,7 @@
> #define URXD_FRMERR (1<<12)
> #define URXD_BRK (1<<11)
> #define URXD_PRERR (1<<10)
> +#define URXD_RX_DATA (0xFF)
> #define UCR1_ADEN (1<<15) /* Auto dectect interrupt */
> #define UCR1_ADBR (1<<14) /* Auto detect baud rate */
> #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */
> @@ -165,7 +166,7 @@ void serial_setbrg (void)
> int serial_getc (void)
> {
> while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY);
> - return __REG(UART_PHYS + URXD);
> + return (__REG(UART_PHYS + URXD) & URXD_RX_DATA); /* mask out status from
> upper word */
> }
>
> void serial_putc (const char c)
> --
> 1.5.5.1
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
--
View this message in context: http://www.nabble.com/-PATCH--i.MX31%3A-fixed-CTRL-C-detection-tp17720150p18011808.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection
2008-06-08 15:59 [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection Juergen Kilb
2008-06-19 15:40 ` Felix Radensky
@ 2008-07-05 22:32 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2008-07-05 22:32 UTC (permalink / raw)
To: u-boot
In message <200806081759.54303.J.Kilb@gmx.de> you wrote:
> The Register URXD contains status information in bits [15..8].
> With status bit 15 set, CTRL-C was reported as 0x8003 instead
> of 0x03. Therefore CTRL-C was not detected.
> To solve this, bits [15..8] were masked out now.
>
> Signed-off-by: Juergen Kilb <J.Kilb@gmx.de>
> ---
> cpu/arm1136/mx31/serial.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
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
There is, however, a strange, musty smell in the air that reminds me
of something...hmm...yes...I've got it...there's a VMS nearby, or I'm
a Blit. - Larry Wall in Configure from the perl distribution
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-05 22:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-08 15:59 [U-Boot-Users] [PATCH] i.MX31: fixed CTRL-C detection Juergen Kilb
2008-06-19 15:40 ` Felix Radensky
2008-07-05 22:32 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox