platform/adaptation/renesas_rcar/renesas_kernel.git
11 years agopinctrl: pinctrl-single: Fix error check condition
Sachin Kamat [Tue, 20 Nov 2012 11:04:39 +0000 (16:34 +0530)]
pinctrl: pinctrl-single: Fix error check condition

*map should be tested for NULL instead of map.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: SPEAr: Update error check for unsigned variables
Tushar Behera [Fri, 16 Nov 2012 06:50:39 +0000 (12:20 +0530)]
pinctrl: SPEAr: Update error check for unsigned variables

Checking '< 0' for unsigned variables always returns false. For error
codes, use IS_ERR_VALUE() instead.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoMerge branch 'at91' into devel
Linus Walleij [Wed, 21 Nov 2012 15:06:33 +0000 (16:06 +0100)]
Merge branch 'at91' into devel

11 years agogpiolib: Fix use after free in gpiochip_add_pin_range
Axel Lin [Wed, 21 Nov 2012 06:33:56 +0000 (14:33 +0800)]
gpiolib: Fix use after free in gpiochip_add_pin_range

This is introduced by commit 9ab6e988
"gpiolib: return any error code from range creation".

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: rename pin range arguments
Linus Walleij [Wed, 21 Nov 2012 07:48:09 +0000 (08:48 +0100)]
gpiolib: rename pin range arguments

To be crystal clear on what the arguments mean in this
funtion dealing with both GPIO and PIN ranges with confusing
naming, we now have gpio_offset and pin_offset and we are
on the clear that these are offsets into the specific GPIO
and pin controller respectively. The GPIO chip itself will
of course keep track of the base offset into the global
GPIO number space.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: single: support gpio request and free
Haojian Zhuang [Thu, 15 Nov 2012 08:36:31 +0000 (16:36 +0800)]
pinctrl: single: support gpio request and free

Marvell's PXA/MMP silicon also match the behavior of pinctrl-single.
Each pin binds to one register. A lot of pins could be configured
as gpio.

GPIO range is defined as a child node of pinmux in .dtsi file. If those
pins are with the same gpio function configuration in the pinmux
register, they could be defined in the same GPIO range. For this new
child node, two properties are used.

reg = <the start of pinmux register in range, size of range>

pinctrl-single,gpio: <gpio base in range, the gpio function of the range
in the pinmux register>

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: generic: add input schmitt disable parameter
Haojian Zhuang [Thu, 15 Nov 2012 08:36:33 +0000 (16:36 +0800)]
pinctrl: generic: add input schmitt disable parameter

In Marvell PXA/MMP silicons, input schmitt disable value is 0x40, not 0.
So append new config parameter -- input schmitt disable.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/u300/coh901: stop spawning pinctrl from GPIO
Linus Walleij [Tue, 20 Nov 2012 13:42:47 +0000 (14:42 +0100)]
pinctrl/u300/coh901: stop spawning pinctrl from GPIO

Let's stop spawning the pinctrl driver from the GPIO driver,
we have these two mechanisms broken apart now, and they can
each probe in isolation. If the GPIO driver cannot find its
pin controller (pinctrl-u300), the pin controller core will
tell it to defer probing.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/u300/coh901: let the gpio_chip register the range
Linus Walleij [Tue, 20 Nov 2012 13:28:07 +0000 (14:28 +0100)]
pinctrl/u300/coh901: let the gpio_chip register the range

Instead of having the pinctrl driver register the GPIO range
for the gpio_chip, making it necessary to instantiate the
pin controller from the GPIO driver and pass the GPIO chip as
platform data, now let the GPIO chip driver register it's own
ranges and have the pinctrl driver look up the GPIO chip from
the pinctrl core as necessary.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: add function to retrieve range from pin
Linus Walleij [Tue, 20 Nov 2012 13:25:07 +0000 (14:25 +0100)]
pinctrl: add function to retrieve range from pin

This adds a function to the pinctrl core to retrieve the GPIO
range associated with a certain pin for a certain controller.
This is needed when a pinctrl driver want to look up the
corresponding struct gpio_chip for a certain pin. As the
GPIO drivers can now create these ranges themselves, the
pinctrl driver no longer knows about all its associated GPIO
chips.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: return any error code from range creation
Linus Walleij [Tue, 20 Nov 2012 13:56:25 +0000 (14:56 +0100)]
gpiolib: return any error code from range creation

If we try to create a range for a certain GPIO chip and the
target pin controller is not yet available it may return
a probe deferral error code, so handle this all the way
our by checking the error code.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: make range registration defer properly
Linus Walleij [Tue, 20 Nov 2012 13:54:18 +0000 (14:54 +0100)]
pinctrl: make range registration defer properly

This makes the pinctrl_find_and_add_gpio_range() return
-EPROBE_DEFER if the range hosting pin controller cannot be
located. We may assume that the common case for why adding a
range fails is that the targe pin controller device has not
probed yet.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: rename find_pinctrl_*
Linus Walleij [Tue, 20 Nov 2012 13:03:37 +0000 (14:03 +0100)]
gpiolib: rename find_pinctrl_*

Rename the function find_pinctrl_and_add_gpio_range()
to pinctrl_find_and_add_gpio_range() so as to be consistent
with the rest of the functions.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: let gpiochip_add_pin_range() specify offset
Linus Walleij [Tue, 20 Nov 2012 11:40:15 +0000 (12:40 +0100)]
gpiolib: let gpiochip_add_pin_range() specify offset

Like with commit 3c739ad0df5eb41cd7adad879eda6aa09879eb76
it is not always enough to specify all the pins of a gpio_chip
from offset zero to be added to a pin map range, since the
mapping from GPIO to pin controller may not be linear at all,
but need to be broken into a few consecutive sub-ranges or
1-pin entries for complicated cases. The ranges may also be
sparse.

