]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoMerge tag 'renesas-r8a7778-ccf-and-multiplatform-for-v4.1' into requests/merged
Simon Horman [Wed, 11 Mar 2015 23:38:39 +0000 (08:38 +0900)]
Merge tag 'renesas-r8a7778-ccf-and-multiplatform-for-v4.1' into requests/merged

Renesas ARM Based SoC r8a7778 CCF and Multiplatform Updates for v4.1

* Add CCF and them multiplatform support to r8a7778 SoC and its
  bockw board.

9 years agoMerge tag 'renesas-soc-for-v4.1' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:56 +0000 (09:41 +0900)]
Merge tag 'renesas-soc-for-v4.1' into requests/merged

Renesas ARM Based SoC Updates for v4.1

* Do not make CMA reservation for R-Car Gen2 when HIGHMEM=n

9 years agoMerge tag 'renesas-soc-cleanup-for-v4.1' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:47 +0000 (09:41 +0900)]
Merge tag 'renesas-soc-cleanup-for-v4.1' into requests/merged

Renesas ARM Based SoC Cleanup for v4.1

* Remove redundant cpu_disable implementation from r8a7779 SoC
* Remove mach/{uncompress,clkdev,system}.h

9 years agoMerge tag 'renesas-sh7372-soc-removal-for-v4.1' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:38 +0000 (09:41 +0900)]
Merge tag 'renesas-sh7372-soc-removal-for-v4.1' into requests/merged

Renesas ARM Based SoC sh7372 SoC Removal Updates for v4.1

* Remove the sh7372 SoC and its mackerel board

9 years agoMerge tag 'renesas-dt-for-v4.1' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:29 +0000 (09:41 +0900)]
Merge tag 'renesas-dt-for-v4.1' into requests/merged

Renesas ARM Based SoC DT Updates for v4.1

* Increase hardware coverage of DT for various SoCs
* Add PFC information for emev2 SoC
* Remap entire APMU region for r8a7791 and r8a7790 SoCs
* Declare the full 512 MiB of RAM for kzm9g board
* Add selectable sources to DIV6 clocks to sh73a0 SoC
* Add missing INTCA0 clock for irqpin module on sh73a0 SoC
* Set control-parent for all irqpin node on sh73a0 SoC

9 years agoMerge tag 'renesas-simple-pm-bus-for-v4.1' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:22 +0000 (09:41 +0900)]
Merge tag 'renesas-simple-pm-bus-for-v4.1' into requests/merged

Renesas ARM Based SoC Simple PM Bus Updates for v4.1

* Add Simple Power-Managed Bus Driver

9 years agoMerge tag 'renesas-sh-drivers-for-v4.0' into requests/merged
Simon Horman [Thu, 5 Mar 2015 00:41:14 +0000 (09:41 +0900)]
Merge tag 'renesas-sh-drivers-for-v4.0' into requests/merged

SH Drivers Updates for v4.0

* Disable PM runtime for multi-platform r8a7740 with genpd

9 years agoARM: shmobile: r8a7778: enable multiplatform target
Ulrich Hecht [Thu, 26 Feb 2015 16:42:13 +0000 (17:42 +0100)]
ARM: shmobile: r8a7778: enable multiplatform target

Adds config option and enables DTB building.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: add sound to DT
Ulrich Hecht [Thu, 26 Feb 2015 16:42:12 +0000 (17:42 +0100)]
ARM: shmobile: bockw: add sound to DT

Adds sound card using the ak4643 codec.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add sound to DT
Ulrich Hecht [Thu, 26 Feb 2015 16:42:11 +0000 (17:42 +0100)]
ARM: shmobile: r8a7778: add sound to DT

Adds an entry for an R-Car Gen. 1 sound controller.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
[horms: Removed undocumented "renesas,rcar_sound" compat string]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: add devices hooked up to i2c0 to DT
Ulrich Hecht [Thu, 26 Feb 2015 16:42:09 +0000 (17:42 +0100)]
ARM: shmobile: bockw: add devices hooked up to i2c0 to DT

Cameras, RTC, and ak4643 sound codec.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoDT: i2c: add trivial binding for OKI ML86V7667 video decoder
Ulrich Hecht [Thu, 26 Feb 2015 16:42:08 +0000 (17:42 +0100)]
DT: i2c: add trivial binding for OKI ML86V7667 video decoder

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: common clock framework CPG driver
Ulrich Hecht [Thu, 26 Feb 2015 16:42:07 +0000 (17:42 +0100)]
ARM: shmobile: r8a7778: common clock framework CPG driver

Driver for the r8a7778's clocks that depend on the mode bits.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw dts: set extal clock frequency
Ulrich Hecht [Mon, 16 Feb 2015 16:58:59 +0000 (17:58 +0100)]
ARM: shmobile: bockw dts: set extal clock frequency

Sets the extal clock to the frequency of the oscillator installed by
default (33 MHz).

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw dts: Move Ethernet node to BSC
Ulrich Hecht [Mon, 16 Feb 2015 16:58:58 +0000 (17:58 +0100)]
ARM: shmobile: bockw dts: Move Ethernet node to BSC

Move the Ethernet node to the new BSC node, as its connected to the
Bus State Controller.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
[horms: dropped compat string changes as they seem out of scope]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: add SDHI DT support
Sergei Shtylyov [Sat, 21 Feb 2015 22:26:37 +0000 (01:26 +0300)]
ARM: shmobile: r8a7794: add SDHI DT support

