aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* pinctrl: fix pinconf_groups_show() to emit newlineStephen Warren2012-02-22
| | | | | | | | pinconf_groups_show() wrote all debug information on one line. Fix it to match pinconf_pins_show() and be legible. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: record a pin owner, not mux function, when requesting pinsStephen Warren2012-02-22
| | | | | | | | | | | | | | | | | When pins are requested/acquired/got, some device becomes the owner of their mux setting. At this point, it isn't certain which mux function will be selected for the pin, since this may vary between each of the device's states in the pinctrl mapping table. As such, we should record the owning device, not what we think the initial mux setting will be, when requesting pins. This doesn't make a lot of difference right now since pinctrl_get gets only one single device/state combination, but this will make a difference when pinctrl_get gets all states, and pinctrl_select_state can switch between states. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: error if mapping table's control dev can't be foundStephen Warren2012-02-22
| | | | | | | | | | This is a serious error, and the pin control system will not function correctly if it ends up not programing the mapping table entries into the HW. Instead of just ignoring this, error out. Signed-off-by: Stephen Warren <swarren@nvidia.com> [rebased to fit the applied patch series, cast error to pointer] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: downgrade pinctrl_get warning when no maps are foundStephen Warren2012-02-22
| | | | | | | | | | | | | | This may be perfectly legitimate. An IP block may get re-used across SoCs. Not all of those SoCs may need pinmux settings for the IP block, e.g. if one SoC dedicates pins to that function but another doesn't. The driver won't know this, and will always attempt to set up the pinmux. The mapping table defines whether any HW programming is actually needed. Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> [rebased to fit the applied patch series] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: assume map table entries can't have a NULL ctrl_dev_name fieldStephen Warren2012-02-22
| | | | | | | These are already disallowed. Clean up some code that doesn't assume this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: spawn U300 pinctrl from the COH901 GPIOLinus Walleij2012-02-22
| | | | | | | | | | | This solves the riddle on how the U300 pin controller shall be able to reference the struct gpio_chip even though these are two separate drivers: spawn the pinctrl child from the GPIO driver and pass in the struct gpio_chip as platform data. In the process we rename the U300 "pinmux-u300" to "pinctrl-u300" so as not to confuse. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: core.c/h cleanupsStephen Warren2012-02-22
| | | | | | | | | * Make all functions internal to core.c static. Remove any of these from core.h. * Add any missing EXPORT_SYMBOL_GPL(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: Re-order pinconf.[ch] to match each-otherStephen Warren2012-02-22
| | | | | | | | | | Modify the two files so that the order of function prototypes in the header matches the order of implementations in the .c file. Don't prototype a couple of internal functions. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: Re-order pinmux.[ch] to match each-otherStephen Warren2012-02-22
| | | | | | | | Modify the two files so that the order of function prototypes in the header matches the order of implementations in the .c file. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: Store mapping table as a list of chunksStephen Warren2012-02-22
| | | | | | | | | | | | | | | | | | | | Instead of storing a single array of mapping table entries, which requires realloc()ing that array each time it's extended and copying the new data, simply store a list of pointers to the individual chunks. This also removes the need to copy the mapping table at all; a pointer is maintained to the original table, this saving memory. A macro for_each_maps() is introduced to hide the additional complexity of iterating over the map entries. This change will also simplify removing chunks of entries from the mapping table. This isn't important right now, but will be in the future, when mapping table entries are dynamically added when parsing them from the device tree, and removed when drivers no longer need to interact with pinctrl. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: use list_add_tail instead of list_addStephen Warren2012-02-22
| | | | | | | | This mostly makes debugfs files print things in the order that they were added or acquired, which just feels a little more consistent. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: pinctrl_register_mappings() shouldn't be __initStephen Warren2012-02-22
| | | | | | | | | | It may be common for pinctrl_register_mappings() to be used from __init context, but there's no reason that additional mappings shouldn't be added at a later point, e.g. if loading modules that add pin controllers and their mapping tables. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: make "hog" mapping table entries workStephen Warren2012-02-22
| | | | | | | | | | | | Commit 77a5988 "pinctrl: changes hog mechanism to be self-referential" modified the way "hog" entries were represented in the mapping table. However, the new representation failed some error checks in pinctrl_hog_map(). Remove the now-bogus error-check, and fix the code to solve the issue the error-check used to avoid. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* serial/sirf: fixup for changes to pin controlLinus Walleij2012-02-22
| | | | | | | | | | | | We changed the signature of the pin multiplexing functions to handle any pin business, so fix up the Sirf driver to call this new interface and rename some variables to make the semantics understandable. Cc: linux-serial@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: changes hog mechanism to be self-referentialLinus Walleij2012-02-10
| | | | | | | | | | | Instead of a specific boolean field to indicate if a map entry shall be hogged, treat self-reference as an indication of desired hogging. This drops one field off the map struct and has a nice Douglas R. Hofstadter-feel to it. Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: factor pin control handles over to the coreLinus Walleij2012-02-10
| | | | | | | | | | | | This moves the per-devices struct pinctrl handles and device map over from the pinmux part of the subsystem to the core pinctrl part. This makes the device handles core infrastructure with the goal of using these handles also for pin configuration, so that device drivers (or boards etc) will need one and only one handle to the pin control core. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: move generic functions to the pinctrl_ namespaceLinus Walleij2012-02-10
| | | | | | | | | | | | | | Since we want to use the former pinmux handles and mapping tables for generic control involving both muxing and configuration we begin refactoring by renaming them from pinmux_* to pinctrl_*. ChangeLog v1->v2: - Also rename the PINMUX_* macros in machine.h to PIN_ as indicated in the documentation so as to reflect the generic nature of these mapping entries from now on. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: break out a pinctrl consumer headerLinus Walleij2012-02-10
| | | | | | | | | | This breaks out a <linux/pinctrl/consumer.h> header to be used by all pinmux and pinconfig alike, so drivers needing services from pinctrl does not need to include different headers. This is similar to the approach taken by the regulator API. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: enable pinmux for mmp seriesHaojian Zhuang2012-02-01
| | | | | | | | Support PXA168/PXA910/MMP2 pinmux. Now only support function switch. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> [Rebase and fix some whitespace issues] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: delete raw device pointers in pinmux mapsLinus Walleij2012-02-01
| | | | | | | | | | | | After discussion with Mark Brown in an unrelated thread about ADC lookups, it came to my knowledge that the ability to pass a struct device * in the regulator consumers is just a historical artifact, and not really recommended. Since there are no in-kernel users of these pointers, we just kill them right now, before someone starts to use them. Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* pinctrl: restore pin namingLinus Walleij2012-02-01
| | | | | | | | | Commit ca53c5f1ca5c936777caca46b7c716a40682ce83 ("pinctrl: conjure names for unnamed pins") made pins lose their identity and only get autogenerated names. Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2012-01-30
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776F hwmon: (sht15) fix bad error code MAINTAINERS: Drop maintainer for MAX1668 hwmon driver MAINTAINERS: Add hwmon entries for Wolfson hwmon: (f71805f) Fix clamping of temperature limits
| * hwmon: (w83627ehf) Disable setting DC mode for pwm2, pwm3 on NCT6776FGuenter Roeck2012-01-29
| | | | | | | | | | | | | | | | | | | | NCT6776F only supports pwm mode for pwm2 and pwm3. Return error if an attempt is made to set those pwm channels to DC mode. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org # 3.0+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (sht15) fix bad error codeVivien Didelot2012-01-29
| | | | | | | | | | | | | | | | When no platform data was supplied, returned error code was 0. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Cc: stable@vger.kernel.org # 2.6.32+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (f71805f) Fix clamping of temperature limitsJean Delvare2012-01-20
| | | | | | | | | | | | | | | | | | | | | | Properly clamp temperature limits set by the user. Without this fix, attempts to write temperature limits above the maximum supported by the chip (255 degrees Celsius) would arbitrarily and unexpectedly result in the limit being set to 0 degree Celsius. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* | Merge branch 'for-torvalds' of ↵Linus Torvalds2012-01-30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Here are some fixes to the pin control system that has accumulated since -rc1. Mainly Tony Lindgren fixed the module load/unload logic and the rest are minor fixes and documentation. * 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: add checks for empty function names pinctrl: fix pinmux_hog_maps when ctrl_dev_name is not set pinctrl: fix some pinmux typos pinctrl: free debugfs entries when unloading a pinmux driver pinctrl: unbreak error messages Documentation/pinctrl: fix a few syntax errors in code examples pinctrl: fix pinconf_pins_show iteration
| * | pinctrl: add checks for empty function namesTony Lindgren2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed as otherwise we can get the following when dealing with buggy data in a pinmux driver for pinmux_search_function: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at strcmp+0xc/0x34 LR is at pinmux_get+0x350/0x8f4 ... As we need pctldev initialized to call ops->list_functions, let's initialize it before check_ops calls and pass the pctldev to the check_ops functions. Do this for both pinmux and pinconf check_ops functions. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | pinctrl: fix pinmux_hog_maps when ctrl_dev_name is not setTony Lindgren2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ctrl_dev_name is optional for struct pinmux_map assuming that ctrl_dev is set. Without this patch we can get: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... (pinmux_hog_maps+0xa4/0x20c) (pinctrl_register+0x2a4/0x378) ... Fix this by adding adding a test for map->ctrl_dev. Additionally move the test for map->ctrl_dev earlier to optimize out the loop a bit. Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | pinctrl: fix some pinmux typosTony Lindgren2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | Fix some pinmux typos so implementing pinmux drivers is a bit easier. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | pinctrl: free debugfs entries when unloading a pinmux driverTony Lindgren2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | We were not cleaning up properly after unloading a pinmux driver compiled as module. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | pinctrl: unbreak error messagesUwe Kleine-König2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to not line break error messages to allow easier grepping for them even when the line gets >80 chars. Additionally some minor reformating is done. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | pinctrl: fix pinconf_pins_show iterationStephen Warren2012-01-20
| |/ | | | | | | | | | | | | | | | | Commit 706e852 "pinctrl: correct a offset while enumerating pins" modified the variable used by pinconf_pin_show()'s for loop, but didn't update the for loop test expression. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* | Merge tag 'tty-3.3-rc1' of ↵Linus Torvalds2012-01-30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Here are some tty/serial patches for 3.3-rc1 Big thing here is the movement of the 8250 serial drivers to their own directory, now that the patch churn has calmed down. Other than that, only minor stuff (omap patches were reverted as they were found to be wrong), and another broken driver removed from the system. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * tag 'tty-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: Kill off Moorestown code Revert "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode" Revert "tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip" serial: Fix wakeup init logic to speed up startup docbook: don't use serial_core.h in device-drivers book serial: amba-pl011: lock console writes against interrupts amba-pl011: do not disable RTS during shutdown tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIME omap-serial :Make the suspend/resume functions depend on CONFIG_PM_SLEEP. TTY: fix UV serial console regression jsm: Fixed EEH recovery error Updated TTY MAINTAINERS info serial: group all the 8250 related code together
| * | serial: Kill off Moorestown codeAlan Cox2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | All production devices operate in the Oaktrail configuration with legacy PC elements present and an ACPI BIOS. Continue stripping out the Moorestown elements from the tree leaving Medfield. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | Revert "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode"Greg Kroah-Hartman2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0a697b22252c9d7208b5fb3e9fbd124dd229f1d2 as Paul wants to rework it. Cc: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | Revert "tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the ↵Greg Kroah-Hartman2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chip" This reverts commit 43cf7c0bebf50d0b68aa42ae6d24cf08e3f24823 as Paul wants to redo it. Cc: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | serial: Fix wakeup init logic to speed up startupSimon Glass2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The synchronize_rcu() call resulting from making every serial driver wake-up capable (commit b3b708fa) slows boot down on my Tegra2x system (with CONFIG_PREEMPT disabled). But this is avoidable since it is the device_set_wakeup_enable() and then subsequence disable which causes the delay. We might as well just make the device wakeup capable but not actually enable it for wakeup until needed. Effectively the current code does this: device_set_wakeup_capable(dev, 1); device_set_wakeup_enable(dev, 1); device_set_wakeup_enable(dev, 0); We can just drop the last two lines. Before this change my boot log says: [ 0.227062] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.702928] serial8250.0: ttyS0 at MMIO 0x70006040 (irq = 69) is a Tegra after: [ 0.227264] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.227983] serial8250.0: ttyS0 at MMIO 0x70006040 (irq = 69) is a Tegra for saving of 450ms. Suggested-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | serial: amba-pl011: lock console writes against interruptsRabin Vincent2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protect against pl011_console_write() and the interrupt for the console UART running concurrently on different CPUs. Otherwise the console_write could spin for a long time waiting for the UART to become not busy, while the other CPU continuously services UART interrupts and keeps the UART busy. The checks for sysrq and oops_in_progress are taken from 8250.c. Cc: stable <stable@vger.kernel.org> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Reviewed-by: Bibek Basu <bibek.basu@stericsson.com> Reviewed-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | amba-pl011: do not disable RTS during shutdownShreshtha Kumar Sahu2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In present driver, shutdown clears RTS and DTR in CR register. But the documentation "Documentation/serial/driver" suggests not to disable RTS and DTR in shutdown(). Also RTS and DTR is preserved between shutdown and startup calls, i.e. these are restored in startup if they were enabled while doing shutdown. So that if RTS and DTR are set using pl011_set_mctrl then it should continue even after shutdown->startup sequence. For throttling/unthrottling user should call pl011_set_mctrl. Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chipPaul Walmsley2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that when the transmit FIFO threshold is reached on OMAP UARTs, it does not result in a PRCM wakeup. This appears to be a silicon bug. This means that if the MPU powerdomain is in a low-power state, the MPU will not be awakened to refill the FIFO until the next interrupt from another device. The best solution, at least for the short term, would be for the OMAP serial driver to call a OMAP subarchitecture function to prevent the MPU powerdomain from entering a low power state while the FIFO has data to transmit. However, we no longer have a clean way to do this, since patches that add platform_data function pointers have been deprecated by the OMAP maintainer. So we attempt to work around this as well. The workarounds depend on the setting of CONFIG_CPU_IDLE. When CONFIG_CPU_IDLE=n, the driver will now only transmit one byte at a time. This causes the transmit FIFO threshold interrupt to stay active until there is no more data to be sent. Thus, the MPU powerdomain stays on during transmits. Aside from that energy consumption penalty, each transmitted byte results in a huge number of UART interrupts -- about five per byte. This wastes CPU time and is quite inefficient, but is probably the most expedient workaround in this case. When CONFIG_CPU_IDLE=y, there is a slightly more direct workaround: the PM QoS constraint can be abused to keep the MPU powerdomain on. This results in a normal number of interrupts, but, similar to the above workaround, wastes power by preventing the MPU from entering WFI. Future patches are planned for the 3.4 merge window to implement more efficient, but also more disruptive, workarounds to these problems. DMA operation is unaffected by this patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA modePaul Walmsley2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure FIFO levels are set correctly in non-DMA mode (the default). This patch will cause a receive FIFO threshold interrupt to be raised when there is at least one byte in the RX FIFO. It will also cause a transmit FIFO threshold interrupt when there is only one byte remaining in the TX FIFO. These changes fix the receive interrupt problem and part of the transmit interrupt problem. A separate set of issues must be worked around for the transmit path to have a basic level of functionality; a subsequent patch will address these. DMA operation is unaffected by this patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIMEShubhrajyoti D2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function serial_omap_restore_context is called only from serial_omap_runtime_resume which depends on CONFIG_PM_RUNTIME. Make serial_omap_restore_context also compile conditionally. if CONFIG_PM_RUNTIME is not defined below warn may be seen. LD net/xfrm/built-in.o drivers/tty/serial/omap-serial.c:1524: warning: 'serial_omap_restore_context' defined but not used CC drivers/tty/vt/selection.o Acked-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | omap-serial :Make the suspend/resume functions depend on CONFIG_PM_SLEEP.Shubhrajyoti D2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | The macro SET_SYSTEM_SLEEP_PM_OPS depends CONFIG_PM_SLEEP. The patch defines the suspend and resume functions for CONFIG_PM_SLEEP instead of CONFIG_SUSPEND. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | TTY: fix UV serial console regressionJiri Slaby2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 74c2107759d (serial: Use block_til_ready helper) and its fixup 3f582b8c110 (serial: fix termios settings in open) introduced a regression on UV systems. The serial eventually freezes while being used. It's completely unpredictable and sometimes needs a heap of traffic to happen first. To reproduce this, yast installation was used as it turned out to be pretty reliable in reproducing. Especially during installation process where one doesn't have an SSH daemon running. And no monitor as the HW is completely headless. So this was fun to find. Given the machine doesn't boot on vanilla before 2.6.36 final. (And the commits above are older.) Unless there is some bad race in the code, the hardware seems to be pretty broken. Otherwise pure MSR read should not cause such a bug, or? So to prevent the bug, revert to the old behavior. I.e. read modem status only if we really have to -- for non-CLOCAL set serials. Non-CLOCAL works on this hardware OK, I tried. See? I don't. And document that shit. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: stable <stable@vger.kernel.org> References: https://lkml.org/lkml/2011/12/6/573 References: https://bugzilla.novell.com/show_bug.cgi?id=718518 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | jsm: Fixed EEH recovery errorLucas Kannebley Tavares2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an error on the jsm driver that would cause it to be unable to recover after a second error is detected. At the first error, the device recovers properly: [72521.485691] EEH: Detected PCI bus error on device 0003:02:00.0 [72521.485695] EEH: This PCI device has failed 1 times in the last hour: ... [72532.035693] ttyn3 at MMIO 0x0 (irq = 49) is a jsm [72532.105689] jsm: Port 3 added However, at the second error, it cascades until EEH disables the device: [72631.229549] Call Trace: ... [72641.725687] jsm: Port 3 added [72641.725695] EEH: Detected PCI bus error on device 0003:02:00.0 [72641.725698] EEH: This PCI device has failed 3 times in the last hour: It was caused because the PCI state was not being saved after the first restore. Therefore, at the second recovery the PCI state would not be restored. Signed-off-by: Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com> Signed-off-by: Breno Leitao <brenohl@br.ibm.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | serial: group all the 8250 related code togetherPaul Gortmaker2012-01-24
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The drivers/tty/serial dir is already getting rather busy. Relocate the 8250 related drivers to their own subdir to reduce the clutter. Note that sunsu.c is not included in this move -- it is 8250-like hardware, but it does not use any of the existing infrastructure -- and does not depend on SERIAL_8250. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge tag 'usb-3.3-rc1' of ↵Linus Torvalds2012-01-30
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Here are a bunch of USB patches for 3.3-rc1. Nothing major, largest thing here is the removal of some drivers that did not work at all. Other than that, the normal collection of bugfixes and new device ids. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * tag 'usb-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (52 commits) uwb & wusb: fix kconfig error USB: Realtek cr: fix autopm scheduling while atomic USB: ftdi_sio: Add more identifiers xHCI: Cleanup isoc transfer ring when TD length mismatch found usb: musb: omap2430: minor cleanups. qcaux: add more Pantech UML190 and UML290 ports Revert "drivers: usb: Fix dependency for USB_HWA_HCD" usb: mv-otg - Fix build if CONFIG_USB is not set USB: cdc-wdm: Avoid hanging on interface with no USB_CDC_DMM_TYPE usb: add support for STA2X11 host driver drivers: usb: Fix dependency for USB_HWA_HCD kernel-doc: fix new warning in usb.h USB: OHCI: fix new compiler warnings usb: serial: kobil_sct: fix compile warning: drivers/usb/host/ehci-fsl.c: add missing iounmap USB: cdc-wdm: better allocate a buffer that is at least as big as we tell the USB core USB: cdc-wdm: call wake_up_all to allow driver to shutdown on device removal USB: cdc-wdm: use two mutexes to allow simultaneous read and write USB: cdc-wdm: updating desc->length must be protected by spin_lock USB: usbsevseg: fix max length ...
| * | uwb & wusb: fix kconfig errorRandy Dunlap2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix UWB/WUSB kconfig error by changing 'select' to 'depends on'. drivers/usb/wusbcore/Kconfig:4:error: recursive dependency detected! drivers/usb/wusbcore/Kconfig:4: symbol USB_WUSB is selected by USB_HWA_HCD drivers/usb/host/Kconfig:559: symbol USB_HWA_HCD depends on UWB drivers/uwb/Kconfig:5: symbol UWB is selected by USB_WUSB Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: Realtek cr: fix autopm scheduling while atomicStanislaw Gruszka2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=784345 Reported-by: Francis Moreau <francis.moro@gmail.com> Reported-and-tested-by: Christian D <chrisudeussen@gmail.com> Reported-and-tested-by: Jimmy Dorff <jdorff@phy.duke.edu> Reported-and-tested-by: collura@ieee.org Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: ftdi_sio: Add more identifiersAlan Cox2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | 0x04d8, 0x000a: Hornby Elite Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>