This alters the signature of the function to accept offsets
into both the GPIO-chip local pinspace and the pin controller
local pinspace.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: at91: pm9g45: add mmc support
Jean-Christophe PLAGNIOL-VILLARD [Mon, 19 Nov 2012 16:46:24 +0000 (00:46 +0800)]
ARM: at91: pm9g45: add mmc support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: Animeo IP: add mmc support
Jean-Christophe PLAGNIOL-VILLARD [Thu, 15 Nov 2012 13:56:27 +0000 (21:56 +0800)]
ARM: at91: Animeo IP: add mmc support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: dt: add mmc pinctrl for Atmel reference boards
Jean-Christophe PLAGNIOL-VILLARD [Mon, 19 Nov 2012 16:38:18 +0000 (00:38 +0800)]
ARM: at91: dt: add mmc pinctrl for Atmel reference boards

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: dt: at91sam9: add mmc pinctrl support
Jean-Christophe PLAGNIOL-VILLARD [Fri, 16 Nov 2012 00:24:17 +0000 (08:24 +0800)]
ARM: at91: dt: at91sam9: add mmc pinctrl support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91/dts: add nodes for atmel hsmci controllers for atmel boards
Ludovic Desroches [Mon, 19 Nov 2012 11:24:02 +0000 (12:24 +0100)]
ARM: at91/dts: add nodes for atmel hsmci controllers for atmel boards

Add mci controller nodes to atmel boards.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91/dts: add nodes for atmel hsmci controllers for atmel SOCs
Ludovic Desroches [Mon, 19 Nov 2012 11:23:36 +0000 (12:23 +0100)]
ARM: at91/dts: add nodes for atmel hsmci controllers for atmel SOCs

Add mci controller nodes to atmel SOCs.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: add clocks for DT entries
Ludovic Desroches [Mon, 19 Nov 2012 11:19:53 +0000 (12:19 +0100)]
ARM: at91: add clocks for DT entries

Add clocks to clock lookup table for DT entries.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoMerge branch 'delivery/pinctrl-at91-3.8' of http://github.com/at91linux/linux-at91...
Linus Walleij [Wed, 21 Nov 2012 09:48:33 +0000 (10:48 +0100)]
Merge branch 'delivery/pinctrl-at91-3.8' of github.com/at91linux/linux-at91 into at91

11 years agoARM: at91: add Somfy Animeo IP board support
Jean-Christophe PLAGNIOL-VILLARD [Thu, 15 Nov 2012 13:56:27 +0000 (21:56 +0800)]
ARM: at91: add Somfy Animeo IP board support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Add AT91RM9200EK board device tree
Joachim Eastwood [Sun, 28 Oct 2012 18:31:11 +0000 (18:31 +0000)]
ARM: AT91: Add AT91RM9200EK board device tree

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Add AT91RM9200 device tree
Joachim Eastwood [Sun, 28 Oct 2012 18:31:10 +0000 (18:31 +0000)]
ARM: AT91: Add AT91RM9200 device tree

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Add AT91RM9200 DT board
Joachim Eastwood [Sun, 28 Oct 2012 18:31:09 +0000 (18:31 +0000)]
ARM: AT91: Add AT91RM9200 DT board

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Add usart/tc/pio/ohci DT clock lookup to AT91RM9200
Joachim Eastwood [Sun, 28 Oct 2012 18:31:08 +0000 (18:31 +0000)]
ARM: AT91: Add usart/tc/pio/ohci DT clock lookup to AT91RM9200

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Add DT support to AT91RM9200 System Timer
Joachim Eastwood [Sun, 28 Oct 2012 18:31:07 +0000 (18:31 +0000)]
ARM: AT91: Add DT support to AT91RM9200 System Timer

Based on AT91 PIT DT patch from Jean-Christophe PLAGNIOL-VILLARD.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: AT91: Fix build failure on board-dt
Joachim Eastwood [Sun, 28 Oct 2012 18:31:06 +0000 (18:31 +0000)]
ARM: AT91: Fix build failure on board-dt

We need CONFIG_SOC_AT91SAM9 to get the at91sam926x_timer
symbol used in board-dt.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: add Ronetix pm9g45 board support
Jean-Christophe PLAGNIOL-VILLARD [Thu, 18 Oct 2012 06:10:21 +0000 (14:10 +0800)]
ARM: at91: add Ronetix pm9g45 board support

CPU Module with ATMEL AT91SAM9G45
http://www.ronetix.at/pm9g45.html

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: dt: at91sam9260: split rts and cts pinctrl not
Jean-Christophe PLAGNIOL-VILLARD [Sun, 18 Nov 2012 23:30:01 +0000 (07:30 +0800)]
ARM: at91: dt: at91sam9260: split rts and cts pinctrl not

as we just use the rts and not the rts & cts for rs485

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91: fix usart/uart namimg in pinctrl
Jean-Christophe PLAGNIOL-VILLARD [Sun, 18 Nov 2012 22:40:01 +0000 (06:40 +0800)]
ARM: at91: fix usart/uart namimg in pinctrl

USART are the full pin uart
DBGU the debug Unit
UART the two pin uart

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agoARM: at91sam9: add macb pinctrl support
Jean-Christophe PLAGNIOL-VILLARD [Tue, 23 Oct 2012 02:19:11 +0000 (10:19 +0800)]
ARM: at91sam9: add macb pinctrl support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agopinctrl: at91 add deglitch, debounce, pull down and schmitt trigger mux option support
Jean-Christophe PLAGNIOL-VILLARD [Wed, 26 Sep 2012 06:57:45 +0000 (14:57 +0800)]
pinctrl: at91 add deglitch, debounce, pull down and schmitt trigger mux option support

add :
 set_deglitch: enable/disable deglitch
 set_debounce: enable/disable debounce
 set_pulldown: enable/disable pulldown
 disable_schmitt_trig: disable schmitt trigger

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agopinctrl: at91: provide gpio names
Jean-Christophe PLAGNIOL-VILLARD [Tue, 6 Nov 2012 16:33:34 +0000 (00:33 +0800)]
pinctrl: at91: provide gpio names

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
11 years agopinctrl: nomadik: Staticize non-exported symbols
Axel Lin [Thu, 15 Nov 2012 16:01:35 +0000 (00:01 +0800)]
pinctrl: nomadik: Staticize non-exported symbols

They are not referenced outside of this file, make them static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: nomadik: Prevent NULL dereference if of_match_device returns NULL
Axel Lin [Thu, 15 Nov 2012 04:56:05 +0000 (12:56 +0800)]
pinctrl: nomadik: Prevent NULL dereference if of_match_device returns NULL

of_match_device() may return NULL.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: single: dump pinmux register value
Haojian Zhuang [Wed, 7 Nov 2012 15:19:42 +0000 (23:19 +0800)]
pinctrl: single: dump pinmux register value

Dump pinmux register value, not only function part in the pinmux
register.

Also fix the issue on caluclating pin offset. The last parameter
should be pin number, not register offset.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoPinctrl/spear: plgpio: don't call prepare/unprepare
Viresh Kumar [Wed, 14 Nov 2012 09:14:07 +0000 (14:44 +0530)]
Pinctrl/spear: plgpio: don't call prepare/unprepare

SPEAr SoC's don't do anything in clk_prepare() of plgpio driver,
so there is no need to call this routine multiple times. Just
call it once at probe.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called
Axel Lin [Wed, 14 Nov 2012 08:37:45 +0000 (16:37 +0800)]
pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called

This driver allows clk_get() failure, and still work without it.
This patch adds !IS_ERR(plgpio->clk) checking in plgpio_request() error path
so we only call clk_disable_unprepare() if clk_prepare_enable() is called.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: spear: Make get_gpio_pingroup return NULL when no gpio_pingroup found
Axel Lin [Tue, 13 Nov 2012 12:20:50 +0000 (20:20 +0800)]
pinctrl: spear: Make get_gpio_pingroup return NULL when no gpio_pingroup found

Currently get_gpio_pingroup() may return NULL or ERR_PTR(-EINVAL) when
no gpio_pingroup found. The caller in gpio_request_endisable() only
checks if the return value is NULL. Return ERR_PTR(-EINVAL) for
get_gpio_pingroup() causes problem and seems not necessary.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: coh901: Return proper error if irq_domain_add_linear() fails
Axel Lin [Tue, 13 Nov 2012 16:16:14 +0000 (00:16 +0800)]
pinctrl: coh901: Return proper error if irq_domain_add_linear() fails

Return -ENOMEM instead of 0 if irq_domain_add_linear fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingroup_addr
Axel Lin [Tue, 13 Nov 2012 07:31:41 +0000 (15:31 +0800)]
pinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingroup_addr

Current code does not work if count > 1, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: imx: Fix the logic checking if not able to find pin reg map
Axel Lin [Tue, 13 Nov 2012 01:00:07 +0000 (09:00 +0800)]
pinctrl: imx: Fix the logic checking if not able to find pin reg map

Current code sets "pin_reg = &info->pin_regs[i];" in each loop iteration,
so in the case of no-match, pin_reg is not NULL.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: tegra: Staticize non-exported symbols
Axel Lin [Sun, 11 Nov 2012 02:31:31 +0000 (10:31 +0800)]
pinctrl: tegra: Staticize non-exported symbols

They are not referenced outside of this file, make them static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/nomadik: db8540: split clkout group
Patrice Chotard [Wed, 14 Nov 2012 10:26:27 +0000 (11:26 +0100)]
pinctrl/nomadik: db8540: split clkout group

The clkout group is split into groups clkout1 and clkout2
which allows pins cklkout1 and clkout2 to be muxed
separately.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/nomadik: db8500: split clkout group
Patrice Chotard [Wed, 14 Nov 2012 10:20:09 +0000 (11:20 +0100)]
pinctrl/nomadik: db8500: split clkout group

The clkout group is split into groups clkout1 and clkout2
which allows pins cklkout1 and clkout2 to be muxed
separately.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: pxa3xx: Remove phy_base and phy_size from struct pxa3xx_pinmux_info
Axel Lin [Mon, 12 Nov 2012 06:46:48 +0000 (14:46 +0800)]
pinctrl: pxa3xx: Remove phy_base and phy_size from struct pxa3xx_pinmux_info

They are not used, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: pxa3xx: Use devm_request_and_ioremap
Axel Lin [Mon, 12 Nov 2012 06:45:50 +0000 (14:45 +0800)]
pinctrl: pxa3xx: Use devm_request_and_ioremap

Use managed resources API to simplify the code.
Also ensure we do request mem_region before ioremap.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: tegra: Make PINCTRL_TEGRA select PINMUX && PINCONF
Axel Lin [Mon, 12 Nov 2012 02:00:22 +0000 (10:00 +0800)]
pinctrl: tegra: Make PINCTRL_TEGRA select PINMUX && PINCONF

Then we can remove "select PINMUX && PINCONF" from PINCTRL_TEGRA{20,30}.
This simplifies the dependency.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: mxs: Make PINCTRL_MXS select PINMUX && PINCONF
Axel Lin [Mon, 12 Nov 2012 02:01:56 +0000 (10:01 +0800)]
pinctrl: mxs: Make PINCTRL_MXS select PINMUX && PINCONF

Then we can remove "select PINMUX && PINCONF" from PINCTRL_IMX{23,28}.
This simplifies the dependency.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: spear: Staticize non-exported symbols
Axel Lin [Sun, 11 Nov 2012 02:29:40 +0000 (10:29 +0800)]
pinctrl: spear: Staticize non-exported symbols

They are not referenced outside of this file, make them static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: pinmux: Release all taken pins in pinmux_enable_setting error paths
Axel Lin [Sat, 10 Nov 2012 13:53:20 +0000 (21:53 +0800)]
pinctrl: pinmux: Release all taken pins in pinmux_enable_setting error paths

Currently pinmux_enable_setting does not release all taken pins if
ops->enable() returns error. This patch ensures all taken pins are
released in any error paths.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: lantiq: Staticize non-exported symbols
Axel Lin [Wed, 7 Nov 2012 16:10:17 +0000 (00:10 +0800)]
pinctrl: lantiq: Staticize non-exported symbols

Both ltq_pinctrl_dt_node_to_map() and ltq_pinctrl_dt_free_map() are not
referenced outside of this file. Make them static.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: lantiq: Remove ltq_pmx_disable() function
Axel Lin [Wed, 7 Nov 2012 15:57:59 +0000 (23:57 +0800)]
pinctrl: lantiq: Remove ltq_pmx_disable() function

Current code adds empty ltq_pmx_disable() because pinmux_check_ops() requires
this callback to be defined.

This is not required since commit 02b50ce4cb1
"pinctrl: make pinmux disable function optional".

Thus remove ltq_pmx_disable() function.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: SPEAr: Add SoC specific gpio configuration routines
Shiraz Hashim [Wed, 7 Nov 2012 14:37:25 +0000 (20:07 +0530)]
pinctrl: SPEAr: Add SoC specific gpio configuration routines

Different SPEAr SoCs have different approach to configure pins as gpios. Some
configure a group of gpios with single register bit and others have one bit per
gpio pin. Only earlier one is implemented till now, this patch adds support for
later one.

Here we add callbacks to SoC specific code to configure gpios in
gpio_request_enable(). That will do additional SoC specific configuration to
enable gpio pins.

We also implement this callback for SPEAr1340 in this patch.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: Staticize pinconf_ops
Axel Lin [Wed, 7 Nov 2012 05:37:08 +0000 (13:37 +0800)]
pinctrl: Staticize pinconf_ops

They are not referenced outside respective driver.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: John Crispin <blogic@openwrt.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoMerge branch 'nomadik' into devel
Linus Walleij [Sun, 11 Nov 2012 18:12:46 +0000 (19:12 +0100)]
Merge branch 'nomadik' into devel

11 years agoMerge branch 'at91' into devel
Linus Walleij [Sun, 11 Nov 2012 18:12:33 +0000 (19:12 +0100)]
Merge branch 'at91' into devel

11 years agoARM: SPEAr: Add plgpio node in device tree dtsi files
Viresh Kumar [Sat, 27 Oct 2012 09:51:39 +0000 (15:21 +0530)]
ARM: SPEAr: Add plgpio node in device tree dtsi files

This patch adds plgpio nodes in SPEAr DT files.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: SPEAr: Add gpio ranges support
Viresh Kumar [Sat, 27 Oct 2012 09:51:38 +0000 (15:21 +0530)]
pinctrl: SPEAr: Add gpio ranges support

Most of SPEAr SoCs, which support pinctrl, can configure & use pads as gpio.
This patch gpio enable support for SPEAr pinctrl drivers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: iron out include ladder mistakes
Linus Walleij [Tue, 6 Nov 2012 16:16:39 +0000 (17:16 +0100)]
gpiolib: iron out include ladder mistakes

The <*/gpio.h> includes are updated again: now we need to account
for the problem introduced by commit:
595679a8038584df7b9398bf34f61db3c038bfea
"gpiolib: fix up function prototypes etc"

Actually we need static inlines in include/asm-generic/gpio.h
as well since we may have GPIOLIB but not PINCTRL.
Make sure to move all the CONFIG_PINCTRL business
to the end of the file so we are sure we have
declared struct gpio_chip.

And we need to keep the static inlines in <linux/gpio.h>
but here for the !CONFIG_GENERIC_GPIO case, and then we
may as well throw in a few warnings like the other
prototypes there, if someone would have the bad taste
of compiling without GENERIC_GPIO even.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: separation of pin concerns
Linus Walleij [Tue, 6 Nov 2012 15:03:35 +0000 (16:03 +0100)]
gpiolib: separation of pin concerns

The fact that of_gpiochip_add_pin_range() and
gpiochip_add_pin_range() share too much code is fragile and
will invariably mean that bugs need to be fixed in two places
instead of one.

So separate the concerns of gpiolib.c and gpiolib-of.c and
have the latter call the former as back-end. This is necessary
also when going forward with other device descriptions such
as ACPI.

This is done by:

- Adding a return code to gpiochip_add_pin_range() so we can
  reliably check whether this succeeds.

- Get rid of the custom of_pinctrl_add_gpio_range() from
  pinctrl. Instead create of_pinctrl_get() to just retrive the
  pin controller per se from an OF node. This composite
  function was just begging to be deleted, it was way to
  purpose-specific.

- Use pinctrl_dev_get_name() to get the name of the retrieved
  pin controller and use that to call back into the generic
  gpiochip_add_pin_range().

Now the pin range is only allocated and tied to a pin
controller from the core implementation in gpiolib.c.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: call pin removal in chip removal function
Linus Walleij [Tue, 6 Nov 2012 14:15:44 +0000 (15:15 +0100)]
gpiolib: call pin removal in chip removal function

This makes us call gpiochio_remove_pin_ranges() in the
gpiochip_remove() function, so we get rid of ranges when
freeing the chip.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: remove duplicate pin range code
Linus Walleij [Tue, 6 Nov 2012 14:03:47 +0000 (15:03 +0100)]
gpiolib: remove duplicate pin range code

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Introduced both of_gpiochip_remove_pin_range() and
gpiochip_remove_pin_ranges(). But the contents are exactly
the same so remove the OF one and rely on the range deletion
in the core.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib-of: staticize the pin range calls
Linus Walleij [Tue, 6 Nov 2012 13:58:55 +0000 (14:58 +0100)]
gpiolib-of: staticize the pin range calls

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Declared the of_gpiochip_[add|remove]_pin_range() global
while they should be static as they are only ever used in
this file. Let's convert them to static.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: fix up function prototypes etc
Linus Walleij [Tue, 6 Nov 2012 13:49:39 +0000 (14:49 +0100)]
gpiolib: fix up function prototypes etc

Commit 69e1601bca88809dc118abd1becb02c15a02ec71
"gpiolib: provide provision to register pin ranges"

Got most of it's function prototypes wrong, so fix this up by:

- Moving the void declarations into static inlines in
  <linux/gpio.h> (previously the actual prototypes were declared
  here...)

- Declare the gpiochip_add_pin_range() and
  gpiochip_remove_pin_ranges() functions in <asm-generic/gpio.h>
  together with the pin range struct declaration itself.

- Actually only implement these very functions in gpiolib.c
  if CONFIG_PINCTRL is set.

- Additionally export the symbols since modules will need to
  be able to do this.

Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: sirf: Staticize non-exported symbol
Axel Lin [Mon, 5 Nov 2012 13:44:28 +0000 (21:44 +0800)]
pinctrl: sirf: Staticize non-exported symbol

Staticize sirfsoc_gpio_irq_map() function.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: u300: Staticize non-exported symbols
Axel Lin [Mon, 5 Nov 2012 13:42:16 +0000 (21:42 +0800)]
pinctrl: u300: Staticize non-exported symbols

Staticize u300_pin_config_get() and u300_pin_config_set() functions.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/u300: use managed resources
Linus Walleij [Wed, 17 Oct 2012 17:17:56 +0000 (19:17 +0200)]
pinctrl/u300: use managed resources

This converts the U300 pin controller to use managed resources
(devm_*) for it's memory region.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/coh901: convert to use managed resources
Linus Walleij [Wed, 17 Oct 2012 16:49:05 +0000 (18:49 +0200)]
pinctrl/coh901: convert to use managed resources

This switches the COH 901 pin controller to use managed
resources (devm_*) for memory remaps, clocks, etc.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl/coh901: use irqdomain, allocate irqdescs
Linus Walleij [Wed, 17 Oct 2012 16:31:20 +0000 (18:31 +0200)]
pinctrl/coh901: use irqdomain, allocate irqdescs

This switches the COH 901 pinctrl driver to allocate its GPIO
IRQs dynamically, and start to use a linear irqdomain to map
from the hardware IRQs.

This way we can cut away the complex allocation of IRQ numbers
from the <mach/irqs.h> file.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoARM: U300: bump IRQs to offset 32
Linus Walleij [Wed, 17 Oct 2012 11:16:46 +0000 (13:16 +0200)]
ARM: U300: bump IRQs to offset 32

The U300 IRQs were bumped once to offset to 1 (in order to avoid
using IRQ 0 which is now NO_IRQ). This was OK as we were still
passing the number of irqs in the .nr_irqs field of the machine,
with descriptors allocated at boot time.

However .nr_irqs should be 0, leading the system to reserve the
first 16 IRQs. Then the VIC driver will complain that IRQs 1
thru 15 are pre-allocated, so to avoid this and use free
descriptors, move all IRQs up to offset 32.

This will all be done away with as we migrate to device tree,
so it is an interim solution.

Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: SPEAr: Add plgpio driver
Viresh Kumar [Sat, 27 Oct 2012 09:51:37 +0000 (15:21 +0530)]
pinctrl: SPEAr: Add plgpio driver

Most of SPEAr SoCs, which support pinctrl, can configure & use
pads as gpio. This patch adds plgpio driver for configuring
these pads as gpio.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agogpiolib: provide provision to register pin ranges
Shiraz Hashim [Sat, 27 Oct 2012 09:51:36 +0000 (15:21 +0530)]
gpiolib: provide provision to register pin ranges

pinctrl subsystem needs gpio chip base to prepare set of gpio
pin ranges, which a given pinctrl driver can handle. This is
important to handle pinctrl gpio request calls in order to
program a given pin properly for gpio operation.

As gpio base is allocated dynamically during gpiochip
registration, presently there exists no clean way to pass this
information to the pinctrl subsystem.

After few discussions from [1], it was concluded that may be
gpio controller reporting the pin range it supports, is a
better way than pinctrl subsystem directly registering it.

