From: Dimitri Torfs <dimitri@sonycom.com>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org
Subject: [PATCH 2.6] use struct uart_port for early_serial_setup()
Date: Tue, 23 Dec 2003 10:03:51 +0100 [thread overview]
Message-ID: <20031223090351.GA5300@sonycom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
Hi,
I think early_serial_setup() should be called with struct uart_port* instead
of struct serial_struct*. Patch for the Vr41xx series.
Dimitri
--
Dimitri Torfs | NSCE
dimitri.torfs@sonycom.com | Sint Stevens Woluwestraat 55
tel: +32 2 2908451 | 1130 Brussel
fax: +32 2 7262686 | Belgium
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2800 bytes --]
Index: arch/mips/vr41xx/common/serial.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/vr41xx/common/serial.c,v
retrieving revision 1.4
diff -u -r1.4 serial.c
--- arch/mips/vr41xx/common/serial.c 31 Oct 2003 01:49:07 -0000 1.4
+++ arch/mips/vr41xx/common/serial.c 23 Dec 2003 08:51:07 -0000
@@ -41,7 +41,9 @@
*/
#include <linux/init.h>
#include <linux/types.h>
+#include <linux/tty.h>
#include <linux/serial.h>
+#include <linux/serial_core.h>
#include <asm/addrspace.h>
#include <asm/cpu.h>
@@ -116,59 +118,62 @@
void __init vr41xx_siu_init(int interface, int module)
{
- struct serial_struct s;
+#ifdef CONFIG_SERIAL_8250
+ struct uart_port p;
vr41xx_siu_ifselect(interface, module);
- memset(&s, 0, sizeof(s));
+ memset(&p, 0, sizeof(p));
- s.line = vr41xx_serial_ports;
- s.baud_base = SIU_BASE_BAUD;
- s.irq = SIU_IRQ;
- s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
+ p.line = vr41xx_serial_ports;
+ p.uartclk = SIU_BASE_BAUD * 16;
+ p.irq = SIU_IRQ;
+ p.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
switch (current_cpu_data.cputype) {
case CPU_VR4111:
case CPU_VR4121:
- s.iomem_base = (unsigned char *)VR4111_SIURB;
+ p.membase = (unsigned char *)VR4111_SIURB;
break;
case CPU_VR4122:
case CPU_VR4131:
case CPU_VR4133:
- s.iomem_base = (unsigned char *)VR4122_SIURB;
+ p.membase = (unsigned char *)VR4122_SIURB;
break;
default:
panic("Unexpected CPU of NEC VR4100 series");
break;
}
- s.iomem_reg_shift = 0;
- s.io_type = SERIAL_IO_MEM;
- if (early_serial_setup(&s) != 0)
+ p.regshift = 0;
+ p.iotype = UPIO_MEM;
+ if (early_serial_setup(&p) != 0)
printk(KERN_ERR "SIU setup failed!\n");
vr41xx_clock_supply(SIU_CLOCK);
vr41xx_serial_ports++;
+#endif
}
void __init vr41xx_dsiu_init(void)
{
- struct serial_struct s;
+#ifdef CONFIG_SERIAL_8250
+ struct uart_port p;
if (current_cpu_data.cputype != CPU_VR4122 &&
current_cpu_data.cputype != CPU_VR4131 &&
current_cpu_data.cputype != CPU_VR4133)
return;
- memset(&s, 0, sizeof(s));
+ memset(&p, 0, sizeof(p));
- s.line = vr41xx_serial_ports;
- s.baud_base = DSIU_BASE_BAUD;
- s.irq = DSIU_IRQ;
- s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
- s.iomem_base = (unsigned char *)DSIURB;
- s.iomem_reg_shift = 0;
- s.io_type = SERIAL_IO_MEM;
- if (early_serial_setup(&s) != 0)
+ p.line = vr41xx_serial_ports;
+ p.uartclk = DSIU_BASE_BAUD * 16;
+ p.irq = DSIU_IRQ;
+ p.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
+ p.membase = (unsigned char *)DSIURB;
+ p.regshift = 0;
+ p.iotype = UPIO_MEM;
+ if (early_serial_setup(&p) != 0)
printk(KERN_ERR "DSIU setup failed!\n");
vr41xx_clock_supply(DSIU_CLOCK);
@@ -176,4 +181,5 @@
writew(INTDSIU, MDSIUINTREG);
vr41xx_serial_ports++;
+#endif
}
reply other threads:[~2003-12-23 9:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20031223090351.GA5300@sonycom.com \
--to=dimitri@sonycom.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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.