aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 20:01:26 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-23 20:01:26 -0400
commit2c2a68b84752cb1090fd2456e8b83e5bcc0e73c4 (patch)
treefddb2afa9f3f1c49823ee7cfa7bcc9767e888e79
parentc94c0d201f1c1a62184f4f220c1615347aafbee7 (diff)
parent056a8763fc036639441a6dc49b61e57bc632af6e (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
-rw-r--r--arch/arm/configs/bast_defconfig1
-rw-r--r--arch/arm/configs/s3c2410_defconfig1
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c37
-rw-r--r--drivers/serial/8250_pci.c51
-rw-r--r--drivers/serial/Kconfig7
-rw-r--r--drivers/serial/Makefile1
-rw-r--r--drivers/serial/bast_sio.c80
-rw-r--r--include/linux/pci_ids.h2
8 files changed, 70 insertions, 110 deletions
diff --git a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig
index 2d985e9611cd..35e3a99bcbb6 100644
--- a/arch/arm/configs/bast_defconfig
+++ b/arch/arm/configs/bast_defconfig
@@ -561,7 +561,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
561# 561#
562CONFIG_SERIAL_S3C2410=y 562CONFIG_SERIAL_S3C2410=y
563CONFIG_SERIAL_S3C2410_CONSOLE=y 563CONFIG_SERIAL_S3C2410_CONSOLE=y
564CONFIG_SERIAL_BAST_SIO=y
565CONFIG_SERIAL_CORE=y 564CONFIG_SERIAL_CORE=y
566CONFIG_SERIAL_CORE_CONSOLE=y 565CONFIG_SERIAL_CORE_CONSOLE=y
567CONFIG_UNIX98_PTYS=y 566CONFIG_UNIX98_PTYS=y
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 98b72ff38832..96a794d8de84 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -570,7 +570,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
570# 570#
571CONFIG_SERIAL_S3C2410=y 571CONFIG_SERIAL_S3C2410=y
572CONFIG_SERIAL_S3C2410_CONSOLE=y 572CONFIG_SERIAL_S3C2410_CONSOLE=y
573CONFIG_SERIAL_BAST_SIO=y
574CONFIG_SERIAL_CORE=y 573CONFIG_SERIAL_CORE=y
575CONFIG_SERIAL_CORE_CONSOLE=y 574CONFIG_SERIAL_CORE_CONSOLE=y
576CONFIG_UNIX98_PTYS=y 575CONFIG_UNIX98_PTYS=y
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index ccb6bcefa46c..206778ebfce7 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -28,6 +28,7 @@
28 * 14-Mar-2006 BJD Updated for __iomem changes 28 * 14-Mar-2006 BJD Updated for __iomem changes
29 * 22-Jun-2006 BJD Added DM9000 platform information 29 * 22-Jun-2006 BJD Added DM9000 platform information
30 * 28-Jun-2006 BJD Moved pm functionality out to common code 30 * 28-Jun-2006 BJD Moved pm functionality out to common code
31 * 17-Jul-2006 BJD Changed to platform device for SuperIO 16550s
31*/ 32*/
32 33
33#include <linux/kernel.h> 34#include <linux/kernel.h>
@@ -64,6 +65,8 @@
64#include <linux/mtd/nand_ecc.h> 65#include <linux/mtd/nand_ecc.h>
65#include <linux/mtd/partitions.h> 66#include <linux/mtd/partitions.h>
66 67
68#include <linux/serial_8250.h>
69
67#include "clock.h" 70#include "clock.h"
68#include "devs.h" 71#include "devs.h"
69#include "cpu.h" 72#include "cpu.h"
@@ -351,6 +354,39 @@ static struct platform_device bast_device_dm9k = {
351 } 354 }
352}; 355};
353 356
357/* serial devices */
358
359#define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
360#define SERIAL_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ)
361#define SERIAL_CLK (1843200)
362
363static struct plat_serial8250_port bast_sio_data[] = {
364 [0] = {
365 .mapbase = SERIAL_BASE + 0x2f8,
366 .irq = IRQ_PCSERIAL1,
367 .flags = SERIAL_FLAGS,
368 .iotype = UPIO_MEM,
369 .regshift = 0,
370 .uartclk = SERIAL_CLK,
371 },
372 [1] = {
373 .mapbase = SERIAL_BASE + 0x3f8,
374 .irq = IRQ_PCSERIAL2,
375 .flags = SERIAL_FLAGS,
376 .iotype = UPIO_MEM,
377 .regshift = 0,
378 .uartclk = SERIAL_CLK,
379 },
380 { }
381};
382
383static struct platform_device bast_sio = {
384 .name = "serial8250",
385 .id = 0,
386 .dev = {
387 .platform_data = &bast_sio_data,
388 },
389};
354 390
355/* Standard BAST devices */ 391/* Standard BAST devices */
356 392
@@ -364,6 +400,7 @@ static struct platform_device *bast_devices[] __initdata = {
364 &s3c_device_nand, 400 &s3c_device_nand,
365 &bast_device_nor, 401 &bast_device_nor,
366 &bast_device_dm9k, 402 &bast_device_dm9k,
403 &bast_sio,
367}; 404};
368 405
369static struct clk *bast_clocks[] = { 406static struct clk *bast_clocks[] = {
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index de54bdc5398b..356f5556759a 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -389,6 +389,9 @@ static void __devexit sbs_exit(struct pci_dev *dev)
389 * - 10x cards have control registers in IO and/or memory space; 389 * - 10x cards have control registers in IO and/or memory space;
390 * - 20x cards have control registers in standard PCI configuration space. 390 * - 20x cards have control registers in standard PCI configuration space.
391 * 391 *
392 * There are also Quartet Serial cards which use Oxford Semiconductor
393 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
394 *
392 * Note: some SIIG cards are probed by the parport_serial object. 395 * Note: some SIIG cards are probed by the parport_serial object.
393 */ 396 */
394 397
@@ -1026,6 +1029,8 @@ enum pci_board_num_t {
1026 pbn_b0_2_921600, 1029 pbn_b0_2_921600,
1027 pbn_b0_4_921600, 1030 pbn_b0_4_921600,
1028 1031
1032 pbn_b0_4_1152000,
1033
1029 pbn_b0_bt_1_115200, 1034 pbn_b0_bt_1_115200,
1030 pbn_b0_bt_2_115200, 1035 pbn_b0_bt_2_115200,
1031 pbn_b0_bt_8_115200, 1036 pbn_b0_bt_8_115200,
@@ -1158,6 +1163,12 @@ static struct pci_board pci_boards[] __devinitdata = {
1158 .base_baud = 921600, 1163 .base_baud = 921600,
1159 .uart_offset = 8, 1164 .uart_offset = 8,
1160 }, 1165 },
1166 [pbn_b0_4_1152000] = {
1167 .flags = FL_BASE0,
1168 .num_ports = 4,
1169 .base_baud = 1152000,
1170 .uart_offset = 8,
1171 },
1161 1172
1162 [pbn_b0_bt_1_115200] = { 1173 [pbn_b0_bt_1_115200] = {
1163 .flags = FL_BASE0|FL_BASE_BARS, 1174 .flags = FL_BASE0|FL_BASE_BARS,
@@ -1755,33 +1766,30 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
1755static void __devexit pciserial_remove_one(struct pci_dev *dev) 1766static void __devexit pciserial_remove_one(struct pci_dev *dev)
1756{ 1767{
1757 struct serial_private *priv = pci_get_drvdata(dev); 1768 struct serial_private *priv = pci_get_drvdata(dev);
1769 struct pci_serial_quirk *quirk;
1770 int i;
1758 1771
1759 pci_set_drvdata(dev, NULL); 1772 pci_set_drvdata(dev, NULL);
1760 1773
1761 if (priv) { 1774 for (i = 0; i < priv->nr; i++)
1762 struct pci_serial_quirk *quirk; 1775 serial8250_unregister_port(priv->line[i]);
1763 int i;
1764
1765 for (i = 0; i < priv->nr; i++)
1766 serial8250_unregister_port(priv->line[i]);
1767 1776
1768 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) { 1777 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1769 if (priv->remapped_bar[i]) 1778 if (priv->remapped_bar[i])
1770 iounmap(priv->remapped_bar[i]); 1779 iounmap(priv->remapped_bar[i]);
1771 priv->remapped_bar[i] = NULL; 1780 priv->remapped_bar[i] = NULL;
1772 } 1781 }
1773 1782
1774 /* 1783 /*
1775 * Find the exit quirks. 1784 * Find the exit quirks.
1776 */ 1785 */
1777 quirk = find_quirk(dev); 1786 quirk = find_quirk(dev);
1778 if (quirk->exit) 1787 if (quirk->exit)
1779 quirk->exit(dev); 1788 quirk->exit(dev);
1780 1789
1781 pci_disable_device(dev); 1790 pci_disable_device(dev);
1782 1791
1783 kfree(priv); 1792 kfree(priv);
1784 }
1785} 1793}
1786 1794
1787static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state) 1795static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
@@ -1978,6 +1986,9 @@ static struct pci_device_id serial_pci_tbl[] = {
1978 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0, 1986 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0,
1979 pbn_b0_4_921600 }, 1987 pbn_b0_4_921600 },
1980 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, 1988 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
1989 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, 0, 0,
1990 pbn_b0_4_1152000 },
1991 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
1981 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1992 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
1982 pbn_b0_4_115200 }, 1993 pbn_b0_4_115200 },
1983 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952, 1994 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index e0d0a470ddfc..97034d3937fd 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -306,13 +306,6 @@ config SERIAL_S3C2410_CONSOLE
306 your boot loader about how to pass options to the kernel at 306 your boot loader about how to pass options to the kernel at
307 boot time.) 307 boot time.)
308 308
309config SERIAL_BAST_SIO
310 bool "Support for BAST SuperIO serial ports"
311 depends on ARCH_BAST && SERIAL_8250=y
312 help
313 Support for registerin the SuperIO chip on BAST board with
314 the 8250/16550 uart code.
315
316config SERIAL_DZ 309config SERIAL_DZ
317 bool "DECstation DZ serial driver" 310 bool "DECstation DZ serial driver"
318 depends on MACH_DECSTATION && MIPS32 311 depends on MACH_DECSTATION && MIPS32
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 65bd4381685e..11c7dc483f93 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -44,7 +44,6 @@ obj-$(CONFIG_SERIAL_LH7A40X) += serial_lh7a40x.o
44obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o 44obj-$(CONFIG_SERIAL_AU1X00) += au1x00_uart.o
45obj-$(CONFIG_SERIAL_DZ) += dz.o 45obj-$(CONFIG_SERIAL_DZ) += dz.o
46obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o 46obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
47obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o
48obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o 47obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
49obj-$(CONFIG_SERIAL_CPM) += cpm_uart/ 48obj-$(CONFIG_SERIAL_CPM) += cpm_uart/
50obj-$(CONFIG_SERIAL_IMX) += imx.o 49obj-$(CONFIG_SERIAL_IMX) += imx.o
diff --git a/drivers/serial/bast_sio.c b/drivers/serial/bast_sio.c
deleted file mode 100644
index 2b48fab6f0c6..000000000000
--- a/drivers/serial/bast_sio.c
+++ /dev/null
@@ -1,80 +0,0 @@
1/* linux/drivers/serial/bast_sio.c
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * http://www.simtec.co.uk/products/EB2410ITX/
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 23-Sep-2004 BJD Added copyright header
14 * 23-Sep-2004 BJD Added serial port remove code
15*/
16
17#include <linux/module.h>
18#include <linux/config.h>
19#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/tty.h>
22#include <linux/serial.h>
23#include <linux/serial_core.h>
24#include <linux/types.h>
25
26#include <asm/io.h>
27#include <asm/serial.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/map.h>
31#include <asm/arch/irqs.h>
32#include <asm/arch/bast-map.h>
33#include <asm/arch/bast-irq.h>
34
35static int __init serial_bast_register(unsigned long port, unsigned int irq)
36{
37 struct serial_struct serial_req;
38
39 serial_req.flags = UPF_AUTOPROBE | UPF_SHARE_IRQ;
40 serial_req.baud_base = BASE_BAUD;
41 serial_req.irq = irq;
42 serial_req.io_type = UPIO_MEM;
43 serial_req.iomap_base = port;
44 serial_req.iomem_base = ioremap(port, 0x10);
45 serial_req.iomem_reg_shift = 0;
46
47 return register_serial(&serial_req);
48}
49
50#define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
51
52static int port[2] = { -1, -1 };
53
54static int __init serial_bast_init(void)
55{
56 if (machine_is_bast()) {
57 port[0] = serial_bast_register(SERIAL_BASE + 0x2f8, IRQ_PCSERIAL1);
58 port[1] = serial_bast_register(SERIAL_BASE + 0x3f8, IRQ_PCSERIAL2);
59 }
60
61 return 0;
62}
63
64static void __exit serial_bast_exit(void)
65{
66 if (port[0] != -1)
67 unregister_serial(port[0]);
68 if (port[1] != -1)
69 unregister_serial(port[1]);
70}
71
72
73module_init(serial_bast_init);
74module_exit(serial_bast_exit);
75
76MODULE_LICENSE("GPL");
77MODULE_AUTHOR("Ben Dooks, ben@simtec.co.uk");
78MODULE_DESCRIPTION("BAST Onboard Serial setup");
79
80
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 27348c22dacb..9a28b312eeb4 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1872,6 +1872,7 @@
1872#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 1872#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001
1873 1873
1874#define PCI_VENDOR_ID_SIIG 0x131f 1874#define PCI_VENDOR_ID_SIIG 0x131f
1875#define PCI_SUBVENDOR_ID_SIIG 0x131f
1875#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 1876#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
1876#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001 1877#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001
1877#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002 1878#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002
@@ -1909,6 +1910,7 @@
1909#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 1910#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060
1910#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 1911#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061
1911#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 1912#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062
1913#define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050
1912 1914
1913#define PCI_VENDOR_ID_RADISYS 0x1331 1915#define PCI_VENDOR_ID_RADISYS 0x1331
1914#define PCI_DEVICE_ID_RADISYS_ENP2611 0x0030 1916#define PCI_DEVICE_ID_RADISYS_ENP2611 0x0030