[1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/184816

Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
[Edited documentation a bit]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoRevert "pinctrl: remove pinctrl_remove_gpio_range"
Viresh Kumar [Sat, 27 Oct 2012 09:51:35 +0000 (15:21 +0530)]
Revert "pinctrl: remove pinctrl_remove_gpio_range"

This reverts earlier commit which removed
pinctrl_remove_gpio_range(), because at that time there
weren't any more users of that routine. It was removed as the
removal of ranges was done in unregister of pinctrl.

But as we are now registering stuff from gpiolib, we may
remove and insert a gpio module multiple times. So, we
need this routine again.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: exynos: Add terminating entry for of_device_id table
Axel Lin [Fri, 2 Nov 2012 13:46:13 +0000 (21:46 +0800)]
pinctrl: exynos: Add terminating entry for of_device_id table

The of_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: sirf: enable the driver support new SiRFmarco SoC
Barry Song [Thu, 27 Sep 2012 09:56:30 +0000 (17:56 +0800)]
pinctrl: sirf: enable the driver support new SiRFmarco SoC

The driver supports old up SiRFprimaII SoCs, this patch makes it support
the new SiRFmarco as well.
SiRFmarco, as a SMP SoC, adds new SIRFSOC_GPIO_PAD_EN_CLR registers, to
disable GPIO pad, we should write 1 to the corresponding bit in the new
CLEAR register instead of writing 0 to SIRFSOC_GPIO_PAD_EN.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: mvebu: move to its own directory
Thomas Petazzoni [Wed, 24 Oct 2012 21:38:58 +0000 (23:38 +0200)]
pinctrl: mvebu: move to its own directory

Like the spear platform, the mvebu platform has multiple files: one
core file, and then one file per SoC family. More files will be added
later, as support for mach-orion5x and mach-mv78xx0 SoCs is added to
pinctrl-mvebu. For those reasons, having a separate subdirectory,
drivers/pinctrl/mvebu/ makes sense, and it had already been suggested
by Linus Wallej when the driver was originally submitted.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: mvebu: remove useless include
Thomas Petazzoni [Wed, 24 Oct 2012 21:38:57 +0000 (23:38 +0200)]
pinctrl: mvebu: remove useless include

Including the core.h header for the pinctrl subsystem is not
necessary, and it is actually causing problems when moving the
pinctrl-mvebu drivers into a separate subdirectory.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: mvebu: allow plat-orion architectures to use pinctrl-mvebu
Thomas Petazzoni [Wed, 24 Oct 2012 21:38:56 +0000 (23:38 +0200)]
pinctrl: mvebu: allow plat-orion architectures to use pinctrl-mvebu

The mach-kirkwood and mach-dove architectures have not yet been
integrated into the mach-mvebu directory, which should ultimately
contain the support for all Marvell SoCs from the Engineering Business
Unit.

However, before this can happen, we need to let mach-kirkwood and
mach-dove use the pinctrl-mvebu driver, which supports the kirkwood
and dove SoC families. In order to do that, we make this driver
available as soon as PLAT_ORION is selected, instead of using
ARCH_MVEBU as a condition. In the long term, PLAT_ORION should
disappear and be fully replaced by ARCH_MVEBU, but the plan is to make
the migration step by step, by first having the existing mach-*
directories for Marvell SoCs converge on several infrastructures,
including the pinctrl one.

Also, like the spear pinctrl driver, we put all pinctrl-mvebu Kconfig
options under a if, in order to avoid having certain options
(PINCTRL_DOVE, PINCTRL_KIRKWOOD, etc.) selecting an option
(PINCTLR_MVEBU) which itself has a dependency (on ARCH_MVEBU). In this
a construct, the dependency is in fact ignored due to the selects.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agopinctrl: reserve pins when states are activated
Linus Walleij [Wed, 17 Oct 2012 18:51:54 +0000 (20:51 +0200)]
pinctrl: reserve pins when states are activated

This switches the way that pins are reserved for multiplexing:

We used to do this when the map was parsed, at the creation of
the settings inside the pinctrl handle, in pinmux_map_to_setting().

However this does not work for us, because we want to use the
same set of pins with different devices at different times: the
current code assumes that the pin groups in a pinmux state will
only be used with one single device, albeit different groups can
be active at different times. For example if a single I2C driver
block is used to drive two different busses located on two
pin groups A and B, then the pins for all possible states of a
function are reserved when fetching the pinctrl handle: the
I2C bus can choose either set A or set B by a mux state at
runtime, but all pins in both group A and B (the superset) are
effectively reserved for that I2C function and mapped to the
device. Another device can never get in and use the pins in
group A, even if the device/function is using group B at the
moment.

Instead: let use reserve the pins when the state is activated
and drop them when the state is disabled, i.e. when we move to
another state. This way different devices/functions can use the
same pins at different times.

We know that this is an odd way of doing things, but we really
need to switch e.g. an SD-card slot to become a tracing output
sink at runtime: we plug in a special "tracing card" then mux
the pins that used to be an SD slot around to the tracing
unit and push out tracing data there instead of SD-card
traffic.

As a side effect pinmux_free_setting() is unused but the stubs
are kept for future additions of code.

Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Loic Pallardy <loic.pallardy@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Jean Nicolas Graux <jean-nicolas.graux@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 years agoLinux 3.7-rc5
Linus Torvalds [Sun, 11 Nov 2012 12:44:33 +0000 (13:44 +0100)]
Linux 3.7-rc5

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sat, 10 Nov 2012 21:03:49 +0000 (22:03 +0100)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "Bug fixes galore, mostly in drivers as is often the case:

  1) USB gadget and cdc_eem drivers need adjustments to their frame size
     lengths in order to handle VLANs correctly.  From Ian Coolidge.

  2) TIPC and several network drivers erroneously call tasklet_disable
     before tasklet_kill, fix from Xiaotian Feng.

  3) r8169 driver needs to apply the WOL suspend quirk to more chipsets,
     fix from Cyril Brulebois.

  4) Fix multicast filters on RTL_GIGA_MAC_VER_35 r8169 chips, from
     Nathan Walp.

  5) FDB netlink dumps should use RTM_NEWNEIGH as the message type, not
     zero.  From John Fastabend.

  6) Fix smsc95xx tx checksum offload on big-endian, from Steve
     Glendinning.

  7) __inet_diag_dump() needs to repsect and report the error value
     returned from inet_diag_lock_handler() rather than ignore it.
     Otherwise if an inet diag handler is not available for a particular
     protocol, we essentially report success instead of giving an error
     indication.  Fix from Cyrill Gorcunov.

  8) When the QFQ packet scheduler sees TSO/GSO packets it does not
     handle things properly, and in fact ends up corrupting it's
     datastructures as well as mis-schedule packets.  Fix from Paolo
     Valente.

  9) Fix oopser in skb_loop_sk(), from Eric Leblond.

  10) CXGB4 passes partially uninitialized datastructures in to FW
      commands, fix from Vipul Pandya.

  11) When we send unsolicited ipv6 neighbour advertisements, we should
      send them to the link-local allnodes multicast address, as per
      RFC4861.  Fix from Hannes Frederic Sowa.

  12) There is some kind of bug in the usbnet's kevent deferral
      mechanism, but more immediately when it triggers an uncontrolled
      stream of kernel messages spam the log.  Rate limit the error log
      message triggered when this problem occurs, as sending thousands
      of error messages into the kernel log doesn't help matters at all,
      and in fact makes further diagnosis more difficult.

      From Steve Glendinning.

  13) Fix gianfar restore from hibernation, from Wang Dongsheng.

  14) The netlink message attribute sizes are wrong in the ipv6 GRE
      driver, it was using the size of ipv4 addresses instead of ipv6
      ones :-) Fix from Nicolas Dichtel."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  gre6: fix rtnl dump messages
  gianfar: ethernet vanishes after restoring from hibernation
  usbnet: ratelimit kevent may have been dropped warnings
  ipv6: send unsolicited neighbour advertisements to all-nodes
  net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
  usb: gadget: g_ether: fix frame size check for 802.1Q
  cxgb4: Fix initialization of SGE_CONTROL register
  isdn: Make CONFIG_ISDN depend on CONFIG_NETDEVICES
  cxgb4: Initialize data structures before using.
  af-packet: fix oops when socket is not present
  pkt_sched: enable QFQ to support TSO/GSO
  net: inet_diag -- Return error code if protocol handler is missed
  net: bnx2x: Fix typo in bnx2x driver
  smsc95xx: fix tx checksum offload for big endian
  rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dump
  ptp: update adjfreq callback description
  r8169: allow multicast packets on sub-8168f chipset.
  r8169: Fix WoL on RTL8168d/8111d.
  drivers/net: use tasklet_kill in device remove/close process
  tipc: do not use tasklet_disable before tasklet_kill

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Sat, 10 Nov 2012 20:58:34 +0000 (21:58 +0100)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Several build/bug fixes for sparc, including:

  1) Configuring a mix of static vs.  modular sparc64 crypto modules
     didn't work, remove an ill-conceived attempt to only have to build
     the device match table for these drivers once to fix the problem.

     Reported by Meelis Roos.

  2) Make the montgomery multiple/square and mpmul instructions actually
     usable in 32-bit tasks.  Essentially this involves providing 32-bit
     userspace with a way to use a 64-bit stack when it needs to.

  3) Our sparc64 atomic backoffs don't yield cpu strands properly on
     Niagara chips.  Use pause instruction when available to achieve
     this, otherwise use a benign instruction we know blocks the strand
     for some time.

  4) Wire up kcmp

  5) Fix the build of various drivers by removing the unnecessary
     blocking of OF_GPIO when SPARC.

  6) Fix unintended regression wherein of_address_to_resource stopped
     being provided.  Fix from Andreas Larsson.

  7) Fix NULL dereference in leon_handle_ext_irq(), also from Andreas
     Larsson."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix build with mix of modular vs. non-modular crypto drivers.
  sparc: Support atomic64_dec_if_positive properly.
  of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again
  sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
  sparc: Add sparc support for platform_get_irq()
  sparc: Allow OF_GPIO on sparc.
  qlogicpti: Fix build warning.
  sparc: Wire up sys_kcmp.
  sparc64: Improvde documentation and readability of atomic backoff code.
  sparc64: Use pause instruction when available.
  sparc64: Fix cpu strand yielding.
  sparc64: Make montmul/montsqr/mpmul usable in 32-bit threads.

