From: Albert H. <he...@us...> - 2009-02-01 18:29:58
|
Update of /cvsroot/gc-linux/linux/drivers/serial In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17186/drivers/serial Modified Files: Kconfig Makefile usbgecko.c Log Message: Merge 2.6.28. Also: - run checkpatch against the non-broken source code - add GPIO driver fixes - implement getgeo for the special block drivers - small fixes Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/serial/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 15 Nov 2008 20:10:15 -0000 1.4 +++ Makefile 1 Feb 2009 18:29:35 -0000 1.5 @@ -4,6 +4,16 @@ obj-$(CONFIG_SERIAL_CORE) += serial_core.o obj-$(CONFIG_SERIAL_21285) += 21285.o + +# These Sparc drivers have to appear before others such as 8250 +# which share ttySx minor node space. Otherwise console device +# names change and other unplesantries. +obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o +obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o +obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o +obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o +obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o + obj-$(CONFIG_SERIAL_8250) += 8250.o obj-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o @@ -31,16 +41,10 @@ obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o -obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o -obj-$(CONFIG_SERIAL_SUNHV) += sunhv.o -obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o -obj-$(CONFIG_SERIAL_SUNSU) += sunsu.o -obj-$(CONFIG_SERIAL_SUNSAB) += sunsab.o obj-$(CONFIG_SERIAL_MUX) += mux.o obj-$(CONFIG_SERIAL_68328) += 68328serial.o obj-$(CONFIG_SERIAL_68360) += 68360serial.o -obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o obj-$(CONFIG_SERIAL_MCF) += mcf.o obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o obj-$(CONFIG_SERIAL_LH7A40X) += serial_lh7a40x.o Index: usbgecko.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/serial/usbgecko.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- usbgecko.c 27 Mar 2008 22:35:41 -0000 1.4 +++ usbgecko.c 1 Feb 2009 18:29:35 -0000 1.5 @@ -2,8 +2,8 @@ * drivers/serial/usbgecko.c * * Console and TTY driver for the USB Gecko adapter. - * Copyright (C) 2008 The GameCube Linux Team - * Copyright (C) 2008 Albert Herranz + * Copyright (C) 2008-2009 The GameCube Linux Team + * Copyright (C) 2008,2009 Albert Herranz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -86,7 +86,7 @@ { struct exi_device *exi_device = adapter->exi_device; - if (exi_device) + if (exi_device) ug_exi_io_transaction(exi_device, i, o); } #endif @@ -102,12 +102,12 @@ ug_exi_io_transaction(exi_device, 0x9000, &data); exi_dev_give(exi_device); - return (data == 0x0470); + return data == 0x0470; } #if 0 /* - * + * */ static int ug_is_txfifo_empty(struct ug_adapter *adapter) { @@ -120,13 +120,13 @@ if (!exi_dev_try_take(exi_device)) { ug_exi_io_transaction(exi_device, 0xC000, &data); exi_dev_give(exi_device); - return (data & 0x0400); + return data & 0x0400; } return 0; } /* - * + * */ static int ug_is_rxfifo_empty(struct ug_adapter *adapter) { @@ -139,13 +139,13 @@ if (!exi_dev_try_take(exi_device)) { ug_exi_io_transaction(exi_device, 0xD000, &data); exi_dev_give(exi_device); - return (data & 0x0400); + return data & 0x0400; } return 0; } /* - * + * */ static int ug_putc(struct ug_adapter *adapter, char c) { @@ -158,13 +158,13 @@ if (!exi_dev_try_take(exi_device)) { ug_exi_io_transaction(exi_device, 0xB000|(c<<4), &data); exi_dev_give(exi_device); - return (data & 0x0400); + return data & 0x0400; } return 0; } /* - * + * */ static int ug_getc(struct ug_adapter *adapter, char *c) { @@ -187,7 +187,7 @@ #endif /* - * + * */ static int ug_safe_putc(struct ug_adapter *adapter, char c) { @@ -199,16 +199,16 @@ if (!exi_dev_try_take(exi_device)) { ug_exi_io_transaction(exi_device, 0xC000, &data); - if ((data & 0x0400)) + if ((data & 0x0400)) ug_exi_io_transaction(exi_device, 0xB000|(c<<4), &data); exi_dev_give(exi_device); - return (data & 0x0400); + return data & 0x0400; } return 0; } /* - * + * */ static int ug_safe_getc(struct ug_adapter *adapter, char *c) { @@ -244,12 +244,12 @@ * */ static void ug_console_write(struct console *co, const char *buf, - unsigned int count) + unsigned int count) { struct ug_adapter *adapter = co->data; char *b = (char *)buf; - while(count--) { + while (count--) { if (*b == '\n') ug_safe_putc(adapter, '\r'); ug_safe_putc(adapter, *b++); @@ -260,21 +260,21 @@ * */ static int ug_console_read(struct console *co, char *buf, - unsigned int count) + unsigned int count) { struct ug_adapter *adapter = co->data; int i; char c; i = count; - while(i--) { + while (i--) { ug_safe_getc(adapter, &c); *buf++ = c; } return count; } -static struct tty_driver *ug_tty_driver = NULL; +static struct tty_driver *ug_tty_driver; static struct tty_driver *ug_console_device(struct console *co, int *index) { @@ -283,24 +283,24 @@ } -static struct console ug_consoles[]= { - { - .name = DRV_MODULE_NAME "0", - .write = ug_console_write, - .read = ug_console_read, - .device = ug_console_device, - .flags = CON_PRINTBUFFER | CON_ENABLED, - .index = 0, - .data = &ug_adapters[0], +static struct console ug_consoles[] = { + { + .name = DRV_MODULE_NAME "0", + .write = ug_console_write, + .read = ug_console_read, + .device = ug_console_device, + .flags = CON_PRINTBUFFER | CON_ENABLED, + .index = 0, + .data = &ug_adapters[0], }, { - .name = DRV_MODULE_NAME "1", - .write = ug_console_write, - .read = ug_console_read, - .device = ug_console_device, - .flags = CON_PRINTBUFFER | CON_ENABLED, - .index = 1, - .data = &ug_adapters[1], + .name = DRV_MODULE_NAME "1", + .write = ug_console_write, + .read = ug_console_read, + .device = ug_console_device, + .flags = CON_PRINTBUFFER | CON_ENABLED, + .index = 1, + .data = &ug_adapters[1], }, }; @@ -323,7 +323,7 @@ set_task_state(current, TASK_RUNNING); chunk = 0; - while(!kthread_should_stop()) { + while (!kthread_should_stop()) { count = 0; adapter = tty->driver_data; if (adapter) @@ -415,7 +415,7 @@ index = tty->index; adapter = &ug_adapters[index]; - for(i = 0; i < count; i++) + for (i = 0; i < count; i++) ug_safe_putc(adapter, *b++); return count; } @@ -482,7 +482,7 @@ */ /* - * + * */ static int ug_probe(struct exi_device *exi_device) { @@ -494,7 +494,7 @@ if (exi_device->eid.id != EXI_ID_NONE) return -ENODEV; - if (!ug_check_adapter(exi_device)) + if (!ug_check_adapter(exi_device)) return -ENODEV; slot = to_channel(exi_get_exi_channel(exi_device)); @@ -531,9 +531,8 @@ console = &ug_consoles[slot]; adapter = console->data; - if (adapter->refcnt) { + if (adapter->refcnt) drv_printk(KERN_ERR, "adapter removed while in use!\n"); - } ug_tty_exit(); Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/serial/Kconfig,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Kconfig 15 Nov 2008 20:10:15 -0000 1.5 +++ Kconfig 1 Feb 2009 18:29:35 -0000 1.6 @@ -9,7 +9,6 @@ # The new 8250/16550 serial drivers config SERIAL_8250 tristate "8250/16550 and compatible serial support" - depends on (BROKEN || !SPARC) select SERIAL_CORE ---help--- This selects whether you want to include the driver for the standard @@ -458,7 +457,7 @@ config SERIAL_SAMSUNG_DEBUG bool "Samsung SoC serial debug" - depends on SERIAL_SAMSUNG + depends on SERIAL_SAMSUNG && DEBUG_LL help Add support for debugging the serial driver. Since this is generally being used as a console, we use our own output @@ -994,24 +993,12 @@ bool "Support RTS/CTS on 68328 serial port" depends on SERIAL_68328 -config SERIAL_COLDFIRE - bool "ColdFire serial support (DEPRECATED)" - depends on COLDFIRE - help - This driver supports the built-in serial ports of the Motorola ColdFire - family of CPUs. - This driver is deprecated because it supports only the old interface - for serial drivers and features like magic keys are not working. - Please switch to the new style driver because this driver will be - removed soon. - config SERIAL_MCF - bool "Coldfire serial support (new style driver)" + bool "Coldfire serial support" depends on COLDFIRE select SERIAL_CORE help - This new serial driver supports the Freescale Coldfire serial ports - using the new serial driver subsystem. + This serial driver supports the Freescale Coldfire serial ports. config SERIAL_MCF_BAUDRATE int "Default baudrate for Coldfire serial ports" @@ -1136,42 +1123,6 @@ your boot loader (lilo or loadlin) about how to pass options to the kernel at boot time.) -config SERIAL_CPM_SCC1 - bool "Support for SCC1 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SCC1 as a serial port - -config SERIAL_CPM_SCC2 - bool "Support for SCC2 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SCC2 as a serial port - -config SERIAL_CPM_SCC3 - bool "Support for SCC3 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SCC3 as a serial port - -config SERIAL_CPM_SCC4 - bool "Support for SCC4 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SCC4 as a serial port - -config SERIAL_CPM_SMC1 - bool "Support for SMC1 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SMC1 as a serial port - -config SERIAL_CPM_SMC2 - bool "Support for SMC2 serial port" - depends on SERIAL_CPM=y - help - Select this option to use SMC2 as a serial port - config SERIAL_SGI_L1_CONSOLE bool "SGI Altix L1 serial console support" depends on IA64_GENERIC || IA64_SGI_SN2 @@ -1325,7 +1276,7 @@ say Y or M. Otherwise, say N. config SERIAL_NETX - bool "NetX serial port support" + tristate "NetX serial port support" depends on ARM && ARCH_NETX select SERIAL_CORE help @@ -1337,7 +1288,7 @@ config SERIAL_NETX_CONSOLE bool "Console on NetX serial port" - depends on SERIAL_NETX + depends on SERIAL_NETX=y select SERIAL_CORE_CONSOLE help If you have enabled the serial port on the Hilscher NetX SoC @@ -1428,10 +1379,10 @@ help This is a driver for the USB Gecko adapter for the Nintendo GameCube and Wii gaming consoles. It provides a console and a tty interface. - + If you have an adapter like this, say Y here, otherwise say N. - - To compile this driver as a module, choose M here: the - module will be called usbgecko. + + To compile this driver as a module, choose M here: the + module will be called usbgecko. endmenu |