From: Peter Korsgaard <jacmet@sunsite•dk>
To: dbolcsfoldi@gmail•com, linuxppc-embedded@ozlabs•org
Subject: Re: [PATCH] Xilinx UART Lite 2.6.18 driver
Date: Fri, 27 Oct 2006 17:03:01 +0200 [thread overview]
Message-ID: <877iylreca.fsf@sleipner.barco.com> (raw)
In-Reply-To: <87lknadbbl.fsf@sleipner.barco.com> (Peter Korsgaard's message of "Fri, 20 Oct 2006 21:41:34 +0200")
>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite•dk> writes:
Peter> I'll test and take a closer look at your patch when I have
Peter> access to hw again on Monday.
Sorry, it got a bit later than promised, but I've now had a closer
look at your patch ..
--- uartlite/arch/ppc/boot/simple/misc.c 2006-10-15 14:09:47.000000000 -0700
+++ uartlite-mod/arch/ppc/boot/simple/misc.c 2006-10-15 13:58:51.000000000 -0700
@@ -48,7 +48,8 @@
#if (defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_VGA_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
- || defined(CONFIG_SERIAL_MPSC_CONSOLE)) \
+ || defined(CONFIG_SERIAL_MPSC_CONSOLE) \
+ || defined(CONFIG_SERIAL_UARTLITE_CONSOLE)) \
&& !defined(CONFIG_GEMINI)
#define INTERACTIVE_CONSOLE 1
#endif
The Xilinx boards use misc-embedded.c not misc.c - Why is this needed?
+unsigned long serial_init(int chan, void *ignored)
+{
+ switch (chan) {
+ #ifdef XPAR_XUL_UART_0_BASEADDR
+ case 0:
+ return XPAR_XUL_UART_0_BASEADDR;
+ #endif
+ #ifdef XPAR_XUL_UART_1_BASEADDR
+ case 1:
+ return XPAR_XUL_UART_1_BASEADDR;
+ #endif
+ #ifdef XPAR_XUL_UART_2_BASEADDR
+ case 2:
+ return XPAR_XUL_UART_2_BASEADDR;
+ #endif
+ #ifdef XPAR_XUL_UART_3_BASEADDR
+ case 3:
+ return XPAR_XUL_UART_3_BASEADDR;
+ #endif
This doesn't help much as you don't use the com_port argument in the
other functions.
Where did you get the XPAR_XUL_UART_ defines from? Our xparameters.h
seem to contain XPAR_UARTLITE_ defines instead.
@@ -131,12 +115,16 @@
struct uart_port *port = (struct uart_port *)dev_id;
int busy;
+ spin_lock(&port->lock); /* Lock the port in case of printk */
+
In an interrupt handler? Why? The console_write does a spin_lock_irqsave.
static int __init ulite_console_setup(struct console *co, char *options)
{
+ int i, ret;
struct uart_port *port;
-
+ struct platform_device *pdev;
+
if (co->index < 0 || co->index >= ULITE_NR_UARTS)
return -EINVAL;
port = &ports[co->index];
/* not initialized yet? */
- if (!port->membase)
- return -ENODEV;
+ if (!port->membase) {
+ /* We might be early console */
Is this really necessary? The platform probe get's called quite early, E.G.:
Breakpoint 2, ulite_probe (pdev=0xc01c84d0) at drivers/serial/uartlite.c:392
392 {
(gdb) print __log_buf
$1 = "<5>Linux version 2.6.19-rc3 (peko@sleipner) (gcc version 3.4.5) #19 Fri Oct 27 16:39:00 CEST 2006\n<6>Barco ThinLite (V2P) <peter.korsgaard@barco•com>\n<7>Entering add_active_range(0, 0, 15360) 0 entrie"...
You can always use the ppc_md.progress() stuff for really early
debugging if needed. I would prefer to keep this workaround out of
uartlite.c if it isn't needed.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2006-10-27 15:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 20:49 [PATCH] Xilinx UART Lite 2.6.18 driver David Bolcsfoldi
2006-10-10 22:04 ` Grant Likely
2006-10-11 22:06 ` David H. Lynch Jr.
2006-10-12 10:34 ` Peter Korsgaard
2006-10-12 21:12 ` David Bolcsfoldi
2006-10-13 5:21 ` David Bolcsfoldi
2006-10-13 7:04 ` David H. Lynch Jr.
2006-10-13 7:22 ` Peter Korsgaard
[not found] ` <45329C42.3030000@dlasys.net>
2006-10-16 19:42 ` Peter Korsgaard
2006-10-13 7:11 ` Peter Korsgaard
2006-10-15 23:48 ` David Bolcsfoldi
2006-10-20 19:41 ` Peter Korsgaard
2006-10-27 15:03 ` Peter Korsgaard [this message]
2006-10-28 3:29 ` David H. Lynch Jr.
2006-10-30 8:23 ` Peter Korsgaard
2006-10-31 17:26 ` David H. Lynch Jr.
2006-10-30 19:45 ` David Bolcsfoldi
2006-11-06 15:44 ` Peter Korsgaard
2006-10-13 6:48 ` David H. Lynch Jr.
2006-10-13 7:15 ` Peter Korsgaard
2006-10-15 21:02 ` David H. Lynch Jr.
2006-10-16 19:49 ` Peter Korsgaard
2006-10-16 19:52 ` Peter Korsgaard
2006-10-13 7:08 ` Peter Korsgaard
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=877iylreca.fsf@sleipner.barco.com \
--to=jacmet@sunsite$(echo .)dk \
--cc=dbolcsfoldi@gmail$(echo .)com \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox