-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIPS] Put an end to <asm/serial.h>'s long and annyoing existence
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
- Loading branch information
Ralf Baechle
committed
Jul 10, 2007
1 parent
192cca6
commit e7c4782
Showing
15 changed files
with
371 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/module.h> | ||
#include <linux/serial_8250.h> | ||
|
||
#include <asm/ddb5xxx/ddb5477.h> | ||
|
||
#define DDB_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
|
||
#define DDB5477_PORT(base, int) \ | ||
{ \ | ||
.mapbase = base, \ | ||
.irq = int, \ | ||
.uartclk = 1843200, \ | ||
.iotype = UPIO_MEM, \ | ||
.flags = DDB_UART_FLAGS, \ | ||
.regshift = 3, \ | ||
} | ||
|
||
static struct plat_serial8250_port uart8250_data[] = { | ||
DDB5477_PORT(0xbfa04200, VRC5477_IRQ_UART0), | ||
DDB5477_PORT(0xbfa04240, VRC5477_IRQ_UART1), | ||
{ }, | ||
}; | ||
|
||
static struct platform_device uart8250_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev = { | ||
.platform_data = uart8250_data, | ||
}, | ||
}; | ||
|
||
static int __init uart8250_init(void) | ||
{ | ||
return platform_device_register(&uart8250_device); | ||
} | ||
|
||
module_init(uart8250_init); | ||
|
||
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("8250 UART probe driver for the NEC DDB5477"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
* | ||
* A NS16552 DUART with a 20MHz crystal. | ||
* | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/serial_8250.h> | ||
|
||
#define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
|
||
static struct plat_serial8250_port uart8250_data[] = { | ||
{ | ||
.mapbase = 0xe0001020, | ||
.irq = 4, | ||
.uartclk = 20000000, | ||
.iotype = UPIO_MEM, | ||
.flags = OCELOT_UART_FLAGS, | ||
.regshift = 2, | ||
}, | ||
{ }, | ||
}; | ||
|
||
static struct platform_device uart8250_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev = { | ||
.platform_data = uart8250_data, | ||
}, | ||
}; | ||
|
||
static int __init uart8250_init(void) | ||
{ | ||
return platform_device_register(&uart8250_device); | ||
} | ||
|
||
module_init(uart8250_init); | ||
|
||
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/module.h> | ||
#include <linux/serial_8250.h> | ||
|
||
#include <asm/jazz.h> | ||
|
||
/* | ||
* Confusion ... It seems the original Microsoft Jazz machine used to have a | ||
* 4.096MHz clock for its UART while the MIPS Magnum and Millenium systems | ||
* had 8MHz. The Olivetti M700-10 and the Acer PICA have 1.8432MHz like PCs. | ||
*/ | ||
#ifdef CONFIG_OLIVETTI_M700 | ||
#define JAZZ_BASE_BAUD 1843200 | ||
#else | ||
#define JAZZ_BASE_BAUD 8000000 /* 3072000 */ | ||
#endif | ||
|
||
#define JAZZ_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
|
||
#define JAZZ_PORT(base, int) \ | ||
{ \ | ||
.mapbase = base, \ | ||
.irq = int, \ | ||
.uartclk = JAZZ_BASE_BAUD, \ | ||
.iotype = UPIO_MEM, \ | ||
.flags = JAZZ_UART_FLAGS, \ | ||
.regshift = 0, \ | ||
} | ||
|
||
static struct plat_serial8250_port uart8250_data[] = { | ||
JAZZ_PORT(JAZZ_SERIAL1_BASE, JAZZ_SERIAL1_IRQ), | ||
JAZZ_PORT(JAZZ_SERIAL2_BASE, JAZZ_SERIAL2_IRQ), | ||
{ }, | ||
}; | ||
|
||
static struct platform_device uart8250_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev = { | ||
.platform_data = uart8250_data, | ||
}, | ||
}; | ||
|
||
static int __init uart8250_init(void) | ||
{ | ||
return platform_device_register(&uart8250_device); | ||
} | ||
|
||
module_init(uart8250_init); | ||
|
||
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("8250 UART probe driver for the Jazz family"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/serial_8250.h> | ||
|
||
#define PORT(base, int) \ | ||
{ \ | ||
.iobase = base, \ | ||
.irq = int, \ | ||
.uartclk = 1843200, \ | ||
.iotype = UPIO_PORT, \ | ||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \ | ||
.regshift = 0, \ | ||
} | ||
|
||
static struct plat_serial8250_port uart8250_data[] = { | ||
PORT(0x3F8, 4), | ||
PORT(0x2F8, 3), | ||
PORT(0x3E8, 4), | ||
PORT(0x2E8, 3), | ||
{ }, | ||
}; | ||
|
||
static struct platform_device uart8250_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM, | ||
.dev = { | ||
.platform_data = uart8250_data, | ||
}, | ||
}; | ||
|
||
static int __init uart8250_init(void) | ||
{ | ||
return platform_device_register(&uart8250_device); | ||
} | ||
|
||
module_init(uart8250_init); | ||
|
||
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("Generic 8250 UART probe driver"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
* | ||
* Copyright (C) 2007 MIPS Technologies, Inc. | ||
* written by Ralf Baechle (ralf@linux-mips.org) | ||
* | ||
* Probe driver for the Malta's UART ports: | ||
* | ||
* o 2 ports in the SMC SuperIO | ||
* o 1 port in the CBUS UART, a discrete 16550 which normally is only used | ||
* for bringups. | ||
* | ||
* We don't use 8250_platform.c on Malta as it would result in the CBUS | ||
* UART becoming ttyS0. | ||
*/ | ||
#include <linux/module.h> | ||
#include <linux/init.h> | ||
#include <linux/serial_8250.h> | ||
|
||
#define SMC_PORT(base, int) \ | ||
{ \ | ||
.iobase = base, \ | ||
.irq = int, \ | ||
.uartclk = 1843200, \ | ||
.iotype = UPIO_PORT, \ | ||
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \ | ||
.regshift = 0, \ | ||
} | ||
|
||
#define CBUS_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
|
||
static struct plat_serial8250_port uart8250_data[] = { | ||
SMC_PORT(0x3F8, 4), | ||
SMC_PORT(0x2F8, 3), | ||
{ | ||
.mapbase = 0x1f000900, /* The CBUS UART */ | ||
.irq = MIPS_CPU_IRQ_BASE + 2, | ||
.uartclk = 3686400, /* Twice the usual clk! */ | ||
.iotype = UPIO_MEM32, | ||
.flags = CBUS_UART_FLAGS, | ||
.regshift = 3, | ||
}, | ||
{ }, | ||
}; | ||
|
||
static struct platform_device uart8250_device = { | ||
.name = "serial8250", | ||
.id = PLAT8250_DEV_PLATFORM2, | ||
.dev = { | ||
.platform_data = uart8250_data, | ||
}, | ||
}; | ||
|
||
static int __init uart8250_init(void) | ||
{ | ||
return platform_device_register(&uart8250_device); | ||
} | ||
|
||
module_init(uart8250_init); | ||
|
||
MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); | ||
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("8250 UART probe driver for the Malta CBUS UART"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.