summaryrefslogtreecommitdiffstats
path: root/drivers/serial/mrst_max3110.c
Commit message (Collapse)AuthorAgeFilesLines
* serial: mrst_max3110: Make the IRQ option runtimeAlan Cox2010-10-221-27/+28
| | | | | | | | | | And while we are at it allow it to fail to find one. Without this the IRQ option will cause the 3110 driver to fail on 0.7 SFI firmware. Acked-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* serial: mrst_max3110: some code cleanupFeng Tang2010-10-221-127/+200
| | | | | | | | | | | | | The cleanup for mrst_max3110 includes: * remove unneeded head files * make the spi_transfer dma safe, so that driver is more portable * add more check for error return value * use mutex_trylock for read thread Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/serial/mrst_max3110.c needs linux/irq.hAndrew Morton2010-10-011-0/+1
| | | | | | | | | | | sparc64 allmodconfig: drivers/serial/mrst_max3110.c: In function `serial_m3110_startup': drivers/serial/mrst_max3110.c:470: error: `IRQ_TYPE_EDGE_FALLING' undeclared (first use in this function) Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* serial: fix wakup races in the mrst_max3110 driverArjan van de Ven2010-08-101-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The mrst_max3110 driver had a set of unsafe wakeup sequences along the following line: if (!atomic_read(&foo)) { atomic_set(&foo, 1); wake_up(worker_thread); } and the worker thread would do if (atomic_read(&foo)) { do_work(); atomic_set(&foo, 0); } which can result in various missed wakups due to test-then-set races, as well as due to clear-after-work instead of clear-before-work. This patch fixes these races by using the proper bit test-and-set operations, and by doing clear-before-work. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* serial: replace open coded mutex with a real mutex in mrst_max3110.cArjan van de Ven2010-08-101-7/+8
| | | | | | | | | | | | | | | | | | The mrst_max3110.c driver uses an open coded, non atomic variable to create exclusion between two of its worker threads. More than that, while the main thread does a proper set-work-clear sequence, the other thread only does a test, with the result that no actual exclusion is happening. this patch replaces this open coded variable with a proper mutex in addition, the 'lock' spinlock is removed from the per adapter structure, the lock was only ever initialized but never used Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* max3110 sanity check a registerjianwei.yang2010-08-101-2/+11
| | | | | | | | | | | | | | MAX3111 is the SPI/UART IC installed on the MRST SPI Port Card as a serial debug goal, and the SPI Port Card will be frequently mounted and unmounted from the main board by developers depending whether debug serial is required or not. As the MAX3111 has no subvendor or product id registers available, the patch will try to access one register to decide if this IC is present or not. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* mrst_max3110: add UART driver for Max3110 on MoorestownFeng Tang2010-08-101-0/+844
This driver enable the max3110 device, it can be used as a system console. the IRQ needs be enabled if user want a better performance. MRST max3110 works in 3.684MHz clock, which supports 230400 as its maximum rate. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud