···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)77+ *88+ * A NS16552 DUART with a 20MHz crystal.99+ *1010+ */1111+#include <linux/module.h>1212+#include <linux/init.h>1313+#include <linux/serial_8250.h>1414+1515+#define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)1616+1717+static struct plat_serial8250_port uart8250_data[] = {1818+ {1919+ .mapbase = 0xe0001020,2020+ .irq = 4,2121+ .uartclk = 20000000,2222+ .iotype = UPIO_MEM,2323+ .flags = OCELOT_UART_FLAGS,2424+ .regshift = 2,2525+ },2626+ { },2727+};2828+2929+static struct platform_device uart8250_device = {3030+ .name = "serial8250",3131+ .id = PLAT8250_DEV_PLATFORM,3232+ .dev = {3333+ .platform_data = uart8250_data,3434+ },3535+};3636+3737+static int __init uart8250_init(void)3838+{3939+ return platform_device_register(&uart8250_device);4040+}4141+4242+module_init(uart8250_init);4343+4444+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");4545+MODULE_LICENSE("GPL");4646+MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot");
+1-1
arch/mips/jazz/Makefile
···22# Makefile for the Jazz family specific parts of the kernel33#4455-obj-y := irq.o jazzdma.o reset.o setup.o55+obj-y := irq.o jazzdma.o jazz-platform.o reset.o setup.o
+60
arch/mips/jazz/jazz-platform.c
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)77+ */88+#include <linux/init.h>99+#include <linux/module.h>1010+#include <linux/serial_8250.h>1111+1212+#include <asm/jazz.h>1313+1414+/*1515+ * Confusion ... It seems the original Microsoft Jazz machine used to have a1616+ * 4.096MHz clock for its UART while the MIPS Magnum and Millenium systems1717+ * had 8MHz. The Olivetti M700-10 and the Acer PICA have 1.8432MHz like PCs.1818+ */1919+#ifdef CONFIG_OLIVETTI_M7002020+#define JAZZ_BASE_BAUD 18432002121+#else2222+#define JAZZ_BASE_BAUD 8000000 /* 3072000 */2323+#endif2424+2525+#define JAZZ_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)2626+2727+#define JAZZ_PORT(base, int) \2828+{ \2929+ .mapbase = base, \3030+ .irq = int, \3131+ .uartclk = JAZZ_BASE_BAUD, \3232+ .iotype = UPIO_MEM, \3333+ .flags = JAZZ_UART_FLAGS, \3434+ .regshift = 0, \3535+}3636+3737+static struct plat_serial8250_port uart8250_data[] = {3838+ JAZZ_PORT(JAZZ_SERIAL1_BASE, JAZZ_SERIAL1_IRQ),3939+ JAZZ_PORT(JAZZ_SERIAL2_BASE, JAZZ_SERIAL2_IRQ),4040+ { },4141+};4242+4343+static struct platform_device uart8250_device = {4444+ .name = "serial8250",4545+ .id = PLAT8250_DEV_PLATFORM,4646+ .dev = {4747+ .platform_data = uart8250_data,4848+ },4949+};5050+5151+static int __init uart8250_init(void)5252+{5353+ return platform_device_register(&uart8250_device);5454+}5555+5656+module_init(uart8250_init);5757+5858+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");5959+MODULE_LICENSE("GPL");6060+MODULE_DESCRIPTION("8250 UART probe driver for the Jazz family");
+47
arch/mips/kernel/8250-platform.c
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)77+ */88+#include <linux/module.h>99+#include <linux/init.h>1010+#include <linux/serial_8250.h>1111+1212+#define PORT(base, int) \1313+{ \1414+ .iobase = base, \1515+ .irq = int, \1616+ .uartclk = 1843200, \1717+ .iotype = UPIO_PORT, \1818+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \1919+ .regshift = 0, \2020+}2121+2222+static struct plat_serial8250_port uart8250_data[] = {2323+ PORT(0x3F8, 4),2424+ PORT(0x2F8, 3),2525+ PORT(0x3E8, 4),2626+ PORT(0x2E8, 3),2727+ { },2828+};2929+3030+static struct platform_device uart8250_device = {3131+ .name = "serial8250",3232+ .id = PLAT8250_DEV_PLATFORM,3333+ .dev = {3434+ .platform_data = uart8250_data,3535+ },3636+};3737+3838+static int __init uart8250_init(void)3939+{4040+ return platform_device_register(&uart8250_device);4141+}4242+4343+module_init(uart8250_init);4444+4545+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");4646+MODULE_LICENSE("GPL");4747+MODULE_DESCRIPTION("Generic 8250 UART probe driver");
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2007 MIPS Technologies, Inc.77+ * written by Ralf Baechle (ralf@linux-mips.org)88+ *99+ * Probe driver for the Malta's UART ports:1010+ *1111+ * o 2 ports in the SMC SuperIO1212+ * o 1 port in the CBUS UART, a discrete 16550 which normally is only used1313+ * for bringups.1414+ *1515+ * We don't use 8250_platform.c on Malta as it would result in the CBUS1616+ * UART becoming ttyS0.1717+ */1818+#include <linux/module.h>1919+#include <linux/init.h>2020+#include <linux/serial_8250.h>2121+2222+#define SMC_PORT(base, int) \2323+{ \2424+ .iobase = base, \2525+ .irq = int, \2626+ .uartclk = 1843200, \2727+ .iotype = UPIO_PORT, \2828+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \2929+ .regshift = 0, \3030+}3131+3232+#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)3333+3434+static struct plat_serial8250_port uart8250_data[] = {3535+ SMC_PORT(0x3F8, 4),3636+ SMC_PORT(0x2F8, 3),3737+ {3838+ .mapbase = 0x1f000900, /* The CBUS UART */3939+ .irq = MIPS_CPU_IRQ_BASE + 2,4040+ .uartclk = 3686400, /* Twice the usual clk! */4141+ .iotype = UPIO_MEM32,4242+ .flags = CBUS_UART_FLAGS,4343+ .regshift = 3,4444+ },4545+ { },4646+};4747+4848+static struct platform_device uart8250_device = {4949+ .name = "serial8250",5050+ .id = PLAT8250_DEV_PLATFORM2,5151+ .dev = {5252+ .platform_data = uart8250_data,5353+ },5454+};5555+5656+static int __init uart8250_init(void)5757+{5858+ return platform_device_register(&uart8250_device);5959+}6060+6161+module_init(uart8250_init);6262+6363+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");6464+MODULE_LICENSE("GPL");6565+MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART");
+44
arch/mips/momentum/ocelot_3/platform.c
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2006, 07 Ralf Baechle (ralf@linux-mips.org)77+ * Copyright (C) 2007 Dale Farnsworth (dale@farnsworth.org)88+ */19#include <linux/delay.h>210#include <linux/if_ether.h>1111+#include <linux/init.h>312#include <linux/ioport.h>1313+#include <linux/module.h>414#include <linux/mv643xx.h>515#include <linux/platform_device.h>1616+#include <linux/serial_8250.h>617718#include "ocelot_3_fpga.h"819···217206device_initcall(mv643xx_eth_add_pds);218207219208#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */209209+210210+#define OCELOT3_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)211211+212212+static struct plat_serial8250_port uart8250_data[] = {213213+ {214214+ .membase = (signed long) 0xfd000020,215215+ .irq = 6,216216+ .uartclk = 20000000,217217+ .iotype = UPIO_MEM,218218+ .flags = OCELOT3_UART_FLAGS,219219+ .regshift = 2,220220+ },221221+ { },222222+};223223+224224+static struct platform_device uart8250_device = {225225+ .name = "serial8250",226226+ .id = PLAT8250_DEV_PLATFORM,227227+ .dev = {228228+ .platform_data = uart8250_data,229229+ },230230+};231231+232232+static int __init uart8250_init(void)233233+{234234+ return platform_device_register(&uart8250_device);235235+}236236+237237+module_init(uart8250_init);238238+239239+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");240240+MODULE_LICENSE("GPL");241241+MODULE_DESCRIPTION("8250 UART probe driver for the Ocelot 3");
+52
arch/mips/sgi-ip32/ip32-platform.c
···11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)77+ */88+#include <linux/module.h>19#include <linux/init.h>210#include <linux/platform_device.h>1111+#include <linux/serial_8250.h>1212+1313+#include <asm/ip32/mace.h>1414+#include <asm/ip32/ip32_ints.h>1515+1616+/*1717+ * .iobase isn't a constant (in the sense of C) so we fill it in at runtime.1818+ */1919+#define MACE_PORT(int) \2020+{ \2121+ .irq = int, \2222+ .uartclk = 1843200, \2323+ .iotype = UPIO_MEM, \2424+ .flags = UPF_SKIP_TEST, \2525+ .regshift = 8, \2626+}2727+2828+static struct plat_serial8250_port uart8250_data[] = {2929+ MACE_PORT(MACEISA_SERIAL1_IRQ),3030+ MACE_PORT(MACEISA_SERIAL2_IRQ),3131+ { },3232+};3333+3434+static struct platform_device uart8250_device = {3535+ .name = "serial8250",3636+ .id = PLAT8250_DEV_PLATFORM,3737+ .dev = {3838+ .platform_data = uart8250_data,3939+ },4040+};4141+4242+static int __init uart8250_init(void)4343+{4444+ uart8250_data[0].iobase = (unsigned long) &mace->isa.serial1;4545+ uart8250_data[1].iobase = (unsigned long) &mace->isa.serial1;4646+4747+ return platform_device_register(&uart8250_device);4848+}4949+5050+device_initcall(uart8250_init);351452static __init int meth_devinit(void)553{···6618}67196820device_initcall(meth_devinit);2121+2222+MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");2323+MODULE_LICENSE("GPL");2424+MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");
-36
arch/mips/sgi-ip32/ip32-setup.c
···6262}6363#endif64646565-#ifdef CONFIG_SERIAL_82506666-#include <linux/tty.h>6767-#include <linux/serial.h>6868-#include <linux/serial_core.h>6969-#endif /* CONFIG_SERIAL_8250 */7070-7165/* An arbitrary time; this can be decreased if reliability looks good */7266#define WAIT_MS 107367···90969197 board_time_init = ip32_time_init;92989393-#ifdef CONFIG_SERIAL_82509494- {9595- static struct uart_port o2_serial[2];9696-9797- memset(o2_serial, 0, sizeof(o2_serial));9898- o2_serial[0].type = PORT_16550A;9999- o2_serial[0].line = 0;100100- o2_serial[0].irq = MACEISA_SERIAL1_IRQ;101101- o2_serial[0].flags = UPF_SKIP_TEST;102102- o2_serial[0].uartclk = 1843200;103103- o2_serial[0].iotype = UPIO_MEM;104104- o2_serial[0].membase = (char *)&mace->isa.serial1;105105- o2_serial[0].fifosize = 14;106106- /* How much to shift register offset by. Each UART register107107- * is replicated over 256 byte space */108108- o2_serial[0].regshift = 8;109109- o2_serial[1].type = PORT_16550A;110110- o2_serial[1].line = 1;111111- o2_serial[1].irq = MACEISA_SERIAL2_IRQ;112112- o2_serial[1].flags = UPF_SKIP_TEST;113113- o2_serial[1].uartclk = 1843200;114114- o2_serial[1].iotype = UPIO_MEM;115115- o2_serial[1].membase = (char *)&mace->isa.serial2;116116- o2_serial[1].fifosize = 14;117117- o2_serial[1].regshift = 8;118118-119119- early_serial_setup(&o2_serial[0]);120120- early_serial_setup(&o2_serial[1]);121121- }122122-#endif12399#ifdef CONFIG_SGI_O2MACE_ETH124100 {125101 char *mac = ArcGetEnvironmentVariable("eaddr");