11 years agoMerge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 10 Nov 2012 05:59:35 +0000 (06:59 +0100)]
Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Jeff Layton.

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Do not lookup hashed negative dentry in cifs_atomic_open
  cifs: fix potential buffer overrun in cifs.idmap handling code

11 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
Linus Torvalds [Sat, 10 Nov 2012 05:58:20 +0000 (06:58 +0100)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
 - correct argument type (pgprot_t) when calling __ioremap()
 - PCI_IOBASE virtual address change
 - use architected event for CPU cycle counter
 - fix ELF core dumping
 - select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
 - missing completion for secondary CPU boot
 - booting on systems with all memory beyond 4GB

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
  arm64: mm: fix booting on systems with no memory below 4GB
  arm64: smp: add missing completion for secondary boot
  arm64: compat: select CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  arm64: elf: fix core dumping definitions for GP and FP registers
  arm64: perf: use architected event for CPU cycle counter
  arm64: Move PCI_IOBASE closer to MODULES_VADDR
  arm64: Use pgprot_t as the last argument when invoking __ioremap()

11 years agoMerge tag 'stable/for-linus-3.7-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 10 Nov 2012 05:56:21 +0000 (06:56 +0100)]
Merge tag 'stable/for-linus-3.7-rc5-tag' of git://git./linux/kernel/git/konrad/xen

Pull Xen fixes from Konrad Rzeszutek Wilk:
 "There are three ARM compile fixes (we forgot to export certain
  functions and if the drivers are built as an module - we go belly-up).

  There is also an mismatch of irq_enter() / exit_idle() calls sequence
  which were fixed some time ago in other piece of codes, but failed to
  appear in the Xen code.

  Lastly a fix for to help in the field with troubleshooting in case we
  cannot get the appropriate parameter and also fallback code when
  working with very old hypervisors."

Bug-fixes:
 - Fix compile issues on ARM.
 - Fix hypercall fallback code for old hypervisors.
 - Print out which HVM parameter failed if it fails.
 - Fix idle notifier call after irq_enter.

* tag 'stable/for-linus-3.7-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/arm: Fix compile errors when drivers are compiled as modules (export more).
  xen/arm: Fix compile errors when drivers are compiled as modules.
  xen/generic: Disable fallback build on ARM.
  xen/events: fix RCU warning, or Call idle notifier after irq_enter()
  xen/hvm: If we fail to fetch an HVM parameter print out which flag it is.
  xen/hypercall: fix hypercall fallback code for very old hypervisors

11 years agosparc64: Fix build with mix of modular vs. non-modular crypto drivers.
David S. Miller [Sat, 10 Nov 2012 04:53:32 +0000 (20:53 -0800)]
sparc64: Fix build with mix of modular vs. non-modular crypto drivers.

We tried linking in a single built object to hold the device table,
but only works if all of the sparc64 crypto modules get built the same
way (modular vs. non-modular).

Just include the device ID stub into each driver source file so that
the table gets compiled into the correct result in all cases.

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc: Support atomic64_dec_if_positive properly.
David S. Miller [Sat, 10 Nov 2012 03:37:59 +0000 (19:37 -0800)]
sparc: Support atomic64_dec_if_positive properly.

Sparc32 already supported it, as a consequence of using the
generic atomic64 implementation.  And the sparc64 implementation
is rather trivial.

This allows us to set ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE for all
of sparc, and avoid the annoying warning from lib/atomic64_test.c

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoof/address: sparc: Declare of_address_to_resource() as an extern function for sparc...
Andreas Larsson [Tue, 6 Nov 2012 00:12:03 +0000 (00:12 +0000)]
of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again

This bug-fix makes sure that of_address_to_resource is defined extern for sparc
so that the sparc-specific implementation of of_address_to_resource() is once
again used when including include/linux/of_address.h in a sparc context. A
number of drivers in mainline relies on this function working for sparc.

The bug was introduced in a850a7554442f08d3e910c6eeb4ee216868dda1e, "of/address:
add empty static inlines for !CONFIG_OF". Contrary to that commit title, the
static inlines are added for !CONFIG_OF_ADDRESS, and CONFIG_OF_ADDRESS is never
defined for sparc. This is good behavior for the other functions in
include/linux/of_address.h, as the extern functions defined in
drivers/of/address.c only gets linked when OF_ADDRESS is configured. However,
for of_address_to_resource there exists a sparc-specific implementation in
arch/sparc/arch/sparc/kernel/of_device_common.c

