On 4/30/07, Grant Likely <[EMAIL PROTECTED]> wrote:
On 4/30/07, Mohammad Sadegh Sadri <[EMAIL PROTECTED]> wrote:
>
> Well
>
> Don't know if any change should occure in the source files but when I compile
any version of 2.6 kernel for ml403/405 with UART 16550 support , I encounter this
error message :
Hmm, yes. That looks busted. Try the attached patch and see if it
works for you.
Oops; that patch won't work. Try this one instead.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[EMAIL PROTECTED]
(403) 399-0195
From 586ab13b819d503d29d60efeaffe8d511d35f0af Mon Sep 17 00:00:00 2001
From: Grant Likely <[email protected]>
Date: Mon, 30 Apr 2007 01:47:15 -0600
Subject: [PATCH] [POWERPC] Fix gen550 early serial support on Xilinx Virtex
RS_TABLE_SIZE and SERIAL_PORT_DFNS were not getting defined for the
Xilinx Virtex platform. In this case, we explicitly do *not* add a
use these definitions instead of the data in the platform device
registration because drivers/serial/8250.c will try to use them
instead of the data in the platform device. Only syslib/gen550.c and
boot/common/ns16550.c want to use these defines; so include xparameters
directly from there.
Signed-off-by: Grant Likely <[email protected]>
---
arch/ppc/platforms/4xx/xparameters/xparameters.h | 7 ++++++-
arch/ppc/syslib/gen550_dbg.c | 3 +++
arch/ppc/syslib/virtex_devices.c | 3 +++
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h
index 0af94b0..917cc81 100644
--- a/arch/ppc/platforms/4xx/xparameters/xparameters.h
+++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h
@@ -27,7 +27,8 @@
#endif
#ifndef SERIAL_PORT_DFNS
- /* zImage serial port definitions */
+#if defined(XPAR_UARTNS550_0_BASEADDR)
+ /* zImage/gen550 serial port definitions; only port 1 supported ATM */
#define RS_TABLE_SIZE 1
#define SERIAL_PORT_DFNS { \
.baud_base = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16, \
@@ -37,6 +38,10 @@
.iomem_reg_shift = 2, \
.io_type = SERIAL_IO_MEM, \
},
+#else
+ #define RS_TABLE_SIZE 0
+ #define SERIAL_PORT_DFNS
+#endif
#endif
/*
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c
index 9293f5c..267d6db 100644
--- a/arch/ppc/syslib/gen550_dbg.c
+++ b/arch/ppc/syslib/gen550_dbg.c
@@ -23,6 +23,9 @@
#include <asm/machdep.h>
#include <asm/serial.h>
#include <asm/io.h>
+#if defined(CONFIG_XILINX_VIRTEX)
+#include <platforms/4xx/xparameters/xparameters.h>
+#endif
#define SERIAL_BAUD 9600
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index c17251a..953f622 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -312,6 +312,9 @@ virtex_early_serial_init(int num, struct plat_serial8250_port *pdata)
#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
struct uart_port serial_req;
+ if (num >= RS_TABLE_SIZE)
+ return;
+
memset(&serial_req, 0, sizeof(serial_req));
serial_req.mapbase = pdata->mapbase;
serial_req.membase = pdata->membase;
--
1.5.1
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded