#include <linux/usb/ehci_pdriver.h> #include <asm-generic/sizes.h> #include <loongson1.h> #define LS1X_UART(_id) \ { \ .mapbase = LS1X_UART ## _id ## _BASE, \ .irq = LS1X_UART ## _id ## _IRQ, \ .iotype = UPIO_MEM, \ .flags = UPF_IOREMAP | UPF_FIXED_TYPE, \ .type = PORT_16550A, \ } static struct plat_serial8250_port ls1x_serial8250_port[] = { LS1X_UART(0), LS1X_UART(1), LS1X_UART(2), LS1X_UART(3), {}, }; struct platform_device ls1x_uart_device = { .name = "serial8250", .id = PLAT8250_DEV_PLATFORM, .dev = { .platform_data = ls1x_serial8250_port, }, }; void __init ls1x_serial_setup(struct platform_device *pdev)
.num_resources = ARRAY_SIZE(ls1x_nand_resources), .resource = ls1x_nand_resources, }; #endif //CONFIG_MTD_NAND_LS1X #define LS1X_UART(_id) \ { \ .mapbase = LS1X_UART ## _id ## _BASE, \ .irq = LS1X_UART ## _id ## _IRQ, \ .iotype = UPIO_MEM, \ .flags = UPF_IOREMAP | UPF_FIXED_TYPE, \ .type = PORT_16550A, \ } static struct plat_serial8250_port ls1x_serial8250_port[] = { LS1X_UART(0), LS1X_UART(1), LS1X_UART(2), LS1X_UART(3), LS1X_UART(4), LS1X_UART(5), LS1X_UART(6), LS1X_UART(7), LS1X_UART(8), LS1X_UART(9), LS1X_UART(10), LS1X_UART(11), {}, };