2 * s6105 platform devices
4 * Copyright (c) 2009 emlix GmbH
7 #include <linux/kernel.h>
8 #include <linux/init.h>
9 #include <linux/platform_device.h>
10 #include <linux/serial.h>
11 #include <linux/serial_8250.h>
13 #include <variant/hardware.h>
17 static const signed char uart_irq_mappings[] = {
23 const signed char *platform_irq_mappings[NR_IRQS] = {
24 [UART_INTNUM] = uart_irq_mappings,
27 static struct plat_serial8250_port serial_platform_data[] = {
29 .membase = (void *)S6_REG_UART + 0x0000,
30 .mapbase = S6_REG_UART + 0x0000,
34 .iotype = SERIAL_IO_MEM,
35 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
38 .membase = (void *)S6_REG_UART + 0x1000,
39 .mapbase = S6_REG_UART + 0x1000,
43 .iotype = SERIAL_IO_MEM,
44 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
49 static struct platform_device platform_devices[] = {
52 .id = PLAT8250_DEV_PLATFORM,
54 .platform_data = serial_platform_data,
59 static int __init device_init(void)
63 for (i = 0; i < ARRAY_SIZE(platform_devices); i++)
64 platform_device_register(&platform_devices[i]);
67 arch_initcall_sync(device_init);