mfd: syscon: Fix warnings when printing resource_size_t

Gets rid of these warnings when compile module for 64 bit targets:
  CC      drivers/mfd/syscon.o
  drivers/mfd/syscon.c: In function 'syscon_probe':
  drivers/mfd/syscon.c:155:2: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' [-Wformat]
  drivers/mfd/syscon.c:155:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat]

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Merge branch 'exynos/clk' into next/firmware

This is a dependency for the exynos/secure branch

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Merge tag 'secure-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/firmware

From Kukjin Kim <kgene.kim@samsung.com>:

add support secure firmware for exynos

* tag 'secure-exynos-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Add secure firmware support to secondary CPU bring-up
  ARM: EXYNOS: Add IO mapping for non-secure SYSRAM.
  ARM: EXYNOS: Add support for Exynos secure firmware
  ARM: EXYNOS: Add support for secure monitor calls
  ARM: Add interface for registering and calling firmware-specific operations

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
nfsd4: check backchannel attributes on create_session

Make sure the client gives us an adequate backchannel.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
mfd: db8500-prcmu: Support platform dependant device selection

The main aim for this cycle is to have the u8540 booting to a
console. However, the u8540 doesn't support all of the u8500
platform devices yet. After this stage is complete we can then
fill in the inadequacies, such as specific clock support at a
later date. To achieve this we're placing devices supported by
all platforms into a common device structure and the remaining
ones into a platform specific one.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
nfsd4: clean up validate_stateid

The logic here is better expressed with a switch statement.

While we're here, CLOSED stateids (or stateids of an unkown type--which
would indicate a server bug) should probably return nfserr_bad_stateid,
though this behavior shouldn't affect any non-buggy client.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
merge_config.sh: Avoid creating unnessary source softlinks

Viresh noticed when using merge_config.sh that a source softlink
was being created even when he didn't specify the -O option.

The problem arises due to the previous commit 409f117e2d6b
which added the -O option. Basically if -O is not specified,
we still pass '-O=.' to the make command, which then generates
a source softlink to ./

This patch adds an extra check so if there is no -O specified
to merge_config.sh, we don't pass one on to make.

Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Reported-and-tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
ARM: Kirkwood: sort board entries by ASCII-code order

This patch sorts board entries in files Kconfig, Makefile and
kirkwood_defconfig by ASCII-code order.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
ARM: Kirkwood: DT board setup for CloudBox

This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
is a low cost NAS based on the Network Space v2.

Chipset list:
- CPU MARVELL 88F6702 1Ghz
- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
- SPI flash, NOR 512KB
- 1 push button
- 2 LEDs (red and blue)

There is no EEPROM and no USB ports embedded.

Note that this board must not be confused with the Network Space Mini v2
which is embedded in a previous LaCie product also named CloudBox.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
ARM: Kirkwood: update Network Space Mini v2 description

LaCie has released two products under the CloudBox name. The
netspace_mini_v2 machine is embedded in the oldest product. The cloudbox
machine is embedded in the newest one. In order to allow a CloudBox user
to select the right machine support, this patch adds some informations
to the netspace_mini_v2 Kconfig description. A comment is also added to
the dts file.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
gpio: gpio-generic: Add 16 and 32 bit big endian byte order support

There is no general support for 64-bit big endian accesses, so that is
left unsupported.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio/omap: free irq domain in probe() failure paths

Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe() fails. Therefore, ensure we free the domain if the
probe does fail. Furthermore, the local variable "ret" is not needed
and so remove this.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio/omap: remove extra context restores in *_runtime_resume()

68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups
on level-triggered GPIOs) already restores the fallingdetect and
risingdetect contexts in *_runtime_resume(). These registers were
modified in *_runtime_suspend() to include even those configured
as level-triggered since only edge-triggered gpios can generate
wakeup events. Therefore, the old context restores of the same
registers present later in the code is not needed any more.
Remove them.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio/omap: optimise interrupt service routine

The OMAP GPIO interrupt service routine is checking each bit in the
GPIO interrupt status register to see which bits are set. It is not
efficient to check every bit especially if only a few bits are set.
Therefore, instead of checking every bit use the __ffs() function,
which returns the location of the first set bit, to find all the set
bits.

This optimisation was suggested-by and developed in collaboration
with Felipe Balbi.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio/omap: force restore if context loss is not detectable

When booting with device-tree the function pointer for detecting context
loss is not populated. Ideally, the pm_runtime framework should be
enhanced to allow a means for reporting context/state loss and we could
avoid populating such function pointers altogether. In the interim until
a generic non-device specific solution is in place, force a restore of
the gpio bank when enabling the gpio controller.

Adds a new device-tree property for the OMAP GPIO controller to indicate
if the GPIO controller is located in a power-domain that never loses
power and hence will always maintain its logic state.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: mcp23s08: convert driver to DT

This converts the mcp23s08 driver to be able to be used with
device tree.

There is a "spi-present-mask" device tree property, that allows to
use multiple of this spi chips on the same chipselect.

v4:
- removed the ability to specify the pullup from device tree
- updated binding doc

v3:
- removed mcp,chips device tree property in favour of a
    mcp,spi-present-mask and a flag for the pullup of every gpio
- seperated the match table. Now there is one for i2c and one for spi
- do the of reading stuff on stack of the probe function - no devm
    any more

v2:
- squashed booth patches together
- fixed build warning, when CONFIG_OF is not defined
- use of_match_ptr macro for of_match_table

Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio: lpc32xx: Fix off-by-one valid range checking for bank

The valid bank should be 0 ... ARRAY_SIZE(lpc32xx_gpiochip) - 1.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
gpio / ACPI: Handle ACPI events in accordance with the spec

Commit 0d1c28a (gpiolib-acpi: Add ACPI5 event model support to gpio.)
that added support for ACPI events signalled through GPIO interrupts
covered only GPIO pins whose numbers are less than or equal to 255.
However, there may be GPIO pins with numbers greater than 255 and
the ACPI spec (ACPI 5.0, Section 5.6.5.1) requires the _EVT method
to be used for handling events corresponding to those pins.

Moreover, according to the spec, _EVT is the default mechanism
for handling all ACPI events signalled through GPIO interrupts,
so if the _Exx/_Lxx method is not present for the given pin,
_EVT should be used instead.  If present, though, _Exx/_Lxx take
precedence over _EVT which shouldn't be executed in that case
(ACPI 5.0, Section 5.6.5.3).

Modify acpi_gpiochip_request_interrupts() to follow the spec as
described above and add acpi_gpiochip_free_interrupts() needed
to free interrupts associated with _EVT.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
mfd: tps65090: Add compatible string for charger subnode

This patch adds the of_compatible value for the tps65090 charger
subnode used when loading the driver to find its properties
and of_node.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
ARM: sched_clock: allow changing to higher frequency counter

Allow multiple calls to setup_sched_clock and switch to the new counter
if it is higher frequency.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>