Solution suggested by: Sam Ravnborg <sam@ravnborg.org>

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq
Andreas Larsson [Tue, 30 Oct 2012 00:09:46 +0000 (00:09 +0000)]
sparc32, leon: Check for existent irq_map entry in leon_handle_ext_irq

If an irq is being unlinked concurrently with leon_handle_ext_irq,
irq_map[eirq] might be null in leon_handle_ext_irq. Make sure that
this is not dereferenced.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc: Add sparc support for platform_get_irq()
Andreas Larsson [Mon, 29 Oct 2012 23:26:56 +0000 (23:26 +0000)]
sparc: Add sparc support for platform_get_irq()

This adds sparc support for platform_get_irq that in the normal case use
platform_get_resource() to get an irq. This standard approach fails for sparc as
there are no resources of type IORESOURCE_IRQ for irqs for sparc.

Cross platform drivers can then use this standard platform function and work on
sparc instead of having to have a special case for sparc.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agogre6: fix rtnl dump messages
Nicolas Dichtel [Fri, 9 Nov 2012 05:34:56 +0000 (05:34 +0000)]
gre6: fix rtnl dump messages

Spotted after a code review.
Introduced by c12b395a46646bab69089ce7016ac78177f6001f (gre: Support GRE over
IPv6).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agogianfar: ethernet vanishes after restoring from hibernation
Wang Dongsheng [Fri, 9 Nov 2012 04:43:51 +0000 (04:43 +0000)]
gianfar: ethernet vanishes after restoring from hibernation

If a gianfar ethernet device is down prior to hibernating a
system, it will no longer be present upon system restore.

For example:

~# ifconfig eth0 down
~# echo disk > /sys/power/state

  <trigger a restore from hibernation>

~# ifconfig eth0 up
SIOCSIFFLAGS: No such device

This happens because the restore function bails out early upon
finding devices that were not up at hibernation.  In doing so,
it never gets to the netif_device_attach call at the end of
the restore function.  Adding the netif_device_attach as done
here also makes the gfar_restore code consistent with what is
done in the gfar_resume code.

Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: ratelimit kevent may have been dropped warnings
Steve Glendinning [Thu, 8 Nov 2012 06:26:21 +0000 (06:26 +0000)]
usbnet: ratelimit kevent may have been dropped warnings

when something goes wrong, a flood of these messages can be
generated by usbnet (thousands per second).  This doesn't
generally *help* the condition so this patch ratelimits the
rate of their generation.

There's an underlying problem in usbnet's kevent deferral
mechanism which needs fixing, specifically that events *can*
get dropped and not handled.  This patch doesn't address this,
but just mitigates fallout caused by the current implemention.

Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: send unsolicited neighbour advertisements to all-nodes
Hannes Frederic Sowa [Tue, 6 Nov 2012 16:18:41 +0000 (16:18 +0000)]
ipv6: send unsolicited neighbour advertisements to all-nodes

As documented in RFC4861 (Neighbor Discovery for IP version 6) 7.2.6.,
unsolicited neighbour advertisements should be sent to the all-nodes
multicast address.

Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 9 Nov 2012 20:35:51 +0000 (21:35 +0100)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes (again) from Dave Airlie:
 "dropped the ball on a vmware patch, so two more fixes for vmwgfx are
  here, one for hibernate issue, one for a BUG trigger."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memory
  drm/vmwgfx: Fix hibernation device reset

11 years agoMerge tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Fri, 9 Nov 2012 20:33:53 +0000 (21:33 +0100)]
Merge tag '3.7-pci-fixes' of git://git./linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "Power management:
    - PCI/PM: Fix proc config reg access for D3cold and bridge
      suspending
    - PCI/PM: Resume device before shutdown
    - PCI/PM: Fix deadlock when unbinding device if parent in D3cold
  Hotplug:
    -  PCI/portdrv: Don't create hotplug slots unless port supports
       hotplug"

* tag '3.7-pci-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/portdrv: Don't create hotplug slots unless port supports hotplug
  PCI/PM: Fix proc config reg access for D3cold and bridge suspending
  PCI/PM: Resume device before shutdown
  PCI/PM: Fix deadlock when unbinding device if parent in D3cold

11 years agoMerge tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 9 Nov 2012 20:32:33 +0000 (21:32 +0100)]
Merge tag 'mmc-fixes-for-3.7-rc5' of git://git./linux/kernel/git/cjb/mmc

Pull MMC fixes from Chris Ball:
 - sdhci: fix a NULL dereference at resume-time, seen on OLPC XO-4
 - sdhci: fix against 3.7-rc1 for UHS modes without a vqmmc regulator
 - sdhci-of-esdhc: disable CMD23 on boards where it's broken
 - sdhci-s3c: fix against 3.7-rc1 for card detection with runtime PM
 - dw_mmc, omap_hsmmc: fix potential NULL derefs, compiler warnings

* tag 'mmc-fixes-for-3.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: sdhci-s3c: fix the card detection in runtime-pm
  mmc: sdhci-s3c: use clk_prepare_enable and clk_disable_unprepare
  mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
  mmc: dw_mmc: fix modular build for exynos back-end
  mmc: sdhci: fix NULL dereference in sdhci_request() tuning
  mmc: sdhci: fix IS_ERR() checking of regulator_get()
  mmc: fix sdhci-dove probe/removal
  mmc: sh_mmcif: fix use after free
  mmc: sdhci-pci: fix 'Invalid iomem size' error message condition
  mmc: mxcmmc: Fix MODULE_ALIAS
  mmc: omap_hsmmc: fix NULL pointer dereference for dt boot
  mmc: omap_hsmmc: fix host reference after mmc_free_host
  mmc: dw_mmc: fix multiple drv_data NULL dereferences
  mmc: dw_mmc: enable controller interrupt before calling mmc_start_host
  mmc: sdhci-of-esdhc: disable CMD23 for some Freescale SoCs
  mmc: dw_mmc: remove _dev_info compile warning
  mmc: dw_mmc: convert the variable type of irq