Commit Graph

5122 Commits

Author SHA1 Message Date
AKASHI Takahiro 764b51ead1 arm64: kdump: reserve memory for crash dump kernel
"crashkernel=" kernel parameter specifies the size (and optionally
the start address) of the system ram to be used by crash dump kernel.
reserve_crashkernel() will allocate and reserve that memory at boot time
of primary kernel.

The memory range will be exposed to userspace as a resource named
"Crash kernel" in /proc/iomem.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Pratyush Anand <panand@redhat.com>
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-05 18:26:57 +01:00
AKASHI Takahiro 8f579b1c4e arm64: limit memory regions based on DT property, usable-memory-range
Crash dump kernel uses only a limited range of available memory as System
RAM. On arm64 kdump, This memory range is advertised to crash dump kernel
via a device-tree property under /chosen,
   linux,usable-memory-range = <BASE SIZE>

Crash dump kernel reads this property at boot time and calls
memblock_cap_memory_range() to limit usable memory which are listed either
in UEFI memory map table or "memory" nodes of a device tree blob.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Geoff Levand <geoff@infradead.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-05 18:26:54 +01:00
Bhupesh Sharma 6e7300cff1 efi/bgrt: Enable ACPI BGRT handling on arm64
Now that the ACPI BGRT handling code has been made generic, we can
enable it for arm64.

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
[ Updated commit log to reflect that BGRT is only enabled for arm64, and added
  missing 'return' statement to the dummy acpi_parse_bgrt() function. ]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-8-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-05 12:27:25 +02:00
Ard Biesheuvel 24d7c494ce efi/arm-stub: Round up FDT allocation to mapping size
The FDT is mapped via a fixmap entry that is at least 2 MB in size and
2 MB aligned on 4 KB page size kernels.

On UEFI systems, the FDT allocation may share this 2 MB mapping with a
reserved region (or another memory region that we should never map),
unless we account for this in the size of the allocation (the alignment
is already 2 MB)

So instead of taking guesses at the needed space, simply allocate 2 MB
immediately. The allocation will be recorded as EFI_LOADER_DATA, and the
kernel only memblock_reserve()'s the actual size of the FDT, so the
unused space will be released back to the kernel.

Reviewed-By: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Richard Ruigrok <rruigrok@codeaurora.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-05 12:27:24 +02:00
Ard Biesheuvel 138728dd4e efi/arm-stub: Correct FDT and initrd allocation rules for arm64
On arm64, we have made some changes over the past year to the way the
kernel itself is allocated and to how it deals with the initrd and FDT.
This patch brings the allocation logic in the EFI stub in line with that,
which is necessary because the introduction of KASLR has created the
possibility for the initrd to be allocated in a place where the kernel
may not be able to map it. (This is mostly a theoretical scenario, since
it only affects systems where the physical memory footprint exceeds the
size of the linear mapping.)

Since we know the kernel itself will be covered by the linear mapping,
choose a suitably sized window (i.e., based on the size of the linear
region) covering the kernel when allocating memory for the initrd.

The FDT may be anywhere in memory on arm64 now that we map it via the
fixmap, so we can lift the address restriction there completely.

Tested-by: Richard Ruigrok <rruigrok@codeaurora.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-4-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-05 12:27:23 +02:00
Neil Armstrong 6939db7e0d ARM64: dts: meson-gx: Add support for HDMI output
Add HDMI output and connector nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-04-04 11:04:17 -07:00
Neil Armstrong e9da72821f ARM64: dts: meson-gx: Add shared CMA dma memory pool
The HDMI modes needs more CMA memory to be reserved at boot-time.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-04-04 11:04:17 -07:00
Heiner Kallweit 62158c6a9c ARM64: dts: meson-gxbb-odroidc2: Enable SARADC node
Now that 3adbf34273 "iio: adc: add a driver for the SAR ADC found in
Amlogic Meson SoCs" has added support for the ADC, let's enable it
on Odroid C2.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-04-04 11:04:17 -07:00
Catalin Marinas dffb0113d5 Merge branch 'arm64/common-sysreg' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core
* 'arm64/common-sysreg' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux:
  arm64: sysreg: add Set/Way sys encodings
  arm64: sysreg: add register encodings used by KVM
  arm64: sysreg: add physical timer registers
  arm64: sysreg: subsume GICv3 sysreg definitions
  arm64: sysreg: add performance monitor registers
  arm64: sysreg: add debug system registers
  arm64: sysreg: sort by encoding
2017-04-04 18:08:47 +01:00
Ard Biesheuvel cad27ef27e arm64: efi: split Image code and data into separate PE/COFF sections
To prevent unintended modifications to the kernel text (malicious or
otherwise) while running the EFI stub, describe the kernel image as
two separate sections: a .text section with read-execute permissions,
covering .text, .rodata and .init.text, and a .data section with
read-write permissions, covering .init.data, .data and .bss.

This relies on the firmware to actually take the section permission
flags into account, but this is something that is currently being
implemented in EDK2, which means we will likely start seeing it in
the wild between one and two years from now.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:59 +01:00
Ard Biesheuvel f1eb542f39 arm64: efi: replace open coded constants with symbolic ones
Replace open coded constants with symbolic ones throughout the
Image and the EFI headers. No binary level changes are intended.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:50 +01:00
Ard Biesheuvel effc7b027a arm64: efi: remove pointless dummy .reloc section
The kernel's EFI PE/COFF header contains a dummy .reloc section, and
an explanatory comment that claims that this is required for the EFI
application loader to accept the Image as a relocatable image (i.e.,
one that can be loaded at any offset and fixed up in place)

This was inherited from the x86 implementation, which has elaborate host
tooling to mangle the PE/COFF header post-link time, and which populates
the .reloc section with a single dummy base relocation. On ARM, no such
tooling exists, and the .reloc section remains empty, and is never even
exposed via the BaseRelocationTable directory entry, which is where the
PE/COFF loader looks for it.

The PE/COFF spec is unclear about relocatable images that do not require
any fixups, but the EDK2 implementation, which is the de facto reference
for PE/COFF in the UEFI space, clearly does not care, and explicitly
mentions (in a comment) that relocatable images with no base relocations
are perfectly fine, as long as they don't have the RELOCS_STRIPPED
attribute set (which is not the case for our PE/COFF image)

So simply remove the .reloc section altogether.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:41 +01:00
Ard Biesheuvel f328ba470c arm64: efi: remove forbidden values from the PE/COFF header
Bring the PE/COFF header in line with the PE/COFF spec, by setting
NumberOfSymbols to 0, and removing the section alignment flags.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:34 +01:00
Ard Biesheuvel 99922257cf arm64: efi: clean up Image header after PE header has been split off
After having split off the PE header, clean up the bits that remain:
use .long consistently, merge two adjacent #ifdef CONFIG_EFI blocks,
fix the offset of the PE header pointer and remove the redundant .align
that follows it.

Also, since we will be eliminating all open coded constants from the
EFI header in subsequent patches, let's replace the open coded "ARM\x64"
magic number with its .ascii equivalent.

No changes to the resulting binary image are intended.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:28 +01:00
Ard Biesheuvel b5f4a214b8 arm64: efi: move EFI header and related data to a separate .S file
In preparation of yet another round of modifications to the PE/COFF
header, macroize it and move the definition into a separate source
file.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:50:09 +01:00
Liang Chen 0c1f854675 arm64: dts: rockchip: add RK3328 eavluation board devicetree
This patch add rk3328-evb.dts for RK3328 evaluation board.
Tested on RK3328 evb.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-04-04 18:12:25 +02:00
Ard Biesheuvel 214fad5507 arm64: relocation testing module
This module tests the module loader's ELF relocation processing
routines. When loaded, it logs output like below.

    Relocation test:
    -------------------------------------------------------
    R_AARCH64_ABS64                 0xffff880000cccccc pass
    R_AARCH64_ABS32                 0x00000000f800cccc pass
    R_AARCH64_ABS16                 0x000000000000f8cc pass
    R_AARCH64_MOVW_SABS_Gn          0xffff880000cccccc pass
    R_AARCH64_MOVW_UABS_Gn          0xffff880000cccccc pass
    R_AARCH64_ADR_PREL_LO21         0xffffff9cf4d1a400 pass
    R_AARCH64_PREL64                0xffffff9cf4d1a400 pass
    R_AARCH64_PREL32                0xffffff9cf4d1a400 pass
    R_AARCH64_PREL16                0xffffff9cf4d1a400 pass

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 17:03:32 +01:00
Liang Chen 52e02d377a arm64: dts: rockchip: add core dtsi file for RK3328 SoCs
This patch adds core dtsi file for Rockchip RK3328 SoCs.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-04-04 18:03:01 +02:00
Dave Martin 46823dd17c arm64: cpufeature: Make ID reg accessor naming less counterintuitive
read_system_reg() can readily be confused with read_sysreg(),
whereas these are really quite different in their meaning.

This patches attempts to reduce the ambiguity be reserving "sysreg"
for the actual system register accessors.

read_system_reg() is instead renamed to read_sanitised_ftr_reg(),
to make it more obvious that the Linux-defined sanitised feature
register cache is being accessed here, not the underlying
architectural system registers.

cpufeature.c's internal __raw_read_system_reg() function is renamed
in line with its actual purpose: a form of read_sysreg() that
indexes on (non-compiletime-constant) encoding rather than symbolic
register name.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-04-04 16:55:41 +01:00
Icenowy Zheng ec4279053a arm64: allwinner: a64: add R_PIO pinctrl node
Allwinner A64 have a dedicated pin controller to manage the PL pin bank.
As the driver and the required clock support are added, add the device
node for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-04 17:45:09 +02:00
Icenowy Zheng 791a9e001d arm64: allwinner: a64: add r_ccu node
A64 SoC have a CCU (r_ccu) in PRCM block.

Add the device node for it.

The mux 3 of R_CCU is an internal oscillator, which is 16MHz according
to the user manual, and has only 30% accuracy based on our experience
on older SoCs. The real mesaured value of it on two Pine64 boards is
around 11MHz, which is around 70% of 16MHz.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-04 17:44:57 +02:00
Jon Hunter 18236a1488 arm64: tegra: Update the Tegra132 flowctrl compatible string
Update the Tegra132 flowctrl compatible string to include
"nvidia,tegra132-flowctrl" so it is aligned with the flowctrl binding
documentation.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-04-04 17:15:05 +02:00
Alexandre Courbot dfd7a3845a arm64: tegra: Add GPU node for Tegra186
Add the DT node for the GP10B GPU on Tegra186.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-04-04 17:15:05 +02:00
Victor Kamensky 09a6adf53d arm64: mm: unaligned access by user-land should be received as SIGBUS
After 52d7523 (arm64: mm: allow the kernel to handle alignment faults on
user accesses) commit user-land accesses that produce unaligned exceptions
like in case of aarch32 ldm/stm/ldrd/strd instructions operating on
unaligned memory received by user-land as SIGSEGV. It is wrong, it should
be reported as SIGBUS as it was before 52d7523 commit.

Changed do_bad_area function to take signal and code parameters out of esr
value using fault_info table, so in case of do_alignment_fault fault
user-land will receive SIGBUS. Wrapped access to fault_info table into
esr_to_fault_info function.

Cc: <stable@vger.kernel.org>
Fixes: 52d7523 (arm64: mm: allow the kernel to handle alignment faults on user accesses)
Signed-off-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-04-04 12:13:36 +01:00
Greg Kroah-Hartman cb2e3d461b Merge 4.11-rc5 into usb-next
We want the usb fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-03 14:16:25 +02:00
Al Viro bee3f412d6 Merge branch 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux into uaccess.parisc 2017-04-02 10:33:48 -04:00
Rob Herring dc10ef2dfd arm64: dts: juno: fix PCI bus dtc warnings
dtc recently added PCI bus checks. Fix these warnings.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2017-03-31 11:03:15 +01:00
Arnd Bergmann 9720a9a31d Rockchip dts changes based on the newly created arm/arm64 symlinks.
The core addition is the support for the rk3399-based Gru family of
 ChromeOS devices, like the Kevin board which is the recently released
 Samsung Chromebook Plus. Additionally the usb3 controllers are added
 to rk3399 as they're used on Gru devices and even without full type-c
 support they can at least drive usb2 devices already.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAljY62IQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgYkKCACdlgqbhUPiGj/xGqSlBRdWzX20nMAmFMLh
 jPDSX3wjOTtmxCUoyGB4eac/823fVydVzf0OeLGTyJc7zx3IS+7p6dPMdV0ulLio
 UAKyhJk6HbAOWdQXRZFQbSGeWfcaRB12gu5uNbUiwaDsD7Pguk2z/H/z9pS03ydB
 OIXB3UrIKl0YW0CYhqH6Rt09af/8q3IaTDVwJpAXvAUNVcYogUK797fTXsxH8CD2
 e92qmtbEEdI6FGsACP6OTQx2mBDZCd+weABaacxKhIJ9IPce8QHVtcZj2VjH43L7
 TzIZkQ4b5MMG176mpofNzv2+O3i9BAzAkoX87czz7Y9fwuf7pFfy
 =rqs0
 -----END PGP SIGNATURE-----

Merge tag 'v4.12-rockchip-dts64-symlinks-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64

Pull "Rockchip dts64 updates (using arm/arm64 symlinks) for 4.12 part1" from Heiko Stübner

Rockchip dts changes based on the newly created arm/arm64 symlinks.
The core addition is the support for the rk3399-based Gru family of
ChromeOS devices, like the Kevin board which is the recently released
Samsung Chromebook Plus. Additionally the usb3 controllers are added
to rk3399 as they're used on Gru devices and even without full type-c
support they can at least drive usb2 devices already.

* tag 'v4.12-rockchip-dts64-symlinks-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: add regulator info for Kevin digitizer
  arm64: dts: rockchip: describe Gru/Kevin OPPs + CPU regulators
  arm64: dts: rockchip: add Gru/Kevin DTS
  dt-bindings: Document rk3399 Gru/Kevin
  arm64: dts: rockchip: support dwc3 USB for rk3399
2017-03-31 11:54:40 +02:00
Arnd Bergmann a5cd01ff18 Contains various changes for the rk3368 (dma, i2s, disable mailbox per
default, mmc-resets) and also removes the wrongly added idle states, that
 do not match the hardware's capabilities, as well as some general rk3399
 pcie fixes as well as also the mmc resets.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAljY6c0QHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgdIYB/wKt/kONmWhi3RsXCXFUv/PBM0NToKvUq5e
 5LvprMvIb/dyEBpA1bSaxOmktYDmEzqQFfxBOT7gfWX8/N+oFLWsfLsMNGkReev0
 QPxQaITA1sOVSqDPWb5Pw4jDJ58CKUH1Cvj9GU1NuU3qp5ioggMTr/RFk2FsQ2wi
 AJTDmyRHIp2Hfr7C//H85U7qd0NB0xQJz4GpZ98HnuZoSzpeQs7SRikOr4PZAaEA
 mqsFizsELiAee/BmsTsppjzEIM5MpCIe91fx4S5NBNbnbmy2pFvXsmL5QazTWyao
 FiWPPcIWuEVnuVLWXAGn4vLlKJG7DH+aJSOtN482J/fRnaTZABU6
 =/nLm
 -----END PGP SIGNATURE-----

Merge tag 'v4.12-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64

Pull "Rockchip dts64 updates for 4.12 part1" from Heiko Stübner:

Contains various changes for the rk3368 (dma, i2s, disable mailbox per
default, mmc-resets) and also removes the wrongly added idle states, that
do not match the hardware's capabilities, as well as some general rk3399
pcie fixes as well as also the mmc resets.

* tag 'v4.12-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: fix PCIe domain number for rk3399
  arm64: dts: rockchip: add rk3399 dw-mmc resets
  arm64: dts: rockchip: add rk3368 dw-mmc resets
  arm64: dts: rockchip: disable mailbox of RK3368 SoCs per default
  arm64: dts: rockchip: add i2s nodes support for RK3368 SoCs
  arm64: dts: rockchip: add dmac nodes for rk3368 SoCs
  arm64: dts: rockchip: remove wrongly added idle states on rk3368
  arm64: dts: rockchip: sort rk3399-pcie by unit address
