From: David Woodhouse <dwmw2@infradead.org>
To: Pantelis Antoniou <panto@intracom.gr>
Cc: Tom Rini <trini@kernel.crashing.org>,
Kumar Gala <kumar.gala@motorola.com>,
Linuxppc-Embedded <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: [PATCH] Take two of the new serial uart driver.
Date: Mon, 07 Jun 2004 10:12:41 +0100 [thread overview]
Message-ID: <1086599561.29255.20.camel@localhost.localdomain> (raw)
In-Reply-To: <40C42337.20209@intracom.gr>
On Mon, 2004-06-07 at 11:11 +0300, Pantelis Antoniou wrote:
> The following patch fixes the problem by properly waiting
> two character times on mode change.
Thanks. Cleaned up and working version looks like this:
--- drivers/serial/cpm_uart/cpm_uart.h.orig 2004-06-06 16:37:05.000000000 +0100
+++ drivers/serial/cpm_uart/cpm_uart.h 2004-06-07 10:06:58.380032904 +0100
@@ -65,6 +65,8 @@
uint dp_addr;
void *mem_addr;
dma_addr_t dma_addr;
+ int baud;
+ int bits;
};
extern int cpm_uart_port_map[UART_NR];
--- drivers/serial/cpm_uart/cpm_uart_core.c.orig 2004-06-07 09:27:48.020341888 +0100
+++ drivers/serial/cpm_uart/cpm_uart_core.c 2004-06-07 10:08:41.849303184 +0100
@@ -44,6 +44,7 @@
#include <asm/io.h>
#include <asm/irq.h>
+#include <asm/delay.h>
#if defined(CONFIG_SERIAL_CPM_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
@@ -483,6 +484,10 @@
if ((termios->c_cflag & CREAD) == 0)
port->read_status_mask &= ~BD_SC_EMPTY;
+ /* if previous configuration exists wait 2 character times for tx to finish */
+ if (pinfo->baud != 0 || pinfo->bits != 0)
+ udelay((3 * 1000000 * pinfo->bits) / pinfo->baud);
+
spin_lock_irqsave(&port->lock, flags);
/* Start bit has not been added (so don't, because we would just
@@ -503,6 +508,10 @@
}
cpm_set_brg(pinfo->brg - 1, baud);
+
+ pinfo->baud = baud;
+ pinfo->bits = bits;
+
spin_unlock_irqrestore(&port->lock, flags);
}
--
dwmw2
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
prev parent reply other threads:[~2004-06-07 9:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-03 14:13 [PATCH] Take two of the new serial uart driver Pantelis Antoniou
2004-06-03 16:21 ` David Woodhouse
2004-06-04 6:31 ` Pantelis Antoniou
2004-06-05 9:12 ` David Woodhouse
2004-06-05 19:22 ` Tom Rini
2004-06-05 22:02 ` David Woodhouse
2004-06-06 1:30 ` Tom Rini
2004-06-07 8:11 ` Pantelis Antoniou
2004-06-07 8:36 ` David Woodhouse
2004-06-07 8:34 ` Pantelis Antoniou
2004-06-07 8:53 ` David Woodhouse
2004-06-07 8:53 ` Pantelis Antoniou
2004-06-07 9:06 ` David Woodhouse
2004-06-07 9:12 ` David Woodhouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1086599561.29255.20.camel@localhost.localdomain \
--to=dwmw2@infradead.org \
--cc=kumar.gala@motorola.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=panto@intracom.gr \
--cc=trini@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.