Path: blob/master/arch/mips/kernel/8250-platform.c
10817 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (C) 2007 Ralf Baechle ([email protected])6*/7#include <linux/module.h>8#include <linux/init.h>9#include <linux/serial_8250.h>1011#define PORT(base, int) \12{ \13.iobase = base, \14.irq = int, \15.uartclk = 1843200, \16.iotype = UPIO_PORT, \17.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \18.regshift = 0, \19}2021static struct plat_serial8250_port uart8250_data[] = {22PORT(0x3F8, 4),23PORT(0x2F8, 3),24PORT(0x3E8, 4),25PORT(0x2E8, 3),26{ },27};2829static struct platform_device uart8250_device = {30.name = "serial8250",31.id = PLAT8250_DEV_PLATFORM,32.dev = {33.platform_data = uart8250_data,34},35};3637static int __init uart8250_init(void)38{39return platform_device_register(&uart8250_device);40}4142module_init(uart8250_init);4344MODULE_AUTHOR("Ralf Baechle <[email protected]>");45MODULE_LICENSE("GPL");46MODULE_DESCRIPTION("Generic 8250 UART probe driver");474849