Define the generic R8A7794 parts of the SDHI[012] device nodes.

Based on the orginal patch by Shinobu Uehara <shinobu.uehara.xc@renesas.com>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd
Geert Uytterhoeven [Wed, 3 Dec 2014 13:41:47 +0000 (14:41 +0100)]
drivers: sh: Disable PM runtime for multi-platform r8a7740 with genpd

If the default PM domain using PM_CLK is used for PM runtime, the real PM
domain(s) cannot be registered from DT later.

Hence do not enable it when running a multi-platform kernel with genpd
support on an r8a7740. The R-Mobile PM domain driver will take care of
PM runtime management of the module clocks.

The default PM domain is still needed for:
  - platforms without genpd support,
  - the legacy (non-DT) case, where genpd may take over later, except
    for the C5 "always on" PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n
Magnus Damm [Wed, 21 Jan 2015 05:01:37 +0000 (14:01 +0900)]
ARM: shmobile: No R-Car Gen2 CMA reservation when HIGHMEM=n

Allow R-Car Gen2 platforms to boot with CMA enabled
and HIGHMEM disabled. This patch adds code to check
if the R-Car Gen2 specific memory reservation window
is included in the kernel memory range or not. When
HIGHMEM is disabled the R-Car Gen2 reservation area is
outside the kernel memory range and in such case the
memory reservation is simply skipped over.

