]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agogpio: stmpe: drop references to "virtual" IRQ, fix bug
Linus Walleij [Fri, 11 Oct 2013 17:51:38 +0000 (19:51 +0200)]
gpio: stmpe: drop references to "virtual" IRQ, fix bug

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

When doing this I see that the hwirq argument is used
for mapping rather than the Linux IRQ in the map function.
This doesn't look right. Use the Linux IRQ instead.

I cannot test this patch so I don't know if the mapping change
is correct, however since absolutely every other driver does
it the other way around this doesn't look sound at all. Please
help out with review.

Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Gabriel Fernandez <gabriel.fernandez@st.com>
Cc: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: rcar: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:43:39 +0000 (19:43 +0200)]
gpio: rcar: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Cc: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pl061: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:40:16 +0000 (19:40 +0200)]
gpio: pl061: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: mpc8xxx: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:37:30 +0000 (19:37 +0200)]
gpio: mpc8xxx: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Cc: Anatolij Gustschin <agust@denx.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: lynxpoint: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:32:16 +0000 (19:32 +0200)]
gpio: lynxpoint: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus. Take this
opportunity to sink a variable into a loop.

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: intel-mid: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:27:02 +0000 (19:27 +0200)]
gpio: intel-mid: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: em: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:21:34 +0000 (19:21 +0200)]
gpio: em: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Cc: Magnus Damm <damm@opensource.se>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: bcm_kona: rename confusing variables
Linus Walleij [Fri, 11 Oct 2013 17:14:50 +0000 (19:14 +0200)]
gpio: bcm_kona: rename confusing variables

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus. Rename the
"gpio" variable to "hwirq" to reflect what it is. Rename one
instance of "virq" to "child_irq" that better describes what
it is.

Cc: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: adnp: rename "virq" to "child_irq"
Linus Walleij [Fri, 11 Oct 2013 17:10:00 +0000 (19:10 +0200)]
gpio: adnp: rename "virq" to "child_irq"

This variable is confusingly named, the different Linux IRQs
aren't any more virtual than any other Linux IRQ. Give it a
non-misleading name.

Acked-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: tc3589x: drop references to "virtual" IRQ
Linus Walleij [Fri, 11 Oct 2013 17:06:12 +0000 (19:06 +0200)]
gpio: tc3589x: drop references to "virtual" IRQ

Rename the argument "virq" to just "irq", this IRQ isn't any
more "virtual" than any other Linux IRQ number, we use "hwirq"
for the actual hw-numbers, "virq" is just bogus.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: bcm281xx: Fix nested interrupt handler issue
Markus Mayer [Mon, 7 Oct 2013 21:51:00 +0000 (14:51 -0700)]
gpio: bcm281xx: Fix nested interrupt handler issue

The GPIO interrupt handler does not need to be marked as nested.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMAINTAINERS: GPIO-INTEL-MID: add maintainer
David Cohen [Mon, 7 Oct 2013 19:17:27 +0000 (12:17 -0700)]
MAINTAINERS: GPIO-INTEL-MID: add maintainer

Assign david.a.cohen@linux.intel.com as maintainer of Intel MID gpio
driver at drivers/gpio/gpio-intel-mid.c.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio-intel-mid: update prefixes and names from langwell to intel-mid
David Cohen [Fri, 4 Oct 2013 20:01:42 +0000 (13:01 -0700)]
gpio-intel-mid: update prefixes and names from langwell to intel-mid

After file was renamed from gpio-langwell to gpio-intel-mid, this patch
updates the variables, functions and structs to be based on intel-mid
instead of langwell.

There is no function change.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: rename gpio-langwell to gpio-intel-mid
David Cohen [Fri, 4 Oct 2013 20:01:41 +0000 (13:01 -0700)]
gpio: rename gpio-langwell to gpio-intel-mid

gpio-langwell is a deprecated name. Despite the driver was made
initially for Langwell, it supports now other Intel Mid SoC's.

This patch does no change beside the file renaming with Kconfig/Makefile
update.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: langwell: add Intel Merrifield support
David Cohen [Fri, 4 Oct 2013 20:01:40 +0000 (13:01 -0700)]
gpio: langwell: add Intel Merrifield support

This patch implements a better way to handle multiple SoC's and adds
Intel Merrifield support to gpio-langwell.

It was based on previous work from Ning Li <ning.li@intel.com>

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
Signed-off-by: Ning Li <ning.li@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function
Mika Westerberg [Thu, 10 Oct 2013 08:01:07 +0000 (11:01 +0300)]
gpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function

It makes more sense to have these functions close to each other. No
functional changes.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: arizona: Use the of_node from the Arizona device
Charles Keepax [Sun, 29 Sep 2013 20:00:37 +0000 (21:00 +0100)]
gpio: arizona: Use the of_node from the Arizona device

We need to use the of_node from the main Arizona device as that
holds our configuration.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: twl4030: Remove redundant of_match_ptr
Sachin Kamat [Sat, 28 Sep 2013 12:04:09 +0000 (17:34 +0530)]
gpio: twl4030: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: clps711x: Remove redundant of_match_ptr
Sachin Kamat [Sat, 28 Sep 2013 12:04:08 +0000 (17:34 +0530)]
gpio: clps711x: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: adnp: Remove redundant of_match_ptr
Sachin Kamat [Sat, 28 Sep 2013 12:04:07 +0000 (17:34 +0530)]
gpio: adnp: Remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: gemini: delete <mach/gpio.h>
Linus Walleij [Tue, 1 Oct 2013 08:45:42 +0000 (10:45 +0200)]
ARM: gemini: delete <mach/gpio.h>

The Gemini has no need of a <mach/gpio.h> header as this is only
used by the machine-local gpio.c gpiochip driver, which is also
only using the irq_to_gpio() macro. Delete the file, move the single
macro into the driver and remove the NEED_MACH_GPIO_H flag.

Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: w90x900: delete <mach/gpio.h>
Linus Walleij [Tue, 1 Oct 2013 08:28:58 +0000 (10:28 +0200)]
ARM: w90x900: delete <mach/gpio.h>

