aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-06serial: omap: fix software flow controlVikram Pandita1-6/+6
Software flow control register bits were not defined correctly. Also clarify the IXON and IXOFF logic to reflect what userspace wants. Cc: stable@vger.kernel.org Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: make sure to put() on poll_get_charFelipe Balbi1-2/+7
if we would reach serial_omap_get_char() while Data Ready bit isn't set, we would return from it without kicking our pm timer. This would mean we would, eventually, have an unbalanced pm_runtime_get on our device which would prevent it from ever sleeping again. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: implement set_wakeFelipe Balbi1-0/+10
This has been missing from OMAP UART driver for quite a while and it's simple enough to implement it. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: unlock the port lockRuchika Kharwar1-1/+4
This patch unlocks the port lock before calling a serial_core API and re-acquires the port lock after calling it. This patch fixes a system freeze issue seen when the serial_core API uart_write_wakeup() eventually attempts to acquire the port lock already acquired by omap serial interrupt handler. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Ruchika Kharwar <ruchika@ti.com> Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> Signed-off-by: Vijay Badawadagi <bvijay@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: drop "inline" from IRQ handler prototypeFelipe Balbi1-1/+1
it makes no sense to mark our IRQ handler inline since it's passed as a function pointer when enabling the IRQ line. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: optimization with section annotationsFelipe Balbi1-5/+5
Two functions: omap_serial_fill_features_erratas() and of_get_uart_port_info() are only called from probe(). Marking them as __devinit gives us another oportunity to free some code after .init.text is done. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Ruchika Kharwar <ruchika@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: fix sequence of pm_runtime_* calls.Ruchika Kharwar1-1/+1
pm_runtime_enable() needs to be invoked before pm_runtime_use_autosuspend(), and pm_runtime_set_autosuspend_delay() functions. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Ruchika Kharwar <ruchika@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: don't save IRQ flags on hardirqFelipe Balbi1-3/+2
When we're running our hardirq handler, there's not need to disable IRQs with spin_lock_irqsave() because IRQs are already disabled. It also makes no difference if we save or not IRQ flags. Switch over to simple spin_lock/spin_unlock and drop the "flags" variable. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: make sure to suspend device before removeFelipe Balbi1-0/+1
before removing the driver, let's make sure to force device into a suspended state in order to conserve power. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: drop unnecessary check from removeFelipe Balbi1-6/+3
if platform_get_drvdata() returns NULL, that's quite a nasty bug on the driver which we want to catch ASAP. Otherwise, that check is hugely unneeded. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: set dev->drvdata before enabling pm_runtimeFelipe Balbi1-1/+1
by the time we call our first pm_runtme_get_sync() after enable pm_runtime, our resume method might be called. To avoid problems, we must make sure that our dev->drvdata is set correctly before our resume method gets called. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: stick to put_autosuspendFelipe Balbi1-11/+22
Everytime we're done using our TTY, we want the pm timer to be reinitilized. By sticking to pm_runtime_pm_autosuspend() we make sure that this will always be the case. The idea behind this patch is to make sure we will always reinitialize the pm timer so that we don't fall into a situation where pm_runtime_put() expires right away (if timer was already about to expire when we made the call to pm_runtime_put()). While suspending right away wouldn't cause any issues, reinitializing the pm timer can help us avoiding unnecessary context save & restore operations (which are somewhat expensive) if there's another read/write/set_termios request coming right after. IOW, we are trying to make sure UART is still powered up while it's still under heavy usage. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: move THRE check to transmit_chars()Felipe Balbi1-3/+5
since all other IRQ types now do all necessary checks inside their handlers, transmit_chars() was the only one left expecting serial_omap_irq() to check THRE for it. We can move THRE check to transmit_chars() in order to make serial_omap_irq() more uniform. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: refactor receive_chars() into rdi/rlsi handlersFelipe Balbi1-104/+101
receive_chars() was getting too big and too difficult to follow. By splitting it into separate RDI and RSLI handlers, we have smaller functions which are easy to understand and only touch the pieces which they need to touch. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: simplify IRQ handlingFelipe Balbi1-13/+38
quite a few changes here, though they are pretty obvious. In summary we're making sure to detect which interrupt type we need to handle before calling the underlying interrupt handling procedure. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: drop DMA supportFelipe Balbi1-318/+12
The current support is known to be broken and a later patch will come re-adding it using dma engine API. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06serial: omap: don't access the platform_deviceFelipe Balbi1-62/+62
The driver doesn't need to know about its platform_device. Everything the driver needs can be done through the struct device pointer. In case we need to use the OMAP-specific PM function pointers, those can make sure to find the device's platform_device pointer so they can find the struct omap_device through pdev->archdata field. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-06xen/pciback: Fix proper FLR steps.Konrad Rzeszutek Wilk1-4/+4
When we do FLR and save PCI config we did it in the wrong order. The end result was that if a PCI device was unbind from its driver, then binded to xen-pciback, and then back to its driver we would get: > lspci -s 04:00.0 04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection 13:42:12 # 4 :~/ > echo "0000:04:00.0" > /sys/bus/pci/drivers/pciback/unbind > modprobe e1000e e1000e: Intel(R) PRO/1000 Network Driver - 2.0.0-k e1000e: Copyright(c) 1999 - 2012 Intel Corporation. e1000e 0000:04:00.0: Disabling ASPM L0s L1 e1000e 0000:04:00.0: enabling device (0000 -> 0002) xen: registering gsi 48 triggering 0 polarity 1 Already setup the GSI :48 e1000e 0000:04:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode e1000e: probe of 0000:04:00.0 failed with error -2 This fixes it by first saving the PCI configuration space, then doing the FLR. Reported-by: Ren, Yongjie <yongjie.ren@intel.com> Reported-and-Tested-by: Tobias Geiger <tobias.geiger@vido.info> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: stable@vger.kernel.org
2012-09-05Merge tag 'mmc-fixes-for-3.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmcLinus Torvalds7-61/+97
Pull MMC fixes from Chris Ball: - a firmware bug on several Samsung MoviNAND eMMC models causes permanent corruption on the device when secure erase and secure trim requests are made, so we disable those requests on these eMMC devices. - atmel-mci: fix a hang with some SD cards by waiting for not-busy flag. - dw_mmc: low-power mode breaks SDIO interrupts; fix PIO error handling; fix handling of error interrupts. - mxs-mmc: fix deadlocks; fix compile error due to dma.h arch change. - omap: fix broken PIO mode causing memory corruption. - sdhci-esdhc: fix card detection. * tag 'mmc-fixes-for-3.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: omap: fix broken PIO mode mmc: card: Skip secure erase on MoviNAND; causes unrecoverable corruption. mmc: dw_mmc: Disable low power mode if SDIO interrupts are used mmc: dw_mmc: fix error handling in PIO mode mmc: dw_mmc: correct mishandling error interrupt mmc: dw_mmc: amend using error interrupt status mmc: atmel-mci: not busy flag has also to be used for read operations mmc: sdhci-esdhc: break out early if clock is 0 mmc: mxs-mmc: fix deadlock caused by recursion loop mmc: mxs-mmc: fix deadlock in SDIO IRQ case mmc: bfin_sdh: fix dma_desc_array build error
2012-09-05dj: memory scribble in logi_djAlan Cox1-2/+2
Allocate a structure not a pointer to it ! Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-05Merge tag 'gpio-fixes-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpioLinus Torvalds4-4/+5
Pull GPIO fixes from Linus Walleij: "These are some GPIO regression fixes for v3.6: - Erroneous debug message from of_get_named_gpio_flags() - Make sure the MC9S08DZ60 GPIO driver depend on I2C being compiled in (not module) or allmodconfig breaks. - Check return value from irq_alloc_descs() in the Emma Mobile GPIO driver. - Assign the owner field for the rdc321x driver so the module won't be removed if it has active GPIOs." * tag 'gpio-fixes-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: rdc321x: Prevent removal of modules exporting active GPIOs gpio: em: Fix checking return value of irq_alloc_descs gpio: mc9s08dz60: Fix build error if I2C=m gpio: Fix debug message in of_get_named_gpio_flags()
2012-09-05Merge tag 'fbdev-fixes-for-3.6-1' of git://github.com/schandinat/linux-2.6Linus Torvalds6-5/+19
Pull fbdev fixes from Florian Tobias Schandinat: - a fix by Paul Cercueil to prevent a possible buffer overflow - a fix by Bruno Prémont to prevent a rare sleep in invalid context - a fix by Julia Lawall for a double free in auo_k190x - a fix by Dan Carpenter to prevent a division by zero in mb862xxfb - a regression fix by Tomi Valkeinen for the SDI output in OMAP - a fix by Grazvydas Ignotas to fix the console colors in OMAP * tag 'fbdev-fixes-for-3.6-1' of git://github.com/schandinat/linux-2.6: OMAPFB: fix framebuffer console colors OMAPDSS: Fix SDI PLL locking video: mb862xxfb: prevent divide by zero bug drivers/video/auo_k190x.c: drop kfree of devm_kzalloc's data fbcon: Fix bit_putcs() call to kmalloc(s, GFP_KERNEL) fbcon: prevent possible buffer overflow.
2012-09-05Merge tag 'upstream-3.6-rc5' of git://git.infradead.org/linux-ubiLinus Torvalds1-2/+2
Pull ubi fix from Artem Bityutskiy: "A single small fix for memory deallocation: we allocated memory using 'kmem_cache_alloc()' but were freeing it using 'kfree()' in some cases. Now we fix this by using 'kmem_cache_free()' instead." * tag 'upstream-3.6-rc5' of git://git.infradead.org/linux-ubi: UBI: fix a horrible memory deallocation bug
2012-09-06regulator: tps6586x: add support for SYS railLaxman Dewangan2-2/+31
Device have SYS rail which is always ON. It is system power bus. LDO5 and LDO_RTC get powered through this rail internally. Add support for this rail and make the LDO5/LDO_RTC supply by it. Update document accordingly. [swarren: Instantiate the sys regulator from board-harmony-power.c to avoid regression.] Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-058250_pci: Add additional WCH CHC353 devicesAlan Cox1-4/+37
These were reported in bugzilla long ago with a hack patch. Now we have a proper patch for one we can do the rest. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=25102 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05parport: fix possible memory leak in parport_gsc_probe_port()Wei Yongjun1-0/+1
ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05Merge branch 'pnx4008-removal' of git://git.antcom.de/linux-2.6 into next/cleanupOlof Johansson6-90/+7
Removes the pnx4008 platform support, which hasn't seen any active development since 2006 and seems to be unused these days. * 'pnx4008-removal' of git://git.antcom.de/linux-2.6: ARM: mach-pnx4008: Remove architecture
2012-09-05serial: add a new helper functionHuang Shijie10-11/+11
In most of the time, the driver needs to check if the cts flow control is enabled. But now, the driver checks the ASYNC_CTS_FLOW flag manually, which is not a grace way. So add a new wraper function to make the code tidy and clean. Signed-off-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: omap: define helpers for pdata function pointersFelipe Balbi1-19/+47
this patch is in preparation to a few other changes which will align on the prototype for function pointers passed through pdata. It also helps cleaning up the driver a little by agregating checks for pdata in a single location. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: omap: define and use to_uart_omap_port()Felipe Balbi1-18/+18
current code only works because struct uart_port is the first member on the uart_omap_port structure. If, for whatever reason, someone puts another member as the first of the structure, that cast won't work anymore. In order to be safe, let's use a container_of() which, for now, gets optimized into a cast anyway. Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: Add note about migration to driver SCCNXPAlexander Shiyan1-0/+3
This patch adds note about migration to driver SCCNXP in the code of driver SC26XX and in MIPS SNI board initialization with example. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: New serial driver SCCNXPAlexander Shiyan3-0/+1004
This driver is a replacement for a SC26XX driver with a lot of improvements and new features. The main differences from the SC26XX driver: - Removed dependency on MIPS. Driver can be used on any platform. - Added support for SCC2681, SCC2691, SCC2692, SC28L91, SC28L92, SC28L202, SCC68681 and SCC68692 ICs. - Using devm_-related functions. - Improved error handling of serial port, improved FIFO handling. - Ability to load multiple instances of drivers. To avoid the possibility of regression, driver SC26XX left in the system to confirm the stability of the driver on platforms where it is being used. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05parport_serial: Add support for the WCH353 2S/1P multi-IO cardGuainluca Anzolin2-9/+40
To allow parport_serial to handle the card the same PCI ids are blacklisted in 8250_pci.c using the existing software blacklist mechanism. The blacklist array is also renamed because it now covers this new use case. Since the two serial ports are auto-detected as XScale instead of 16550A clones, we also add a quirk to 8250_pci.c to skip autodetection and set the correct port type. Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it> [Fold in fixes for the uart_8250 change] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: Samsung: Silence some checkpatch errors and warningsSachin Kamat1-3/+3
Fixes the following errors and warnings: ERROR: trailing whitespace ERROR: return is not a function, parentheses are not required WARNING: suspect code indent for conditional statements (32, 36) Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: Samsung: Replace printk with dev_* functionsSachin Kamat1-7/+7
Silences checkpatch warnings regarding use of printks. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: pl011: honour serial aliases in device treeMatthew Leach1-0/+36
If the order of UART nodes is changed in the device tree, then tty dev devices are attached to different serial ports causing the console to be directed to a different physical serial port. The "serial" aliases in the device tree should prevent this. This patch ensures that the UART driver creates tty devices that honour these aliases if a device tree is present. Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Will Deacon <will.deacon@arm.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Matthew Leach <matthew.leach@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: diminish usage of struct serial_uart_configPaul Gortmaker3-5/+7
This structure might have made sense many years ago, but at this point it is only used in one specific driver, and referenced in stale comments elsewhere. Rather than change the sunsu.c driver, simply move the struct to be within the exclusive domain of that driver, so it won't get inadvertently picked up and used by other serial drivers going forward. The comments referencing the now driver specific struct are updated accordingly. Note that 8250.c has a struct that is similar in usage, with the name serial8250_config; but is 100% independent and untouched here. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial: sunsu.c - don't explicitly tie array size to dynamic entityPaul Gortmaker1-1/+1
The addition of 8250-like entities continues to grow, while this driver has a snapshot of a select few common 8250 UARTs. So it has no need to grow with the new additions, since it calls out its own (largely historic) static list which does not grow. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05m32r_sio: remove dependency on struct serial_uart_configPaul Gortmaker1-34/+2
The struct serial_uart_config is hardly used at all, and the use case like this one are somewhat needless. Remove the trivial usage so that we can remove serial_uart_config. Since the type field isn't really used at all, we also delete the initialization and references of it here as well. Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05serial/imx: improve error diagnosics for clock and pinctrl failuresUwe Kleine-König1-0/+3
These error paths are used more often now after deep changes to the clock code and pinctrl is still new for imx. So help debugging and give clues in the boot log. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: Split the serial_core helpers for setserial into twoAlan Cox1-71/+87
We want them split so that we can call them from setserial functionality where we copy to/from user space and do the locking, but also from sysfs where in future we'll want to came them within a sysfs context. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05drivers/tty/serial/sirfsoc_uart.c: drop frees of devm_ alloc'd dataJulia Lawall1-6/+2
devm free functions should not have to be explicitly used. A semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ ( * devm_kfree(...); | * devm_free_irq(...); | * devm_iounmap(...); | * devm_release_region(...); | * devm_release_mem_region(...); ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: serial: mpc5xxx: add support for mark/space parityWolfram Sang1-2/+6
Tested on a custom MPC5200B-board using some fancy industrial protocol. Verified that MPC512x has identical bits, so should work there as well. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05drivers:tty:fix up ENOIOCTLCMD error handlingWanlong Gao1-1/+1
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be translated as ENOTTY to user mode. For example: fd = open("/dev/tty", O_RDWR); ioctl(fd, -1, &argp); then the errno should be ENOTTY but not EINVAL. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: serial: max310x: Remove explicit use of devm_kfreeEmil Goode1-3/+0
There is no reason to explicitly call devm_kfree in probe or remove functions. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: serial: max310x: Check return code of gpiochip_removeEmil Goode1-3/+7
The gpiochip_remove function may fail to remove a gpio_chip if any GPIOs are still requested. This patch informs the caller of such a senario. Sparse is warning because the function prototype has a __must_check annotation. Sparse warning: drivers/tty/serial/max310x.c:1223:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: serial: altera_uart: Use platform_{get,set}_drvdataTobias Klauser1-3/+3
Use the wrapper functions, so we can directly pass a struct platfrom_device. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05tty: max3100: use module_spi_driverDevendra Naga1-11/+1
the driver's module init and exit functions can be replaced with module_spi_driver as they do only spi_register_driver and spi_unregister_driver in module's init and exit paths. Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05drivers/tty/serial/amba-pl0{10,11}.c: use clk_prepare_enable and clk_disable_unprepareJulia Lawall2-22/+8
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. The9 make the code more concise, and ensure that clk_unprepare is called when clk_enable fails. A simplified version of the semantic patch that introduces calls to these functions is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ - clk_prepare(e); - clk_enable(e); + clk_prepare_enable(e); @@ expression e; @@ - clk_disable(e); - clk_unprepare(e); + clk_disable_unprepare(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05xen: Use correct masking in xen_swiotlb_alloc_coherent.Ronny Hegewald1-1/+1
When running 32-bit pvops-dom0 and a driver tries to allocate a coherent DMA-memory the xen swiotlb-implementation returned memory beyond 4GB. The underlaying reason is that if the supplied driver passes in a DMA_BIT_MASK(64) ( hwdev->coherent_dma_mask is set to 0xffffffffffffffff) our dma_mask will be u64 set to 0xffffffffffffffff even if we set it to DMA_BIT_MASK(32) previously. Meaning we do not reset the upper bits. By using the dma_alloc_coherent_mask function - it does the proper casting and we get 0xfffffffff. This caused not working sound on a system with 4 GB and a 64-bit compatible sound-card with sets the DMA-mask to 64bit. On bare-metal and the forward-ported xen-dom0 patches from OpenSuse a coherent DMA-memory is always allocated inside the 32-bit address-range by calling dma_alloc_coherent_mask. This patch adds the same functionality to xen swiotlb and is a rebase of the original patch from Ronny Hegewald which never got upstream b/c the underlaying reason was not understood until now. The original email with the original patch is in: http://old-list-archives.xen.org/archives/html/xen-devel/2010-02/msg00038.html the original thread from where the discussion started is in: http://old-list-archives.xen.org/archives/html/xen-devel/2010-01/msg00928.html Signed-off-by: Ronny Hegewald <ronny.hegewald@online.de> Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-By: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: stable@vger.kernel.org