Without this patch the kernel boot hangs when CMA is
enabled and HIGHMEM is disabled on the r8a7791 Koelsch
hardware platform:

    WARNING: CPU: 1 PID: 1 at mm/cma.c:113 cma_init_reserved_areas+0x88/0x1d4()
    ...
    WARNING: CPU: 1 PID: 1 at mm/cma.c:121 cma_init_reserved_areas+0xf8/0x1d4()
    ...
    Unable to handle kernel NULL pointer dereference at virtual address 00000160
    pgd = c0003000
    [00000160] *pgd=80000040004003, *pmd=00000000
    Internal error: Oops: 206 [#1] SMP ARM
    Modules linked in:
    CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W
3.19.0-rc4-koelsch-01450-g7f9b6075ce12c3ea-dirty #735
    Hardware name: Generic R8A7791 (Flattened Device Tree)
    task: edc553c0 ti: edc56000 task.ti: edc56000
    PC is at set_pfnblock_flags_mask+0x54/0xa0
    LR is at 0x440

In the current shmobile_defconfig HIGHMEM is enabled
while CMA is disabled, so to trigger this the kernel
configuration for both CMA and HIGHMEM needs to be
adjusted.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Remove redundant cpu_disable implementation
Stephen Boyd [Sat, 14 Feb 2015 00:41:01 +0000 (16:41 -0800)]
ARM: shmobile: r8a7779: Remove redundant cpu_disable implementation

By default only the non-boot CPUs can be hotplugged if the
smp_operations structure doesn't have the cpu_disable function
pointer set. r8a7779_cpu_disable() implements the same logic,
only non-boot CPUs can be hotplugged, so it's redundant to
override the default behavior.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove mach/uncompress.h
Magnus Damm [Tue, 20 Jan 2015 11:58:20 +0000 (20:58 +0900)]
ARM: shmobile: Remove mach/uncompress.h

Convert ARCH_SHMOBILE_LEGACY to make use of <debug/uncompress.h>
and remove the now unused <mach/uncompress.h>.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove mach/clkdev.h
Magnus Damm [Tue, 20 Jan 2015 11:58:10 +0000 (20:58 +0900)]
ARM: shmobile: Remove mach/clkdev.h

Move over ARCH_SHMOBILE_LEGACY to use the default legacy ARM
implementations of __clk_get() and __clk_put() in <asm/clkdev.h>
by deselecting HAVE_MACH_CLKDEV. This has the nice side effect
that <mach/clkdev.h> is no longer used and can be removed.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove mach/system.h
Magnus Damm [Tue, 20 Jan 2015 11:58:00 +0000 (20:58 +0900)]
ARM: shmobile: Remove mach/system.h

The file <mach/system.h> is no longer included from anywhere so
clean up the code by removing mach-shmobile/include/mach/system.h

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoDocumentation: Remove ZBOOT MMC/SDHI utility and docs
Magnus Damm [Mon, 26 Jan 2015 06:19:51 +0000 (15:19 +0900)]
Documentation: Remove ZBOOT MMC/SDHI utility and docs

Remove ZBOOT MMC/SDHI Documentation for sh7372 together
wit the vrl4 utility. Without sh7372 and Mackerel support
these files are no longer useful.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372 dtsi: Remove Legacy DTSI file
Magnus Damm [Mon, 26 Jan 2015 06:19:41 +0000 (15:19 +0900)]
ARM: shmobile: sh7372 dtsi: Remove Legacy DTSI file

Remove the sh7372 DTSI file for the now unsupported sh7372 SoC.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Remove DT binding documentation
Magnus Damm [Mon, 26 Jan 2015 06:19:31 +0000 (15:19 +0900)]
ARM: shmobile: sh7372: Remove DT binding documentation

Remove DT compatible string documentation for the now removed sh7372 SoC.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Remove Legacy C SoC code
Magnus Damm [Mon, 26 Jan 2015 06:19:20 +0000 (15:19 +0900)]
ARM: shmobile: sh7372: Remove Legacy C SoC code

Remove support for the legacy Cortex-A8 based sh7372 SoC.

The Linux kernel still lacks DT bindings for the sh7372 INTC
interrupt controller so DT multiplatform support is not possibile.

Also, the sh7372 SoC never went into mass production anyway so to
aid migration to DT multiplatform simply get rid of sh7372 support.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Remove ZBOOT MMC/SDHI support
Magnus Damm [Mon, 26 Jan 2015 06:19:09 +0000 (15:19 +0900)]
ARM: shmobile: sh7372: Remove ZBOOT MMC/SDHI support

Remove the sh7372 implementation and the shared ZBOOT MMC
and SDHI support code from the compressed ARM boot loader.

With this in place it is no longer possible to boot any
self-contained kernel for sh7372 directly from Mask ROM
via SDHI and MMCIF hardware.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove from MAINTAINERS
Magnus Damm [Mon, 26 Jan 2015 06:19:00 +0000 (15:19 +0900)]
ARM: shmobile: mackerel: Remove from MAINTAINERS

Remove the mackerel_defconfig from the MAINTAINERS file.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove defconfig
Magnus Damm [Mon, 26 Jan 2015 06:18:49 +0000 (15:18 +0900)]
ARM: shmobile: mackerel: Remove defconfig

Remove the defconfig for the no longer supported mackerel board.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove mach-type entry
Magnus Damm [Mon, 26 Jan 2015 06:18:39 +0000 (15:18 +0900)]
ARM: shmobile: mackerel: Remove mach-type entry

Remove the mackerel entry from the mach-types file.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove DT binding documentation
Magnus Damm [Mon, 26 Jan 2015 06:18:29 +0000 (15:18 +0900)]
ARM: shmobile: mackerel: Remove DT binding documentation

Remove the DT compatible string documentation for the
no longer supported Mackerel board.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel dts: Remove Legacy DTS file
Magnus Damm [Mon, 26 Jan 2015 06:18:19 +0000 (15:18 +0900)]
ARM: shmobile: mackerel dts: Remove Legacy DTS file

Remove the DTS file for the no longer supported Mackerel board.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove Legacy C board code
Magnus Damm [Mon, 26 Jan 2015 06:18:08 +0000 (15:18 +0900)]
ARM: shmobile: mackerel: Remove Legacy C board code

Remove legacy C code for the sh7372 Mackerel board. There is no
DT multiplatform implementation available for the sh7372 SoC so
simply phase out the board and SoC code support.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: mackerel: Remove ZBOOT code
Magnus Damm [Mon, 26 Jan 2015 06:17:58 +0000 (15:17 +0900)]
ARM: shmobile: mackerel: Remove ZBOOT code

Remove ZBOOT support code for Mackerel. With this patch in place
it is no longer possible to boot a self-contained kernel directly
from the reset vector. ZBOOT is still supported on kzm9g.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778 dtsi: Add Bus State Controller node
Ulrich Hecht [Mon, 16 Feb 2015 16:58:57 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778 dtsi: Add Bus State Controller node

Add a node for the Bus State Controller (BSC) on r8a7778, to which
multiple external devices can be connected.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: add USB, VIN pin descriptions to DT
Ulrich Hecht [Mon, 16 Feb 2015 16:58:53 +0000 (17:58 +0100)]
ARM: shmobile: bockw: add USB, VIN pin descriptions to DT

Adds pin control info for USB host and video-in devices.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add internal ethernet controller to DT
Ulrich Hecht [Mon, 16 Feb 2015 16:58:52 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: add internal ethernet controller to DT

Internal Ethernet controller DT entry with clock information.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add MSTP clock assignments to DT
Ulrich Hecht [Mon, 16 Feb 2015 16:58:50 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: add MSTP clock assignments to DT

Assigns clocks to i2c*, tmu*, scif*, mmcif, sdhi*, and hspi*.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: implement SoC and board CCF support
Ulrich Hecht [Mon, 16 Feb 2015 16:58:49 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: implement SoC and board CCF support

Disables the legacy clock framework and passes the mode bits to the CPG
driver if CCF is enabled.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Common clock framework DT description
Ulrich Hecht [Mon, 16 Feb 2015 16:58:47 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: Common clock framework DT description

Declares all r8a7778 clocks supported by the legacy clock framework,
plus tmu2.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
[horms: only included dtsi changes]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: add CPG register bits header
Ulrich Hecht [Mon, 16 Feb 2015 16:58:46 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: add CPG register bits header

Enumerates CPG driver custom clocks and MSTP clock enable bits.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: synchronize dts with reference platform
Ulrich Hecht [Mon, 16 Feb 2015 16:58:45 +0000 (17:58 +0100)]
ARM: shmobile: r8a7778: synchronize dts with reference platform

This moves everything to the legacy dts that is missing there to make it
suitable for use with multiplatform.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: bus: Add Simple Power-Managed Bus Driver
Geert Uytterhoeven [Thu, 5 Feb 2015 10:11:28 +0000 (11:11 +0100)]
drivers: bus: Add Simple Power-Managed Bus Driver

Add a driver for transparent busses that don't need a real driver, but
where the bus controller is part of a PM domain, or under the control of
a functional clock.  Typically, the bus controller's PM domain and/or
clock must be enabled for child devices connected to the bus (either
on-SoC or externally) to function.

Hence the sole purpose of this driver is to enable its clock and PM
domain (if exist(s)), which are specified in the DT and managed from
platform and PM domain code, and to probe for child devices.

Due to the child-parent relationship with devices connected to the bus,
PM domain and clock state transitions are handled in the correct order.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: bus: Add Renesas Bus State Controller (BSC) DT Bindings
Geert Uytterhoeven [Thu, 5 Feb 2015 10:11:27 +0000 (11:11 +0100)]
drivers: bus: Add Renesas Bus State Controller (BSC) DT Bindings

The bindings for the BSC extend the bindings for "simple-pm-bus".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: bus: Add Simple Power-Managed Bus DT Bindings
Geert Uytterhoeven [Thu, 5 Feb 2015 10:11:26 +0000 (11:11 +0100)]
drivers: bus: Add Simple Power-Managed Bus DT Bindings

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: bus: Sort Makefile entries alphabetically
Geert Uytterhoeven [Thu, 5 Feb 2015 10:11:25 +0000 (11:11 +0100)]
drivers: bus: Sort Makefile entries alphabetically

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agodrivers: bus: Sort Kconfig entries alphabetically
Geert Uytterhoeven [Thu, 5 Feb 2015 10:11:24 +0000 (11:11 +0100)]
drivers: bus: Sort Kconfig entries alphabetically

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add ADSP clocks
Sergei Shtylyov [Tue, 30 Dec 2014 20:21:45 +0000 (23:21 +0300)]
ARM: shmobile: r8a7790: add ADSP clocks

Add the ADSP clocks to the CPG and MSTP5 nodes of the R8A7790 device tree.

Based on the original patch by Konstantin Kozhevnikov
<konstantin.kozhevnikov@cogentembedded.com>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add ADSP clocks
Sergei Shtylyov [Tue, 30 Dec 2014 20:20:34 +0000 (23:20 +0300)]
ARM: shmobile: r8a7791: add ADSP clocks

Add the ADSP clocks to the CPG and MSTP5 nodes of the R8A7791 device tree.

Based on the original patch by Konstantin Kozhevnikov
<konstantin.kozhevnikov@cogentembedded.com>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: henninger: add CAN0 DT support
Sergei Shtylyov [Mon, 5 Jan 2015 22:26:45 +0000 (01:26 +0300)]
ARM: shmobile: henninger: add CAN0 DT support

Define the Henninger board dependent part of the CAN0 device node.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add CAN DT support
Sergei Shtylyov [Mon, 5 Jan 2015 22:25:25 +0000 (01:25 +0300)]
ARM: shmobile: r8a7791: add CAN DT support

Define the generic R8A7791 parts of the CAN0/1 device nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add CAN clocks
Sergei Shtylyov [Mon, 5 Jan 2015 22:24:08 +0000 (01:24 +0300)]
ARM: shmobile: r8a7791: add CAN clocks

The R-Car CAN controllers can derive the CAN bus clock not only from their
peripheral clock input (clkp1) but also from the other internal clock (clkp2)
and external clock fed on CAN_CLK pin.  Describe those clocks in the device
tree,  along with  the USB_EXTAL clock  from which clkp2 is derived.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add CAN DT support
Sergei Shtylyov [Mon, 5 Jan 2015 21:34:42 +0000 (00:34 +0300)]
ARM: shmobile: r8a7790: add CAN DT support

Define the generic R8A7790 parts of the CAN0/1 device nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add CAN clocks
Sergei Shtylyov [Mon, 5 Jan 2015 21:33:25 +0000 (00:33 +0300)]
ARM: shmobile: r8a7790: add CAN clocks

The R-Car CAN controllers can derive the CAN bus clock not only from their
peripheral clock input (clkp1) but also from the other internal clock (clkp2)
and external clock fed on CAN_CLK pin.  Describe those clocks in the device
tree,  along with  the USB_EXTAL clock  from which clkp2 is derived.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: emev2-kzm9d dts: Add PFC information for uart1
Niklas Söderlund [Tue, 17 Feb 2015 13:31:55 +0000 (14:31 +0100)]
ARM: shmobile: emev2-kzm9d dts: Add PFC information for uart1

Configure the pinmux on kzm9d to use the serial connector for uart1.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: emev2 dtsi: Add PFC information
Niklas Söderlund [Tue, 17 Feb 2015 13:31:54 +0000 (14:31 +0100)]
ARM: shmobile: emev2 dtsi: Add PFC information

With this information all GPIOs can make use of the PFC functionality.

Signed-off-by: Niklas Söderlund <niso@kth.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: smp: remap whole apmu region
Wolfram Sang [Tue, 3 Feb 2015 14:57:42 +0000 (15:57 +0100)]
ARM: shmobile: r8a7791: smp: remap whole apmu region

Documentation says the last register is at 0x184 (CAxCPUCMCR), so use
proper length. Current APMU code accesses CAxCPUnCR which is currently
outside of the remapped area.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: smp: remap whole apmu region
Wolfram Sang [Tue, 3 Feb 2015 14:57:41 +0000 (15:57 +0100)]
ARM: shmobile: r8a7790: smp: remap whole apmu region

Documentation says the last register is at 0x184 (CAxCPUCMCR), so use
proper length. Current APMU code accesses CAxCPUnCR which is currently
outside of the remapped area.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: Add DU HDMI output support
Laurent Pinchart [Wed, 10 Dec 2014 23:42:12 +0000 (01:42 +0200)]
ARM: shmobile: koelsch: Add DU HDMI output support

Add DT nodes for the ADV7511 HDMI encoder and its HDMI output connector
and configure the DISP pin group that drives the HDMI transmitter DE
pin.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Correct SDHI clock labels and output-names
Simon Horman [Thu, 29 Jan 2015 01:41:24 +0000 (10:41 +0900)]
ARM: shmobile: r8a7791: Correct SDHI clock labels and output-names

There appears to have been some inconsistency and confusion here as on
the r8a7790 these clocks are referred to as SD(HI)1 and SD(HI)2 while on
the r8a7791 and r8a7794 they are referred to as SD(HI)2 and SD(HI)3.

Fixes: 59e79895b95892863 ("ARM: shmobile: r8a7791: Add clocks")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 years agoARM: shmobile: r8a7794: Correct SDHI clock base address, labels and output-names
Simon Horman [Mon, 5 Jan 2015 00:40:49 +0000 (09:40 +0900)]
ARM: shmobile: r8a7794: Correct SDHI clock base address, labels and output-names

* Correct base address of SD3 div6 clk.
* Update div6 clock node labels
  There appears to have been some inconsistency and confusion here as on
  the r8a7790 these clocks are referred to as SD(HI)1 and SD(HI)2 while on
  the r8a7791 and r8a7794 they are referred to as SD(HI)2 and SD(HI)3.

This has no run-time affect as the clock nodes are not currently used.

Fixes: 8e181633e6ca96049 ("ARM: shmobile: r8a7794: Add SDHI clocks to device tree")
Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 years agoARM: shmobile: r8a7794: alt: Enable ethernet controller
Laurent Pinchart [Tue, 27 Jan 2015 08:45:56 +0000 (10:45 +0200)]
ARM: shmobile: r8a7794: alt: Enable ethernet controller

Enable the ethernet controller for the Alt board. Pin muxing entries are
currently left out as r8a7794 pin control support isn't available yet.
We thus rely on the boot loader to configure ethernet pins for now.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: Add ethernet controller to device tree
Laurent Pinchart [Tue, 27 Jan 2015 08:45:55 +0000 (10:45 +0200)]
ARM: shmobile: r8a7794: Add ethernet controller to device tree

Add a DT node for the on-SoC ethernet controller device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: Add IPMMU DT nodes
Laurent Pinchart [Tue, 27 Jan 2015 09:13:25 +0000 (11:13 +0200)]
ARM: shmobile: r8a7794: Add IPMMU DT nodes

Add the six IPMMU instances found in the r8a7794 to DT with a disabled
status.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add IPMMU DT nodes
Laurent Pinchart [Tue, 27 Jan 2015 09:13:24 +0000 (11:13 +0200)]
ARM: shmobile: r8a7791: Add IPMMU DT nodes

Add the seven IPMMU instances found in the r8a7791 to DT with a disabled
status.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add IPMMU DT nodes
Laurent Pinchart [Tue, 27 Jan 2015 09:13:23 +0000 (11:13 +0200)]
ARM: shmobile: r8a7790: Add IPMMU DT nodes

Add the six IPMMU instances found in the r8a7790 to DT with a disabled
status.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7794: Add DMAC devices to DT
Laurent Pinchart [Tue, 27 Jan 2015 17:12:17 +0000 (19:12 +0200)]
ARM: shmobile: r8a7794: Add DMAC devices to DT

Instantiate the two system DMA controllers in the r8a7794 device tree.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Declare the full 512 MiB of RAM
Geert Uytterhoeven [Tue, 6 Jan 2015 19:17:39 +0000 (20:17 +0100)]
ARM: shmobile: kzm9g-reference dts: Declare the full 512 MiB of RAM

Traditionally, the first 16 MiB of RAM was reserved for the RT
processor.  However, this is incompatible with CONFIG_AUTO_ZRELADDR=y,
which requires that the start address of physical memory is a multiple
of 128 MiB.

As CONFIG_AUTO_ZRELADDR=y is enabled for multi-platform kernels, declare
RAM to start at 0x40000000.

While at it, reclaim the last 8 MiB of RAM, too, so the full 512 MiB is
available. Note that kzm9g_defconfig still has
CONFIG_MEMORY_START=0x41000000 and CONFIG_MEMORY_SIZE=0x1f000000, so
before the advent of DT we scribbled over the last 8 MiB, too.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM
Geert Uytterhoeven [Tue, 6 Jan 2015 19:17:38 +0000 (20:17 +0100)]
ARM: shmobile: kzm9g dts: Declare the full 512 MiB of RAM

Traditionally, the first 16 MiB of RAM was reserved for the RT
processor.  However, this is incompatible with CONFIG_AUTO_ZRELADDR=y,
which requires that the start address of physical memory is a multiple
of 128 MiB.

As CONFIG_AUTO_ZRELADDR=y is enabled for multi-platform kernels, declare
RAM to start at 0x40000000.

While at it, reclaim the last 8 MiB of RAM, too, so the full 512 MiB is
available. Note that kzm9g_defconfig still has
CONFIG_MEMORY_START=0x41000000 and CONFIG_MEMORY_SIZE=0x1f000000, so
before the advent of DT we scribbled over the last 8 MiB, too.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0 dtsi: Add selectable sources to DIV6 clocks
Ulrich Hecht [Tue, 6 Jan 2015 19:56:06 +0000 (20:56 +0100)]
ARM: shmobile: sh73a0 dtsi: Add selectable sources to DIV6 clocks

Specifies clock sources and register bits.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
[geert: Drop renesas,src-shift/renesas,src-width, pad to 4 or 8 parents]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0 dtsi: Add missing INTCA0 clock for irqpin module
Geert Uytterhoeven [Tue, 6 Jan 2015 19:56:05 +0000 (20:56 +0100)]
ARM: shmobile: sh73a0 dtsi: Add missing INTCA0 clock for irqpin module

This clock drives the irqpin controller modules.
Before, it was assumed enabled by the bootloader or reset state.
By making it available to the driver, we make sure it gets enabled when
needed, and allow it to be managed by system or runtime PM.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Add st1232 touchscreen node
Laurent Pinchart [Tue, 6 Jan 2015 19:42:09 +0000 (20:42 +0100)]
ARM: shmobile: kzm9g-reference dts: Add st1232 touchscreen node

Enable the kzm9g touchscreen controller in the board's DT file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Add r2025sd rtc node
Geert Uytterhoeven [Tue, 6 Jan 2015 19:42:08 +0000 (20:42 +0100)]
ARM: shmobile: kzm9g-reference dts: Add r2025sd rtc node

Add a DT node for the R2025D real-time clock, which is connected to
i2c0.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Add adxl345 accelerometer node
Geert Uytterhoeven [Tue, 6 Jan 2015 19:42:07 +0000 (20:42 +0100)]
ARM: shmobile: kzm9g-reference dts: Add adxl345 accelerometer node

Add a DT node for the ADXL345 three-axis digital accelerometer sensor,
which is connected to i2c0.

As trivial i2c devices are matched against the first compatible entry
only, compatibility is declared with "adi,adxl34x" only for now.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
The device needs an interrupt to operate properly. Specify the two
interrupts used on the board.

While at it rename the DT node to accelerometer@1d to describe the
device's function instead of its model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node
Geert Uytterhoeven [Tue, 6 Jan 2015 19:42:06 +0000 (20:42 +0100)]
ARM: shmobile: kzm9g-reference dts: Add ak8975 magnetometer node

Add a DT node for the AK8975 magnetometer sensor, which is connected to
i2c0.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Specify the device interrupt to avoid polling for end of conversion.

While at it rename the DT node to compass@c to describe the device's
function instead of its model.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference dts: Sort i2c0 children by unit address
Geert Uytterhoeven [Tue, 6 Jan 2015 19:42:05 +0000 (20:42 +0100)]
ARM: shmobile: kzm9g-reference dts: Sort i2c0 children by unit address

While at it rename the ak4648 node to "codec" to describe the device's
function instead of its model, and move its device-specific property
after its generic properties.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0 dtsi: Set control-parent for all irqpin nodes
Laurent Pinchart [Tue, 6 Jan 2015 19:42:04 +0000 (20:42 +0100)]
ARM: shmobile: sh73a0 dtsi: Set control-parent for all irqpin nodes

The sh73a0 INTC can't mask interrupts properly most likely due to a
hardware bug. Set the control-parent property to delegate masking to the
parent interrupt controller.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7740 dtsi: add remaining DIV6 clocks
Ulrich Hecht [Wed, 21 Jan 2015 16:17:39 +0000 (17:17 +0100)]
ARM: shmobile: r8a7740 dtsi: add remaining DIV6 clocks

This adds the remaining DIV6 clocks and all possible parents for the SUB
clock.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoLinux 4.0-rc1 v4.0-rc1
Linus Torvalds [Mon, 23 Feb 2015 02:21:14 +0000 (18:21 -0800)]
Linux 4.0-rc1

.. after extensive statistical analysis of my G+ polling, I've come to
the inescapable conclusion that internet polls are bad.

Big surprise.

But "Hurr durr I'ma sheep" trounced "I like online polls" by a 62-to-38%
margin, in a poll that people weren't even supposed to participate in.
Who can argue with solid numbers like that? 5,796 votes from people who
can't even follow the most basic directions?

In contrast, "v4.0" beat out "v3.20" by a slimmer margin of 56-to-44%,
but with a total of 29,110 votes right now.

Now, arguably, that vote spread is only about 3,200 votes, which is less
than the almost six thousand votes that the "please ignore" poll got, so
it could be considered noise.

But hey, I asked, so I'll honor the votes.

9 years agoMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Mon, 23 Feb 2015 02:05:13 +0000 (18:05 -0800)]
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Ext4 bug fixes.

  We also reserved code points for encryption and read-only images (for
  which the implementation is mostly just the reserved code point for a
  read-only feature :-)"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix indirect punch hole corruption
  ext4: ignore journal checksum on remount; don't fail
  ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
  ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize
  ext4: support read-only images
  ext4: change to use setup_timer() instead of init_timer()
  ext4: reserve codepoints used by the ext4 encryption feature
  jbd2: complain about descriptor block checksum errors

9 years agoMerge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 23 Feb 2015 01:42:14 +0000 (17:42 -0800)]
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull more vfs updates from Al Viro:
 "Assorted stuff from this cycle.  The big ones here are multilayer
  overlayfs from Miklos and beginning of sorting ->d_inode accesses out
  from David"

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits)
  autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
  procfs: fix race between symlink removals and traversals
  debugfs: leave freeing a symlink body until inode eviction
  Documentation/filesystems/Locking: ->get_sb() is long gone
  trylock_super(): replacement for grab_super_passive()
  fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
  SELinux: Use d_is_positive() rather than testing dentry->d_inode
  Smack: Use d_is_positive() rather than testing dentry->d_inode
  TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
  Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
  Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
  VFS: Split DCACHE_FILE_TYPE into regular and special types
  VFS: Add a fallthrough flag for marking virtual dentries
  VFS: Add a whiteout dentry type
  VFS: Introduce inode-getting helpers for layered/unioned fs environments
  Infiniband: Fix potential NULL d_inode dereference
  posix_acl: fix reference leaks in posix_acl_create
  autofs4: Wrong format for printing dentry
  ...

9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 22 Feb 2015 17:57:16 +0000 (09:57 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fix from Russell King:
 "Just one fix this time around.  __iommu_alloc_buffer() can cause a
  BUG() if dma_alloc_coherent() is called with either __GFP_DMA32 or
  __GFP_HIGHMEM set.  The patch from Alexandre addresses this"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()

9 years agoautofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
Al Viro [Sun, 22 Feb 2015 03:19:57 +0000 (22:19 -0500)]
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation

X-Coverup: just ask spender
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoprocfs: fix race between symlink removals and traversals
Al Viro [Sun, 22 Feb 2015 03:16:11 +0000 (22:16 -0500)]
procfs: fix race between symlink removals and traversals

use_pde()/unuse_pde() in ->follow_link()/->put_link() resp.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodebugfs: leave freeing a symlink body until inode eviction
Al Viro [Sun, 22 Feb 2015 03:05:11 +0000 (22:05 -0500)]
debugfs: leave freeing a symlink body until inode eviction

As it is, we have debugfs_remove() racing with symlink traversals.
Supply ->evict_inode() and do freeing there - inode will remain
pinned until we are done with the symlink body.

And rip the idiocy with checking if dentry is positive right after
we'd verified debugfs_positive(), which is a stronger check...

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoDocumentation/filesystems/Locking: ->get_sb() is long gone
Al Viro [Sat, 21 Feb 2015 09:59:02 +0000 (04:59 -0500)]
Documentation/filesystems/Locking: ->get_sb() is long gone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agotrylock_super(): replacement for grab_super_passive()
Konstantin Khlebnikov [Thu, 19 Feb 2015 17:19:35 +0000 (20:19 +0300)]
trylock_super(): replacement for grab_super_passive()

I've noticed significant locking contention in memory reclaimer around
sb_lock inside grab_super_passive(). Grab_super_passive() is called from
two places: in icache/dcache shrinkers (function super_cache_scan) and
from writeback (function __writeback_inodes_wb). Both are required for
progress in memory allocator.

Grab_super_passive() acquires sb_lock to increment sb->s_count and check
sb->s_instances. It seems sb->s_umount locked for read is enough here:
super-block deactivation always runs under sb->s_umount locked for write.
Protecting super-block itself isn't a problem: in super_cache_scan() sb
is protected by shrinker_rwsem: it cannot be freed if its slab shrinkers
are still active. Inside writeback super-block comes from inode from bdi
writeback list under wb->list_lock.

This patch removes locking sb_lock and checks s_instances under s_umount:
generic_shutdown_super() unlinks it under sb->s_umount locked for write.
New variant is called trylock_super() and since it only locks semaphore,
callers must call up_read(&sb->s_umount) instead of drop_super(sb) when
they're done.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agofanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup()
rather than d_is_dir() when checking a dir watch and give an error on fake
directories.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoCachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack
thereof) in cachefiles:

 (1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as
     it doesn't want to deal with automounts in its cache.

 (2) Coccinelle didn't find S_IS* expressions in ASSERT() statements in
     cachefiles.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
David Howells [Thu, 29 Jan 2015 12:02:35 +0000 (12:02 +0000)]
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)

Convert the following where appropriate:

 (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry).

 (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry).

 (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry).  This is actually more
     complicated than it appears as some calls should be converted to
     d_can_lookup() instead.  The difference is whether the directory in
     question is a real dir with a ->lookup op or whether it's a fake dir with
     a ->d_automount op.

In some circumstances, we can subsume checks for dentry->d_inode not being
NULL into this, provided we the code isn't in a filesystem that expects
d_inode to be NULL if the dirent really *is* negative (ie. if we're going to
use d_inode() rather than d_backing_inode() to get the inode pointer).

Note that the dentry type field may be set to something other than
DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS
manages the fall-through from a negative dentry to a lower layer.  In such a
case, the dentry type of the negative union dentry is set to the same as the
type of the lower dentry.

However, if you know d_inode is not NULL at the call site, then you can use
the d_is_xxx() functions even in a filesystem.

There is one further complication: a 0,0 chardev dentry may be labelled
DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE.  Strictly, this was
intended for special directory entry types that don't have attached inodes.

The following perl+coccinelle script was used:

use strict;

my @callers;
open($fd, 'git grep -l \'S_IS[A-Z].*->d_inode\' |') ||
    die "Can't grep for S_ISDIR and co. callers";
@callers = <$fd>;
close($fd);
unless (@callers) {
    print "No matches\n";
    exit(0);
}

my @cocci = (
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISLNK(E->d_inode->i_mode)',
    '+ d_is_symlink(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISDIR(E->d_inode->i_mode)',
    '+ d_is_dir(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISREG(E->d_inode->i_mode)',
    '+ d_is_reg(E)' );

my $coccifile = "tmp.sp.cocci";
open($fd, ">$coccifile") || die $coccifile;
print($fd "$_\n") || die $coccifile foreach (@cocci);
close($fd);

foreach my $file (@callers) {
    chomp $file;
    print "Processing ", $file, "\n";
    system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 ||
die "spatch failed";
}

[AV: overlayfs parts skipped]

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSELinux: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:33 +0000 (12:02 +0000)]
SELinux: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in SELinux to get rid
of direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSmack: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
Smack: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in Smack to get rid of
direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoTOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()

Use d_is_dir() rather than d_inode and S_ISDIR().  Note that this will include
fake directories such as automount triggers.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoApparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:31 +0000 (12:02 +0000)]
Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode

Use d_is_positive(dentry) or d_is_negative(dentry) rather than testing
dentry->d_inode as the dentry may cover another layer that has an inode when
the top layer doesn't or may hold a 0,0 chardev that's actually a whiteout.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoApparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
David Howells [Thu, 29 Jan 2015 12:02:31 +0000 (12:02 +0000)]
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb

mediated_filesystem() should use dentry->d_sb not dentry->d_inode->i_sb and
should avoid file_inode() also since it is really dealing with the path.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Split DCACHE_FILE_TYPE into regular and special types
David Howells [Thu, 29 Jan 2015 12:02:29 +0000 (12:02 +0000)]
VFS: Split DCACHE_FILE_TYPE into regular and special types

Split DCACHE_FILE_TYPE into DCACHE_REGULAR_TYPE (dentries representing regular
files) and DCACHE_SPECIAL_TYPE (representing blockdev, chardev, FIFO and
socket files).

d_is_reg() and d_is_special() are added to detect these subtypes and
d_is_file() is left as the union of the two.

This allows a number of places that use S_ISREG(dentry->d_inode->i_mode) to
use d_is_reg(dentry) instead.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Add a fallthrough flag for marking virtual dentries
David Howells [Thu, 29 Jan 2015 12:02:28 +0000 (12:02 +0000)]
VFS: Add a fallthrough flag for marking virtual dentries

Add a DCACHE_FALLTHRU flag to indicate that, in a layered filesystem, this is
a virtual dentry that covers another one in a lower layer that should be used
instead.  This may be recorded on medium if directory integration is stored
there.

The flag can be set with d_set_fallthru() and tested with d_is_fallthru().

Original-author: Valerie Aurora <vaurora@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Add a whiteout dentry type
David Howells [Thu, 29 Jan 2015 12:02:27 +0000 (12:02 +0000)]
VFS: Add a whiteout dentry type

Add DCACHE_WHITEOUT_TYPE and provide a d_is_whiteout() accessor function.  A
d_is_miss() accessor is also added for ordinary cache misses and
d_is_negative() is modified to indicate either an ordinary miss or an enforced
miss (whiteout).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: Introduce inode-getting helpers for layered/unioned fs environments
David Howells [Thu, 29 Jan 2015 12:02:27 +0000 (12:02 +0000)]
VFS: Introduce inode-getting helpers for layered/unioned fs environments

Introduce some function for getting the inode (and also the dentry) in an
environment where layered/unioned filesystems are in operation.

The problem is that we have places where we need *both* the union dentry and
the lower source or workspace inode or dentry available, but we can only have
a handle on one of them.  Therefore we need to derive the handle to the other
from that.

The idea is to introduce an extra field in struct dentry that allows the union
dentry to refer to and pin the lower dentry.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 22 Feb 2015 03:41:38 +0000 (19:41 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for MIPS:

   - a number of fixes that didn't make the 3.19 release.

   - a number of cleanups.

   - preliminary support for Cavium's Octeon 3 SOCs which feature up to
     48 MIPS64 R3 cores with FPU and hardware virtualization.

   - support for MIPS R6 processors.

     Revision 6 of the MIPS architecture is a major revision of the MIPS
     architecture which does away with many of original sins of the
     architecture such as branch delay slots.  This and other changes in
     R6 require major changes throughout the entire MIPS core
     architecture code and make up for the lion share of this pull
     request.

   - finally some preparatory work for eXtendend Physical Address
     support, which allows support of up to 40 bit of physical address
     space on 32 bit processors"

     [ Ahh, MIPS can't leave the PAE brain damage alone.  It's like
       every CPU architect has to make that mistake, but pee in the snow
       by changing the TLA.  But whether it's called PAE, LPAE or XPA,
       it's horrid crud   - Linus ]

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (114 commits)
  MIPS: sead3: Corrected get_c0_perfcount_int
  MIPS: mm: Remove dead macro definitions
  MIPS: OCTEON: irq: add CIB and other fixes
  MIPS: OCTEON: Don't do acknowledge operations for level triggered irqs.
  MIPS: OCTEON: More OCTEONIII support
  MIPS: OCTEON: Remove setting of processor specific CVMCTL icache bits.
  MIPS: OCTEON: Core-15169 Workaround and general CVMSEG cleanup.
  MIPS: OCTEON: Update octeon-model.h code for new SoCs.
  MIPS: OCTEON: Implement DCache errata workaround for all CN6XXX
  MIPS: OCTEON: Add little-endian support to asm/octeon/octeon.h
  MIPS: OCTEON: Implement the core-16057 workaround
  MIPS: OCTEON: Delete unused COP2 saving code
  MIPS: OCTEON: Use correct instruction to read 64-bit COP0 register
  MIPS: OCTEON: Save and restore CP2 SHA3 state
  MIPS: OCTEON: Fix FP context save.
  MIPS: OCTEON: Save/Restore wider multiply registers in OCTEON III CPUs
  MIPS: boot: Provide more uImage options
  MIPS: Remove unneeded #ifdef __KERNEL__ from asm/processor.h
  MIPS: ip22-gio: Remove legacy suspend/resume support
  mips: pci: Add ifdef around pci_proc_domain
  ...