The local <mach/gpio.h> file on the w90x900 is completely unused
and the platform does not define NEED_MACH_GPIO_H.

Cc: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge branch 'ixp4-cleanup' into devel
Linus Walleij [Fri, 27 Sep 2013 12:46:56 +0000 (14:46 +0200)]
Merge branch 'ixp4-cleanup' into devel

10 years agoARM: ixp4xx: stop broadcasting the custom GPIO API
Linus Walleij [Tue, 10 Sep 2013 12:10:13 +0000 (14:10 +0200)]
ARM: ixp4xx: stop broadcasting the custom GPIO API

Now that these custom GPIO accessors are only used from the
gpio chip in this machine, move the code out of the include
file and right next to the gpiochip implementation.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: ixp4: delete irq_to_gpio
Linus Walleij [Tue, 10 Sep 2013 11:39:03 +0000 (13:39 +0200)]
ARM: ixp4: delete irq_to_gpio

This dangerous function is not used in the kernel, so let's
just delete it.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agostaging: media/lirc: switch to use gpiolib
Linus Walleij [Tue, 10 Sep 2013 11:30:10 +0000 (13:30 +0200)]
staging: media/lirc: switch to use gpiolib

The lirc serial module has special hooks to work with NSLU2,
switch these over to use gpiolib, as that is available on the
ixp4 platform.

Not even compile tested as there is no way to select this
driver from menuconfig on the ixp4 platform.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoptp: switch to use gpiolib
Linus Walleij [Tue, 10 Sep 2013 11:15:18 +0000 (13:15 +0200)]
ptp: switch to use gpiolib

This platform supports gpiolib, so remove the custom API use
and replace with calls to gpiolib. Also request the GPIO before
starting to use it.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: netdev@vger.kernel.org
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoinput: misc: ixp4-beeper: use gpiolib strictly
Linus Walleij [Tue, 10 Sep 2013 11:06:57 +0000 (13:06 +0200)]
input: misc: ixp4-beeper: use gpiolib strictly

Request and free the GPIO line used for the beeper properly.
Then use the gpiolib API to flip the output of the GPIO pin
instead of relying on hacks to poke the register bits.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoinput: misc: ixp4-beeper: switch to use gpiolib
Linus Walleij [Tue, 10 Sep 2013 10:53:03 +0000 (12:53 +0200)]
input: misc: ixp4-beeper: switch to use gpiolib

The platform using this beeper has support for gpiolib, so there
is no point to use the custom gpio_line* API. A strange ambiguity
where a line was first set as input and then driven high was
solved by first driving the line high as output and then switch
it to input.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: ixp4xx: convert remaining users to use gpiolib
Linus Walleij [Tue, 10 Sep 2013 09:19:55 +0000 (11:19 +0200)]
ARM: ixp4xx: convert remaining users to use gpiolib

A few call sites inside mach-ixp4xx were still using the custom
ixp4xx GPIO API with gpio_line_* accessors, convert all these
to use the standard gpiolib functions instead. Also attempt to
request and label all GPIOs before use. Move the GPIO requests
to per-machine device_initcalls() so we are not dependent on the
GPIO chip to be available at machine_init time.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge branch 'pxa-cleanup' into devel
Linus Walleij [Fri, 27 Sep 2013 12:01:35 +0000 (14:01 +0200)]
Merge branch 'pxa-cleanup' into devel

10 years agoARM: pxa: delete the custom GPIO header
Linus Walleij [Thu, 26 Sep 2013 08:04:49 +0000 (10:04 +0200)]
ARM: pxa: delete the custom GPIO header

The PXA sub-architecture appears to have a custom <mach/gpio.h>
for no reason whatsoever. The file became completely empty
after Haojian removed the remaining content in
commit 157d2644cb0c1e71a18baaffca56d2b1d0ebf10f
"ARM: pxa: change gpio to platform device".

That commit added these two lines:

However it seems like deleting the file has no effect
whatsoever on the kernel compilation.

Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: mmp: delete the custom GPIO header
Linus Walleij [Wed, 25 Sep 2013 13:54:11 +0000 (15:54 +0200)]
ARM: mmp: delete the custom GPIO header

The MMP sub-architecture appears to have a custom <mach/gpio.h>
for no reason whatsoever. The file became completely empty
after Haojian removed the remaining content in
commit 157d2644cb0c1e71a18baaffca56d2b1d0ebf10f
"ARM: pxa: change gpio to platform device".

Cc: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pcf857x: Add OF support
Laurent Pinchart [Sat, 21 Sep 2013 18:39:49 +0000 (20:39 +0200)]
gpio: pcf857x: Add OF support

Add DT bindings for the pcf857x-compatible chips and parse the device
tree node in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pca953x: Don't flip bits on PCA957x GPIO expanders when probing them.
Graeme Smecher [Fri, 13 Sep 2013 21:41:48 +0000 (14:41 -0700)]
gpio: pca953x: Don't flip bits on PCA957x GPIO expanders when probing them.

The pca957x driver supports a handful of I2C GPIO expanders from NXP, Maxim,
and TI. For the PCA9574 and PCA9575 devices only, the driver resets the GPIO
level and direction in the pca957x_probe function. This seems like the wrong
thing to do, since it can cause hardware bit twiddles during warm reboots when
the chip state and reset values don't match.

This kind of initialization is best left upstream (in a bootloader) or
downstream (in userspace). It's also an inconsistency across devices supported
by this driver.

This patch is NOT boot-tested: the SoC I'm  using is stuck on 2.6.37, and the
patch doesn't apply trivially.

Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: gpio-mc33880: Remove redundant spi_set_drvdata
Sachin Kamat [Thu, 19 Sep 2013 12:00:53 +0000 (17:30 +0530)]
gpio: gpio-mc33880: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: gpio-74x164: Remove redundant of_match_ptr
Sachin Kamat [Thu, 19 Sep 2013 11:58:08 +0000 (17:28 +0530)]
gpio: gpio-74x164: Remove redundant of_match_ptr

