This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/systems/lctr-a6xx/patches/linux/4.4.66/00-aim104-com8.patch

86 lines
2.6 KiB
Diff
Raw Normal View History

diff -Nru a/drivers/tty/serial/8250/8250_aim104_com8.c b/drivers/tty/serial/8250/8250_aim104_com8.c
--- a/drivers/tty/serial/8250/8250_aim104_com8.c
+++ b/drivers/tty/serial/8250/8250_aim104_com8.c
@@ -0,0 +1,51 @@
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/serial_8250.h>
+
+#define PORT(_base,_irq) \
+ { \
+ .iobase = _base, \
+ .irq = _irq, \
+ .uartclk = 1843200, \
+ .iotype = UPIO_PORT, \
+ .flags = UPF_BOOT_AUTOCONF | UPF_BUGGY_UART, \
+ }
+
+static struct plat_serial8250_port aim104_data[] = {
+ PORT(0x100, 10),
+ PORT(0x108, 10),
+ PORT(0x110, 10),
+ PORT(0x118, 10),
+ PORT(0x120, 10),
+ PORT(0x128, 10),
+ PORT(0x130, 10),
+ PORT(0x138, 10),
+ PORT(0x300, 6),
+ PORT(0x308, 6),
+ PORT(0x310, 6),
+ PORT(0x318, 6),
+ PORT(0x320, 6),
+ PORT(0x328, 6),
+ PORT(0x330, 6),
+ PORT(0x338, 6),
+ { },
+};
+
+static struct platform_device exar_device = {
+ .name = "serial8250",
+ .id = PLAT8250_DEV_PLATFORM,
+ .dev = {
+ .platform_data = aim104_data,
+ },
+};
+
+static int __init exar_init(void)
+{
+ return platform_device_register(&exar_device);
+}
+
+module_init(exar_init);
+
+MODULE_AUTHOR("Ricardo Martins");
+MODULE_DESCRIPTION("8250 serial probe module for Eurotech AIM104-COM8");
+MODULE_LICENSE("GPL");
diff -Nru a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -225,6 +225,15 @@ config SERIAL_8250_EXAR_ST16C554
To compile this driver as a module, choose M here: the module
will be called 8250_exar_st16c554.
+config SERIAL_8250_AIM104_COM8
+ tristate "Support Eurotech AIM104-COM8 Dual Quad UART"
+ depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
+ help
+ Eurotech AIM104-COM8 Dual Quad UART.
+
+ To compile this driver as a module, choose M here: the module
+ will be called 8250_aim104_com8.
+
config SERIAL_8250_HUB6
tristate "Support Hub6 cards"
depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
diff -Nru a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
--- a/drivers/tty/serial/8250/Makefile
+++ b/drivers/tty/serial/8250/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o
obj-$(CONFIG_SERIAL_8250_ACCENT) += 8250_accent.o
obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
+obj-$(CONFIG_SERIAL_8250_AIM104_COM8) += 8250_aim104_com8.o
obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
obj-$(CONFIG_SERIAL_8250_FSL) += 8250_fsl.o