1*9bef3d41SPaul Gortmaker /* 2*9bef3d41SPaul Gortmaker * Copyright (C) 2005 Russell King. 3*9bef3d41SPaul Gortmaker * Data taken from include/asm-i386/serial.h 4*9bef3d41SPaul Gortmaker * 5*9bef3d41SPaul Gortmaker * This program is free software; you can redistribute it and/or modify 6*9bef3d41SPaul Gortmaker * it under the terms of the GNU General Public License version 2 as 7*9bef3d41SPaul Gortmaker * published by the Free Software Foundation. 8*9bef3d41SPaul Gortmaker */ 9*9bef3d41SPaul Gortmaker #include <linux/module.h> 10*9bef3d41SPaul Gortmaker #include <linux/init.h> 11*9bef3d41SPaul Gortmaker #include <linux/serial_8250.h> 12*9bef3d41SPaul Gortmaker 13*9bef3d41SPaul Gortmaker #define HUB6(card,port) \ 14*9bef3d41SPaul Gortmaker { \ 15*9bef3d41SPaul Gortmaker .iobase = 0x302, \ 16*9bef3d41SPaul Gortmaker .irq = 3, \ 17*9bef3d41SPaul Gortmaker .uartclk = 1843200, \ 18*9bef3d41SPaul Gortmaker .iotype = UPIO_HUB6, \ 19*9bef3d41SPaul Gortmaker .flags = UPF_BOOT_AUTOCONF, \ 20*9bef3d41SPaul Gortmaker .hub6 = (card) << 6 | (port) << 3 | 1, \ 21*9bef3d41SPaul Gortmaker } 22*9bef3d41SPaul Gortmaker 23*9bef3d41SPaul Gortmaker static struct plat_serial8250_port hub6_data[] = { 24*9bef3d41SPaul Gortmaker HUB6(0, 0), 25*9bef3d41SPaul Gortmaker HUB6(0, 1), 26*9bef3d41SPaul Gortmaker HUB6(0, 2), 27*9bef3d41SPaul Gortmaker HUB6(0, 3), 28*9bef3d41SPaul Gortmaker HUB6(0, 4), 29*9bef3d41SPaul Gortmaker HUB6(0, 5), 30*9bef3d41SPaul Gortmaker HUB6(1, 0), 31*9bef3d41SPaul Gortmaker HUB6(1, 1), 32*9bef3d41SPaul Gortmaker HUB6(1, 2), 33*9bef3d41SPaul Gortmaker HUB6(1, 3), 34*9bef3d41SPaul Gortmaker HUB6(1, 4), 35*9bef3d41SPaul Gortmaker HUB6(1, 5), 36*9bef3d41SPaul Gortmaker { }, 37*9bef3d41SPaul Gortmaker }; 38*9bef3d41SPaul Gortmaker 39*9bef3d41SPaul Gortmaker static struct platform_device hub6_device = { 40*9bef3d41SPaul Gortmaker .name = "serial8250", 41*9bef3d41SPaul Gortmaker .id = PLAT8250_DEV_HUB6, 42*9bef3d41SPaul Gortmaker .dev = { 43*9bef3d41SPaul Gortmaker .platform_data = hub6_data, 44*9bef3d41SPaul Gortmaker }, 45*9bef3d41SPaul Gortmaker }; 46*9bef3d41SPaul Gortmaker 47*9bef3d41SPaul Gortmaker static int __init hub6_init(void) 48*9bef3d41SPaul Gortmaker { 49*9bef3d41SPaul Gortmaker return platform_device_register(&hub6_device); 50*9bef3d41SPaul Gortmaker } 51*9bef3d41SPaul Gortmaker 52*9bef3d41SPaul Gortmaker module_init(hub6_init); 53*9bef3d41SPaul Gortmaker 54*9bef3d41SPaul Gortmaker MODULE_AUTHOR("Russell King"); 55*9bef3d41SPaul Gortmaker MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards"); 56*9bef3d41SPaul Gortmaker MODULE_LICENSE("GPL"); 57