2017-03-31 11:53:40 +02:00
Arnd Bergmann bda484e76e This pull request contains Broadcom ARM64-based SoCs Device Tree updates for
4.12, please pull the following:
 
 - Rob enables the cryptographic block on Northstar 2 (SPU) by adding the proper
   Device Tree nodes
 
 - Jon replaces all occurences of: status = "ok" with status = "okay" to better
   conform to the Device Tree specification
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJY1VaOAAoJEIfQlpxEBwcEcV4P/3jbaahcHY8RQgzUEV2IOHL6
 r82SI54BGNzrLRZQCeOQopUzTSiVtpSuFkjaZZr3zsKg0rFOQL5krQQiqXFq4m4G
 uzzBRCFXJb4ePE/czylE6YyNZFjAiQmpvWltNJwRQ8vbEml5M3B/PEfWaW9OTFxx
 5FulbvF1RG4zU0BG3DS1YggejQqNmNiT/CvwVBg1qLq2m9yGXd8XVsIRKMVxKGTx
 YZnxAEKueE/DqY5N9WvwKcTPP7JzBPPSPLqbSlPFI5+uRKn/EQ6pHBbSzCQXGEjb
 hpfKkMK2gFhnNw0Uvb9k5cT/sbst3evsaYGTE6q2DplKchCF1D1OQbUK5Dqn2ork
 MvitS7zkOavHrx+QPP0QkwPjWJrcCNnlIGwjFR/L8xl1Cz0WvSg9npyLVJr5kjmH
 uLDnx1RxKzDDaf/K42ZmuABRC7OURf2w7ARoAD4Z8Y4hRe+in7A9YTP8pHMjOcgG
 BR1aSr6zgLnqvMJDT+p0WrCTiEnd4rOJKL2zM/mmYdlYzkLe+HQ1YTi3mkCkEaTR
 Ao6TH8uAGJnc5ve7xY50ChNDlbKOUL6Nip/RMiayqr6JfG5OkMoqkrhF9gLYcnNo
 c4zLRT7sKBXJrYHqgo3xZuk41mYaiqoSsYiuXS283T1miOK1BWZ0ZzqIP+MH53yz
 yA1EmWP1XdHuU6hvKrZ8
 =yeV5
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.12/devicetree-arm64' of http://github.com/Broadcom/stblinux into next/dt64

Pull "Broadcom devicetree-arm64 changes for 4.12" from Florian Fainelli:

This pull request contains Broadcom ARM64-based SoCs Device Tree updates for
4.12, please pull the following:

- Rob enables the cryptographic block on Northstar 2 (SPU) by adding the proper
  Device Tree nodes

- Jon replaces all occurences of: status = "ok" with status = "okay" to better
  conform to the Device Tree specification

* tag 'arm-soc/for-4.12/devicetree-arm64' of http://github.com/Broadcom/stblinux:
  arm64: dts: NS2: convert "ok" to "okay"
  arm64: dts: NS2: Add Broadcom SPU driver DT entry
2017-03-31 11:52:16 +02:00
Arnd Bergmann 8e8c72535d mvebu dt64 for 4.12 (part 1)
- Add RTC support on Armada 7k/8k
 - Improve i2c support on Armada 37xx
 - Add gpio expander and RTC on Armada 3720 board
 - Improve USB3 support on Armada 37xx
 - Add network support on Armada 7k/8k
 -----BEGIN PGP SIGNATURE-----
 
 iIEEABECAEEWIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCWNVViCMcZ3JlZ29yeS5j
 bGVtZW50QGZyZWUtZWxlY3Ryb25zLmNvbQAKCRALBhiOFHI71b/NAJ9Y60FsHOFK
 08mr2r3h/4+ydzlxWQCfQeR509BowT9/i92+Rl1ZhqS7SS0=
 =kbjv
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt64-4.12-1' of git://git.infradead.org/linux-mvebu into next/dt64

Pull "mvebu dt64 for 4.12 (part 1)" from Gregory CLEMENT:

- Add RTC support on Armada 7k/8k
- Improve i2c support on Armada 37xx
- Add gpio expander and RTC on Armada 3720 board
- Improve USB3 support on Armada 37xx
- Add network support on Armada 7k/8k

* tag 'mvebu-dt64-4.12-1' of git://git.infradead.org/linux-mvebu:
  arm64: marvell: dts: add PPv2.2 description to Armada 7K/8K
  ARM64: dts: marvell: armada-3720 add RTC support
  ARM64: dts: marvell: armada-3720-db: Add phy for USB3
  ARM64: dts: marvell: armada-37xx: Add clock resource for USB3
  ARM64: dts: marvell: armada-37xx: Fix interrupt mapping for USB3
  ARM64: dts: marvell: armada-3720-db: add gpio expander
  ARM64: dts: marvell: armada37xx: add address and size property for i2c cells
  arm64: dts: marvell: add RTC description for Armada 7K/8K
2017-03-31 11:51:03 +02:00
Arnd Bergmann 6cd8eaacb8 UniPhier ARM64 SoC DT updates for v4.12
- Fix W=* build warnings
 - Add pinctrl properties to eMMC nodes
 - Fix resets properties of USB nodes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY0byiAAoJED2LAQed4NsGG/0P/34WlG/kvjVxm2XRNUNz/+Mv
 zT1d5t+4yG0vD2m2RhaB0FhJPLX3h8U1ZgulZgALzDyi2R/1IDvZBjXzzgYUTz14
 LZPD/XOFfbrD//KHXPvbreOr6qcOgqIZq7P03oBYcyg2AmkfUNdfNSRLtF+YFKIf
 tjNJOUHewBr6mtMzWdp+PO8ARUSWFw9x7fro6B5eW1vh9CRZxfXGiNp8yJIxHu8i
 3hq3QFlCFO5pspY6OCpap+hf1O/duvT2W4vp/ZO+4BSjxaPTMdWxmNLehxlSkYi0
 tQbLPN9nnqVd/Z7dODCokcPaSM5QJLOP7k9yoSgldu/J92XF42CARkaC4jK07KAJ
 gGZN5MtCHTsZAkHUnbNiZRWgmiMBZhECSainEVMtDORCngyUGdP2Mi+Uriyqqy2j
 vK8MBDbI1BcQQP29JAE7cuBAE0n1r9SyUyTE5iBiFXnatExKJzqnc6fmk3+CO2l5
 Q5EYhlFeYXvEYXHhB1Zu5wa9OguTjqsNqLLm6FLqX6yUAOG/ZCSsQ0ijza3m8swj
 lnTik+F3ePbMDQ45zsSo6e+mlEOizWw7p7bpJBQ8Cgkbqivyk2qME1/sCUwuw+Bq
 WyuIsOGpkverPfI1g+EnOLkK3GTzQWlM/LIvrlvZsqhsqYlxuUX9UeIzN9ss31sG
 AW6piCyxUyfN6fli1nHd
 =X39C
 -----END PGP SIGNATURE-----

Merge tag 'uniphier-dt64-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt64

Pull "UniPhier ARM64 SoC DT updates for v4.12" from Masahiro Yamada:

- Fix W=* build warnings
- Add pinctrl properties to eMMC nodes
- Fix resets properties of USB nodes

* tag 'uniphier-dt64-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier:
  arm64: dts: uniphier: re-order reset deassertion of USB of LD11
  arm64: dts: uniphier: add pinctrl property to eMMC node for LD11/LD20
  arm64: dts: uniphier: move memory node below aliases node
  arm64: dts: uniphier: fix no unit name warnings
2017-03-31 11:45:14 +02:00
Jayachandran C 517b311eae arm64: dts: move from ARCH_VULCAN to ARCH_THUNDER2
Move and update device tree files as part of transition from Broadcom
Vulcan to Cavium ThunderX2.

The changes are to:
 * rename dts/broadcom/vulcan.dtsi to cavium/thunder2-99xx.dtsi,
   update cpu cores to be "cavium,thunder2", and update SoC to be
   "cavium,thunderx2-cn9900"
 * move SoC dts/broadcom/vulcan-eval.dtsi to cavium/thunder2-99xx.dtsi
   and update board name string
 * Update dts/broadcom/Makefile not to build vulcan dtbs
 * Update dts/cavium/Makefile to build thunder2 dtbs

No changes to the dts contents except the updated "compatible" and
"model" properties.

Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-03-31 11:42:30 +02:00
Arnd Bergmann e1c98a2720 This pull request contains Broadcom ARM64-based SoCs defconfig updates for
4.12, please pull the following:
 
 - Gerd enables the BCM2835 MMC driver which yields better performance than the
   default one (iProc)
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJY1VXOAAoJEIfQlpxEBwcE8UwP/3Q6JuaHapjsJw2f8wQL4pMd
 tSpVmXYaYTJ7zMjgwJECpgxNfA2F475TRhCPI7p+0KkGCzgL5ZmrOIt8cA98LGWW
 hFVYJsPLzDaMrUwC1ujCJ573wmYiCJNW8tO9g8KRThbqoRwTxZmFerwPUJV5AO23
 ni1WgUgncDML9iaQvxI0k5QEmXt2+QA7zhUUS7nwkeiHedsV7AZfZLyBv2rlavQQ
 W58P8lFfW9Cqzh9ZHxodPcSTzeW96GrDHJncXQE6ngUXXdgOWNQOpEFGJ3hA0TRK
 VSrmT8UyfVv+PtZp2m4XG5jZSEZ8xO2HMuLI/Gi5UkrvcPMYlxm/AbtRM/8rSftP
 UyAt7bfUM7XNAGMMtETIy3/bCHpqbRBQxP2uDcXDuk4LyHdB8VOvqSMA92oPHPem
 Wr8r9hwwVuKQfjh+8jFKHKURU9escrnSyLcYaYB4lK97JF5ZC6XJG/aN2cT23Kof
 koDjVzrmIzS1QWkvl/bw/9Tvsz8UeuoDJJkaaoTFNOqv9S7SZfHtSlgKzS2c9U19
 jxavEY7ByRNgUQPJQYOR4LuQxiPl+vW37ZqXuUau+oOOCWEXrnw/ql/Ouxs8/6ne
 XhuCqqUP5/jcDTxCDmzwpJsSGVWEUbdA1d4uILFQn/1GSmUa4JmzKcnHUiBiQwNu
 gRn9dyGDhvGLehQfDwo+
 =KRAt
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.12/defconfig-arm64' of http://github.com/Broadcom/stblinux into next/arm64

Pull "Broadcom defconfig-arm64 changes for 4.12" from Florian Fainelli:

This pull request contains Broadcom ARM64-based SoCs defconfig updates for
4.12, please pull the following:

- Gerd enables the BCM2835 MMC driver which yields better performance than the
  default one (iProc)

* tag 'arm-soc/for-4.12/defconfig-arm64' of http://github.com/Broadcom/stblinux:
  arm64: set CONFIG_MMC_BCM2835=y in defconfig
2017-03-31 11:03:41 +02:00
Masahiro Yamada 9b3403ae56 arm64: drop non-existing vdso-offsets.h from .gitignore
Since commit a66649dab3 ("arm64: fix vdso-offsets.h dependency"),
include/generated/vdso-offsets.h is directly generated without
arch/arm64/kernel/vdso/vdso-offsets.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-30 19:29:30 +01:00
Shaokun Zhang 34d04f25a9 arm64: remove redundant header file in current.h
Commint 9d84fb27fa ("arm64: restore get_current() optimisation") has
removed read_sysreg() and asm/sysreg.h is redundant.

