linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] AMD Alchemy UART: claim memory range
@ 2006-04-29 17:24 Sergei Shtylyov
  0 siblings, 0 replies; only message in thread
From: Sergei Shtylyov @ 2006-04-29 17:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: rmk+serial, linux-serial

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

Resending since there was no reaction since the initial mail (4/4/2006)...

I've noticed that the 8250/Au1x00 driver (drivers/serial/8250_au1x00.c)
doesn't claim UART memory ranges and uses wrong (KSEG1-based) UART addresses
instead of the physical ones.

WBR, Sergei

Sighed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>


[-- Attachment #2: Au1xx0-claim-UART-range.patch --]
[-- Type: text/plain, Size: 1186 bytes --]

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 674b15c..d641ac4 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1906,6 +1906,9 @@ static int serial8250_request_std_resour
 	int ret = 0;
 
 	switch (up->port.iotype) {
+	case UPIO_AU:
+		size = 0x100000;
+		/* fall thru */
 	case UPIO_MEM:
 		if (!up->port.mapbase)
 			break;
@@ -1938,6 +1941,9 @@ static void serial8250_release_std_resou
 	unsigned int size = 8 << up->port.regshift;
 
 	switch (up->port.iotype) {
+	case UPIO_AU:
+		size = 0x100000;
+		/* fall thru */
 	case UPIO_MEM:
 		if (!up->port.mapbase)
 			break;
diff --git a/drivers/serial/8250_au1x00.c b/drivers/serial/8250_au1x00.c
index 3d1bfd0..58015fd 100644
--- a/drivers/serial/8250_au1x00.c
+++ b/drivers/serial/8250_au1x00.c
@@ -30,13 +30,12 @@
 	{						\
 		.iobase		= _base,		\
 		.membase	= (void __iomem *)_base,\
-		.mapbase	= _base,		\
+		.mapbase	= CPHYSADDR(_base),	\
 		.irq		= _irq,			\
 		.uartclk	= 0,	/* filled */	\
 		.regshift	= 2,			\
 		.iotype		= UPIO_AU,		\
-		.flags		= UPF_SKIP_TEST | 	\
-				  UPF_IOREMAP,		\
+		.flags		= UPF_SKIP_TEST 	\
 	}
 
 static struct plat_serial8250_port au1x00_data[] = {





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-29 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-29 17:24 [PATCH] AMD Alchemy UART: claim memory range Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).