aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/Kconfig7
-rw-r--r--drivers/serial/Makefile1
-rw-r--r--drivers/serial/bast_sio.c80
6 files changed, 37 insertions, 90 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/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