This patch removes asm/sysreg.h header file.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-30 19:15:37 +01:00
Mark Salter 335d2c2d19 arm64: fix NULL dereference in have_cpu_die()
Commit 5c492c3f52 ("arm64: smp: Add function to determine if cpus are
stuck in the kernel") added a helper function to determine if die() is
supported in cpu_ops. This function assumes a cpu will have a valid
cpu_ops entry, but that may not be the case for cpu0 is spin-table or
parking protocol is used to boot secondary cpus. In that case, there
is a NULL dereference if have_cpu_die() is called by cpu0. So add a
check for a valid cpu_ops before dereferencing it.

Fixes: 5c492c3f52 ("arm64: smp: Add function to determine if cpus are stuck in the kernel")
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-30 17:14:32 +01:00
Arnd Bergmann 06d2157196 mvebu defconfig64 for 4.12 (part 1)
Update arm64 defconfig by adding MVPP2 for Marvell Armada 7K/8K and
 MVNETA and I2C_PXA for Armada 37xx.
 -----BEGIN PGP SIGNATURE-----
 
 iIEEABECAEEWIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCWNVU1SMcZ3JlZ29yeS5j
 bGVtZW50QGZyZWUtZWxlY3Ryb25zLmNvbQAKCRALBhiOFHI71fVYAJ9Yp1KsFB7n
 e2/64YGab3J5nQMFKwCeNQFTo4tZeU1Bnew1V83xfFpLXPQ=
 =pCdd
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-defconfig64-4.12-1' of git://git.infradead.org/linux-mvebu into next/arm64

Pull "mvebu defconfig64 for 4.12 (part 1)" from Gregory CLEMENT:

Update arm64 defconfig by adding MVPP2 for Marvell Armada 7K/8K and
MVNETA and I2C_PXA for Armada 37xx.

* tag 'mvebu-defconfig64-4.12-1' of git://git.infradead.org/linux-mvebu:
  arm64: defconfig: enable MVPP2
  arm64: defconfig: enable I2C_PXA
  arm64: defconfig: enable MVNETA
2017-03-30 17:45:35 +02:00
Arnd Bergmann 6b0eb18493 Amlogic: defconfig changes for v4.12
- enable PWM LEDs and LEDs default-on trigger
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJY3CX3AAoJEFk3GJrT+8ZlepMP+wZbCnO5F/UmxSWFVTmIkH8o
 Y+2VKAFQeHTWRLmOMWIRz3y34v1cbjm5NQ2AEZJTmPQ75Fm1Yl3OgFYh17EJOSiM
 L0iWSnFT1eDz+0uS/R2dySH7DSV4zaPoLSBUZArf559G1qmxoCRsAMJsvLVhRSp/
 jhmwsvSyGuY4ZqBy5+KXQe0keGzMyiGa972EPzjNURZIYwehvP8gj+Zmap6WY8EP
 Az9Us6v4DJEkYe6cT93ag57NPYm0R3H5ciZGhNvukM8nYvNm0+yobHKeWWMwTvlU
 DOwWqqmXVve3QM5LidEMn02vO+R+TYjNSyyUBfRLZ9oVxd83RcNA2pKJZg+lU5ba
 jgr4JPMHmq44lrx+SdFgd474/4L6mGWwEmVBW6Rie/aR306wGnxYKYDHeQTZSSjf
 KgjwyeZombLnXZcCJbC12cee+qFnqRbBSFEOohVl8ejsfZVmIjjrgo2Q2oBDwhXB
 y27iwV5yNL1bmm6sedvc1hwJcTPZyH+aoMxfz+cNxY6oqEtRvht+ZINTHfEL74vB
 2vCO9wgVpQj8tJIL6eMWyYX5QHOJUnpd7uokdDD6ZwlaTLO4Kz8+3aQxeQoMUAQ1
 ls9E8ROBytIZJULCHg5ZVX00fG0IbmT4C+PRbGVU2XwkOzUUXAcMYtCmfSxAK4NM
 aYOxdTYlS35/zX7K92oX
 =C+pZ
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/arm64

Pull "Amlogic: defconfig changes for v4.12" from Kevin Hilman:

- enable PWM LEDs and LEDs default-on trigger

* tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  ARM64: defconfig: enable the leds-pwm driver and default-on trigger
2017-03-30 17:44:46 +02:00
Arnd Bergmann 414d06ace9 Introduce generic TEE subsystem:
- the TEE subsystem itself
 - an OP-TEE driver using the subsystem
 - optee bindings
 - optee node for hi6220-hikey.dts
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJYx7QcAAoJELWwuEGXj+zT9P0P/Avy7nOnN8cupGz9nnjn8pwU
 ngG2MgIHN1wNQkqnQfAszdklXwDb3gdF42HnZsRtklOyzXHdsxttlm6lzun2nqbe
 XG8UM/lCSQDgnt0dZJuQw0XR4nd+j5E+8RZZPiKpOiYK3ObfpZNL8EbrlfFkQ6WF
 8uOnYr2WW0tOrwLlyjs8ITLdwcOtzyVafByop6Cetoez4xgY+7CkEs48VI775t+V
 wNOyQ0lwdSQSeBaUB0QmR/xo1070RUkaK1gkbAHNEy2pNHgira+qKMZZNrreoEp+
 hvVKeY1iLhj5AD8Oh6zdkCNC24Oz2rP1wGiNPjP1NhFKTGnnIUj1R9Q77GpP0AV3
 HoajAz0Z68auYerI0VB7EtB4UvnoFDXqvPxYaFiBi0U30O5lK4okj5MjSLHMzV8X
 gmMrm5IKesuNQ8J8Ixor9zyn9Lr1VYV34yoKFqxj5W8s8j7rTKKybHR58eL5fzOR
 y1uqYD4hPggb4QgDIb3I2d+Xg+yYNtlkOi5FLCVe+cXQTBnL58hLoqDbBD2kNLfr
 YPco0a/Ht8Q2l6gcWcCG5eLXKFsqNKhKA9BbuUDvIHIB9z+ZbYohQBQp7cH24Q3B
 TIDXBBVrypSqnhAXQ+UY3pPdK/IVWh2X3RRvFzV1eokIiK/cKg9epRidNUewkKGA
 8TSEvwKV7CHgb2PkvkO2
 =O5tZ
 -----END PGP SIGNATURE-----

Merge tag 'tee-drv-for-4.12' of git://git.linaro.org:/people/jens.wiklander/linux-tee into next/tee

Pull "generic TEE subsystem for v4.12"

Introduce generic TEE subsystem:
- the TEE subsystem itself
- an OP-TEE driver using the subsystem
- optee bindings
- optee node for hi6220-hikey.dts

* tag 'tee-drv-for-4.12' of git://git.linaro.org:/people/jens.wiklander/linux-tee:
  arm64: dt: hikey: Add optee node
  Documentation: tee subsystem and op-tee driver
  tee: add OP-TEE driver
  tee: generic TEE subsystem
  dt/bindings: add bindings for optee
2017-03-30 16:16:28 +02:00
Peter Zijlstra 19d436268d debug: Add _ONCE() logic to report_bug()
Josh suggested moving the _ONCE logic inside the trap handler, using a
bit in the bug_entry::flags field, avoiding the need for the extra
variable.

Sadly this only works for WARN_ON_ONCE(), since the others have
printk() statements prior to triggering the trap.

Still, this saves a fair amount of text and some data:

  text         data       filename
  10682460     4530992    defconfig-build/vmlinux.orig
  10665111     4530096    defconfig-build/vmlinux.patched

Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-30 09:37:20 +02:00
spjoshi@codeaurora.org 6c8583d6fe arm64: dts: msm8996: Add ADSP PIL node
Add ADSP node required for Qualcomm ADSP Peripheral Image Loader.

Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-29 13:43:52 -05:00
Bjorn Andersson 27414e41ba arm64: dts: qcom: pm8994: Add rtc node
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-29 13:43:52 -05:00
Bjorn Andersson 1b0c105b7f arm64: dts: apq8016-sbc: Add ramoops
Declare a ramoops memory segment to aid debugging for those without UART
access. Verified to carry console log when holding volume down for 15
seconds.

No memory region for ramoops-like support was found downstream, so the
arbitrarily picked region is the last MB of System RAM.

Cc: John Stultz <john.stultz@linaro.org>
Cc: Mart Raudsepp <leio@gentoo.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-29 13:41:47 -05:00
Harninder Rai 7a5d73479f arm64: dts: Add support for FSL's LS1088A SoC
LS1088A contains eight ARM v8 CortexA53 processor cores
with 32 KB L1-D cache and 32 KB L1-I cache

Features summary
 Eight 32-bit / 64-bit ARM v8 Cortex-A53 CPUs
  - Arranged as two clusters of four cores sharing a 1 MB L2 cache
  - Speed Up to 1.5 GHz
  - Support for cluster power-gating.
 Cache coherent interconnect (CCI-400)
  - Hardware-managed data coherency
  - Up to 700 MHz
 One 64-bit DDR4 SDRAM memory controller with ECC
 Data path acceleration architecture 2.0 (DPAA2)
 Three PCIe 3.0 controllers
 One serial ATA (SATA 3.0) controller
 Three high-speed USB 3.0 controllers with integrated PHY

 Following levels of DTSI/DTS files have been created for the LS1088A
  SoC family:

         - fsl-ls1088a.dtsi:
                 DTS-Include file for NXP LS1088A SoC.

         - fsl-ls1088a-qds.dts:
                 DTS file for NXP LS1088A QDS board.

         - fsl-ls1088a-rdb.dts:
                 DTS file for NXP LS1088A RDB board

Signed-off-by: Harninder Rai <harninder.rai@nxp.com>
Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
Signed-off-by: Raghav Dogra <raghav.dogra@nxp.com>`
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-29 11:53:19 +08:00
Horia Geantă 85b85c5695 arm64: dts: ls1012a: add crypto node
LS1012A has a SEC v5.4 security engine.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-29 11:02:32 +08:00
Al Viro 92430dab36 arm64: switch to RAW_COPY_USER
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-28 18:23:24 -04:00
Al Viro 46583939b9 arm64: add extable.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2017-03-28 18:23:23 -04:00
Bjorn Andersson 90621b8044 arm64: dts: qcom: msm8916: Update hexagon node
It's necessary to reference the xo clock and cx supply, so specify these
in the node. Also move the Hexagon smd-edge into the hexagon node, to
enable SSR.

As cxo is not yet available we reference the fixed version of cxo for
now, which will work until proper power management is implemented.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-28 15:46:19 -05:00
avaneesh dwivedi 3f1802f888 arm64: dts: msm8996: Add SLPI SMP2P dt node.
Add smp2p support to communicate with slpi processor.

Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-28 15:46:18 -05:00
Stephen Boyd 8bfa6eae5a arm64: dts: qcom: Replace PMU compatible with a53 specific one
The PMU on msm8916 is for the cortex-a53 type CPU. Update the
compatible to the more specific one so we can get the a53
specific events out of the PMU.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-28 15:46:08 -05:00
Bjorn Andersson a2940f36a8 arm64: dts: qcom: msm8996: Fixup smp2p node
The SMEM state property name changes between the integration branch and
mainline, update to use the correct one.

Fixes: 2f45d9fcd5 ("arm64: dts: msm8996: Add SMP2P and APCS nodes")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-03-28 15:46:05 -05:00
jbrunet 9503062d65 ARM64: dts: meson-gxl: add spdif output pins
Add EE and AO domains pins for the spdif output to the gxl device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 08:00:02 -07:00
jbrunet c16fe9a1c7 ARM64: dts: meson-gxl: add i2s output pins
Add EE and AO domains pins for the i2s output clocks and data the gxl
device tree

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:59:53 -07:00
jbrunet 07a4652f0e ARM64: dts: meson-gxbb: add spdif output pins
Add EE and AO domains pins for the spdif output to the gxbb device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:59:43 -07:00
jbrunet 552b1e56d9 ARM64: dts: meson-gxbb: add i2s output pins
Add EE and AO domains pins for the i2s output clocks and data to the gxbb
device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:59:27 -07:00
Neil Armstrong 1db3b92cb2 ARM64: dts: meson-gxbb: Add USB Hub GPIO hog
The ODroid-C2 on-board USB Hub needs to to have it's reset signal set to
high level in order to be enumerated by the USB Host Controller.

But this management must be part of the currently in-development Generic
Power Sequence patch that will allow a USB Controller driver to start and stop
a power sequence associated to the USB Bus.

In the meantime, a simple USB Hog will work to enable the USB Hub.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:56:22 -07:00
Neil Armstrong 84412e4e85 ARM64: dts: meson-gxl: Add gpio-ranges properties
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:56:00 -07:00
Neil Armstrong 18ae17bc51 ARM64: dts: meson-gxbb: Add gpio-ranges properties
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:55:53 -07:00
Neil Armstrong 57ef579878 ARM64: dts: meson-gx: Add Mali nodes for GXBB and GXL
The same Mali-450 MP3 GPU is present in the GXBB and GXL SoCs.

The node is simply added in the meson-gxbb.dtsi file.

For GXL, since a lot is shared with the GXM that has a Mali-T820 IP, this
patch adds a new meson-gxl-mali.dtsi and is included in the SoC specific
dtsi files.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[khilman: s/MALI/Mali in changelog]
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-28 07:48:27 -07:00
Icenowy Zheng 5313ea66a4 arm64: allwinner: h5: enable USB OTG on Orange Pi PC 2 board
Orange Pi PC 2 board features a OTG port like the one on older H3 Orange
Pi's, with PG12 pin being the id det pin and PL2 being the vbus driver
pin.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-27 13:44:52 +02:00
Andre Przywara 9d41bbb6e1 arm64: allwinner: h5: add support for the Orange Pi PC 2 board
The Orange Pi PC 2 is a typical single board computer using the
Allwinner H5 SoC. Apart from the usual suspects it features three
separately driven USB ports and a Gigabit Ethernet port.
Also it has a SPI NOR flash soldered, from which the board can boot
from. This enables the SBC to behave like a "real computer" with
built-in firmware.

Add the board specific .dts file, which includes the H5 .dtsi and
enables the peripherals that we support so far.

Reviewed-by: Rask Ingemann Lambertsen <rask@formelder.dk>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[Icenowy: dropped all GPIO pinctrl nodes, change red LED gpio,
 change MMC cd to active-low, rename some node names to prevent
 underscores]
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-27 13:44:40 +02:00
Andre Przywara 4e36de179f arm64: allwinner: h5: add Allwinner H5 .dtsi
The Allwinner H5 SoC is pin-compatible to the H3 SoC, but uses
Cortex-A53 cores instead.
Based on the now shared base .dtsi describing the common peripherals
describe the H5 specific nodes on top of that.
That symlinks in the sunxi-h3-h5.dtsi from the arch/arm tree.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[Icenowy: add H5 pinctrl compatible, and changes for my h3-h5 dtsi
 refactor, commit message changed to meet new arm64 naming scheme,
 drop H3 pinctrl compatible because of interrupt bank change, drop
 H3 ccu compatible because of clock change, drop ccu node as it come
 into h3-h5 dtsi]
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-27 13:44:39 +02:00
Greg Kroah-Hartman e47ff590cc Merge 4.11-rc4 into usb-next
This resolves a merge issue in the gadget code, and we want the USB
fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-27 09:19:32 +02:00
Linus Torvalds 2056b7c7df ARM: SoC fixes for v4.11
- A couple of OMAP 4.11 regression fixes, including a boot regression for
   SmartReflex, hypervisor mode in thumb2 mode, and reference counting of
   device nodes
 
 - A fix for cpu_idle on at91
 
 - Minor DT fixes on across several platforms:
   sunxi, bcm53xx, at91, nsp, ns2, ux500, omap
 
 - A fix to correct an API change in the reset controllers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWNWBrGCrR//JCVInAQJE/xAArSDx+6i7On53k3QfxkR1mONHrEOlXhlP
 VbTeBfkYtYB08Pgq99QVJE5qYK2N5w2664UNbgs+KKYnYJTNl0G6EW1l7oj+21M+
 xg3e6ctdfeztYeU34q7D2TxzP/EBRHdbpEuT+JHuQOWFYNfGAj2vSt2cdPUael/Q
 D4s4BgeM1dIOzN3z3AvuQpqIhLedVRFAGYAaalKXiwREYUVDgnqhHCPWChVnSQMR
 gnNDYcb5ZxCaELH9gkdVqyfdlScw9juKMg5v7e7KizhBUqOGBT0bguLC9Kfh3mDO
 tIJGwkuqWvc5tAKuAcGklIVOzP8Wtcq0ObrFzLczy6Waf+6aaQl5J8Uw85UR/zg4
 44AHzk++apXTCDlrRzQZIkvaN9TmOBr65qrW1rnqVN72FRS3arDuMV1rEFRdZy2x
 riXmJmENWo+sakst4fTS0QY+/GlPDB8Md4X++Vkl3DgWFgiiBTcPbJCEazsFVip+
 QQzWfXTSB98bCVUuYr5eZgMlPYHrd1ZQIbgzlzIkdUuZ4XCe4MGw88km6TqviBwf
 dduNKnFctkrLAgM3V8rXZBQsZqJHRDmpOfSZ+9XtGYggy83g5FLbkp9h6Ws66SbI
 KCgLzV0THCs/gKLMeDqFerO1xQzxN84pd+YKetnD1RU+5bo98DMUkqgFn+cZyCFA
 dlImlZcN7Pc=
 =zKIg
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:

 - a couple of OMAP 4.11 regression fixes, including a boot regression
   for SmartReflex, hypervisor mode in thumb2 mode, and reference
   counting of device nodes

 - a fix for cpu_idle on at91

 - minor DT fixes on across several platforms: sunxi, bcm53xx, at91,
   nsp, ns2, ux500, omap

 - a fix to correct an API change in the reset controllers

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
  arm64: dts: NS2: Add dma-coherent to relevant DT entries
  reset: fix optional reset_control_get stubs to return NULL
  ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI
  ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  ARM: dts: NSP: GPIO reboot open-source
  ARM: at91: pm: cpu_idle: switch DDR to power-down mode
  ARM: dts: add the AB8500 clocks to the device tree
  ARM: dts: imx6sx-udoo-neo: Fix reboot hang
  ARM: sun8i: Fix the mali clock rate
  ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
  ARM: dts: BCM5301X: Fix memory start address
  ARM: dts: BCM5301X: Fix UARTs on bcm953012k
  Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node"
  ARM: OMAP2+: Release device node after it is no longer needed.
  ARM: OMAP2+: Fix device node reference counts
  ARM: OMAP2+: Remove legacy gpmc-nand.c
  ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
  ARM: dts: am335x-pcm953: Fix legacy wakeup source binding
  ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules
  ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI
  ...
2017-03-24 14:32:21 -07:00
Neil Armstrong ca02e3f9b1 ARM64: dts: meson-gxl: Add missing pinctrl pins groups
Add pinctrl pins nodes following the additions of missing pins in the pinctrl
driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-24 12:25:20 -07:00
Arnd Bergmann 0fa974b8b6 This pull request contains Broadcom ARM64-based SoCs Device Tree fixes for 4.11,
please pull the following:
 
 - Jon adds missing "dma-coherent" property to the Northstar 2 DTS include file
   in order to fix both performance and cache problems for: PCIe, Ethernet,
   PDC/mailbox, SATA3 and SDHCI
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJY0rXOAAoJEIfQlpxEBwcEcCwQAI6nyawZL32CW5cRKcDqHeVG
 l7bZJEdfcYA6TojvIGhdWh4VGSb2sLJsB7cU+eAtdHxI55sp1YR1HMEv5GBNthiq
 JKtwnVKWpaM6lbJGJnQwvGCzrGWSIXJH7KjPHh+Krb8ZV7GWQiJ3neEe3jh7Pp5u
 KEWIin22AowWo/5Hk8reEOoei9E+zer6Bo8YI2SVQ426epXnCocHzfaVIMq28310
 xzlhR8xFACoJTPJBJ8keyjL/9UYoge4Q1PM4VH89ti3juF4ELNGJP2yZyTbXWjOg
 gHDbQ13KWxE6xvCZbRLkiyBkIL5MZ8xKsP6ePqFtNU4STnPvnenWoEpBuY+8+lmz
 YOCoWf+TzyfvFV6BsnbnvBPE09tzeqtY43+kLOAsizqPY1+MzflDNW1MLBKRzQBV
 yGI6NhNB8wgKtCrYAGAd4O+Mb1GkGigw/C7l+/L68aBNqwy3pfPEM1zkobX7sBUi
 T+CjYQoF5ZUNx+p6cQfZFnr7ygC/iUyo7jODY9fTbCQ51PiTw1uMcOUmaV2DbQ2T
 Fq4jZRTVRubzBlCTNG1hRPqycGoXzjRS/uGKOLX5+XqRNKUBfFzy+XNoGqRlSO9n
 E6ef1ZbCO5GwxG6otgmlARHgCigSusKvfccQ9WWcB+1CegeCFSbyG1YzYkhQZ281
 te/nPRCmU/Uq0YvUoogd
 =5KXs
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.11/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux into fixes

Pull "Broadcom arm64 Device Tree fixes for 4.11" from Florian Fainelli:

This pull request contains Broadcom ARM64-based SoCs Device Tree fixes for 4.11,
please pull the following:

- Jon adds missing "dma-coherent" property to the Northstar 2 DTS include file
  in order to fix both performance and cache problems for: PCIe, Ethernet,
  PDC/mailbox, SATA3 and SDHCI

* tag 'arm-soc/for-4.11/devicetree-arm64-fixes' of http://github.com/Broadcom/stblinux:
  arm64: dts: NS2: Add dma-coherent to relevant DT entries
2017-03-24 17:51:50 +01:00
Andre Przywara 565fbac18e arm64: defconfig: add Allwinner USB PHY
The arm64 defconfig covers the Allwinner A64 SoC boards quite well,
but USB support is not enabled.
Add the PHY config symbol to allow defconfig kernels to use USB.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-24 16:43:02 +01:00
Herbert Xu 2e6d603e51 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merging 4.11-rc3 to pick up md5 removal from /dev/random.
2017-03-24 21:58:58 +08:00
Shawn Guo f006aaf7b1 arm64: dts: zte: add tvenc device for zx296718
It adds VOU tvenc device in zx296718.dtsi, so that boards with TV
connector can enable the support by changing 'status' in board DTS file.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2017-03-24 16:25:19 +08:00
Shawn Guo 25bd9d5e28 arm64: dts: zte: add vou and hdmi devices for zx296718
It adds VOU DPC device and enables HDMI support, which includes both
display and audio through SPDIF interface.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2017-03-24 16:25:12 +08:00
Jun Nie 25798d52b8 arm64: dts: zte: add mmc devices for zx296718
Add three mmc devices for zx296718 SoC, and enable the SD and eMMMC on
zx296718-evb board.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2017-03-24 16:16:50 +08:00
Shawn Guo 6d7e05ab8f arm64: dts: zte: remove zx296718 pll_vga clock
Rather than a fixed rate clock, pll_vga is a PLL can be programmed into
different freqencies.  Let's drop it from device tree and get it
registered from clock driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2017-03-24 16:16:50 +08:00
Neil Armstrong e19e64aaf4 ARM64: dts: meson-gx: Prepend GX generic compatible like other nodes
Prepend the compatible strings with a GX generic name in nodes compatible with
the GXBB HW and keep the same scheme as other nodes.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-23 12:25:26 -07:00
Neil Armstrong 932b3363c0 ARM64: dts: meson-gx: empty line cleanup
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-23 12:25:25 -07:00
Neil Armstrong 04b36df406 ARM64: dts: meson-gx: Finally move common nodes to GX dtsi
Since we know the GXBB and GXL/GXM share more hardware, we can safely move
the remaining peripheral nodes present in the GXBB dtsi to the common GX dtsi.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-23 12:25:25 -07:00
Martin Blumenstingl e15d2774b8 ARM64: dts: meson-gxl: add support for the Khadas VIM board
The Khadas VIM series consists of two boards which are almost
identical:
They are both using the same GXL S905X SoC, 100Mbit/s ethernet
(through the SoC-internal PHY), 2GB DDR3 memory, a micro-SD card slot,
onboard eMMC, Broadcom based SDIO WIFI, 2x USB A and 1x USB Type-C (the
latter with OTG support). The red LED is driven by PWM_AO_B (which
allows dimming), while the blue LED is managed by the firmware.
The differences are:
- the VIM Pro has a 16GB eMMC module, while the VIM only has 8GB
- the VIM Pro uses an AP6255 a/b/g/n/ac WIFI module, while the VIM comes
  with an AP6212 b/g/n SDIO WIFI module
 (the Vim uses an 8GB eMMC module, while

The boards are based on Amlogic's GXL S905X P212 reference design, which
is why most of the functionality (all MMC controllers and power
sequences, IR remote input, the main UART, ADC and ethernet) is simply
inherited from meson-gxl-s905x-p212.dtsi.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-23 11:54:35 -07:00
Martin Blumenstingl e98fd13413 ARM64: dts: amlogic: meson-gxl: add the missing PWM pins
This adds the new DT nodes for the missing PWM pins in the EE and AO
domain.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-23 11:54:14 -07:00
Thomas Petazzoni 66e5630284 arm64: defconfig: enable MVPP2
The MVPP2 network driver is used for the ARM64 Marvell Armada 7K and 8K
platforms, so enable it in the arm64 defconfig.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:50:13 +01:00
Thomas Petazzoni 6089471924 arm64: marvell: dts: add PPv2.2 description to Armada 7K/8K
This commit adds the description of the PPv2.2 hardware block for the
Marvell Armada 7K and Armada 8K processors, and their corresponding Armada
7040 and 8040 Development boards.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:46:23 +01:00
Gregory CLEMENT 85bee2af8a ARM64: dts: marvell: armada-3720 add RTC support
The Armada 3720 DB board has an RTC on the I2C bus. It's a PT7C4337A from
Pericom but which claims to be fully compatible with the ds1337.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:43:51 +01:00
Gregory CLEMENT a12af1c207 ARM64: dts: marvell: armada-3720-db: Add phy for USB3
Now that the gpio expander is present in the dts, use it to add an USB3
PHY using one of these gpio as a regulator.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:43:06 +01:00
Gregory CLEMENT e4afb4804d ARM64: dts: marvell: armada-37xx: Add clock resource for USB3
Now that clocks are available provide a clock resource for xhci node.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:43:02 +01:00
Gregory CLEMENT 86fcb2bca0 ARM64: dts: marvell: armada-37xx: Fix interrupt mapping for USB3
IRQ number for xhci controller was wrong, fix it.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-23 17:42:58 +01:00
Kefeng Wang 29d981217a arm64: drop unnecessary newlines in show_regs()
There are two unnecessary newlines, one is in show_regs, another
is in __show_regs(), drop them.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 14:20:41 +00:00
Ard Biesheuvel d27cfa1fc8 arm64: mm: set the contiguous bit for kernel mappings where appropriate
This is the third attempt at enabling the use of contiguous hints for
kernel mappings. The most recent attempt 0bfc445dec was reverted after
it turned out that updating permission attributes on live contiguous ranges
may result in TLB conflicts. So this time, the contiguous hint is not set
for .rodata or for the linear alias of .text/.rodata, both of which are
mapped read-write initially, and remapped read-only at a later stage.
(Note that the latter region could also be unmapped and remapped again
with updated permission attributes, given that the region, while live, is
only mapped for the convenience of the hibernation code, but that also
means the TLB footprint is negligible anyway, so why bother)

This enables the following contiguous range sizes for the virtual mapping
of the kernel image, and for the linear mapping:

          granule size |  cont PTE  |  cont PMD  |
          -------------+------------+------------+
               4 KB    |    64 KB   |   32 MB    |
              16 KB    |     2 MB   |    1 GB*   |
              64 KB    |     2 MB   |   16 GB*   |

* Only when built for 3 or more levels of translation. This is due to the
  fact that a 2 level configuration only consists of PGDs and PTEs, and the
  added complexity of dealing with folded PMDs is not justified considering
  that 16 GB contiguous ranges are likely to be ignored by the hardware (and
  16k/2 levels is a niche configuration)

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 14:09:23 +00:00
Ard Biesheuvel 5bd4669471 arm64/mm: remove pointless map/unmap sequences when creating page tables
The routines __pud_populate and __pmd_populate only create a table
entry at their respective level which refers to the next level page
by its physical address, so there is no reason to map this page and
then unmap it immediately after.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 14:09:12 +00:00
Ard Biesheuvel c0951366d4 arm64/mmu: replace 'page_mappings_only' parameter with flags argument
In preparation of extending the policy for manipulating kernel mappings
with whether or not contiguous hints may be used in the page tables,
replace the bool 'page_mappings_only' with a flags field and a flag
NO_BLOCK_MAPPINGS.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:55:51 +00:00
Ard Biesheuvel 141d1497aa arm64/mmu: add contiguous bit to sanity bug check
A mapping with the contiguous bit cannot be safely manipulated while
live, regardless of whether the bit changes between the old and new
mapping. So take this into account when deciding whether the change
is safe.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:55:35 +00:00
Ard Biesheuvel eccc1bff1b arm64/mmu: ignore debug_pagealloc for kernel segments
The debug_pagealloc facility manipulates kernel mappings in the linear
region at page granularity to detect out of bounds or use-after-free
accesses. Since the kernel segments are not allocated dynamically,
there is no point in taking the debug_pagealloc_enabled flag into
account for them, and we can use block mappings unconditionally.

Note that this applies equally to the linear alias of text/rodata:
we will never have dynamic allocations there given that the same
memory is statically in use by the kernel image.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:55:21 +00:00
Ard Biesheuvel e393cf40ae arm64/mmu: align alloc_init_pte prototype with pmd/pud versions
Align the function prototype of alloc_init_pte() with its pmd and pud
counterparts by replacing the pfn parameter with the equivalent physical
address.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:55:09 +00:00
Ard Biesheuvel 2ebe088b73 arm64: mmu: apply strict permissions to .init.text and .init.data
To avoid having mappings that are writable and executable at the same
time, split the init region into a .init.text region that is mapped
read-only, and a .init.data region that is mapped non-executable.

This is possible now that the alternative patching occurs via the linear
mapping, and the linear alias of the init region is always mapped writable
(but never executable).

Since the alternatives descriptions themselves are read-only data, move
those into the .init.text region.

Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:54:50 +00:00
Ard Biesheuvel 28b066da69 arm64: mmu: map .text as read-only from the outset
Now that alternatives patching code no longer relies on the primary
mapping of .text being writable, we can remove the code that removes
the writable permissions post-init time, and map it read-only from
the outset.

To preserve the existing behavior under rodata=off, which is relied
upon by external debuggers to manage software breakpoints (as pointed
out by Mark), add an early_param() check for rodata=, and use RWX
permissions if it set to 'off'.

Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:54:33 +00:00
Ard Biesheuvel 5ea5306c32 arm64: alternatives: apply boot time fixups via the linear mapping
One important rule of thumb when desiging a secure software system is
that memory should never be writable and executable at the same time.
We mostly adhere to this rule in the kernel, except at boot time, when
regions may be mapped RWX until after we are done applying alternatives
or making other one-off changes.

For the alternative patching, we can improve the situation by applying
the fixups via the linear mapping, which is never mapped with executable
permissions. So map the linear alias of .text with RW- permissions
initially, and remove the write permissions as soon as alternative
patching has completed.

Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:54:19 +00:00
Ard Biesheuvel aa8c09be7a arm64: mmu: move TLB maintenance from callers to create_mapping_late()
In preparation of refactoring the kernel mapping logic so that text regions
are never mapped writable, which would require adding explicit TLB
maintenance to new call sites of create_mapping_late() (which is currently
invoked twice from the same function), move the TLB maintenance from the
call site into create_mapping_late() itself, and change it from a full
TLB flush into a flush by VA, which is more appropriate here.

Also, given that create_mapping_late() has evolved into a routine that only
updates protection bits on existing mappings, rename it to
update_mapping_prot()

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:54:13 +00:00
Ard Biesheuvel 3b3c6c24de arm64: Revert "arm64: kaslr: fix breakage with CONFIG_MODVERSIONS=y"
This reverts commit 9c0e83c371, which
is no longer needed now that the modversions code plays nice with
relocatable PIE kernels.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-23 13:15:20 +00:00
Neil Armstrong c34cd35ed9 ARM64: dts: meson-gxbb-odroidc2: Fix TFLASH VDD regulator GPIO line
The wrong GPIO line was provided here.

Fixes: ef8d2ffedf ("ARM64: dts: meson-gxbb: add MMC support")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-22 20:46:52 -07:00
Neil Armstrong b03c7d6438 ARM64: dts: meson-gxbb-odroidc2: Add GPIO lines names
This patch describes the GPIO lines usage on the Odroid-C2 board.

This is useful in the debugfs gpio file and using the cdev gpio API.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-22 20:46:51 -07:00
Neil Armstrong 82838e6f52 ARM64: dts: meson-gx: Add Buttons to Q200 and P230 boards
This patch adds support for the P230 and Q200 ADC laddered button and
GPIO button.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-22 20:46:51 -07:00
Brian Norris b9ed79fa91 arm64: dts: rockchip: add regulator info for Kevin digitizer
We need to enable this regulator before the digitizer can be used. Wacom
recommended waiting for 100 ms before talking to the HID.

Signed-off-by: Brian Norris <briannorris@chromium.org>
[store chip ident as comment until i2c multi-compatibles are sorted]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-23 00:51:58 +01:00
Mark Rutland 7606e07856 KVM: arm64: Use common Set/Way sys definitions
Now that we have common definitions for the encoding of Set/Way cache
maintenance operations, make the KVM code use these, simplifying the
sys_reg_descs table.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:38:38 +00:00
Mark Rutland 851050a573 KVM: arm64: Use common sysreg definitions
Now that we have common definitions for the remaining register encodings
required by KVM, make the KVM code use these, simplifying the
sys_reg_descs table and the genericv8_sys_regs table.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:38:26 +00:00
Mark Rutland 0d449541c1 KVM: arm64: use common invariant sysreg definitions
Now that we have common definitions for the register encodings used by
KVM, make the KVM code uses thse for invariant sysreg definitions. This
makes said definitions a reasonable amount shorter, especially as many
comments are rendered redundant and can be removed.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:38:18 +00:00
Mark Rutland b2d693ced2 KVM: arm64: Use common physical timer sysreg definitions
Now that we have common definitions for the physical timer control
registers, make the KVM code use these, simplifying the sys_reg_descs
table.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:38:09 +00:00
Mark Rutland e804d20897 KVM: arm64: Use common GICv3 sysreg definitions
Now that we have common definitions for the GICv3 register encodings,
make the KVM code use these, simplifying the sys_reg_descs table.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:38:01 +00:00
Mark Rutland 174ed3e475 KVM: arm64: Use common performance monitor sysreg definitions
Now that we have common definitions for the performance monitor register
encodings, make the KVM code use these, simplifying the sys_reg_descs
table.

The comments for PMUSERENR_EL0 and PMCCFILTR_EL0 are kept, as these
describe non-obvious details regarding the registers. However, a slight
fixup is applied to bring these into line with the usual comment style.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:37:53 +00:00
Mark Rutland ee1b64e6cc KVM: arm64: Use common debug sysreg definitions
Now that we have common definitions for the debug register encodings,
make the KVM code use these, simplifying the sys_reg_descs table.

The table previously erroneously referred to MDCCSR_EL0 as MDCCSR_EL1.
This is corrected (as is necessary in order to use the common sysreg
definition).

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:37:45 +00:00
Mark Rutland 8db5d8f141 KVM: arm64: add SYS_DESC()
This patch adds a macro enabling us to initialise sys_reg_desc
structures based on common sysreg encoding definitions in
<asm/sysreg.h>. Subsequent patches will use this to simplify the KVM
code.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
2017-03-22 18:37:36 +00:00
Mark Rutland d61c97a777 arm64: move !VHE work to end of el2_setup
We only need to initialise sctlr_el1 if we're installing an EL2 stub, so
we may as well defer this until we're doing so. Similarly, we can defer
intialising CPTR_EL2 until then, as we do not access any trapped
functionality as part of el2_setup.

This patch modified el2_setup accordingly, allowing us to remove a
branch and simplify the code flow.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-22 17:21:38 +00:00
Mark Rutland 3ad47d055a arm64: reduce el2_setup branching
The early el2_setup code is a little convoluted, with two branches where
one would do. This makes the code more painful to read than is
necessary.

We can remove a branch and simplify the logic by moving the early return
in the booted-at-EL1 case earlier in the function. This separates it
from all the setup logic that only makes sense for EL2.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-22 17:21:38 +00:00
Chris Redmon fda89d9efc arm64: struct debug_info: Check CONFIG_HAVE_HW_BREAKPOINT
Check if CONFIG_HAVE_HW_BREAKPOINT is enabled before compiling in extra
data required for hardware breakpoints. Compiling out this code when hw
breakpoints are disabled saves about 272 bytes per struct task_struct.

Signed-off-by: Chris Redmon <credmonster@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-22 17:21:38 +00:00
Geert Uytterhoeven 44176bb38f arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU
Add support for allocating physically contiguous DMA buffers on arm64
systems with an IOMMU.  This can be useful when two or more devices
with different memory requirements are involved in buffer sharing.

Note that as this uses the CMA allocator, setting the
DMA_ATTR_FORCE_CONTIGUOUS attribute has a runtime-dependency on
CONFIG_DMA_CMA, just like on arm32.

For arm64 systems using swiotlb, no changes are needed to support the
allocation of physically contiguous DMA buffers:
  - swiotlb always uses physically contiguous buffers (up to
    IO_TLB_SEGSIZE = 128 pages),
  - arm64's __dma_alloc_coherent() already calls
    dma_alloc_from_contiguous() when CMA is available.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-22 17:21:37 +00:00
Arnd Bergmann f13d52cb3f arm64: define BUG() instruction without CONFIG_BUG
This mirrors commit e9c38ceba8 ("ARM: 8455/1: define __BUG as
asm(BUG_INSTR) without CONFIG_BUG") to make the behavior of
arm64 consistent with arm and x86, and avoids lots of warnings in
randconfig builds, such as:

kernel/seccomp.c: In function '__seccomp_filter':
kernel/seccomp.c:666:1: error: no return statement in function returning non-void [-Werror=return-type]

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-22 17:21:37 +00:00
Jon Mason f0c0cb99f7 arm64: dts: NS2: Add dma-coherent to relevant DT entries
Cache related issues with DMA rings and performance issues related to
caching are being caused by not properly setting the "dma-coherent" flag
in the device tree entries.  Adding it here to correct the issue.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Fixes: fd5e5dd56 ("arm64: dts: Add PCIe0 and PCIe4 DT nodes for NS2")
Fixes: dddc3c9d7 ("arm64: dts: NS2: add AMAC ethernet support")
Fixes: e79249143 ("arm64: dts: Add Broadcom Northstar2 device tree entries for PDC driver")
Fixes: ac9aae00f ("arm64: dts: Add SATA3 AHCI and SATA3 PHY DT nodes for NS2")
Fixes: efc877676 ("arm64: dts: Add SDHCI DT node for NS2")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-03-22 10:14:14 -07:00
Shawn Lin 41b464ef10 arm64: dts: rockchip: fix PCIe domain number for rk3399
It's suggested to fix the domain number for all PCIe
host bridges or not set it at all. However, if we don't
fix it, the domain number will keep increasing ever when
doing unbind/bind test, which makes the bus tree of lspci
introduce pointless domain hierarchy. More investigation shows
the domain number allocater of PCI doesn't consider the conflict
of domain number if we have more than one PCIe port belonging to
different domains. So once unbinding/binding one of them and keep
others would going to overflow the domain number so that finally
it will share the same domain as others, but actually it shouldn't.
We should fix the domain number for PCIe or invent new indexing
ID mechanisms. However it isn't worth inventing new indexing ID
mechanisms personlly, Just look at how other Root Complex drivers
did, for instance, broadcom and qualcomm, it seems fixing the domain
number was more popular. So this patch gonna fix the domain number
of PCIe for rk3399.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 17:50:09 +01:00
Neeraj Upadhyay afd0e5a876 arm64: kaslr: Fix up the kernel image alignment
If kernel image extends across alignment boundary, existing
code increases the KASLR offset by size of kernel image. The
offset is masked after resizing. There are cases, where after
masking, we may still have kernel image extending across
boundary. This eventually results in only 2MB block getting
mapped while creating the page tables. This results in data aborts
while accessing unmapped regions during second relocation (with
kaslr offset) in __primary_switch. To fix this problem, round up the
kernel image size, by swapper block size, before adding it for
correction.

For example consider below case, where kernel image still crosses
1GB alignment boundary, after masking the offset, which is fixed
by rounding up kernel image size.

SWAPPER_TABLE_SHIFT = 30
Swapper using section maps with section size 2MB.
CONFIG_PGTABLE_LEVELS = 3
VA_BITS = 39

_text  : 0xffffff8008080000
_end   : 0xffffff800aa1b000
offset : 0x1f35600000
mask = ((1UL << (VA_BITS - 2)) - 1) & ~(SZ_2M - 1)

(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

offset after existing correction (before mask) = 0x1f37f9b000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

offset (after mask) = 0x1f37e00000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7c
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

new offset w/ rounding up = 0x1f38000000
(_text + offset) >> SWAPPER_TABLE_SHIFT = 0x3fffffe7d
(_end + offset) >> SWAPPER_TABLE_SHIFT  = 0x3fffffe7d

Fixes: f80fb3a3d5 ("arm64: add support for kernel ASLR")
Cc: <stable@vger.kernel.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-22 15:43:11 +00:00
Heiko Stuebner 04dc7f6203 arm64: dts: rockchip: add rk3399 dw-mmc resets
dw-mmc got its reset-properties specified, so add the softresets
for it on the rk3399.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
2017-03-22 11:57:13 +01:00
Heiko Stuebner d0302e0679 arm64: dts: rockchip: add rk3368 dw-mmc resets
dw-mmc got its reset-properties specified, so add the softresets
for it on the rk3368.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
2017-03-22 11:57:12 +01:00
Jianqun Xu ec9b506fe3 arm64: dts: rockchip: disable mailbox of RK3368 SoCs per default
Default to disable mailbox in rk3368 core dts file.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:57:12 +01:00
Jianqun Xu f7d89dfe1e arm64: dts: rockchip: add i2s nodes support for RK3368 SoCs
I2S of RK3368 SoCs keep same as RK3066 SoCs found on Rockchip,
add nodes to support them.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:57:11 +01:00
Huibin Hong 4b4c0db538 arm64: dts: rockchip: add dmac nodes for rk3368 SoCs
Add dmac bus and dmac peri dts nodes for peripherals,
such as I2S, SPI, UART and so on.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:57:11 +01:00
Heiko Stuebner 531b3c49b3 arm64: dts: rockchip: remove wrongly added idle states on rk3368
As reported by Lorenzo, the residency/latency values defined in the
idle-state for rk3368 "make no sense". When introducing them I
simply took the idle-state node from the vendor kernel in error
as I didn't look up if these values were sane in the first place.

Talking to people and determining why they were used in this way
showed that it was meant to make sure the cpu_suspend callback
got initialized which at the 3.10 time was somehow required even
for wfi-based idle handling.

Of course the generic arch_cpu_idle() now does wfi-based idle-handling
already and the rk3368 does not implement any other idle states than
the default WFI, so these wrong idle-states should go away.

Reported-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2017-03-22 11:57:11 +01:00
Brian Norris acaa71a6c7 arm64: dts: rockchip: describe Gru/Kevin OPPs + CPU regulators
Used for Gru/Kevin only, as they're the only ones which have a described
CPU regulator. Also, I'm not sure we've validated this table non-Gru
boards.

At the same time, partially describe PWM regulators for Gru, so cpufreq
doesn't think it can crank up the clock speed without changing the
voltage. However, we don't yet have the DT bindings to fully describe
the Over Voltage Protection (OVP) circuits on these boards. Without that
description, we might end up changing the voltage too much, too fast.

Add the pwm-regulator descriptions and associate the CPU OPPs, but leave
them disabled.

Signed-off-by: Brian Norris <briannorris@chromium.org>
[shared gru/kevin parts on a gru device]
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
[with a bit of reordering]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:54:47 +01:00
Brian Norris 48f4d9796d arm64: dts: rockchip: add Gru/Kevin DTS
Kevin is part of a family of boards called Gru. As best as possible, the
properties shared by the Gru family are placed in rk3399-gru.dtsi, while
Kevin-specific bits are in rk3399-gru-kevin.dts. This does not add full
support for the base Gru board.

Working and tested (to some extent):
 * EC support -- including keyboard, battery, PWM, and probably more
 * UART / console
 * Thermal
 * Touchscreen
 * Touchpad
 * Digitizer (regulator still WIP)
 * PCIe / Wifi
 * Bluetooth / Webcam
 * SD card
 * eMMC
 * USB2 on TypeC
   - This works much of the time, but USB3 devices may or may not detect
     properly. Waiting on proper extcon support for USB3 over TypeC.
   - Depends on XHCI/DWC3 fixes for ARM64 that still haven't landed
 * Backlight

Not working:
 * CPUFreq -- relies on special OVP support for our PWM regulator
   circuits
 * EC / extcon support -- and with it, USB3/TypeC/DP
 * DRM -- won't even build on ARM64, so all display, eDP, etc. is not
   enabled

Not tested:
 * Audio

Signed-off-by: Brian Norris <briannorris@chromium.org>
[shared gru/kevin parts on a gru device]
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
[with a bit of reordering]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:54:31 +01:00
Brian Norris 7144224f2c arm64: dts: rockchip: support dwc3 USB for rk3399
Add the dwc3 usb needed node information for rk3399.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-03-22 11:42:47 +01:00
Olof Johansson 5344df631b Renesas ARM64 Based SoC DT Updates for v4.12
Cleanup:
 * Drop superfluous status update for frequency override from all
   r8a779[56] boards
 * Tidyup Audio-DMAC channel for DVC for r8a7795 SoC
 * Remove unit-address and reg from integrated cache on r8a779[56] SoCs
 
 Enhancements:
 * Add all Cortex-A53 and Cortex-A57 CPU cores to r8a7796 SoC
 * Add Cortex-A53 CPU cores to r8a7795 SoC
 * Update memory node to 4 GiB map on h3ulcb board
 * Upgrade to PSCI v1.0 to support Suspend-to-RAM on r8a779[56] SoCs
 * Add SCIF1 (DEBUG1) to r8a7796/salvator-x board
 * Add all SCIF and HSCIF nodes with DMA enabled to r8a7796 SoC
 * Set drive-strength for ravb pins for r8a7795/salvator-x board
 * Enable gigabit ethernet on r8a779[56]/salvator-x boards
 * Enable I2C for DVFS device r8a779[56]/salvator-x boards
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYz5gjAAoJENfPZGlqN0++SekP/0Po++ReWK9zraXuEnCKROwN
 kz/iVv+uuY+RrClouw1SVO5NgMn5guQeSOWPouslJIa/+rr7tOQFJDiTEBUd2h2Z
 ekZDQhrAPTK5vZdIQ/RFPVxda4auGHkOkZJ14GjbyA4gOMCTeXw89HNe30R4/IYk
 D3RItR7ZTljiGZ1TdqI72XR0s8NIWpt2Jo/0e8mpUZXggJbJXfdIOUzoiurMkQfx
 NADqARx2KzevaSJig1jIEkgJBseciiuiexgNbQIhrwecW12cECu0bhVuxLjxHnns
 YsZajCvDXprVwc1v+goq7qi5612owUMmYJ3awo50cg+iI8t/OC40Y+pwrIGrPU7c
 m5bV4RzMkoY71M8p/z08S8J6djrg4DfIX8GASvmaCgY8Y9hs4j+6rPRm324V30+S
 dYKFCSigRonfk21Y3low3xPC+lUTbL78zeGc739YPSVoe80u33kds9NLmTzsmaZ4
 0igqNJU8xGQCt8eVLDQyRE8M6ZzBd2+Vl+85SXmMgOLXajyhsg4owLEs4oftmLK3
 UGBZlyktUrmNSaAgJ+4S4thLkOSAmjJYgavmURhb95GTKWTgAlZvvMFt5attMG3H
 6Xf/5MldlgsNm2KqsuZiVEcWg19Sp2Yp2otHyjDnKqMZUGfj9F4EsGu8ExYCo9/W
 l0EV+sTS5fAro7TgRqyQ
 =LynK
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt64

Renesas ARM64 Based SoC DT Updates for v4.12

Cleanup:
* Drop superfluous status update for frequency override from all
  r8a779[56] boards
* Tidyup Audio-DMAC channel for DVC for r8a7795 SoC
* Remove unit-address and reg from integrated cache on r8a779[56] SoCs

Enhancements:
* Add all Cortex-A53 and Cortex-A57 CPU cores to r8a7796 SoC
* Add Cortex-A53 CPU cores to r8a7795 SoC
* Update memory node to 4 GiB map on h3ulcb board
* Upgrade to PSCI v1.0 to support Suspend-to-RAM on r8a779[56] SoCs
* Add SCIF1 (DEBUG1) to r8a7796/salvator-x board
* Add all SCIF and HSCIF nodes with DMA enabled to r8a7796 SoC
* Set drive-strength for ravb pins for r8a7795/salvator-x board
* Enable gigabit ethernet on r8a779[56]/salvator-x boards
* Enable I2C for DVFS device r8a779[56]/salvator-x boards

* tag 'renesas-arm64-dt-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (32 commits)
  arm64: dts: r8a7796: salvator-x: Drop superfluous status update for frequency override
  arm64: dts: m3ulcb: Drop superfluous status update for frequency override
  arm64: dts: r8a7795: salvator-x: Drop superfluous status updates for frequency overrides
  arm64: dts: h3ulcb: Drop superfluous status update for frequency override
  arm64: dts: r8a7796: Add Cortex-A53 PMU node
  arm64: dts: r8a7796: Add Cortex-A53 CPU cores
  arm64: dts: r8a7796: Add CA53 L2 cache-controller node
  arm64: dts: r8a7796: Add Cortex-A57 PMU node
  arm64: dts: r8a7796: Add Cortex-A57 CPU cores
  arm64: dts: r8a7795: Tidyup Audio-DMAC channel for DVC
  arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins
  arm64: dts: r8a7796: Remove unit-address and reg from integrated cache
  arm64: dts: r8a7795: Remove unit-addresses and regs from integrated caches
  arm64: dts: r8a7796: Upgrade to PSCI v1.0 to support Suspend-to-RAM
  arm64: dts: r8a7795: Upgrade to PSCI v1.0 to support Suspend-to-RAM
  arm64: dts: r8a7795: Add Cortex-A53 PMU node
  arm64: dts: r8a7795: Add Cortex-A53 CPU cores
  arm64: dts: r8a7796: Enable HSCIF DMA
  arm64: dts: r8a7796: salvator-x: add SCIF1 (DEBUG1)
  arm64: dts: r8a7796: Enable SCIF DMA
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-21 17:34:09 -07:00
Olof Johansson 7df6fcfb52 Merge branch 'shared/dt-symlinks' into next/dt64
* shared/dt-symlinks:
  arm64: dts: add arm/arm64 include symlinks
  ARM: dts: add arm/arm64 include symlinks

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-21 17:26:17 -07:00
Olof Johansson 223b9ad701 Merge branch 'shared/dt-symlinks' into next/dt
* shared/dt-symlinks:
  arm64: dts: add arm/arm64 include symlinks
  ARM: dts: add arm/arm64 include symlinks

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-21 17:21:44 -07:00
Heiko Stuebner 0a6081b673 arm64: dts: add arm/arm64 include symlinks
Allow including of dtsi files in an architecture-independent manner.
Some dtsi files may be shared between architectures and one suggestion
was to have symlinks and let these includes get accessed via a
    #include <arm64/foo.dtsi>
So add the necessary symlinks for arm32.

Suggested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-21 17:21:28 -07:00
Will Deacon 713cc9df64 arm64: compat: Update compat syscalls
Hook up three pkey syscalls (which we don't implement) and the new statx
syscall, as has been done for arch/arm/.

Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-21 18:10:40 +00:00
Krzysztof Kozlowski 0edf17984f arm64: defconfig: Enable video, DRM and LPASS drivers for Exynos5433 and Exynos7
Enable drivers specific to Exynos5433 and Exynos7:
1. MFD Low Power Audio SubSystem (LPASS),
2. DRM drivers (DECON display, outputs),
3. Drivers for video-related sub-blocks (JPEG, Multi Format Codec,
   GScaler).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-03-21 19:18:53 +02:00
Krzysztof Kozlowski caab3df982 arm64: exynos: Enable Exynos PMU and PM domains drivers
Enable EXYNOS_PM_DOMAINS because recently Exynos5433 got support for
Power Management domains.  The Exynos5433 pinctrl driver requires
EXYNOS_PMU to get the syscon-regmap for PMU address space.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
2017-03-21 19:18:53 +02:00
Geert Uytterhoeven bec0948e81 arm64: dts: r8a7796: Add reset control properties
Add properties to describe the reset topology for on-SoC devices:
  - Add the "#reset-cells" property to the CPG/MSSR device node,
  - Add resets and reset-names properties to the various device nodes.

This allows to reset SoC devices using the Reset Controller API.

Note that all resets added match the corresponding module clocks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-21 09:18:21 +01:00
Geert Uytterhoeven dcccc13210 arm64: dts: r8a7795: Add reset control properties
Add properties to describe the reset topology for on-SoC devices:
  - Add the "#reset-cells" property to the CPG/MSSR device node,
  - Add resets and reset-names properties to the various device nodes.

This allows to reset SoC devices using the Reset Controller API.

Note that all resets added match the corresponding module clocks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-21 09:18:07 +01:00
Magnus Damm e9f0089b2d arm64: dts: r8a7795: Correct SATA device size to 2MiB
Update the r8a7795 SATA device node to use a 2MiB I/O space as specified
in the "72. Serial-ATA" section of R-Car-Gen3-rev0.52E.pdf

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-21 09:15:00 +01:00
Mikko Perttunen 116503a62a arm64: tegra: Enable IOMMU for host1x on Tegra210
The host1x driver now supports operation behind an IOMMU, so add its
IOMMU domain to the device tree.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-20 19:48:37 +01:00
Mikko Perttunen 24963d1bec arm64: tegra: Enable VIC on Tegra210
Enable the VIC (Video Image Compositor) host1x unit on Tegra210 systems.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-20 19:48:36 +01:00
Suzuki K Poulose c651aae5a7 arm64: v8.3: Support for weaker release consistency
ARMv8.3 adds new instructions to support Release Consistent
processor consistent (RCpc) model, which is weaker than the
RCsc model.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:30:22 +00:00
Suzuki K Poulose cb567e79fa arm64: v8.3: Support for complex number instructions
ARM v8.3 adds support for new instructions to aid floating-point
multiplication and addition of complex numbers. Expose the support
via HWCAP and MRS emulation

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:30:08 +00:00
Suzuki K Poulose c8c3798d23 arm64: v8.3: Support for Javascript conversion instruction
ARMv8.3 adds support for a new instruction to perform conversion
from double precision floating point to integer  to match the
architected behaviour of the equivalent Javascript conversion.
Expose the availability via HWCAP and MRS emulation.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:29:28 +00:00
Will Deacon 87da236ebc arm64: KVM: Add support for VPIPT I-caches
A VPIPT I-cache has two main properties:

1. Lines allocated into the cache are tagged by VMID and a lookup can
   only hit lines that were allocated with the current VMID.

2. I-cache invalidation from EL1/0 only invalidates lines that match the
   current VMID of the CPU doing the invalidation.

This can cause issues with non-VHE configurations, where the host runs
at EL1 and wants to invalidate I-cache entries for a guest running with
a different VMID. VHE is not affected, because the host runs at EL2 and
I-cache invalidation applies as expected.

This patch solves the problem by invalidating the I-cache when unmapping
a page at stage 2 on a system with a VPIPT I-cache but not running with
VHE enabled. Hopefully this is an obscure enough configuration that the
overhead isn't anything to worry about, although it does mean that the
by-range I-cache invalidation currently performed when mapping at stage
2 can be elided on such systems, because the I-cache will be clean for
the guest VMID following a rollover event.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:25:45 +00:00
Will Deacon dda288d7e4 arm64: cache: Identify VPIPT I-caches
Add support for detecting VPIPT I-caches, as introduced by ARMv8.2.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:17:02 +00:00
Will Deacon 02f7760e6e arm64: cache: Merge cachetype.h into cache.h
cachetype.h and cache.h are small and both obviously related to caches.
Merge them together to reduce clutter.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:16:59 +00:00
Will Deacon 155433cb36 arm64: cache: Remove support for ASID-tagged VIVT I-caches
As a recent change to ARMv8, ASID-tagged VIVT I-caches are removed
retrospectively from the architecture. Consequently, we don't need to
support them in Linux either.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:16:57 +00:00
Will Deacon a8d4636f96 arm64: cacheinfo: Remove CCSIDR-based cache information probing
The CCSIDR_EL1.{NumSets,Associativity,LineSize} fields are only for use
in conjunction with set/way cache maintenance and are not guaranteed to
represent the actual microarchitectural features of a design.

The architecture explicitly states:

| You cannot make any inference about the actual sizes of caches based
| on these parameters.

Furthermore, CCSIDR_EL1.{WT,WB,RA,WA} have been removed retrospectively
from ARMv8 and are now considered to be UNKNOWN.

Since the kernel doesn't make use of set/way cache maintenance and it is
not possible for userspace to execute these instructions, we have no
need for the CCSIDR information in the kernel.

This patch removes the accessors, along with the related portions of the
cacheinfo support, which should instead be reintroduced when firmware has
a mechanism to provide us with reliable information.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:16:54 +00:00
Will Deacon 3689c75af2 arm64: cpuinfo: remove I-cache VIPT aliasing detection
The CCSIDR_EL1.{NumSets,Associativity,LineSize} fields are only for use
in conjunction with set/way cache maintenance and are not guaranteed to
represent the actual microarchitectural features of a design.

The architecture explicitly states:

| You cannot make any inference about the actual sizes of caches based
| on these parameters.

We currently use these fields to determine whether or the I-cache is
aliasing, which is bogus and known to break on some platforms. Instead,
assume the I-cache is always aliasing if it advertises a VIPT policy.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2017-03-20 16:16:51 +00:00
Michal Marek 06995804b5 arm64: Use full path in KBUILD_IMAGE definition
The KBUILD_IMAGE variable is used by the rpm and deb-pkg targets, which
expect it to point to the image file in the build directory. The
builddeb script has a workaround for architectures which only provide
the basename, but let's provide a clean interface for packaging tools.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Michal Marek <mmarek@suse.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-20 22:42:12 +09:00
Icenowy Zheng 28ebb7700c arm64: only select PINCTRL for Allwinner platforms
As the pinctrl driver selecting is refactored in Kconfig file of
pinctrl-sunxi, now we can select only PINCTRL for Allwinner platform,
and the default value of several pinctrl drivers useful on ARM64
Allwinner SoCs will become Y.

This is the situation of 32-bit ARM ARCH_SUNXI option.

Drop the select of per-SoC pinctrl choices, but keep selecting PINCTRL.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-03-20 10:08:45 +01:00
Gerd Hoffmann 3c9d361928 arm64: set CONFIG_MMC_BCM2835=y in defconfig
We need to enable this controller so that we can switch the SD card's
pinmux over to it by default, which will improve storage performance.

Read access (dd with 64k blocks on rpi2):
  CONFIG_MMC_SDHCI_IPROC: 11-12 MB/s
  CONFIG_MMC_BCM2835:     19-20 MB/s

Differences on write access are pretty much in the noise.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-17 17:02:52 -07:00
Gregory CLEMENT 4fc056ed55 ARM64: dts: marvell: armada-37xx: Add USB2 node
Armada 37xx SoC embedded an EHCI controller. This patch adds the device
tree node enabling its support.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17 13:32:59 +09:00
Linus Torvalds 325513d9b5 arm64 fixes/cleanups:
- Fix arm64 kernel boot warning when DEBUG_VIRTUAL and KASAN are enabled
 
 - Enable KEYS_COMPAT for keyctl compat support
 
 - Use cpus_have_const_cap() for system_uses_ttbr0_pan() (slight
   performance improvement)
 
 - Update kerneldoc for cpu_suspend() rename
 
 - Remove the arm64-specific kprobe_exceptions_notify (weak generic
   variant defined)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYyrfBAAoJEGvWsS0AyF7xVQ0QAKIaFNyrGuXu8ZVBmuVwaOTe
 GdxeaIHTQCS8cYXefnBmWIt5NQ8ARIh3ZFdY184ugr7cEM93PxBVNP7Kbnsz7vhl
 rfk0/+xAZRJKKtnxxse0zeMqtHEbN7rsaMdYuoEsTo6Yfx0TR/IkefGjN/EKq6It
 BRTxw3MhHkzGKToEtWJPqOCWrGCHC1UErU2dOa9naXXGeKzmh/RQraoy/9S3iRo1
 oGxqcaihhxXqDQwKNENoHhf9qTcv5hoRjzR5D6dXw+lroaqtStwUmWSXqCo+ZJcE
 qaPOmnw9wkuP7l7rpo0csW95NmLfSnW7jcFep53FwHl2Y3BGlW5Eb/QexJzFy+CK
 iRGnUMlpILET63gGCbewnJ9R36E3VX4T5P7HGpbTDvUy3u6IJDHIksjMGlh4VwfQ
 n+NsO7Pr8K0Kq59Lnsyf6MIbrjRmJKAD/sE7gvUuA1Q4oveU4T+s0uDq2bJq84AD
 3BQ/oA/BtGCiWmS17SDEmoQeFoKO7TLc/kAA0AApnR5tGIwRqgYMe3bveIF2K1yM
 08418scXeTDdpxO3Mwb1hnnoi51M2/EQT7vTl/Hk3NkT+DeRCE+zo38kA7y70pFQ
 J0FjNmhBqLGmOaCyq0Tu5X4vtEYosLKohavQbswVUVXoxCTzQik1VzyVLJwruDdl
 fi80OYYDy5cwpaTHenGg
 =mCcZ
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes/cleanups from Catalin Marinas:
 "In Will's absence I'm sending the arm64 fixes he queued for 4.11-rc3:

   - fix arm64 kernel boot warning when DEBUG_VIRTUAL and KASAN are
     enabled

   - enable KEYS_COMPAT for keyctl compat support

   - use cpus_have_const_cap() for system_uses_ttbr0_pan() (slight
     performance improvement)

   - update kerneldoc for cpu_suspend() rename

   - remove the arm64-specific kprobe_exceptions_notify (weak generic
     variant defined)"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: kernel: Update kerneldoc for cpu_suspend() rename
  arm64: use const cap for system_uses_ttbr0_pan()
  arm64: support keyctl() system call in 32-bit mode
  arm64: kasan: avoid bad virt_to_pfn()
  arm64: kprobes: remove kprobe_exceptions_notify
2017-03-16 11:47:28 -07:00
Heiner Kallweit 1b3f6d1486 ARM64: dts: meson-gx: add clock CLKID_RNG0 to hwrng node
Add clock CLKID_RNG0 to HW randon number generator node.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-03-16 17:58:48 +08:00
Yuantian Tang 893e2aad46 arm64: dts: ls1012a: add thermal monitor node
There is a thermal monitoring unit on ls1012a soc which can
monitor and record the temperature of cores so that appropriate actions
can be taken or alarm the user when the temperature exceeds a programmed
temperature threshold.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-16 11:05:43 +08:00
Jon Mason 231b362aec arm64: dts: NS2: convert "ok" to "okay"
Per e-mail from Sergei Shtylyov, the DT spec dictates it should be
"okay" (although "ok" is also recognized).  Thus, changing all "ok" to
"okay" in NS2 device tree files

Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-03-15 14:54:21 -07:00
Martin Blumenstingl 9ded9b0fa8 ARM64: dts: meson-gxl: improve support for the P212 reference design
The Amlogic P212 reference design is used by other devices as well, such
as (for example) the Khadas VIM boards. Thus this patch adds and moves
all common entries from meson-gxl-s905x-p212.dts to a new, separate
meson-gxl-s905x-p212.dtsi (which can be re-used on boards such as the
Khadas VIM).
Support for all boards based on the P212 reference design includes:
- enabling IR support
- enabling the SAR ADC (SARADC_CH1 is connected to a resistor which
  indicates the hardware revision, a similar design is found on the
  Khadas VIM boards)
- all MMC controllers (which means that SDIO wifi, the SD card and the
  eMMC are now supported)
- pwm_ef as dependency for the SDIO wifi modules
- uart_A which is connected to the bluetooth module (the bluetooth
  module itself is not enabled yet due to missing devicetree bindings
  for the Broadcom serial bluetooth devices)
- uart_AO is moved to the .dtsi (as all known devices use it as their
  boot-console)

Specific to the P212 board:
- this also enables the CVBS connector (which is not available on the
  Khadas VIM boards for example)
- Realtek based SDIO wifi (instead of Broadcom which most other devices
  use)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-14 14:44:22 -07:00
Yuantian Tang 427700a7ca arm64: dts: updated sata node on ls1012a platform
Updated sata node to add ecc register address and dma coherence
property.
Enable sata on ls1012a platforms as well.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-14 16:11:49 +08:00
Olof Johansson 1a002a297b Renesas ARM64 Based SoC Defconfig Updates for v4.12
* Enable SH Mobile I2C controller
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYwnRGAAoJENfPZGlqN0++oUoQAKoc+VzrlpJH8JSf+dUhxT2z
 xwtxmy0OrpZp4ydAFQI9mheVL+9rtWgWyviX7yi5KMZaRUq3nKlgZYKAM6KF9ol8
 2gOL7ZKGHQrDNNQXjc9x1MBOC6sTeG26WFs5AmUCcAa96P0hfQyPSP0I5JFapx58
 Q57jWeb69pLcrd3ThjGwb5ClUm3zoHQCZCdasI/hBKb1oJJG1deHMvqyUr1HUzNh
 C+i8tkjjp7CfEyvQbmBbT2H/H7/o4E3sTQMrrOoWnacEiemKbrfSqTCrD/TwO5Z8
 tqX0AME4HmkLKFrZASsPzbJUyI0zkBAkMteTmepu+ghvRkGNk9GwsXJiuldXvLzh
 agkL9A+RKGfHYC+8Qp2huwMU09Z0xTDXKr7czb0jNQNiWnh5AII38I712z4TQW+L
 7+GGCAxM7ZUAyJKBAA8T1Z/Lrzhf4qE4B+Gziq7uaUkOwK40HVSHkfylPpHMZ65Z
 +9AnvoP6WT4/ZRT7UnLlfPGAEHVQlYDIlYV/XQzxWWMLg8tqJ0k0vG2bailnolCG
 +SQbYv/1tPShoNvwPOWGq1JLcICeOTn1+cXBScG+B4VLfsE1uTuDidGzBwAOupDm
 gbns7C6+a4iJ4bVO2zUi223yI4jBeWnScdV5CJGmlZTWgDKurCdVbofOJdbNXAat
 HyI2gGtcdm2UnWDEmYU7
 =aVur
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm64-defconfig-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/arm64

Renesas ARM64 Based SoC Defconfig Updates for v4.12

* Enable SH Mobile I2C controller

* tag 'renesas-arm64-defconfig-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  arm64: defconfig: Enable SH Mobile I2C controller

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-13 16:03:02 -07:00
Geert Uytterhoeven 3cbe33367d arm64: dts: r8a7796: salvator-x: Drop superfluous status update for frequency override
The scif_clk device node is already enabled in r8a7796.dtsi, so there is
no need to update its status again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-13 10:21:16 +01:00
Geert Uytterhoeven cb4de4ece4 arm64: dts: m3ulcb: Drop superfluous status update for frequency override
The scif_clk device node is already enabled in r8a7796.dtsi, so there is
no need to update its status again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-13 10:20:59 +01:00
Geert Uytterhoeven 971939d1da arm64: dts: r8a7795: salvator-x: Drop superfluous status updates for frequency overrides
The scif_clk and pcie_bus_clk device nodes are already enabled in
r8a7795.dtsi, so there is no need to update their statuses again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-13 10:20:27 +01:00
Geert Uytterhoeven c9060f50d8 arm64: dts: h3ulcb: Drop superfluous status update for frequency override
The scif_clk device node is already enabled in r8a7795.dtsi, so there is
no need to update its status again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-13 10:20:00 +01:00
Linus Torvalds ecade11425 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:

 - a workaround for a GIC erratum

 - a missing stub function for CONFIG_IRQDOMAIN=n

 - fixes for a couple of type inconsistencies

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/crossbar: Fix incorrect type of register size
  irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065
  irqdomain: Add empty irq_domain_check_msi_remap
  irqchip/crossbar: Fix incorrect type of local variables
2017-03-12 14:11:38 -07:00
Masahiro Yamada 7a201e3142 arm64: dts: uniphier: re-order reset deassertion of USB of LD11
Deassert the bit in the System Control block before the MIO block.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-13 00:32:40 +09:00
Linus Torvalds 106e4da602 KVM fixes for v4.11-rc2
ARM updates from Marc Zyngier:
  "vgic updates:
   - Honour disabling the ITS
   - Don't deadlock when deactivating own interrupts via MMIO
   - Correctly expose the lact of IRQ/FIQ bypass on GICv3
 
   I/O virtualization:
   - Make KVM_CAP_NR_MEMSLOTS big enough for large guests with
     many PCIe devices
 
   General bug fixes:
   - Gracefully handle exception generated with syndroms that
     the host doesn't understand
   - Properly invalidate TLBs on VHE systems"
 
 x86:
  - improvements in emulation of VMCLEAR, VMX MSR bitmaps, and VCPU reset
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABCAAGBQJYxENfAAoJEED/6hsPKofoEEkIAIWglnOGOHqf4pPv9OThKzKm
 5CGINdPVEkJ56QNaYrINiQRHAzIUg8dsrhsisYmEdYGv3Mxf5WO0OebfzTrniNm4
 GXIM8OuYD04MSnIomfGGBAwFZ6ptgdeD+PVkSFYHArkvWYfPm54ghjVj3AXmkicf
 tRiIsPSiL/QT0vha5LBGfwsWOYavmZRfQBNA5yYUIHgO0Mp7LI24AeZOQiSM2ngx
 Gl5xfzk0bayhZSBr+r/fvxqbEd0udiY7klGEvt3hrPT+JzzpoamEgCCZ6eLFZbGM
 eABeQUzm7StD4Ib3WHkVU81ysOWndL0TK94BBBLIn1j+ht9FLi9iGkmTYspk9po=
 =/phS
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Radim Krčmář:
 "ARM updates from Marc Zyngier:
   - vgic updates:
     - Honour disabling the ITS
     - Don't deadlock when deactivating own interrupts via MMIO
     - Correctly expose the lact of IRQ/FIQ bypass on GICv3

   - I/O virtualization:
     - Make KVM_CAP_NR_MEMSLOTS big enough for large guests with many
       PCIe devices

   - General bug fixes:
     - Gracefully handle exception generated with syndroms that the host
       doesn't understand
     - Properly invalidate TLBs on VHE systems

  x86:
   - improvements in emulation of VMCLEAR, VMX MSR bitmaps, and VCPU
     reset

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: nVMX: do not warn when MSR bitmap address is not backed
  KVM: arm64: Increase number of user memslots to 512
  KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused
  KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64
  KVM: Add documentation for KVM_CAP_NR_MEMSLOTS
  KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled
  arm64: KVM: Survive unknown traps from guests
  arm: KVM: Survive unknown traps from guests
  KVM: arm/arm64: Let vcpu thread modify its own active state
  KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset
  kvm: nVMX: VMCLEAR should not cause the vCPU to shut down
  KVM: arm/arm64: vgic-v3: Don't pretend to support IRQ/FIQ bypass
  arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs
2017-03-11 14:24:58 -08:00
Masahiro Yamada 9c0a9700a1 arm64: dts: uniphier: add pinctrl property to eMMC node for LD11/LD20
Now everything is ready to enable this pinctrl.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-12 01:54:34 +09:00
Masahiro Yamada b9f2fc3811 arm64: dts: uniphier: move memory node below aliases node
These UniPhier DT files are fine as long as they are compiled in the
Linux build system.  It is true that Linux is the biggest user of
DT, but DT is project neutral from its concept.  DT files are often
re-used for other projects.  Especially for the UniPhier platform,
these DT files are re-used for U-Boot as well.

If I feed these DT files to the FDTGREP tool in U-Boot, it complains
about the node order.

  FDTGREP spl/u-boot-spl.dtb
  Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT
  /aliases node must come before all other nodes

Given that DT is not very sensitive to the order of nodes, this is a
problem of FDTGREP.  I filed a bug report a year ago, but it has not
been fixed yet.

Differentiating DT is painful.  So, I am up-streaming the requirement
from the down-stream project.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-11 23:47:03 +09:00
Carlo Caione 6e18675e10 ARM64: dts: meson-gxl: Add support for HwaCom AmazeTV
This patch adds support for the HwaCom AmazeTV set-top-box. The
hardware configuration is really similar to the other GXL boards but
for this hardware we need to limit the max-frequency of the eMMC to
have it working.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-10 14:13:23 -08:00
Geert Uytterhoeven 0e4c0e6ea7 arm64: kernel: Update kerneldoc for cpu_suspend() rename
Commit af391b15f7 ("arm64: kernel: rename __cpu_suspend to keep it
aligned with arm") renamed cpu_suspend() to arm_cpuidle_suspend(), but
forgot to update the kerneldoc header.

Fixes: af391b15f7 ("arm64: kernel: rename __cpu_suspend to keep it aligned with arm")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 18:06:24 +00:00
Mark Rutland 14088540ad arm64: use const cap for system_uses_ttbr0_pan()
Since commit 4b65a5db36 ("arm64: Introduce
uaccess_{disable,enable} functionality based on TTBR0_EL1"),
system_uses_ttbr0_pan() has used cpus_have_cap() to determine whether
PAN is present.

Since commit a4023f6827 ("arm64: Add hypervisor safe helper for
checking constant capabilities"), which was introduced around the same
time, cpus_have_cap() doesn't try to use a static key, and must always
perform a load, test, and consitional branch (likely a tbnz for the
latter two).

Elsewhere, we moved to using cpus_have_const_cap(), which can use a
static key (i.e. a non-conditional branch), which is patched at runtime
when the feature is detected.

This patch makes system_uses_ttbr0_pan() use cpus_have_const_cap(). The
static key is likely a win for hot-paths like the uacccess primitives,
and this makes our usage consistent regardless.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 17:45:16 +00:00
Eric Biggers 5c2a625937 arm64: support keyctl() system call in 32-bit mode
As is the case for a number of other architectures that have a 32-bit
compat mode, enable KEYS_COMPAT if both COMPAT and KEYS are enabled.
This allows AArch32 programs to use the keyctl() system call when
running on an AArch64 kernel.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 17:43:46 +00:00
Mark Rutland b0de0ccc8b arm64: kasan: avoid bad virt_to_pfn()
Booting a v4.11-rc1 kernel with DEBUG_VIRTUAL and KASAN enabled produces
the following splat (trimmed for brevity):

[    0.000000] virt_to_phys used for non-linear address: ffff200008080000 (0xffff200008080000)
[    0.000000] WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x48/0x70
[    0.000000] PC is at __virt_to_phys+0x48/0x70
[    0.000000] LR is at __virt_to_phys+0x48/0x70
[    0.000000] Call trace:
[    0.000000] [<ffff2000080b1ac0>] __virt_to_phys+0x48/0x70
[    0.000000] [<ffff20000a03b86c>] kasan_init+0x1c0/0x498
[    0.000000] [<ffff20000a034018>] setup_arch+0x2fc/0x948
[    0.000000] [<ffff20000a030c68>] start_kernel+0xb8/0x570
[    0.000000] [<ffff20000a0301e8>] __primary_switched+0x6c/0x74

This is because we use virt_to_pfn() on a kernel image address when
trying to figure out its nid, so that we can allocate its shadow from
the same node.

As with other recent changes, this patch uses lm_alias() to solve this.

We could instead use NUMA_NO_NODE, as x86 does for all shadow
allocations, though we'll likely want the "real" memory shadow to be
backed from its corresponding nid anyway, so we may as well be
consistent and find the nid for the image shadow.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 17:41:41 +00:00
Naveen N. Rao cb6950b715 arm64: kprobes: remove kprobe_exceptions_notify
Commit fc62d0207a ("kprobes: Introduce weak variant of
kprobe_exceptions_notify()") introduces a generic empty version of the
function for architectures that don't need special handling, like arm64.
As such, remove the arch/arm64/ specific handler.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-10 17:41:19 +00:00
Thierry Reding b27d525006 arm64: tegra: Add GPIO expanders on P2771
The P2771 development board expands the number of GPIOs via two I2C
chips.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:40 +01:00
Thierry Reding b693b3d709 arm64: tegra: Add power monitors on P2771
The P2771 development board comes with two power monitors that can be
used to determine power consumption in different parts of the board.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:38 +01:00
Thierry Reding 59686a9278 arm64: tegra: Add GPIO keys on P2771
The P2771 has three keys (power, volume up and volume down) that are
connected to pins on the AON GPIO controller.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:35 +01:00
Thierry Reding b64994d18f arm64: tegra: Enable current monitors on P3310
The P3310 processor module contains two current monitors that can be
used to determine the current flow across various parts of the board
design.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:34 +01:00
Thierry Reding b0ddea8539 arm64: tegra: Enable SD/MMC slot on P2771
The P3310 processor module makes provisions for exposing the SDMMC1
controller via a standard SD/MMC slot, which the P2771 supports. Hook
up the power supply provided on the P2771 carrier board and enable
the device tree node.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:34 +01:00
Thierry Reding 80fdf7b426 arm64: tegra: Enable SDHCI controllers on P3110
The P3110 processor module wires one of the SDHCI controllers to an on-
board eMMC and exposes another set of SD/MMC signals on the connector to
support an external SD/MMC card. A third controller is connected to the
SDIO pins of an M.2 KEY E connector.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:33 +01:00
Thierry Reding 02df3f03a8 arm64: tegra: Add initial power tree for P3310
Enable the Maxim MAX77620 PMIC found on P3310 and add some fixed
regulators to model the power tree.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-10 17:37:32 +01:00
Jerome Forissier 14e21cb8f8 arm64: dt: hikey: Add optee node
Acked-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2017-03-10 14:51:58 +01:00
Geert Uytterhoeven ccc499330d arm64: dts: r8a7796: Add Cortex-A53 PMU node
Enable the performance monitor unit for the Cortex-A53 cores on the
R8A7796 SoC.

Extracted from a patch by Takeshi Kihara in the BSP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-10 10:27:37 +01:00
Geert Uytterhoeven b4dc3b4b1a arm64: dts: r8a7796: Add Cortex-A53 CPU cores
This patch adds Cortex-A53 CPU cores of R8A7796 SoC, and sets a total of
6 cores (2 x Cortex-A57 + 4 x Cortex-A53).

Based on a patch by Takeshi Kihara in the BSP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-10 10:27:02 +01:00
Geert Uytterhoeven a681e6d632 arm64: dts: r8a7796: Add CA53 L2 cache-controller node
Add a device node for the Cortex-A53 L2 cache-controller.

The L2 cache for the Cortex-A53 CPU cores is 512 KiB large (organized as
32 KiB x 16 ways).

Extracted from a patch by Takeshi Kihara in the BSP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-10 10:26:43 +01:00
Takeshi Kihara 9fccf4d610 arm64: dts: r8a7796: Add Cortex-A57 PMU node
Enable the performance monitor unit for the Cortex-A57 cores on the
R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-10 10:26:25 +01:00
Takeshi Kihara 7328be4a03 arm64: dts: r8a7796: Add Cortex-A57 CPU cores
This patch adds Cortex-A57 CPU cores to R8A7796 SoC for a total of
2 x Cortex-A57.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[geert: Rebased]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-10 10:25:43 +01:00
Kirill A. Shutemov 9849a5697d arch, mm: convert all architectures to use 5level-fixup.h
If an architecture uses 4level-fixup.h we don't need to do anything as
it includes 5level-fixup.h.

If an architecture uses pgtable-nop*d.h, define __ARCH_USE_5LEVEL_HACK
before inclusion of the header. It makes asm-generic code to use
5level-fixup.h.

If an architecture has 4-level paging or folds levels on its own,
include 5level-fixup.h directly.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-09 11:48:47 -08:00
Mark Rutland 4dc529257d arm64: sysreg: add Set/Way sys encodings
Cache maintenance ops fall in the SYS instruction class, and KVM needs
to handle them. So as to keep all SYS encodings in one place, this
patch adds them to sysreg.h.

The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-2.

To make it clear that these are instructions rather than registers, and
to allow us to change the way these are handled in future, a new
sys_insn() alias for sys_reg() is added and used for these new
definitions.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 16:55:36 +00:00
Mark Rutland 14ae7518dd arm64: sysreg: add register encodings used by KVM
This patch adds sysreg definitions for registers which KVM needs the
encodings for, which are not currently describe in <asm/sysregs.h>.
Subsequent patches will make use of these definitions.

The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6, but
this is not an exhaustive addition. Additions are only made for
registers used today by KVM.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 16:55:33 +00:00
Mark Rutland 147a70ceda arm64: sysreg: add physical timer registers
This patch adds sysreg definitions for system registers used to control
the architected physical timer. Subsequent patches will make use of
these definitions.

The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-6.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 16:55:26 +00:00
Mark Rutland 0e9884fe63 arm64: sysreg: subsume GICv3 sysreg definitions
Unlike most sysreg defintiions, the GICv3 definitions don't have a SYS_
prefix, and they don't live in <asm/sysreg.h>. Additionally, some
definitions are duplicated elsewhere (e.g. in the KVM save/restore
code).

For consistency, and to make it possible to share a common definition
for these sysregs, this patch moves the definitions to <asm/sysreg.h>,
adding a SYS_ prefix, and sorting the registers per their encoding.
Existing users of the definitions are fixed up so that this change is
not problematic.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 15:29:45 +00:00
Mark Rutland c7a3c61fc6 arm64: sysreg: add performance monitor registers
This patch adds sysreg definitions for system registers which are part
of the performance monitors extension. Subsequent patches will make use
of these definitions.

The set of registers is described in ARM DDI 0487A.k_iss10775, Table
D5-9. The encodings were taken from Table C5-6 in the same document.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 15:29:45 +00:00
Mark Rutland d9801207cc arm64: sysreg: add debug system registers
This patch adds sysreg definitions for system registers in the debug and
trace system register encoding space. Subsequent patches will make use
of these definitions.

The encodings were taken from ARM DDI 0487A.k_iss10775, Table C5-5.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 15:29:44 +00:00
Mark Rutland 47863d41ec arm64: sysreg: sort by encoding
Out sysreg definitions are largely (but not entirely) in ascending order
of op0:op1:CRn:CRm:op2.

It would be preferable to enforce this sort, as this makes it easier to
verify the set of encodings against documentation, and provides an
obvious location for each addition in future, minimising conflicts.

This patch enforces this order, by moving the few items that break it.
There should be no functional change.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2017-03-09 15:29:44 +00:00
Linu Cherian 955a3fc6d2 KVM: arm64: Increase number of user memslots to 512
Having only 32 memslots is a real constraint for the maximum
number of PCI devices that can be assigned to a single guest.
Assuming each PCI device/virtual function having two memory BAR
regions, we could assign only 15 devices/virtual functions to a
guest.

Hence increase KVM_USER_MEM_SLOTS to 512 as done in other archs like
powerpc.

Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-03-09 09:13:50 +00:00
Linu Cherian 3e92f94a3b KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused
arm/arm64 architecture doesnt use private memslots, hence removing
KVM_PRIVATE_MEM_SLOTS macro definition.

Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Linu Cherian <linu.cherian@cavium.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-03-09 09:13:45 +00:00
Tang Yuantian c8cc48acb2 arm64: dts: added ecc register address to sata node on ls1046a
For ls1046 sata, ecc should be disabled due to a erratum.
Provide the ecc register address for driver to use.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-08 15:05:42 +01:00
Tang Yuantian 85f1dfae15 arm64: dts: added ecc register address to sata node on ls1043a
For ls1043 sata, ecc should be disabled due to a erratum.
Provide the ecc register address for driver to use.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-08 15:05:35 +01:00
Thierry Reding 24975b8c21 arm64: tegra: Enable ethernet on P3310
The P3310 processor module provides networking via the ethernet
controller found on NVIDIA Tegra186 SoCs.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-08 13:31:43 +01:00
Thierry Reding a4c7aab2ea arm64: tegra: Enable I2C controllers on P3310
The P3310 processor modules use seven I2C controllers for various
peripherals.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-08 13:31:40 +01:00
Thierry Reding 93dbb44c5c arm64: tegra: Invert the PMC interrupt on P3310
The PMC interrupt is inverted on P3310, so mark it as such in the device
tree to avoid a flood of interrupts when the PMIC is enabled.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-08 13:31:37 +01:00
Thierry Reding 0caafbde07 arm64: tegra: Add ethernet support for Tegra186
The NVIDIA Tegra186 SoC contains an instance of the Synopsys DWC
ethernet QOS IP block, which supports 10, 100 and 1000 Mbps data
transfer rates.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-08 13:31:33 +01:00
Thierry Reding 73bf90d4d4 arm64: tegra: Add PMC controller on Tegra186
The NVIDIA Tegra186 SoC has a Power Management Controller that performs
various tasks related to system power, boot as well as suspend/resume.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-03-08 13:31:31 +01:00
Gregory CLEMENT a844a652e7 ARM64: dts: marvell: armada-3720-db: add gpio expander
A gpio expander is present on the i2c bus on the Armada 3720 DB board. This
patch add it to the device tree.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-08 10:17:08 +01:00
Gregory CLEMENT 0ddd48de1e ARM64: dts: marvell: armada37xx: add address and size property for i2c cells
These property were missing when the nodes were added and their lack
generate warning messages when adding i2c device in the subnodes.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-08 10:17:00 +01:00
Gregory CLEMENT bbedcf5865 arm64: dts: marvell: add RTC description for Armada 7K/8K
This RTC IP is found in the CP110 master and slave which are part of the
Armada 8K SoCs and of the subset family the Armada 7K.

There is one RTC in each CP but the RTC requires an external
oscillator. However on the Armada 80x0, the RTC clock in CP master is not
connected (by package) to the oscillator. So this one is disabled for the
Armada 8020 and the Armada 8040.

As the RTC clock in CP slave is connected to the oscillator this one is
let enabled. and will be used on these SoCs (80x0).

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-08 10:14:01 +01:00
Hoegeun Kwon e3c0754674 arm64: dts: exynos: Add the burst and esc clock frequency properties to DSI node
Add the burst and esc clock frequency properties to the parent (DSI node).
Currently the clock is parsed from the port node, while it should be
taken from the dsi node.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-08 08:55:39 +02:00
Hyungwon Hwang 5be7ade302 arm64: dts: exynos: Add support for S6E3HA2 panel device on TM2 board
This patch add the panel device tree node for S6E3HA2 display
controller to TM2 dts.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-08 08:47:27 +02:00
Andi Shyti 2b17d2f8bc arm64: dts: exynos: Add stmfts touchscreen node for TM2 and TM2E
TM2 and TM2E devices are provided with a ST-Microelectronics
Finger Tip S device with small differences:

 - screen size
 - TM2E uses the stmfts also as a touchkey for "back" and "menu"

In this commit the initial value of the interrupt line is set to
EXYNOS_PIN_PULL_UP as the interrupt is triggered when the line
goes down.

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-07 21:53:59 +02:00
Andi Shyti 0ed797f705 arm64: dts: exynos: Enable ir-spi in the TM2 and TM2E boards
Add the device tree node for the ir-spi driver which enables the
IR LED for remote controlling.

This patch sets first the GPR3[3] gpio line as a regulator-fixed
for enabling an external regulator which powers the IR LED.

Removes also the default assignment of GPG3[7] related to the
MOSI line of the SPI3 bus.

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2017-03-07 21:17:35 +02:00
Gregory CLEMENT efbd24646a arm64: defconfig: enable I2C_PXA
Now that the Armada 37xx SoCs support the i2c pxa driver, enable it by
default.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-07 18:58:42 +01:00
Gregory CLEMENT d7ec74f412 arm64: defconfig: enable MVNETA
Now that the Armada 37xx SoCs support the mvneta driver, enable it by
default. It is especially useful when booting on an NFS root.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2017-03-07 18:45:55 +01:00
Mark Rutland ba4dd156ea arm64: KVM: Survive unknown traps from guests
Currently we BUG() if we see an ESR_EL2.EC value we don't recognise. As
configurable disables/enables are added to the architecture (controlled
by RES1/RES0 bits respectively), with associated synchronous exceptions,
it may be possible for a guest to trigger exceptions with classes that
we don't recognise.

While we can't service these exceptions in a manner useful to the guest,
we can avoid bringing down the host. Per ARM DDI 0487A.k_iss10775, page
D7-1937, EC values within the range 0x00 - 0x2c are reserved for future
use with synchronous exceptions, and EC values within the range 0x2d -
0x3f may be used for either synchronous or asynchronous exceptions.

The patch makes KVM handle any unknown EC by injecting an UNDEFINED
exception into the guest, with a corresponding (ratelimited) warning in
the host dmesg. We could later improve on this with with a new (opt-in)
exit to the host userspace.

Cc: Dave Martin <dave.martin@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-03-07 14:50:46 +00:00
Shanker Donthineni 90922a2d03 irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065
On Qualcomm Datacenter Technologies QDF2400 SoCs, the ITS hardware
implementation uses 16Bytes for Interrupt Translation Entry (ITE),
but reports an incorrect value of 8Bytes in GITS_TYPER.ITTE_size.

It might cause kernel memory corruption depending on the number
of MSI(x) that are configured and the amount of memory that has
been allocated for ITEs in its_create_device().

This patch fixes the potential memory corruption by setting the
correct ITE size to 16Bytes.

Cc: stable@vger.kernel.org
Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-03-07 14:34:27 +00:00
Abhimanyu Saini df72c23ea2 arm64: dts: freescale: ls2088a: Add DTS support for FSL's LS2088A SoC
This patch adds the device tree support for FSL LS2088A SoC based on
ARMv8 architecture.

Following levels of DTSI/DTS files have been created for the LS2088A
SoC family:

     - fsl-ls2088a.dtsi:
            DTS-Include file for FSL LS2088A SoC.

     - fsl-ls2088a-qds.dts:
            DTS file for FSL LS2088A QDS board.

     - fsl-ls2088a-rdb.dts:
            DTS file for FSL LS2088A RDB board.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-07 12:27:57 +01:00
Abhimanyu Saini c2f6a472be arm64: dts: freescale: ls2080a: Split devicetree for code resuability
LS2088A and LS2080A are similar SoCs with a few differences like
ARM cores etc.

Reorganize the LS2080A device tree to move the common nodes to:
        - fsl-ls208xa.dtsi
        - fsl-ls208xa-rdb.dtsi
        - fsl-ls208xa-qds.dtsi

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2017-03-07 12:27:43 +01:00
Kuninori Morimoto b5a8ffad0e arm64: dts: r8a7795: Tidyup Audio-DMAC channel for DVC
Current	Audio-DMAC is assigned "rx" as Audio-DMAC0, "tx" as Audio-DMAC1.
Thus, DVC "tx" should be assigned as Audio-DMAC1, instead of Audio-DMAC0.

Because of this, current platform board (using SRC/DVC/SSI)
Playback/Capture both will use same Audio-DMAC0
(but it depends on audio data path).

First note is that this "rx" and "tx" are from each IP point,
it doesn't mean Playback/Capture.
Second note is that Audio DMAC assigned on DT is only for
Audio-DMAC, Audio-DMAC-peri-peri has no entry.

=> Audio-DMAC
-> Audio-DMAC-peri-peri
-- HW connection

Playback case

	[Mem] => [SRC]--[DVC] -> [SSI]--[Codec]
	      rx ~~~~~~~~~~~~
Capture

	[Mem] <= [DVC]--[SRC] <- [SSI]--[Codec]
	      tx ~~~~~~~~~~~~

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:51:11 +01:00
Niklas Söderlund 7d73a4da26 arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins
The EthernetAVB should not depend on the bootloader to setup correct
drive-strength values. Values for drive-strength where found by
examining the registers after the bootloader has configured the
registers and successfully used the EthernetAVB.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:51:09 +01:00
Geert Uytterhoeven 57a4fd420c arm64: dts: r8a7796: Remove unit-address and reg from integrated cache
The Cortex-A57 cache controller is an integrated controller, and thus
the device node representing it should not have a unit-addresses or reg
property.

Fixes: 1561f20760 ("arm64: dts: r8a7796: Add Renesas R8A7796 SoC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:51:06 +01:00
Geert Uytterhoeven d165856de1 arm64: dts: r8a7795: Remove unit-addresses and regs from integrated caches
The Cortex-A57/A53 cache controllers are integrated controllers, and
thus the device nodes representing them should not have unit-addresses
or reg properties.

Fixes: 6f7bf82cc9 ("arm64: dts: r8a7795: Fix W=1 dtc warnings")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:51:04 +01:00
Khiem Nguyen b3f26910c0 arm64: dts: r8a7796: Upgrade to PSCI v1.0 to support Suspend-to-RAM
>From PSCI v1.0, Suspend-to-RAM is supported via SYSTEM_SUSPEND PSCI
function call. Hence, upgrade PSCI version for R-Car M3-W to support
Suspend-to-RAM.

The Suspend-to-RAM is highly dependent on ARM Trusted Firwmare support
since necessary callback functions will be registered after a query
to ARM Trusted Firmware about SYSTEM_SUSPEND support.

Since PSCI v1.0 is backward compatible with PSCI v0.2, CPU Hotplug and
CPUIdle should be able to work normally with this change.

Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[geert: Keep "arm,psci-0.2"]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:51:01 +01:00
Khiem Nguyen 71585040b7 arm64: dts: r8a7795: Upgrade to PSCI v1.0 to support Suspend-to-RAM
>From PSCI v1.0, Suspend-to-RAM is supported via SYSTEM_SUSPEND PSCI
function call. Hence, upgrade PSCI version for R-Car H3 to support
Suspend-to-RAM.

The Suspend-to-RAM is highly dependent on ARM Trusted Firwmare support
since necessary callback functions will be registered after a query
to ARM Trusted Firmware about SYSTEM_SUSPEND support.

Since PSCI v1.0 is backward compatible with PSCI v0.2, CPU Hotplug and
CPUIdle should be able to work normally with this change.

Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[geert: Keep "arm,psci-0.2"]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:59 +01:00
Geert Uytterhoeven 9190748fd6 arm64: dts: r8a7795: Add Cortex-A53 PMU node
Enable the performance monitor unit for the Cortex-A53 cores on the
R8A7795 SoC.

Extracted from a patch by Takeshi Kihara in the BSP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:56 +01:00
Geert Uytterhoeven 799a75abde arm64: dts: r8a7795: Add Cortex-A53 CPU cores
This patch adds Cortex-A53 CPU cores to r8a7795 SoC for a total of 8
cores (4 x Cortex-A57 + 4 x Cortex-A53).

Based on work by Takeshi Kihara and Dirk Behme.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:54 +01:00
Ulrich Hecht 6d50bb8935 arm64: dts: r8a7796: Enable HSCIF DMA
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:51 +01:00
Ulrich Hecht d5566d251f arm64: dts: r8a7796: salvator-x: add SCIF1 (DEBUG1)
Enables the SCIF hooked up to the DEBUG1 connector.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:48 +01:00
Ulrich Hecht dbcae5ea4b arm64: dts: r8a7796: Enable SCIF DMA
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:42 +01:00
Ulrich Hecht 19d76f3ec8 arm64: dts: r8a7796: Add all SCIF nodes
Add the device nodes for all R-Car H3 SCIF serial ports, incl. clocks
and power domain.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:35 +01:00
Ulrich Hecht 68cd161072 arm64: dts: r8a7796 dtsi: Add all HSCIF nodes
Add the device nodes for all HSCIF serial ports, incl. clocks, and
power domain.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
[simon: express register size in hex; refer to power domain in changelog]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-07 07:50:25 +01:00
Masahiro Yamada b5027603c4 arm64: dts: uniphier: fix no unit name warnings
Fix warnings reported when built with W=1:
  Node /memory has a reg or ranges property, but no unit name

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-07 05:23:13 +09:00
Martin Blumenstingl c344698648 ARM64: dts: meson-gx: remove the phy-mode property from meson-gx
The ethmac node has to be configured for each board due to different
pinctrl nodes for RGMII/RMII. Thus the phy-mode should be specified at
the same place (= in the board .dts), making it easier to read the board
.dts file (because the phy-mode is stated explicitly, without requiring
developers to read all "parent" .dtsi as well).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:57 -08:00
Martin Blumenstingl 093d23db4f ARM64: dts: amlogic: add the ethernet TX delay configuration
This adds the amlogic,tx-delay-ns property with the old (hardcoded)
default value of 2ns to all boards which are using an RGMII ethernet
PHY.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:56 -08:00
Martin Blumenstingl 23edd1b2d8 ARM64: dts: meson-gxbb-p201: fix ethernet support
Amlogic's own .dts specifies that the P201 board uses a RMII PHY (with
the reset GPIO being GPIOZ_14).
However our P201 board .dts simply inherits the phy-mode setting from
from meson-gx.dtsi where it defaults to RGMII mode.
Remove all ethernet settings from meson-gxbb-p20x.dtsi as it only
specifies the RGMII pins which are only valid for the P200 board.
Instead we add the ethmac node to the meson-gxbb-p201.dts and configure
the pinctrl property and the phy-mode for an RMII PHY.

An MDIO node (which would also specify the PHY) is not added since we
don't know which PHY is being used (and thus which PHY address would
have to be used).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:56 -08:00
Martin Blumenstingl 695dcb2ba1 ARM64: dts: meson-gxbb-wetek-play2: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state.
While here also specify the phy-handle of the ethmac node to make the
PHY configuration similar to the one we have on GXL devices. This will
allow us to specify OF-properties for the PHY itself.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:54 -08:00
Martin Blumenstingl be5f7befbd ARM64: dts: meson-gxbb-wetek-hub: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state.
While here also specify the phy-handle of the ethmac node to make the
PHY configuration similar to the one we have on GXL devices. This will
allow us to specify OF-properties for the PHY itself.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:54 -08:00
Martin Blumenstingl 67d49f3066 ARM64: dts: meson-gxbb-nexbox-a95x: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state.
While here also specify the phy-handle of the ethmac node to make the
PHY configuration similar to the one we have on GXL devices. This will
allow us to specify OF-properties for the PHY itself.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:54 -08:00
Martin Blumenstingl 1220b29749 ARM64: dts: meson-gxbb-vega-s95: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state.
While here also specify the phy-handle of the ethmac node to make the
PHY configuration similar to the one we have on GXL devices. This will
allow us to specify OF-properties for the PHY itself.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:53 -08:00
Martin Blumenstingl 2f739c1750 ARM64: dts: meson-gxbb-p200: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state.
While here also specify the phy-handle of the ethmac node to make the
PHY configuration similar to the one we have on GXL devices. This will
allow us to specify OF-properties for the PHY itself.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:53 -08:00
Martin Blumenstingl b6ff27217e ARM64: dts: meson-gxbb-odroidc2: add the ethernet PHY's reset GPIO
This resets the ethernet PHY during boot to get the PHY into a "clean"
state. While here also explicitly specify the phy-mode instead of
relying on the default-value from meson-gx.dtsi.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:55:53 -08:00
Martin Blumenstingl 95fbe8b08b ARM64: defconfig: enable the leds-pwm driver and default-on trigger
This enables the leds-pwm driver to support LEDs which are PWM-powered
(and thus dimmable). Additionally we have to enable the "default-on"
trigger - this was not required before because the gpio-leds driver has
a separate "default-state" property which can be used to enable the LED
by default.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2017-03-06 09:54:57 -08:00
Marc Zyngier 6892517629 arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs
When invalidating guest TLBs, special care must be taken to
actually shoot the guest TLBs and not the host ones if we're
running on a VHE system.  This is controlled by the HCR_EL2.TGE
bit, which we forget to clear before invalidating TLBs.

Address the issue by introducing two wrappers (__tlb_switch_to_guest
and __tlb_switch_to_host) that take care of both the VTTBR_EL2
and HCR_EL2.TGE switching.

Reported-by: Tomasz Nowicki <tnowicki@caviumnetworks.com>
Tested-by: Tomasz Nowicki <tnowicki@caviumnetworks.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2017-03-06 10:28:24 +00:00
Simon Horman 58e7696e0e arm64: defconfig: Enable SH Mobile I2C controller
Enable SH Mobile I2C controller for use on R-Car Gen3 SoCs.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 10:03:53 +01:00
Kazuya Mizuguchi ef3f08c83f arm64: dts: r8a7796: salvator-x: Fix EthernetAVB PHY timing
Set PHY rxc-skew-ps to 1500 and all other values to their default values.

This is intended to to address failures in the case of 1Gbps communication
using the by salvator-x board with the KSZ9031RNX phy. This has been
reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Kazuya Mizuguchi 325f39010b arm64: dts: r8a7796: Use rgmii-txid phy-mode for EthernetAVB
Since commit 61fccb2d62 ("ravb: Add tx and rx clock internal delays mode
of APSR") the EthernetAVB driver enables tx and rx clock internal delay
modes (TDM and RDM) depending on the phy mode as follows:

    phy mode   | ASPR delay mode
    -----------+----------------
    rgmii-id   | TDM and RDM
    rgmii-rxid | RDM
    rgmii-txid | TDM

And prior to the above commit no internal delay mode settings were
implemented for any phy mode.

With this and the above change present tx internal delay mode is enabled
which has been observed to address failures in the case of 1Gbps
communication using the by salvator-x board with the KSZ9031RNX phy. This
has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W)
SoCs.

With the above patch present but this patch present tx and rx internal
delay modes are enabled; and with the above patch and this present absent
no internal delay modes are enabled. In both cases failures have been
observed when using 1Gbps communication in the environments described
above.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Vladimir Barinov 5b9fd1962f arm64: dts: h3ulcb: Fix EthernetAVB PHY timing
Set PHY rxc-skew-ps to 1500 and all other values to their default values.

This is intended to to address failures in the case of 1Gbps communication
using the by h3ulcb board with the KSZ9031RNX phy.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Kazuya Mizuguchi 0e45da1c6e arm64: dts: r8a7795: salvator-x: Fix EthernetAVB PHY timing
Set PHY rxc-skew-ps to 1500 and all other values to their default values.

This is intended to to address failures in the case of 1Gbps communication
using the by salvator-x board with the KSZ9031RNX phy. This has been
reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W) SoCs.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Kazuya Mizuguchi dda3887907 arm64: dts: r8a7795: Use rgmii-txid phy-mode for EthernetAVB
Since commit 61fccb2d62 ("ravb: Add tx and rx clock internal delays mode
of APSR") the EthernetAVB driver enables tx and rx clock internal delay
modes (TDM and RDM) depending on the phy mode as follows:

    phy mode   | ASPR delay mode
    -----------+----------------
    rgmii-id   | TDM and RDM
    rgmii-rxid | RDM
    rgmii-txid | TDM

And prior to the above commit no internal delay mode settings were
implemented for any phy mode.

With this and the above change present tx internal delay mode is enabled
which has been observed to address failures in the case of 1Gbps
communication using the by salvator-x board with the KSZ9031RNX phy. This
has been reported to occur with both the r8a7795 (H3) and r8a7796 (M3-W)
SoCs.

With the above patch present but this patch present tx and rx internal
delay modes are enabled; and with the above patch and this present absent
no internal delay modes are enabled. In both cases failures have been
observed when using 1Gbps communication in the environments described
above.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Vladimir Barinov a262d66224 arm64: dts: h3ulcb: Update memory node to 4 GiB map
This patch adds memory region:

  - After changes, the H3ULCB board has the following map:
    Bank0: 1GiB RAM : 0x000048000000 -> 0x0007fffffff
    Bank1: 1GiB RAM : 0x000500000000 -> 0x0053fffffff
    Bank2: 1GiB RAM : 0x000600000000 -> 0x0063fffffff
    Bank3: 1GiB RAM : 0x000700000000 -> 0x0073fffffff

  - Before changes, the old map looked like this:
    Bank0: 1GiB RAM : 0x000048000000 -> 0x0007fffffff

Signed-off-by: Vladimir Barinov <vladimir.barinov+renesas@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-03-06 09:54:26 +01:00
Keita Kobayashi 006ced572a arm64: dts: r8a7795: salvator-x: Enable I2C for DVFS device
This patch enables I2C for DVFS device for for Salvator-X board on
R8A7795 SoC.

Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-06 09:54:26 +01:00
Keita Kobayashi d7e0d64a46 arm64: dts: r8a7795: Add I2C for DVFS core to dtsi
This patch adds I2C for DVFS device support for R8A7795 SoC.

Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Signed-off-by: Dien Pham <dien.pham.ry@rvc.renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-06 09:54:26 +01:00
Dien Pham d8e62f0729 arm64: dts: r8a7796: salvator-x: Add I2C for DVFS device support
This patch adds support of I2C for DVFS device for Salvator-X board on
R8A7796 SoC.

Signed-off-by: Dien Pham <dien.pham.ry@rvc.renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-06 09:54:26 +01:00