lkml.org 
[lkml]   [2005]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [RESEND 1] 8250_hp300: unuse register_serial/unregister_serial
From
Date
On Mon, 2005-04-04 at 10:52 +0200, Geert Uytterhoeven wrote:
> Hi Russell,
>
> On Mon, 4 Apr 2005, Russell King wrote:
> > ----- Forwarded message from Russell King <rmk@arm.linux.org.uk> -----
> >
> > Date: Thu, 24 Mar 2005 13:19:57 +0000
> > From: Russell King <rmk@arm.linux.org.uk>
> > To: jongk@linux-m68k.org, geert@linux-m68k.org
> > Cc: Linux Kernel List <linux-kernel@vger.kernel.org>
> > Subject: 8250_hp300: unuse register_serial/unregister_serial
> >
> > Kars, Geert,
> >
> > Here's a patch which converts 8250_hp300 to use serial8250_register_port
> > and serial8250_unregister_port, rather than register_serial/
> > unregister_serial.
> >
> > The 8250-variants allow you to associate the struct device with the port,
> > allowing sysfs to indicate which device owns which serial port. Plus, we
> > stop using a potentially obsolete (and functionally inferior) function.
> >
> > This patch is untested; please test, and send bug fixes.
> >
> > Note: if you need power management, that should come via your device
> > driver, calling serial8250_suspend_port() / serial8250_resume_port()
> > as appropriate.
>
> For me it's OK. But I don't have an HP9000/300 to test. Kars?

Sorry, I've been busy the past few days (getting married and stuff), I
did look at the patch but didn't get around to send a reply.

I needed the following extra changes, after that it compiles and works
on my HP300:

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
ttyS0 at MMIO 0x690011 (irq = 5) is a 16550A
ttyS1 at MMIO 0x41c040 (irq = 0) is a 16550
ttyS2 at MMIO 0x41c060 (irq = 0) is a 16550


Kind regards,

Kars.

--- linux-2.6-m68k-hp/drivers/serial/8250_hp300.c 2005-04-04 15:38:13.448568529 +0200
+++ linux-2.6-m68k-hp/drivers/serial/8250_hp300.c.new 2005-04-04 15:11:27.000000000 +0200
@@ -9,15 +9,15 @@
#include <linux/init.h>
#include <linux/string.h>
#include <linux/kernel.h>
-#include <linux/tty.h>
#include <linux/serial.h>
-#include <linux/serialP.h>
#include <linux/serial_core.h>
#include <linux/delay.h>
#include <linux/dio.h>
#include <linux/console.h>
#include <asm/io.h>

+#include "8250.h"
+
#if !defined(CONFIG_HPDCA) && !defined(CONFIG_HPAPCI)
#warning CONFIG_8250 defined but neither CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure?
#endif
@@ -180,14 +180,14 @@
port.irq = d->ipl;
port.uartclk = HPDCA_BAUD_BASE * 16;
port.mapbase = (d->resource.start + UART_OFFSET);
- port.membase = (char *)(serial_req.iomap_base + DIO_VIRADDRBASE);
+ port.membase = (char *)(port.mapbase + DIO_VIRADDRBASE);
port.regshift = 1;
port.dev = &d->dev;
line = serial8250_register_port(&port);

if (line < 0) {
printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d"
- " irq %d failed\n", d->scode, serial_req.irq);
+ " irq %d failed\n", d->scode, port.irq);
return -ENOMEM;
}

@@ -261,7 +261,7 @@
uport.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF;
/* XXX - no interrupt support yet */
uport.irq = 0;
- uport.baud_base = HPAPCI_BAUD_BASE * 16;
+ uport.uartclk = HPAPCI_BAUD_BASE * 16;
uport.mapbase = base;
uport.membase = (char *)(base + DIO_VIRADDRBASE);
uport.regshift = 2;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.039 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site