summaryrefslogtreecommitdiffstats
path: root/drivers/tty
AgeCommit message (Collapse)Author
2013-07-03Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull second set of VFS changes from Al Viro: "Assorted f_pos race fixes, making do_splice_direct() safe to call with i_mutex on parent, O_TMPFILE support, Jeff's locks.c series, ->d_hash/->d_compare calling conventions changes from Linus, misc stuff all over the place." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) Document ->tmpfile() ext4: ->tmpfile() support vfs: export lseek_execute() to modules lseek_execute() doesn't need an inode passed to it block_dev: switch to fixed_size_llseek() cpqphp_sysfs: switch to fixed_size_llseek() tile-srom: switch to fixed_size_llseek() proc_powerpc: switch to fixed_size_llseek() ubi/cdev: switch to fixed_size_llseek() pci/proc: switch to fixed_size_llseek() isapnp: switch to fixed_size_llseek() lpfc: switch to fixed_size_llseek() locks: give the blocked_hash its own spinlock locks: add a new "lm_owner_key" lock operation locks: turn the blocked_list into a hashtable locks: convert fl_link to a hlist_node locks: avoid taking global lock if possible when waking up blocked waiters locks: protect most of the file_lock handling with i_lock locks: encapsulate the fl_link list handling locks: make "added" in __posix_lock_file a bool ...
2013-07-02Merge tag 'late-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC late changes from Arnd Bergmann: "These are changes that arrived a little late before the merge window or that have multiple dependencies on previous branches so they did not fit into one of the earlier ones. There are 10 branches merged here, a total of 39 non-merge commits. Contents are a mixed bag for the above reasons: * Two new SoC platforms: ST microelectronics stixxxx and the TI 'Nspire' graphing calculator. These should have been in the 'soc' branch but were a little late * Support for the Exynos 5420 variant in mach-exynos, which is based on the other exynos branches to avoid conflicts. * Various small changes for sh-mobile, ux500 and davinci * Common clk support for MSM" * tag 'late-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits) ARM: ux500: bail out on alien cpus ARM: davinci: da850: adopt to pinctrl-single change for configuring multiple pins serial: sh-sci: Initialise variables before access in sci_set_termios() ARM: stih41x: Add B2020 board support ARM: stih41x: Add B2000 board support ARM: sti: Add DEBUG_LL console support ARM: sti: Add STiH416 SOC support ARM: sti: Add STiH415 SOC support ARM: msm: Migrate to common clock framework ARM: msm: Make proc_comm clock control into a platform driver ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver ARM: msm: Remove clock-7x30.h include file ARM: msm: Remove custom clk_set_{max,min}_rate() API ARM: msm: Remove custom clk_set_flags() API msm: iommu: Use clk_set_rate() instead of clk_set_min_rate() msm: iommu: Convert to clk_prepare/unprepare msm_sdcc: Convert to clk_prepare/unprepare usb: otg: msm: Convert to clk_prepare/unprepare msm_serial: Use devm_clk_get() and properly return errors msm_serial: Convert to clk_prepare/unprepare ...
2013-07-02Merge tag 'soc-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC specific changes from Arnd Bergmann: "These changes are all to SoC-specific code, a total of 33 branches on 17 platforms were pulled into this. Like last time, Renesas sh-mobile is now the platform with the most changes, followed by OMAP and EXYNOS. Two new platforms, TI Keystone and Rockchips RK3xxx are added in this branch, both containing almost no platform specific code at all, since they are using generic subsystem interfaces for clocks, pinctrl, interrupts etc. The device drivers are getting merged through the respective subsystem maintainer trees. One more SoC (u300) is now multiplatform capable and several others (shmobile, exynos, msm, integrator, kirkwood, clps711x) are moving towards that goal with this series but need more work. Also noteworthy is the work on PCI here, which is traditionally part of the SoC specific code. With the changes done by Thomas Petazzoni, we can now more easily have PCI host controller drivers as loadable modules and keep them separate from the platform code in drivers/pci/host. This has already led to the discovery that three platforms (exynos, spear and imx) are actually using an identical PCIe host controller and will be able to share a driver once support for spear and imx is added." * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (480 commits) ARM: integrator: let pciv3 use mem/premem from device tree ARM: integrator: set local side PCI addresses right ARM: dts: Add pcie controller node for exynos5440-ssdk5440 ARM: dts: Add pcie controller node for Samsung EXYNOS5440 SoC ARM: EXYNOS: Enable PCIe support for Exynos5440 pci: Add PCIe driver for Samsung Exynos ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data ARM: keystone: Move CPU bringup code to dedicated asm file ARM: multiplatform: always pick one CPU type ARM: imx: select syscon for IMX6SL ARM: keystone: select ARM_ERRATA_798181 only for SMP ARM: imx: Synertronixx scb9328 needs to select SOC_IMX1 ARM: OMAP2+: AM43x: resolve SMP related build error dmaengine: edma: enable build for AM33XX ARM: edma: Add EDMA crossbar event mux support ARM: edma: Add DT and runtime PM support to the private EDMA API dmaengine: edma: Add TI EDMA device tree binding arm: add basic support for Rockchip RK3066a boards arm: add debug uarts for rockchip rk29xx and rk3xxx series arm: Add basic clocks for Rockchip rk3066a SoCs ...
2013-07-02Merge tag 'fixes-non-critical-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC non-cricitical bug fixes from Arnd Bergmann: "These are various bug fixes that were not considered important enough for merging into 3.10. The majority of the ARM fixes are for the OMAP and at91 platforms, and there is another set of bug fixes for device drivers that resolve 'randconfig' build errors and that the subsystem maintainers either did not pick up or preferred to get merged through the arm-soc tree." * tag 'fixes-non-critical-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits) ARM: at91/PMC: use at91_usb_rate() for UTMI PLL ARM: at91/PMC: fix at91sam9n12 USB FS init ARM: at91/PMC: at91sam9n12 family has a PLLB ARM: at91/PMC: sama5d3 family doesn't have a PLLB ARM: tegra: fix section mismatch in tegra_pmc_parse_dt ARM: mxs: don't select HAVE_PWM ARM: mxs: stub out mxs_pm_init for !CONFIG_PM cpuidle: calxeda: select ARM_CPU_SUSPEND ARM: mvebu: fix length of ethernet registers in mv78260 dtsi ARM: at91: cpuidle: Fix target_residency ARM: at91: fix at91_extern_irq usage for non-dt boards ARM: sirf: use CONFIG_SIRF rather than CONFIG_PRIMA2 where necessary clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change X.509: do not emit any informational output mtd: omap2: allow bulding as a module [SCSI] nsp32: use mdelay instead of large udelay constants hwrng: bcm2835: fix MODULE_LICENSE tag ARM: at91: Change the internal SRAM memory type MT_MEMORY_NONCACHED ARM: at91: Fix link breakage when !CONFIG_PHYLIB MAINTAINERS: Add exynos filename match to ARM/S5P EXYNOS ARM ARCHITECTURES ...
2013-06-30Revert "serial: 8250_pci: add support for another kind of NetMos Technology ↵Greg Kroah-Hartman
PCI 9835 Multi-I/O Controller" This reverts commit 8d2f8cd424ca0b99001f3ff4f5db87c4e525f366. As reported by Stefan, this device already works with the parport_serial driver, so the 8250_pci driver should not also try to grab it as well. Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com> Cc: Wang YanQing <udknight@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-29vc: switch to fixed_size_llseek()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-06-27Merge tag 'msm-clock-for-3.11b' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm into next/late From David Brown: MSM clock updates for 3.11. Per Stephen Boyd's coverletter: Resending to collect higher level maintainer acks per Olof's request. The plan is to push this patchset through MSM to the arm-soc tree. This patchset moves the existing MSM clock code and affected drivers to the common clock framework. A prerequisite of moving to the common clock framework is to use clk_prepare() and clk_enable() so the first few patches migrate drivers to that call (clk_prepare() is a no-op on MSM right now). It also removes some custom clock APIs that MSM provides and finally moves the proc_comm clock code to the common struct clk. This patch series will be used as the foundation of the MSM 8660/8960 clock code that I plan to send out after this series. * tag 'msm-clock-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm: ARM: msm: Migrate to common clock framework ARM: msm: Make proc_comm clock control into a platform driver ARM: msm: Prepare clk_get() users in mach-msm for clock-pcom driver ARM: msm: Remove clock-7x30.h include file ARM: msm: Remove custom clk_set_{max,min}_rate() API ARM: msm: Remove custom clk_set_flags() API msm: iommu: Use clk_set_rate() instead of clk_set_min_rate() msm: iommu: Convert to clk_prepare/unprepare msm_sdcc: Convert to clk_prepare/unprepare usb: otg: msm: Convert to clk_prepare/unprepare msm_serial: Use devm_clk_get() and properly return errors msm_serial: Convert to clk_prepare/unprepare Acked-by: Chris Ball <cjb@laptop.org> # for msm_sdcc.c Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-27Merge tag 'renesas-sh-sci-for-v3.11' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/late Renesas sh-sci updates for v3.11 HSCIF support by Ulrich Hecht. * tag 'renesas-sh-sci-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: serial: sh-sci: Initialise variables before access in sci_set_termios() ARM: shmobile: r8a7790: don't use external clock for SCIFs ARM: shmobile: r8a7790: HSCIF support serial: sh-sci: HSCIF support Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2013-06-26serial: sh-sci: Initialise variables before access in sci_set_termios()Simon Horman
This change addresses two warnings that are flagged by gcc relating to potential access to the ssr and cks variables while they are uninitialised. I have addressed this by initialising the values to the defaults present in sci_baud_calc_hscif(). It is my analysis that cks is always initialised if used but that without this change ssr may be accessed while uninitialised. The code altered by this patch was introduced by commit f303b364b41d3fc5bf879799128958400b7859aa ("serial: sh-sci: HSCIF support"). Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-25pch_uart: Add uart_clk selection for the MinnowBoardDarren Hart
Use DMI_BOARD_NAME to determine if we are running on a MinnowBoard and set the uart clock to 50MHz if so. This removes the need to pass the user_uartclk to the kernel at boot time. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24tty: atmel_serial: prepare clk before calling enableBoris BREZILLON
Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to avoid common clk framework warnings. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24Merge 3.10-rc7 into tty-nextGreg Kroah-Hartman
We want the tty fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24msm_serial: Use devm_clk_get() and properly return errorsStephen Boyd
Clocks are not clk_put() in this driver's error paths during probe. The code that checks for clock errors also fails to properly return the error code from the pclk member if it turns out to be the failing clock, leading to potentially confusing error values if the clk member is not an error pointer. Fix these problems with devm_clk_get() and proper error checking. Removing the clk_put() in msm_serial_remove() also points out that msm_port is unused. Furthermore, msm_port is the wrong type and so the clk_put() would be using the wrong pointer. Replace it with the proper type and call uart_remove_one_port() to do the proper cleanup. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-24msm_serial: Convert to clk_prepare/unprepareStephen Boyd
Add calls to clk_prepare and unprepare so that MSM can migrate to the common clock framework. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Brown <davidb@codeaurora.org>
2013-06-22Merge tag 'tty-3.10-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pul tty fixes from Greg Kroah-Hartman: "Here are two tty core fixes that resolve some regressions that have been reported recently. Both tiny fixes, but needed" * tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix transient pty write() EIO tty/vt: Return EBUSY if deallocating VT1 and it is busy
2013-06-20ARM: sirf: use CONFIG_SIRF rather than CONFIG_PRIMA2 where necessaryArnd Bergmann
I got a build error today that made me realize that it is not possible to build a kernel for a SiRF platform without enabling CONFIG_PRIMA2, since a lot of common code depends on CONFIG_PRIMA2. This fixes all occurences that appear like common SiRF code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Barry Song <Baohua.Song@csr.com> Acked-by: Mike Turquette <mturquette@linaro.org>
2013-06-19serial: samsung: select EXYNOS specific driver data if ARCH_EXYNOS is definedChander Kashyap
All EXYNOS4/5 SoCs share a common driver data in the samsung serial driver. Hence, let the driver data inclusion be based on ARCH_EXYNOS instead of SOC specific definition. Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Reviewed by: Girish K S <ks.giri@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-06-18parisc: fix serial ports on C8000 workstationThomas Bogendoerfer
The C8000 workstation (64 bit kernel only) has a somewhat different serial port configuration than other models. Thomas Bogendoerfer sent a patch to fix this in September 2010, which was now minimally modified by me. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Helge Deller <deller@gmx.de>
2013-06-17tty: Reset itty for other ptyPeter Hurley
Commit 19ffd68f816878aed456d5e87697f43bd9e3bd2b ('pty: Remove redundant itty reset') introduced a regression whereby the other pty's linkage is not cleared on teardown. This triggers a false positive diagnostic in testing. Properly reset the itty linkage. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Cc: stable <stable@vger.kernel.org> # 3.10 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17n_tty: Buffer work should not reschedule itselfPeter Hurley
Although the driver-side input path must update the available buffer space, it should not reschedule itself. If space is still available and the flip buffers are not empty, flush_to_ldisc() will loop again. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17n_tty: Fix unsafe update of available buffer spacePeter Hurley
receive_room is used to control the amount of data the flip buffer work can push to the read buffer. This update is unsafe: CPU 0 | CPU 1 | | n_tty_read() | n_tty_set_room() | left = <calc of space> n_tty_receive_buf() | <push data to buffer> | n_tty_set_room() | left = <calc of space> | tty->receive_room = left | | tty->receive_room = left receive_room is now updated with a stale calculation of the available buffer space, and the subsequent work loop will likely overwrite unread data in the input buffer. Update receive_room atomically with the calculation of the available buffer space. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17n_tty: Untangle read completion variablesPeter Hurley
Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17n_tty: Encapsulate minimum_to_wake within N_TTYPeter Hurley
minimum_to_wake is unique to N_TTY processing, and belongs in per-ldisc data. Add the ldisc method, ldisc_ops::fasync(), to notify line disciplines when signal-driven I/O is enabled or disabled. When enabled for N_TTY (by fcntl(F_SETFL, O_ASYNC)), blocking reader/polls will be woken for any readable input. When disabled, blocking reader/polls are not woken until the read buffer is full. Canonical mode (L_ICANON(tty), n_tty_data::icanon) is not affected by the minimum_to_wake setting. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17serial: omap: Fix device tree based PM runtimeTony Lindgren
In the runtime_suspend function pdata is not being used, and also blocks the function in device tree based booting. Fix it by removing the unused pdata from the runtime_suspend function. Further, context loss count is not being passed in pdata, so let's just reinitialize the port every time for those case. This can be further optimized later on for the device tree case by adding detection for the hardware state and possibly by adding a driver specific autosuspend timeout. And doing this, we can then make the related dev_err into a dev_dbg message instead of an error. In order for the wake-up events to work, we also need to set autosuspend_timeout to -1 if 0, and also device_init_wakeup() as that's not being done by the platform init code for the device tree case. Note that this does not affect legacy booting, and in fact might make it work for the cases where the context loss info is not being passed in pdata. Thanks to Kevin Hilman <khilman@linaro.org> for debugging and suggesting fixes for the autosuspend_timeout and device_init_wakeup() related initializiation. Reviewed-by: Kevin Hilman <khilman@linaro.org> Tested-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17serial: imx: Fix serial clock unbalanceFabio Estevam
Since commit 0c375501 (serial: imx: enable the clocks for console), the imx_startup() function calls clk_prepare_enable conditionally, so we need to call clk_disable_unprepare inside imx_shutdown() under the same condition to avoid unbalanced clock calls. This avoids the following warning: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 70 at drivers/clk/clk.c:780 __clk_disable+0x68/0x84() Modules linked in: CPU: 0 PID: 70 Comm: mountall Not tainted 3.10.0-rc4-next-20130607+ #435 Backtrace: [<800116a4>] (dump_backtrace+0x0/0x10c) from [<80011844>] (show_stack+0x18/0x1c) r6:8069f4e8 r5:0000030c r4:00000000 r3:00000000 [<8001182c>] (show_stack+0x0/0x1c) from [<8053bce0>] (dump_stack+0x78/0x94) [<8053bc68>] (dump_stack+0x0/0x94) from [<80023df8>] (warn_slowpath_common+0x6c/0x8c) r4:00000000 r3:00000000 [<80023d8c>] (warn_slowpath_common+0x0/0x8c) from [<80023e3c>] (warn_slowpath_null+0x24/0x2c) r8:bf2ed008 r7:bfaa9810 r6:000f0013 r5:bf824b80 r4:bf824b80 [<80023e18>] (warn_slowpath_null+0x0/0x2c) from [<8041af84>] (__clk_disable+0x68/0x84) [<8041af1c>] (__clk_disable+0x0/0x84) from [<8041b098>] (clk_disable+0x20/0x2c) r4:600f0013 r3:00000001 [<8041b078>] (clk_disable+0x0/0x2c) from [<802c93e8>] (imx_shutdown+0xbc/0xec) r5:bf824b80 r4:bfaa9810 [<802c932c>] (imx_shutdown+0x0/0xec) from [<802c63a0>] (uart_port_shutdown+0x34/0x40) r5:bf86f860 r4:bfaa9810 [<802c636c>] (uart_port_shutdown+0x0/0x40) from [<802c68c0>] (uart_shutdown+0x98/0xc4) r4:bf86f800 r3:00000000 [<802c6828>] (uart_shutdown+0x0/0xc4) from [<802c7514>] (uart_close+0x5c/0x198) r7:bfaa9810 r6:bf274400 r5:bf86f86c r4:bf86f800 [<802c74b8>] (uart_close+0x0/0x198) from [<802ac648>] (tty_release+0xf8/0x500) [<802ac550>] (tty_release+0x0/0x500) from [<800c5a30>] (__fput+0x9c/0x208) [<800c5994>] (__fput+0x0/0x208) from [<800c5bac>] (____fput+0x10/0x14) [<800c5b9c>] (____fput+0x0/0x14) from [<80040234>] (task_work_run+0xb4/0xec) [<80040180>] (task_work_run+0x0/0xec) from [<80029238>] (do_exit+0x2b0/0x920) r8:8000e144 r7:000000f8 r6:bf306300 r5:00000000 r4:bfac1180 [<80028f88>] (do_exit+0x0/0x920) from [<80029a4c>] (do_group_exit+0x50/0xd4) r7:000000f8 [<800299fc>] (do_group_exit+0x0/0xd4) from [<80029ae8>] (__wake_up_parent+0x0/0x28) r7:000000f8 r6:00000001 r5:0006f7ae r4:0006f79a [<80029ad0>] (SyS_exit_group+0x0/0x18) from [<8000dfc0>] (ret_fast_syscall+0x0/0x30) ---[ end trace 16d080eb7efea4e9 ]--- Reported-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17serial/mpc52xx_uart: fix kernel panic when system rebootMatteo Facchinetti
This bug appear when a second PSC based driver appends an interrupt routine to the FIFO controller shared interrupt (like spi-mpc512x-psc). When reboot, uart_shutdown() remove the serial console interrupt handler while spi-mpc512x-psc isr is still activate and cause the following kernel panic: The system is going down for reboot NOW!rpc (ttyPSC0) (Mon Jun 10 12:26:07 20 INIT: Sending processirq 40: nobody cared (try booting with the "irqpoll" option) CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.0-rc4-next-20130607-00001-ga0bceb3-dirty #5 Call Trace: [cfff9f00] [c0007910] show_stack+0x48/0x150 (unreliable) [cfff9f40] [c005ae60] __report_bad_irq.isra.6+0x34/0xe0 [cfff9f60] [c005b194] note_interrupt+0x214/0x26c [cfff9f90] [c00590fc] handle_irq_event_percpu+0xd0/0x1bc [cfff9fd0] [c005921c] handle_irq_event+0x34/0x54 [cfff9fe0] [c005b8f4] handle_level_irq+0x90/0xf4 [cfff9ff0] [c000cb98] call_handle_irq+0x18/0x28 [c050dd60] [c000575c] do_IRQ+0xcc/0x124 [c050dd90] [c000eb04] ret_from_except+0x0/0x14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17serial: mfd: Add sysrq supportFeng Tang
When using MFD HSU based console, sometime we need the sysrq function to help debugging kernel. The sysrq code is basically there, this patch just simply enable it. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17tty: Fix transient pty write() EIOPeter Hurley
Commit 699390354da6c258b65bf8fa79cfd5feaede50b6 ('pty: Ignore slave pty close() if never successfully opened') introduced a bug with ptys whereby a write() in parallel with an open() on an existing pty could mistakenly indicate an I/O error. Only indicate an I/O error if the condition on open() actually exists. Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Cc: stable <stable@vger.kernel.org> # 3.9 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17tty/vt: Return EBUSY if deallocating VT1 and it is busyRoss Lagerwall
Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed the behavior when deallocating VT 1. Previously if trying to deallocate VT1 and it is busy, we would return EBUSY. The commit changed this to return 0 (success). This commit restores the old behavior. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17serial: sh-sci: HSCIF supportUlrich Hecht
Adds support for "High Speed Serial Communications Interface with FIFO", essentially a SCIF with 128-byte FIFOs and more accurate baud rate generator. Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2013-06-14Merge tag 'omap-for-v3.11/soc-signed' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc From Tony Lindgren: Omap SoC changes. Mostly improves am33xx support, and adds minimal support for am43x SoCs. * tag 'omap-for-v3.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: AM43x: SRAM base and size ARM: OMAP2+: AM43x: GP or HS ? ARM: OMAP2+: AM43x: early init ARM: OMAP2+: AM43x: static mapping ARM: OMAP2+: AM437x: SoC revision detection ARM: OMAP2+: AM43x: soc_is support ARM: OMAP2+: AM43x: kbuild ARM: OMAP2+: AM43x: Kconfig ARM: OMAP2+: separate out OMAP4 restart ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK ARM: OMAP3: clock data: get rid of unused USB host clock aliases and dummies ARM: OMAP2+: AM33xx: Add missing reset status info to GFX hwmod + Linux 3.10-rc5 Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-08serial: imx: enable the clocks for consoleHuang Shijie
The console's clocks are disabled after the uart driver is probed. It makes that we can see less log from the console now (though we still can get all the log by the `dmesg`). So enable the clocks for console, and we can see all the log again. This patch also disables the sport->clk_per when we fail to enable the sport->clk_ipg; Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08tty: serial: add Freescale lpuart driver supportJingchang Lu
Add Freescale lpuart driver support. The lpuart device can be found on Vybrid VF610 and Layerscape LS-1 SoCs. Signed-off-by: Jingchang Lu <b35083@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08Merge 3.10-rc5 into tty-nextGreg Kroah-Hartman
2013-06-07Merge tag 'zynq-clk-for-3.11' of git://git.xilinx.com/linux-xlnx into next/socOlof Johansson
From Michal Simek: arm: Xilinx Zynq clock changes for v3.11 Change Xilinx Zynq DT clock description which reflects logical abstraction of Zynq's clock tree. - Refactor PLL driver - Use new clock controller driver - Change timer and uart drivers * tag 'zynq-clk-for-3.11' of git://git.xilinx.com/linux-xlnx: clk: zynq: Remove deprecated clock code arm: zynq: Migrate platform to clock controller clk: zynq: Add clock controller driver clk: zynq: Factor out PLL driver Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-06serial: imx: Improve Kconfig textFabio Estevam
Some improvements in the Kconfig text: - Vendor is Freescale now - Provide a better example for the console parameter, which is something like console=ttymxc0 - Do not pass the names of ancient bootloaders Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06serial: imx: Allow module buildFabio Estevam
There is no need to only allow the serial driver to be built-in. Allow the imx serial driver to be built as a module. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06serial: imx: Fix warning when !CONFIG_SERIAL_IMX_CONSOLEFabio Estevam
When CONFIG_SERIAL_IMX_CONSOLE is not selected the following build warnings appear: drivers/tty/serial/imx.c:274:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function] drivers/tty/serial/imx.c:283:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function] imx_port_ucrs_save() and imx_port_ucrs_restore() are only used when CONFIG_CONSOLE_POLL or CONFIG_SERIAL_IMX_CONSOLE are selected, so protect these functions declaration with a proper ifdef. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06tty/serial/sirf: fix error propagation in sirfsoc_uart_probe()Alexey Khoroshilov
If pinctrl_get_select_default() fails, sirfsoc_uart_probe() returns IS_ERR(result) instead of PTR_ERR(result). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06serial: omap: fix potential NULL pointer dereference in ↵Wei Yongjun
serial_omap_runtime_suspend() The dereference to 'up' should be moved below the NULL test. Introduced by commit ddd85e225c8885b5e4419b0499ab27100e7c366a (serial: omap: prevent runtime PM for "no_console_suspend") Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06tty: serial: Enable uartlite for ARM zynqMichal Simek
Enable it in Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06serial: imx: enable the clocks only when the uart is usedHuang Shijie
Current code opens the clocks when the uart driver is probed. This will wastes some power if several uarts are enabled, but not really used. So close these clocks for uart, and enable the clocks only when the uart is used. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03stallion: final cleanupPaul Bolle
Support for the Stallion multiport serial drivers was removed in v3.1. Clean up their last references in the tree: mainly an outdated Kconfig entry and unneeded documentation. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03serial: imx: add support for DTE modeHuang Shijie
The uart works in the DCE mode by default, but sometime we need it works at the DTE mode. This patch adds the support for the DTE mode. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03serial: omap: repair building without PM_SLEEPArnd Bergmann
A recent bug fix in 3.10, ddd85e225c "serial: omap: prevent runtime PM for "no_console_suspend"", introduced a regression from an obvious typo: drivers/tty/serial/omap-serial.c:1677:14: error: 'serial_omap_complete' undeclared here (not in a function) This changes the incorrectly added macro to the one that we need instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Bin Liu <b-liu@ti.com> Acked-by: Sourav Poddar<sourav.poddar@ti.com> Tested-by: Sourav Poddar<sourav.poddar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03driver: tty: add missing unregister in err caseLibo Chen
when platform_driver_register broken, we should unregister ucc_uart_driver Signed-off-by: Libo chen <libo.chen@huawei.com> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03serial: samsung: missing uart_unregister_driver() on error in ↵Wei Yongjun
s3c24xx_serial_modinit() Add the missing uart_unregister_driver() before return from s3c24xx_serial_modinit() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03tty: replace strict_strtoul() with kstrtoul()Jingoo Han
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03serial/mpc52xx_uart: add MPC5125 PSC supportMatteo Facchinetti
Add MPC5125 PSC register layout structure, MPC5125 specific psc_ops function set and the compatible string. Signed-off-by: Vladimir Ermakov <vooon341@gmail.com> Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03serial/mpc52xx_uart: prepare for adding MPC5125 PSC UART supportMatteo Facchinetti
MPC5125 PSC controller has different register layout than MPC5121. To support MPC5125 PSC in this driver we have to provide further psc_ops functions for SoC specific register accesses. Add new register access functions to the psc_ops structure and provide MPC52xx and MPC512x specific implementation for them. Then replace remaining direct register accesses in the driver by appropriate psc_ops function calls. The subsequent patch can now add MPC5125 specific set of psc_ops functions. Signed-off-by: Vladimir Ermakov <vooon341@gmail.com> Signed-off-by: Matteo Facchinetti <matteo.facchinetti@sirius-es.it> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>