pinctrl: allows not to define the get_group_pins operation

When using a group only pinctrl driver, which does not have any
information on the pins it is useless to define a get_group_pins
always returning an empty list of pins.

When not using get_group_pin[1], a driver must implement it so
pins = NULL and num_pins = 0. This patch makes it the default
behaviour if not defined in the pinctrl driver when used in
pinmux enable and disable funtions and in pinctrl_groups_show.

It also adds a check in pinctrl_get_group_pins and return -EINVAL if
not defined. This function is called in the gpiolib when adding when
pingroup range. It cannot be used if no group is defined, so this seams
reasonable.

[1] get_group_pin(struct pinctrl_dev *pctldev,
		  unsigned selector,
		  const unsigned **pins,
		  unsigned *num_pins);

Signed-off-by: Antoine TÃ©nart <antoine.tenart@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit e5b3b2d9ed202697a937c282f9c4d93b1e3e0848)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lock

rsnd_soc_dai_trigger() will be called
after rsnd_dai_pointer_update() function
which is using rsnd_lock().
Thus, it should be called from outside of rsnd_lock().
Kernel will be hangup without this patch.
Special thanks to Kataoka-san

Reported-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 836b31fe1a9791d84ed95783ed42ebd5719f7918)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
pinctrl: sh-pfc: r8a7791: Split the DU sync and cde/disp groups

The DU parallel interface ODDF signal is optional, move it out of the
HSYNC/VSYNC group into a group of its down. The CDE and DISP signals are
independent, split them to two different groups.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit d10046e25c73e6150677b1b5360f20bb631181a7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
pinctrl: pfc: r8a7790: add i2c0 muxing

Add the muxing for the last missing i2c rcar core. Fix the sorting for
SH_PFC_PIN_NAMED while we are here.

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 35a493de0daf4955b6d15d488b3f8754d4637a04)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
pinctrl: pfc: r8a7790: add mux data for IIC(B) cores

Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit a16b81dcbfc5889c37dac5f8e836136e4740fc18)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
sh-pfc: r8a7790: Fix definition of IPSR5

The extra entry in the table makes SCIFA0_B, and all
peripherals after it, fail.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 34ce57e9df7d14b52c7613bb2c190e411ca99186)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
sh-pfc: r8a7791: Fix definition of MOD_SEL3

There is a missing 0 entry from the MOD_SEL3 table.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 0c66c5628bbb5e96360032440f53a6cb6f8973d0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: LPAE: use signed arithmetic for mask definitions

This patch applies to PAGE_MASK, PMD_MASK, and PGDIR_MASK, where forcing
unsigned long math truncates the mask at the 32-bits.  This clearly does bad
things on PAE systems.

This patch fixes this problem by defining these masks as signed quantities.
We then rely on sign extension to do the right thing.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Subash Patel <subash.rp@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit 926edcc747e2efb3c9add7ed4dbc4e7a3a959d02)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions

Several of the ioremap functions use unsigned long in places
resulting in truncation if physical addresses greater than
4G are passed in. Change the types of the functions and the
callers accordingly.

Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 9b97173e785a54c5df0aa23d1e1f680f61e36e43)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7740: Remove unused r8a7740_add_early_devices_dt()

It was removed in commit 744fdc8dc0e22cc5b61ee1bcde9375f188daa330 ("ARM:
shmobile: r8a7740: Prepare for reference DT setup"), but accidentally
resurrected in commit 88378837780166d67a11142cd6f76596c0a2d8c3 ("ARM:
shmobile: Remove unused r8a7740 auxdata table").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 72dc392ae5bbad3477053ac4c5708dba6706ffa0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: sh7372: Call sh7372_add_early_devices() instead of open coding

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 1fba31f047639a6c7accf4f6d075a6cf9eacecc0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7740: Make r8a7740_meram_workaround() __init

It's called from eva_init() only, which is __init

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit bb6c3d58c36adb205b4bf233fd1c4079e02a6811)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: armadillo-reference dts: Seiko Instruments, Inc is "sii"

Use "sii,s35390a" instead of "seiko,s35390a", cfr.
Documentation/devicetree/bindings/i2c/trivial-devices.txt and
Documentation/devicetree/bindings/vendor-prefixes.txt.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit dd485ab9a88267f4db0d58ace23b19e876ebf8ac)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data

There are no active users of these callbacks, thus there are no benefit
of trying to invoke them.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ab496b9d259e754f5d646219e4f032b274b9fffe)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: henninger: initial device tree

Add the initial device tree for the R8A7791 SoC based Henninger board. SCIF0
serial port support is included, so that the serial console can work.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 4b37ab033e6f8c9750f98fefe9bdc341b6943268)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: henninger: add Ether DT support

Define the Henninger board dependent part of the Ether device node.
Enable DHCP and NFS root for the kernel booting.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 26b0d2cf73cb5091962c81598a36346d05e9ba83)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: henninger: enable SATA0

Enable SATA0 device for the Henninger board.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5a62ec57004f1a434bfd3feed43e447b5780baf6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>