'gen_74x164_dt_ids' is always compiled in. Hence the macro is not
necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: gpio-74x164: Remove redundant spi_set_drvdata
Sachin Kamat [Thu, 19 Sep 2013 11:58:07 +0000 (17:28 +0530)]
gpio: gpio-74x164: Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge branch 'iop-cleanup' into devel
Linus Walleij [Mon, 23 Sep 2013 10:47:14 +0000 (12:47 +0200)]
Merge branch 'iop-cleanup' into devel

10 years agogpio: bcm-kona: only use set_irq_flags() on ARM
Linus Walleij [Fri, 20 Sep 2013 21:14:18 +0000 (23:14 +0200)]
gpio: bcm-kona: only use set_irq_flags() on ARM

As per the pattern from other GPIO drivers, use set_irq_flags()
on ARM only, use irq_set_noprobe() on other archs.

Also rename the argument "virq" to just "irq", this IRQ isn't
any more "virtual" than any other Linux IRQ number, we use
"hwirq" for the actual hw-numbers, "virq" is just bogus.

Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: plat-iop: pass physical base for GPIO
Linus Walleij [Mon, 9 Sep 2013 14:59:54 +0000 (16:59 +0200)]
ARM: plat-iop: pass physical base for GPIO

This alters the IOP platforms to pass a physical base for their
GPIO blocks and alters the driver to remap it when probing
instead of relying on the virtual addresses to be used.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: iop: use readl/writel accessors
Linus Walleij [Mon, 9 Sep 2013 14:54:32 +0000 (16:54 +0200)]
gpio: iop: use readl/writel accessors

Use the standard 32bit I/O accessors instead of just assigning
addresses.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: plat-iop: instantiate GPIO from platform device
Linus Walleij [Mon, 9 Sep 2013 14:39:51 +0000 (16:39 +0200)]
ARM: plat-iop: instantiate GPIO from platform device

This converts the IOP32x and IOP33x platforms to pass their
base address offset by a resource attached to a platform device
instead of using static offset macros implicitly passed
through <linux/gpio.h> including <mach/gpio.h>. Delete the
local <mach/gpio.h> and <asm/hardware/iop3xx-gpio.h> headers
and remove the selection of NEED_MACH_GPIO_H.

Pass the virtual address as a resource in the platform device
at this point for bisectability, next patch will pass the
physical address as is custom.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: plat-iop: remove custom complex GPIO implementation
Linus Walleij [Mon, 9 Sep 2013 14:07:42 +0000 (16:07 +0200)]
ARM: plat-iop: remove custom complex GPIO implementation

The kernel will now only use gpiolib to access GPIOs, so remove
the complex GPIO flag and the custom implementation.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: decouple the IOP GPIO driver from platform
Linus Walleij [Mon, 9 Sep 2013 13:00:40 +0000 (15:00 +0200)]
gpio: decouple the IOP GPIO driver from platform

This removes the only dependence between the IOP GPIO
driver and the GENERIC_GPIO header in <mach/gpio.h>
and its common implementation in the <asm/*> namespace
by copying the one constant it is using into the driver
file.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: iop32x: read N2100 power key using gpiolib
Linus Walleij [Mon, 9 Sep 2013 12:53:02 +0000 (14:53 +0200)]
ARM: iop32x: read N2100 power key using gpiolib

Refrain from using the custom gpio_line_get() to read the power
key on the N2100, use the gpiolib function gpio_get() instead.
Also request the line in the GPIOs initicall, and move the poll
timer setup to that inicall so the gpio chip is available before
we request this GPIO and start to poll it.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: iop32x: request and issue reset using gpio
Linus Walleij [Mon, 9 Sep 2013 12:45:47 +0000 (14:45 +0200)]
ARM: iop32x: request and issue reset using gpio

As the IOP GPIO driver supports gpiolib we can use the standard
GPIO calls to issue a reset of the machine instead of using the
custom gpio_line_set/config calls. Also request the GPIO when
initializing the machine.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: plat-iop: move the GPIO driver to drivers/gpio
Linus Walleij [Mon, 9 Sep 2013 09:59:51 +0000 (11:59 +0200)]
ARM: plat-iop: move the GPIO driver to drivers/gpio

Move the IOP GPIO driver to live with its siblings in the
GPIO subsystem.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: ucb1400: Can be built as a module
Jean Delvare [Fri, 13 Sep 2013 19:41:48 +0000 (21:41 +0200)]
gpio: ucb1400: Can be built as a module

With the recent code cleanup from Marek Vasut, driver gpio-ucb1400 can
be built as a module, so change symbol GPIO_UCB1400 from bool to
tristate.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: bt8xx: remove unnecessary pci_set_drvdata()
Jingoo Han [Thu, 12 Sep 2013 06:48:28 +0000 (15:48 +0900)]
gpio: bt8xx: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: arizona: Add wm8997 support to probe
Charles Keepax [Wed, 11 Sep 2013 13:03:27 +0000 (14:03 +0100)]
gpio: arizona: Add wm8997 support to probe

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: bcm281xx: Add GPIO driver
Markus Mayer [Tue, 10 Sep 2013 18:07:01 +0000 (11:07 -0700)]
gpio: bcm281xx: Add GPIO driver

Add the GPIO driver for the Broadcom bcm281xx family of mobile SoCs.
These GPIO controllers may contain up to 8 banks where each bank
includes 32 pins that can be driven high or low and act as an edge
sensitive interrupt.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Christian Daudt <csd@broadcom.com>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
[Added depends on OF_GPIO]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpiolib: factorize gpiod_get/set functions
Alexandre Courbot [Wed, 4 Sep 2013 11:29:25 +0000 (20:29 +0900)]
gpiolib: factorize gpiod_get/set functions

gpiod_get/set functions share common code between their regular and
cansleep variants. The exporting of the gpiod interface will make
the situation worse. This patch factorizes the common code to avoid code
redundancy.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoemev2: GPIOLIB: Enable support for OF
Ian Molton [Mon, 2 Sep 2013 15:44:55 +0000 (16:44 +0100)]
emev2: GPIOLIB: Enable support for OF

EMEV2 is now a DT platform, however the GPIO driver cannot be used
from a DT file since it does not fill out the of_node field in its
gpio_chip structure.

Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: palmas: add support for TPS80036
Laxman Dewangan [Tue, 3 Sep 2013 14:28:03 +0000 (19:58 +0530)]
gpio: palmas: add support for TPS80036

TI Palmas series device TPS80036 supports 16 GPIOs.
Register its all 16 gpios when this device is selected.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpiolib: Include GPIO label in log messages for GPIOs
Mark Brown [Mon, 9 Sep 2013 09:33:50 +0000 (10:33 +0100)]
gpiolib: Include GPIO label in log messages for GPIOs

Provide the human readable label for the GPIO as well as the number when
we are recording it in order to improve the readability of log messages.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpiolib: Provide helper macros for logging of GPIO events
Mark Brown [Mon, 9 Sep 2013 09:33:49 +0000 (10:33 +0100)]
gpiolib: Provide helper macros for logging of GPIO events

Currently many but not all GPIO log messages log the GPIO number and the
formats vary. Ensure that this is done consistently by defining logging
helpers which take the GPIO descriptor.

The will help people pattern matching on logs and providing the number
makes the log messages that omitted it more useful.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pcf857x: only use set_irq_flags() on ARM
Linus Walleij [Wed, 18 Sep 2013 11:12:29 +0000 (13:12 +0200)]
gpio: pcf857x: only use set_irq_flags() on ARM

As per the pattern from other GPIO drivers, use set_irq_flags()
on ARM only, use irq_set_noprobe() on other archs.

Also rename the argument "virq" to just "irq", this IRQ isn't
any more "virtual" than any other Linux IRQ number, we use
"hwirq" for the actual hw-numbers, "virq" is just bogus.

Cc: George Cherian <george.cherian@ti.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()
Zhang Rui [Tue, 3 Sep 2013 00:31:50 +0000 (08:31 +0800)]
gpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()

acpi_execute_simple_method() is a new ACPI API introduced to invoke
an ACPI control method that has single integer parameter and no return value.

Convert acpi_evaluate_object() to acpi_execute_simple_method()
in drivers/gpio/gpiolib-acpi.c

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pcf857x: call the gpio user handler iff gpio_to_irq is done
George Cherian [Wed, 4 Sep 2013 07:03:03 +0000 (12:33 +0530)]
gpio: pcf857x: call the gpio user handler iff gpio_to_irq is done

For pcf857x driver if the initial state is not set properly (proper
n_latch is not passed), we get bad irq prints on console.
We get this only for the first interrupt and doesnot repeat for further
interrupts unles and until there are other gpio pins which are not flipping
continously.

following prints are seen on console.

[   40.983924] irq 0, desc: ce004080, depth: 1, count: 0, unhandled: 0
[   40.990511] ->handle_irq():  c00aa538, handle_bad_irq+0x0/0x260
[   40.996768] ->irq_data.chip(): c080b6ec, no_irq_chip+0x0/0x60
[   41.002842] ->action():   (null)
[   41.006242]    IRQ_NOPROBE set
[   41.009465]  IRQ_NOREQUEST set

Signed-off-by: George Cherian <george.cherian@ti.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pcf857x: remove the irq_demux_work and gpio->irq
George Cherian [Wed, 4 Sep 2013 07:03:02 +0000 (12:33 +0530)]
gpio: pcf857x: remove the irq_demux_work and gpio->irq

Now that we are using devm_request_threaded_irq no need for
irq_demux_work and gpio->irq. Remove all its references.

Signed-off-by: George Cherian <george.cherian@ti.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agogpio: pcf857x: change to devm_request_threaded_irq
George Cherian [Wed, 4 Sep 2013 07:03:01 +0000 (12:33 +0530)]
gpio: pcf857x: change to devm_request_threaded_irq

Remove the request_irq and use devm_request_threaded_irq
also cleanup free_irq. devm_* takes care of that.

Signed-off-by: George Cherian <george.cherian@ti.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoLinux 3.12-rc1 v3.12-rc1
Linus Torvalds [Mon, 16 Sep 2013 20:17:51 +0000 (16:17 -0400)]
Linux 3.12-rc1

10 years agoMerge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Mon, 16 Sep 2013 20:10:26 +0000 (16:10 -0400)]
Merge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer code update from Thomas Gleixner:
 - armada SoC clocksource overhaul with a trivial merge conflict
 - Minor improvements to various SoC clocksource drivers

* 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: armada-370-xp: Add detailed clock requirements in devicetree binding
  clocksource: armada-370-xp: Get reference fixed-clock by name
  clocksource: armada-370-xp: Replace WARN_ON with BUG_ON
  clocksource: armada-370-xp: Fix device-tree binding
  clocksource: armada-370-xp: Introduce new compatibles
  clocksource: armada-370-xp: Use CLOCKSOURCE_OF_DECLARE
  clocksource: armada-370-xp: Simplify TIMER_CTRL register access
  clocksource: armada-370-xp: Use BIT()
  ARM: timer-sp: Set dynamic irq affinity
  ARM: nomadik: add dynamic irq flag to the timer
  clocksource: sh_cmt: 32-bit control register support
  clocksource: em_sti: Convert to devm_* managed helpers

10 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Mon, 16 Sep 2013 19:39:21 +0000 (15:39 -0400)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "Two minor cifs fixes and a minor documentation cleanup for cifs.txt"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update cifs.txt and remove some outdated infos
  cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache
  cifs: Do not take a reference to the page in cifs_readpage_worker()

10 years agoMerge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi
Linus Torvalds [Mon, 16 Sep 2013 19:37:52 +0000 (15:37 -0400)]
Merge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi

Pull UBI fixes from Artem Bityutskiy:
 "Just a single fastmap fix plus a regression fix"

* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubi:
  UBI: Fix invalidate_fastmap()
  UBI: Fix PEB leak in wear_leveling_worker()

10 years agoMerge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Mon, 16 Sep 2013 19:36:55 +0000 (15:36 -0400)]
Merge tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs

Pull ubifs fix from Artem Bityutskiy:
 "Just one patch which fixes the power-cut recovery testing mode.

  I'll start using a single UBI/UBIFS tree instead of 2 trees from now
  on.  So in the future you'll get 1 small pull request instead of 2
  tiny ones"

* tag 'upstream-3.12-rc1' of git://git.infradead.org/linux-ubifs:
  UBIFS: remove invalid warn msg with tst_recovery enabled

10 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 15 Sep 2013 21:45:52 +0000 (17:45 -0400)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "These are four patches for three construction sites:

   - Fix register decoding for the combination of multi-core processors
     and multi-threading.

   - Two more fixes that are part of the ongoing DECstation resurrection
     work.  One of these touches a DECstation-only network driver.

   - Finally Markos' trivial build fix for the AP/SP support.

  (With this applied now all MIPS defconfigs are building again)"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: kernel: vpe: Make vpe_attrs an array of pointers.
  MIPS: Fix SMP core calculations when using MT support.
  MIPS: DECstation I/O ASIC DMA interrupt handling fix
  MIPS: DECstation HRT initialization rearrangement

10 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Sun, 15 Sep 2013 21:42:59 +0000 (17:42 -0400)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform updates from Matthew Garrett:
 "Nothing amazing here, almost entirely cleanups and minor bugfixes and
  one bit of hardware enablement in the amilo-rfkill driver"

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  platform/x86: panasonic-laptop: reuse module_acpi_driver
  samsung-laptop: fix config build error
  platform: x86: remove unnecessary platform_set_drvdata()
  amilo-rfkill: Enable using amilo-rfkill with the FSC Amilo L1310.
  wmi: parse_wdg() should return kernel error codes
  hp_wmi: Fix unregister order in hp_wmi_rfkill_setup()
  platform: replace strict_strto*() with kstrto*()
  x86: irst: use module_acpi_driver to simplify the code
  x86: smartconnect: use module_acpi_driver to simplify the code
  platform samsung-q10: use ACPI instead of direct EC calls
  thinkpad_acpi: add the ability setting TPACPI_LED_NONE by quirk
  thinkpad_acpi: return -NODEV while operating uninitialized LEDs

10 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 15 Sep 2013 21:41:30 +0000 (17:41 -0400)]
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull misc SCSI driver updates from James Bottomley:
 "This patch set is a set of driver updates (megaraid_sas, fnic, lpfc,
  ufs, hpsa) we also have a couple of bug fixes (sd out of bounds and
  ibmvfc error handling) and the first round of esas2r checker fixes and
  finally the much anticipated big endian additions for megaraid_sas"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (47 commits)
  [SCSI] fnic: fnic Driver Tuneables Exposed through CLI
  [SCSI] fnic: Kernel panic while running sh/nosh with max lun cfg
  [SCSI] fnic: Hitting BUG_ON(io_req->abts_done) in fnic_rport_exch_reset
  [SCSI] fnic: Remove QUEUE_FULL handling code
  [SCSI] fnic: On system with >1.1TB RAM, VIC fails multipath after boot up
  [SCSI] fnic: FC stat param seconds_since_last_reset not getting updated
  [SCSI] sd: Fix potential out-of-bounds access
  [SCSI] lpfc 8.3.42: Update lpfc version to driver version 8.3.42
  [SCSI] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
  [SCSI] lpfc 8.3.42: Fixed inconsistent spin lock usage.
  [SCSI] lpfc 8.3.42: Fix driver's abort loop functionality to skip IOs already getting aborted
  [SCSI] lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices
  [SCSI] lpfc 8.3.42: Fix WARN_ON when driver unloads
  [SCSI] lpfc 8.3.42: Avoided making pci bar ioremap call during dual-chute WQ/RQ pci bar selection
  [SCSI] lpfc 8.3.42: Fixed driver iocbq structure's iocb_flag field running out of space
  [SCSI] lpfc 8.3.42: Fix crash on driver load due to cpu affinity logic
  [SCSI] lpfc 8.3.42: Fixed logging format of setting driver sysfs attributes hard to interpret
  [SCSI] lpfc 8.3.42: Fixed back to back RSCNs discovery failure.
  [SCSI] lpfc 8.3.42: Fixed race condition between BSG I/O dispatch and timeout handling
  [SCSI] lpfc 8.3.42: Fixed function mode field defined too small for not recognizing dual-chute mode
  ...

10 years agoMerge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sun, 15 Sep 2013 11:15:06 +0000 (07:15 -0400)]
Merge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux

Pull SLAB update from Pekka Enberg:
 "Nothing terribly exciting here apart from Christoph's kmalloc
  unification patches that brings sl[aou]b implementations closer to
  each other"

* 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  slab: Use correct GFP_DMA constant
  slub: remove verify_mem_not_deleted()
  mm/sl[aou]b: Move kmallocXXX functions to common code
  mm, slab_common: add 'unlikely' to size check of kmalloc_slab()
  mm/slub.c: beautify code for removing redundancy 'break' statement.
  slub: Remove unnecessary page NULL check
  slub: don't use cpu partial pages on UP
  mm/slub: beautify code for 80 column limitation and tab alignment
  mm/slub: remove 'per_cpu' which is useless variable

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 15 Sep 2013 11:13:39 +0000 (07:13 -0400)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input update from Dmitry Torokhov:
 "The only change is David Hermann's new EVIOCREVOKE evdev ioctl that
  allows safely passing file descriptors to input devices to session
  processes and later being able to stop delivery of events through
  these fds so that inactive sessions will no longer receive user input
  that does not belong to them"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: evdev - add EVIOCREVOKE ioctl

10 years agovfs: fix typo in comment in recent dentry work
Linus Torvalds [Sun, 15 Sep 2013 11:11:01 +0000 (07:11 -0400)]
vfs: fix typo in comment in recent dentry work

Sedat points out that I transposed some letters in "LRU" and wrote "RLU"
instead in one of the new comments explaining the flow.  Let's just fix
it.

Reported-by: Sedat Dilek <sedat.dilek@jpberlin.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agopartitions/efi: loosen check fot pmbr size in lba
Davidlohr Bueso [Fri, 13 Sep 2013 22:02:22 +0000 (15:02 -0700)]
partitions/efi: loosen check fot pmbr size in lba

Matt found that commit 27a7c642174e ("partitions/efi: account for pmbr
size in lba") caused his GPT formatted eMMC device not to boot.  The
reason is that this commit enforced Linux to always check the lesser of
the whole disk or 2Tib for the pMBR size in LBA.  While most disk
partitioning tools out there create a pMBR with these characteristics,
Microsoft does not, as it always sets the entry to the maximum 32-bit
limitation - even though a drive may be smaller than that[1].

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Reported-and-tested-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg...
Linus Torvalds [Sat, 14 Sep 2013 03:06:40 +0000 (23:06 -0400)]
Merge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux

Pull writeback fix from Wu Fengguang:
 "A trivial writeback fix"

* tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Do not sort b_io list only because of block device inode

10 years agovfs: fix dentry LRU list handling and nr_dentry_unused accounting
Linus Torvalds [Sat, 14 Sep 2013 02:55:10 +0000 (22:55 -0400)]
vfs: fix dentry LRU list handling and nr_dentry_unused accounting

The LRU list changes interacted badly with our nr_dentry_unused
accounting, and even worse with the new DCACHE_LRU_LIST bit logic.

This introduces helper functions to make sure everything follows the
proper dcache d_lru list rules: the dentry cache is complicated by the
fact that some of the hotpaths don't even want to look at the LRU list
at all, and the fact that we use the same list entry in the dentry for
both the LRU list and for our temporary shrinking lists when removing
things from the LRU.

The helper functions temporarily have some extra sanity checking for the
flag bits that have to match the current LRU state of the dentry.  We'll
remove that before the final 3.12 release, but considering how easy it
is to get wrong, this first cleanup version has some very particular
sanity checking.

Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agocifs: update cifs.txt and remove some outdated infos
Björn Jacke [Tue, 10 Sep 2013 08:28:38 +0000 (10:28 +0200)]
cifs: update cifs.txt and remove some outdated infos

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Björn JACKE <bj@sernet.de>
Signed-off-by: Steve French <smfrench@gmail.com>
10 years agocifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache
Sachin Prabhu [Fri, 13 Sep 2013 13:11:57 +0000 (14:11 +0100)]
cifs: Avoid calling unlock_page() twice in cifs_readpage() when using fscache

When reading a single page with cifs_readpage(), we make a call to
fscache_read_or_alloc_page() which once done, asynchronously calls
the completion function cifs_readpage_from_fscache_complete(). This
completion function unlocks the page once it has been populated from
cache. The module then attempts to unlock the page a second time in
cifs_readpage() which leads to warning messages.

In case of a successful call to fscache_read_or_alloc_page() we should skip
the second unlock_page() since this will be called by the
cifs_readpage_from_fscache_complete() once the page has been populated by
fscache.

With the modifications to cifs_readpage_worker(), we will need to re-grab the
page lock in cifs_write_begin().

The problem was first noticed when testing new fscache patches for cifs.
https://bugzilla.redhat.com/show_bug.cgi?id=1005737

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
10 years agocifs: Do not take a reference to the page in cifs_readpage_worker()
Sachin Prabhu [Fri, 13 Sep 2013 13:11:56 +0000 (14:11 +0100)]
cifs: Do not take a reference to the page in cifs_readpage_worker()

We do not need to take a reference to the pagecache in
cifs_readpage_worker() since the calling function will have already
taken one before passing the pointer to the page as an argument to the
function.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
10 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Fri, 13 Sep 2013 17:58:41 +0000 (10:58 -0700)]
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Some more low risk cleanup patches:

   - Remove unnecessary pci_set_drvdata in k10temp driver from Jingoo Han
   - Fix return values in several drivers from Sachin Kamat
   - Remove redundant break in amc6821 driver from Sachin Kamat"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (k10temp) remove unnecessary pci_set_drvdata()
  hwmon: (tmp421) Fix return value
  hwmon: (amc6821) Remove redundant break
  hwmon: (amc6821) Fix return value
  hwmon: (ibmaem) Fix return value
  hwmon: (emc2103) Fix return value

10 years agoMerge tag 'xtensa-next-20130912' of git://github.com/czankel/xtensa-linux
Linus Torvalds [Fri, 13 Sep 2013 17:57:48 +0000 (10:57 -0700)]
Merge tag 'xtensa-next-20130912' of git://github.com/czankel/xtensa-linux

Pull Xtensa updates from Chris Zankel.

* tag 'xtensa-next-20130912' of git://github.com/czankel/xtensa-linux:
  xtensa: Fix broken allmodconfig build
  xtensa: remove CCOUNT_PER_JIFFY
  xtensa: fix !CONFIG_XTENSA_CALIBRATE_CCOUNT build failure
  xtensa: don't use echo -e needlessly
  xtensa: new fast_alloca handler
  xtensa: keep a3 and excsave1 on entry to exception handlers
  xtensa: enable kernel preemption
  xtensa: check thread flags atomically on return from user exception

10 years agoMerge git://git.kvack.org/~bcrl/aio-next
Linus Torvalds [Fri, 13 Sep 2013 17:55:58 +0000 (10:55 -0700)]
Merge git://git.kvack.org/~bcrl/aio-next

Pull aio changes from Ben LaHaise:
 "First off, sorry for this pull request being late in the merge window.
  Al had raised a couple of concerns about 2 items in the series below.
  I addressed the first issue (the race introduced by Gu's use of
  mm_populate()), but he has not provided any further details on how he
  wants to rework the anon_inode.c changes (which were sent out months
  ago but have yet to be commented on).

  The bulk of the changes have been sitting in the -next tree for a few
  months, with all the issues raised being addressed"

* git://git.kvack.org/~bcrl/aio-next: (22 commits)
  aio: rcu_read_lock protection for new rcu_dereference calls
  aio: fix race in ring buffer page lookup introduced by page migration support
  aio: fix rcu sparse warnings introduced by ioctx table lookup patch
  aio: remove unnecessary debugging from aio_free_ring()
  aio: table lookup: verify ctx pointer
  staging/lustre: kiocb->ki_left is removed
  aio: fix error handling and rcu usage in "convert the ioctx list to table lookup v3"
  aio: be defensive to ensure request batching is non-zero instead of BUG_ON()
  aio: convert the ioctx list to table lookup v3
  aio: double aio_max_nr in calculations
  aio: Kill ki_dtor
  aio: Kill ki_users
  aio: Kill unneeded kiocb members
  aio: Kill aio_rw_vect_retry()
  aio: Don't use ctx->tail unnecessarily
  aio: io_cancel() no longer returns the io_event
  aio: percpu ioctx refcount
  aio: percpu reqs_available
  aio: reqs_active -> reqs_available
  aio: fix build when migration is disabled
  ...

10 years agoMerge branch 'genirq' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Fri, 13 Sep 2013 14:31:38 +0000 (07:31 -0700)]
Merge branch 'genirq' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull generic hardirq option removal from Martin Schwidefsky:
 "All architectures now use generic hardirqs, s390 has been last to
  switch.

  With that the code under !CONFIG_GENERIC_HARDIRQS and the related
  HAVE_GENERIC_HARDIRQS and GENERIC_HARDIRQS config options can be
  removed.  Yay!"

* 'genirq' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  Remove GENERIC_HARDIRQ config option

10 years agoMerge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Fri, 13 Sep 2013 14:30:17 +0000 (07:30 -0700)]
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kconfig fix from Michal Marek:
 "This is a fix for a regression caused by my previous pull request.

  A sed command in scripts/config that used colons as separator was
  accidentally changed to use slashes, which fails when you use slashes
  in a value.  Changing it back to colons is of course not a proper fix,
  but at least it will be broken in the same way it had been for four
  years.  A proper fix is pending"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/config: fix variable substitution command

10 years agoMerge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realm...
Linus Torvalds [Fri, 13 Sep 2013 14:23:49 +0000 (07:23 -0700)]
Merge tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux

Pull blackfin updates from Steven Miao.

* tag 'blackfin-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/realmz6/blackfin-linux:
  blackfin: Ignore generated uImages
  blackfin: Add STMMAC platform data to enable dwmac1000 driver on BF60x.
  bf609: adv7343: add S-Video and Component output support
  bf609: add adv7343 video encoder support
  clock: add stmmac clock for ethernet driver
  blackfin: scb: Add SCB1 to SCB9 config options and data.
  blackfin: scb: Add system crossbar init code.

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 13 Sep 2013 14:11:14 +0000 (07:11 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:
 "This fixes a 7+ year race condition in the crypto API that causes
  sporadic crashes when multiple threads load the same algorithm.

  It also fixes the crct10dif algorithm again to prevent boot failures
  on systems where the initramfs tool ignores module softdeps"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: crct10dif - Add fallback for broken initrds
  crypto: api - Fix race condition in larval lookup

10 years agoMIPS: kernel: vpe: Make vpe_attrs an array of pointers.
Markos Chandras [Wed, 11 Sep 2013 12:17:52 +0000 (13:17 +0100)]
MIPS: kernel: vpe: Make vpe_attrs an array of pointers.

Commit 567b21e973ccf5b0d13776e408d7c67099749eb8
"mips: convert vpe_class to use dev_groups"

broke the build on MIPS since vpe_attrs should be an array
of 'struct device_attribute' pointers.

Fixes the following build problem:
arch/mips/kernel/vpe.c:1372:2: error: missing braces around initializer
[-Werror=missing-braces]
arch/mips/kernel/vpe.c:1372:2: error: (near initialization for 'vpe_attrs[0]')
[-Werror=missing-braces]

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5819/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoRemove GENERIC_HARDIRQ config option
Martin Schwidefsky [Fri, 30 Aug 2013 07:39:53 +0000 (09:39 +0200)]
Remove GENERIC_HARDIRQ config option

After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
10 years agoscripts/config: fix variable substitution command
Clement Chauplannaz [Fri, 13 Sep 2013 08:45:13 +0000 (10:45 +0200)]
scripts/config: fix variable substitution command

Commit 229455bc02b87f7128f190c4491b4ceffff38648 accidentally changed the
separator between sed `s' command and its parameters from ':' to '/'.

Revert this change.

Reported-and-tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Clement Chauplannaz <chauplac@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
10 years agoMIPS: Fix SMP core calculations when using MT support.
Leonid Yegoshin [Wed, 11 Sep 2013 19:17:47 +0000 (14:17 -0500)]
MIPS: Fix SMP core calculations when using MT support.

The TCBIND register is only available if the core has MT support. It
should not be read otherwise. Secondly, the number of TCs (siblings)
are calculated differently depending on if the kernel is configured
as SMVP or SMTC.

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5822/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: DECstation I/O ASIC DMA interrupt handling fix
Maciej W. Rozycki [Thu, 12 Sep 2013 11:14:31 +0000 (12:14 +0100)]
MIPS: DECstation I/O ASIC DMA interrupt handling fix

This change complements commit d0da7c002f7b2a93582187a9e3f73891a01d8ee4
and brings clear_ioasic_irq back, renaming it to clear_ioasic_dma_irq at
the same time, to make I/O ASIC DMA interrupts functional.

Unlike ordinary I/O ASIC interrupts DMA interrupts need to be deasserted
by software by writing 0 to the respective bit in I/O ASIC's System
Interrupt Register (SIR), similarly to how CP0.Cause.IP0 and CP0.Cause.IP1
bits are handled in the CPU (the difference is SIR DMA interrupt bits are
R/W0C so there's no need for an RMW cycle).  Otherwise the handler is
reentered over and over again.

The only current user is the DEC LANCE Ethernet driver and its extremely
uncommon DMA memory error handler that does not care when exactly the
interrupt is cleared.  Anticipating the use of DMA interrupts by the Zilog
SCC driver this change however exports clear_ioasic_dma_irq for device
drivers to choose the right application-specific sequence to clear the
request explicitly rather than calling it implicitly in the .irq_eoi
handler of `struct irq_chip'.  Previously these interrupts were cleared in
the .end handler of the said structure, before it was removed.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5826/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: DECstation HRT initialization rearrangement
Maciej W. Rozycki [Thu, 12 Sep 2013 11:01:53 +0000 (12:01 +0100)]
MIPS: DECstation HRT initialization rearrangement

Not all I/O ASIC versions have the free-running counter implemented, an
early revision used in the 5000/1xx models aka 3MIN and 4MIN did not have
it.  Therefore we cannot unconditionally use it as a clock source.
Fortunately if not implemented its register slot has a fixed value so it
is enough if we check for the value at the end of the calibration period
being the same as at the beginning.

This also means we need to look for another high-precision clock source on
the systems affected.  The 5000/1xx can have an R4000SC processor
installed where the CP0 Count register can be used as a clock source.
Unfortunately all the R4k DECstations suffer from the missed timer
interrupt on CP0 Count reads erratum, so we cannot use the CP0 timer as a
clock source and a clock event both at a time.  However we never need an
R4k clock event device because all DECstations have a DS1287A RTC chip
whose periodic interrupt can be used as a clock source.

This gives us the following four configuration possibilities for I/O ASIC
DECstations:

1. No I/O ASIC counter and no CP0 timer, e.g. R3k 5000/1xx (3MIN).

2. No I/O ASIC counter but the CP0 timer, i.e. R4k 5000/150 (4MIN).

3. The I/O ASIC counter but no CP0 timer, e.g. R3k 5000/240 (3MAX+).

4. The I/O ASIC counter and the CP0 timer, e.g. R4k 5000/260 (4MAX+).

For #1 and #2 this change stops the I/O ASIC free-running counter from
being installed as a clock source of a 0Hz frequency.  For #2 it also
arranges for the CP0 timer to be used as a clock source rather than a
clock event device, because having an accurate wall clock is more
important than a high-precision interval timer.  For #3 there is no
change.  For #4 the change makes the I/O ASIC free-running counter
installed as a clock source so that the CP0 timer can be used as a clock
event device.

Unfortunately the use of the CP0 timer as a clock event device relies on a
succesful completion of c0_compare_interrupt.  That never happens, because
while waiting for a CP0 Compare interrupt to happen the function spins in
a loop reading the CP0 Count register.  This makes the CP0 Count erratum
trigger reliably causing the interrupt waited for to be lost in all cases.
As a result #4 resorts to using the CP0 timer as a clock source as well,
just as #2.  However we want to keep this separate arrangement in case
(hope) c0_compare_interrupt is eventually rewritten such that it avoids
the erratum.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5825/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoblackfin: Ignore generated uImages
Mark Brown [Thu, 29 Aug 2013 10:23:08 +0000 (11:23 +0100)]
blackfin: Ignore generated uImages

We have the build infrastructure to generate uImages so we should ignore
the resulting generated files.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
10 years agoblackfin: Add STMMAC platform data to enable dwmac1000 driver on BF60x.
Sonic Zhang [Thu, 15 Aug 2013 06:08:05 +0000 (14:08 +0800)]
blackfin: Add STMMAC platform data to enable dwmac1000 driver on BF60x.

- Enable GMAC
- Set propler DMA PBL
- Disable DMA store and forward mode
- Select PTP input clock from MII
clock.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Steven Miao <realmz6@gmail.com>
10 years agobf609: adv7343: add S-Video and Component output support
Scott Jiang [Thu, 8 Aug 2013 22:48:22 +0000 (18:48 -0400)]
bf609: adv7343: add S-Video and Component output support

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
10 years agobf609: add adv7343 video encoder support
Scott Jiang [Wed, 7 Aug 2013 06:30:43 +0000 (02:30 -0400)]
bf609: add adv7343 video encoder support

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
10 years agoclock: add stmmac clock for ethernet driver
Steven Miao [Fri, 5 Jul 2013 06:36:09 +0000 (14:36 +0800)]
clock: add stmmac clock for ethernet driver

Signed-off-by: Steven Miao <realmz6@gmail.com>
10 years agoblackfin: scb: Add SCB1 to SCB9 config options and data.
Sonic Zhang [Thu, 15 Nov 2012 04:32:26 +0000 (12:32 +0800)]
blackfin: scb: Add SCB1 to SCB9 config options and data.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: scb: Add system crossbar init code.
Steven Miao [Thu, 12 Sep 2013 08:36:16 +0000 (16:36 +0800)]
blackfin: scb: Add system crossbar init code.

If SCB exists in select blackfin cpu, developer can change the SCB
priority in kernel configuration.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Steven Miao <realmz6@gmail.com>
10 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Thu, 12 Sep 2013 23:14:49 +0000 (16:14 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This has been sitting in -next for a while with no objections and all
  MIPS defconfigs except one are building fine; that one platform got
  broken by another patch in your tree and I'm going to submit a patch
  separately.

   - a handful of fixes that didn't make 3.11
   - a few bits of Octeon 3 support with more to come for a later
     release
   - platform enhancements for Octeon, ath79, Lantiq, Netlogic and
     Ralink SOCs
   - a GPIO driver for the Octeon
   - some dusting off of the DECstation code
   - the usual dose of cleanups"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
  MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
  MIPS: kexec: Fix random crashes while loading crashkernel
  MIPS: kdump: Skip walking indirection page for crashkernels
  MIPS: DECstation HRT calibration bug fixes
  MIPS: Export copy_from_user_page() (needed by lustre)
  MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
  MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
  MIPS: ralink: Add support for reset-controller API
  MIPS: ralink: mt7620: Add cpu-feature-override header
  MIPS: ralink: mt7620: Add spi clock definition
  MIPS: ralink: mt7620: Add wdt clock definition
  MIPS: ralink: mt7620: Improve clock frequency detection
  MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
  MIPS: ralink: mt7620: Add verbose ram info
  MIPS: ralink: Probe clocksources from OF
  MIPS: ralink: Add support for systick timer found on newer ralink SoC
  MIPS: ralink: Add support for periodic timer irq
  MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
  MIPS: Netlogic: Add support for USB on XLP2xx
  MIPS: Netlogic: XLP2xx update for I2C controller
  ...