Commit graph

40996 commits

Author SHA1 Message Date
Hauke Mehrtens 9faa5960ee ARM: BCM5301X: add NAND flash chip description
This adds the NAND flash chip description for a standard chip found
connected to this SoC. This makes use of generic Broadcom NAND driver
with the iProc interface.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2015-06-06 16:05:50 -07:00
Mike Looijmans 55af8a9164 ARM: 8387/1: arm/mm/dma-mapping.c: Add arm_coherent_dma_mmap
When dma-coherent transfers are enabled, the mmap call must
not change the pg_prot flags in the vma struct.

Split the arm_dma_mmap into a common and specific parts,
and add a "arm_coherent_dma_mmap" implementation that does
not alter the page protection flags.

Tested on a topic-miami board (Zynq) using the ACP port
to transfer data between FPGA and CPU using the Dyplo
framework. Without this patch, byte-wise access to mmapped
coherent DMA memory was about 20x slower because of the
memory being marked as non-cacheable, and transfer speeds
would not exceed 240MB/s.

After this patch, the mapped memory is cacheable and the
transfer speed is again 600MB/s (limited by the FPGA) when
the data is in the L2 cache, while data integrity is being
maintained.

The patch has no effect on non-coherent DMA.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-06 10:44:04 +01:00
Michael van der Westhuizen 0bbe6b5a73 ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone
Fixes the TCM initialisation code to handle TCM banks that are
present but inaccessible due to TrustZone configuration.  This is
the default case when enabling the non-secure world.  It may also
be the case that that the user decided to use TCM for TrustZone.

This change has exposed a bug in handling of TCM where no TCM bank
was usable (the 0 size TCM case).  This change addresses the
resulting hang.

This code only handles the ARMv6 TCMTR register format, and will not
work correctly on boards that use the ARMv7 (or any other) format.
This is handled by performing an early exit from the initialisation
function when the TCMTR reports any format other than v6.

Signed-off-by: Michael van der Westhuizen <michael@smart-africa.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-06 10:37:28 +01:00
Nathan Lynch d2b30cd4b7 ARM: 8384/1: VDSO: force use of BFD linker
When using a toolchain with gold as the default linker, the VDSO build
fails:

  VDSO    arch/arm/vdso/vdso.so.raw
  HOSTCC  arch/arm/vdso/vdsomunge
  MUNGE   arch/arm/vdso/vdso.so.dbg
  OBJCOPY arch/arm/vdso/vdso.so
BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try
linking with -N

For whatever reason, ld.gold is omitting an exidx program header that
ld.bfd emits, and even when I work around that, I don't get a working
VDSO.

For now, instead of supporting gold (which will fail to link the
kernel anyway since it does not implement --pic-veneer), direct the
compiler to use the traditional bfd linker.  This is accomplished by
using -fuse-ld, which is implemented in GCC 4.8 and later.

Note: one limitation of this is that if the toolchain is configured
to use gold by default, and the bfd linker is not in $PATH, the VDSO
build will fail:

  VDSO    arch/arm/vdso/vdso.so.raw
collect2: fatal error: cannot find 'ld'

This will happen if CROSS_COMPILE begins with a path such as
/opt/bin/arm-linux-gnu- but /opt/bin is not in $PATH.  This is
considered an acceptable corner-case limitation and is easily worked
around.

Additonal note: we use cc-option instead of cc-ldoption so that
-fuse-ld=bfd is placed in the command line if the compiler recognizes
the option.  Using cc-ldoption results in an attempt to link, which
fails in the situation just described, causing -fuse-ld=bfd to be
omitted and gold to be used for the VDSO link, which is what we're
trying to prevent.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-06 10:37:12 +01:00
Nathan Lynch d33ce23b21 ARM: 8385/1: VDSO: group link options
Currently the VDSO's link options are kind of a mess spread between

ccflags-y and cmd_vdsold.  Collect linker directives into one
variable, VDSO_LDFLAGS, and use that in cmd_vdsold.

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-06 10:37:11 +01:00
Russell King bcc8fa8313 Merge branch 'for-rmk/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
There's quite a lot here, most of it from Mark Rutland, who has been
working on big.LITTLE PMU support for a while now. His work also brings
us significantly closer to moving the bulk of the CPU PMU driver out
into drivers/, where it can be shared with arm64.

As part of this work, there is a small patch to perf/core, which has
been Acked-by PeterZ and doesn't conflict with tip/perf/core at present.
I've kept that patch on a separate branch, merged in here, so that the
tip guys can pull it too if any unexpected issues crop up.

Please note that there is a conflict with mainline, since we remove
perf_event_cpu.c. The correct resolution is also to remove the file,
since the changes there are already reflected in the rework (and this
resolution is already included in linux-next).
2015-06-06 01:20:54 +01:00
Marek Szyprowski 2be2a3ff42 ARM: EXYNOS: register power domain driver from core_initcall
SYSMMU devices are registered very early in arch_initcall, so ensure
that they can get access to power domains by registering power domain
driver from earlier initcall. This change requires dropping usage of
the platform device associated with each power domain and replacing
clock calls with respective of_clk_* equivalents.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:18:03 +09:00
Marek Szyprowski c4241a582d ARM: EXYNOS: use PS_HOLD based poweroff for all supported SoCs
PS_HOLD based power off procedure is common for all Exynos SoCs,
so use it for every Exynos SoCs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:18:02 +09:00
Krzysztof Kozlowski e6350c575e ARM: SAMSUNG: Constify platform_device_id
The platform_device_id is not modified by the driver and core
uses it as const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:18:02 +09:00
Krzysztof Kozlowski fc4a2cc7c3 ARM: EXYNOS: Constify irq_domain_ops
The irq_domain_ops are not modified by the driver and the irqdomain
core code accepts pointer to a const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:57 +09:00
Bartlomiej Zolnierkiewicz af9971144d ARM: EXYNOS: add coupled cpuidle support for Exynos3250
The following patch adds coupled cpuidle support for Exynos3250 to
an existing cpuidle-exynos driver.  As a result it enables AFTR mode
to be used by default on Exynos3250 without the need to hot unplug
CPU1 first.

The detailed changelog:
- use exynos_[get,set]_boot_addr() in cpuidle-exynos.c and then make
  cpu_boot_reg_base() static
- use exynos_core_restart() in exynos_cpu0_enter_aftr()
- add missing smp_rmb() to exynos_cpu0_enter_aftr() (to make the code
  in-sync with the platform SMP code)
- add call_firmware_op(cpu_boot, 1) to exynos_cpu0_enter_aftr()
- use dsb_sev() instead of IPI wakeup for Exynos3250 in
  exynos_cpu0_enter_aftr()
- add CPU0 vs CPU1 synchronization based on S5P_PMU_SPARE2 register
  for Exynos3250 to cpuidle-exynos.c
- add flush_cache_all() for CPU1/0 before powerdown/AFTR for
  Exynos3250 to exynos_wfi_finisher()/exynos_do_idle()

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:57 +09:00
Bartlomiej Zolnierkiewicz 1225ad7286 ARM: EXYNOS: add exynos_get_boot_addr() helper
Add get_cpu_boot_addr() firmware operation and then
exynos_get_boot_addr() helper.

This is a preparation for adding coupled cpuidle support
for Exynos3250 SoC.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:56 +09:00
Bartlomiej Zolnierkiewicz 955d4cf82f ARM: EXYNOS: add exynos_set_boot_addr() helper
Add exynos_set_boot_addr() helper and covert existing code
(exynos_boot_secondary() and exynos_smp_prepare_cpus()) to
use it.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:56 +09:00
Bartlomiej Zolnierkiewicz 66dc54fd7d ARM: EXYNOS: make exynos_core_restart() less verbose
There is a kernel message about secondary CPU bootup when
exynos_core_restart() is called through CPU hotplug code-path (the
only exynos_core_restart() user currently) so there is no need for
an extra info on Exynos3250 SoC about software reset.  This also
prepares exynos_core_restart() to be re-used in coupled cpuidle
code-path in the future.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:56 +09:00
Bartlomiej Zolnierkiewicz 9f294c178e ARM: EXYNOS: fix exynos_boot_secondary() return value on timeout
exynos_boot_secondary() can erroneously return 0 or -ENOSYS even
when waiting on pen_release being set to -1 timeouts.  Fix it by
adjusting ret variable value to -ETIMEDOUT when necessary.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:56 +09:00
Krzysztof Kozlowski 29e5eea06b ARM: EXYNOS: Get current parent clock for power domain on/off
Using a fixed (by DTS) parent for clocks when turning on the power
domain may introduce issues in other drivers. For example when such
driver changes the parent during runtime and expects that he is the
only place of such change.

Do not rely on DTS providing the fixed parent for such clocks. Instead
before switching domain off, grab a current parent of a clock with
clk_get_parent().

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:56 +09:00
Sergiy Kibrik 0c5f989f1f ARM: SAMSUNG: fix clk_enable() WARNing in S3C24XX ADC
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework. Removes this warning on probe:

 ------------[ cut here ]------------
 WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:889 __clk_enable+0x28/0x9c()
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper Not tainted 3.19.0+ #46
 [<c0013a98>] (unwind_backtrace) from [<c0010d8c>] (show_stack+0x10/0x14)
 [<c0010d8c>] (show_stack) from [<c001b018>] (warn_slowpath_common+0x7c/0xa4)
 [<c001b018>] (warn_slowpath_common) from [<c001b0d0>] (warn_slowpath_null+0x18/0x20)
 [<c001b0d0>] (warn_slowpath_null) from [<c01a5f80>] (__clk_enable+0x28/0x9c)
 [<c01a5f80>] (__clk_enable) from [<c01a600c>] (clk_enable+0x18/0x2c)
 [<c01a600c>] (clk_enable) from [<c001860c>] (s3c_adc_probe+0x11c/0x18c)
 [<c001860c>] (s3c_adc_probe) from [<c0153a10>] (platform_drv_probe+0x30/0x78)
 [<c0153a10>] (platform_drv_probe) from [<c01523e0>] (driver_probe_device+0xb0/0x1fc)
 [<c01523e0>] (driver_probe_device) from [<c01525dc>] (__driver_attach+0x68/0x88)
 [<c01525dc>] (__driver_attach) from [<c0150df0>] (bus_for_each_dev+0x70/0x94)
 [<c0150df0>] (bus_for_each_dev) from [<c0151c80>] (bus_add_driver+0xdc/0x1c4)
 [<c0151c80>] (bus_add_driver) from [<c0152ba4>] (driver_register+0x9c/0xe0)
 [<c0152ba4>] (driver_register) from [<c03041cc>] (adc_init+0x10/0x34)
 [<c03041cc>] (adc_init) from [<c00087fc>] (do_one_initcall+0x110/0x1cc)
 [<c00087fc>] (do_one_initcall) from [<c02ffccc>] (kernel_init_freeable+0xf4/0x1ac)
 [<c02ffccc>] (kernel_init_freeable) from [<c022f4fc>] (kernel_init+0x8/0xe0)
 [<c022f4fc>] (kernel_init) from [<c000e098>] (ret_from_fork+0x14/0x3c)
 ---[ end trace f4a1ea39a114fecf ]---

Signed-off-by: Sergiy Kibrik <sakib@meta.ua>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:55 +09:00
Krzysztof Kozlowski fe4034a3fa ARM: EXYNOS: Add missing of_node_put() when parsing power domains
Add missing of_node_put() to:
1. Error return path if allocating memory for exynos_pm_domain failed.
2. Second iteration over power domains if a child domain was not
   present or was incomplete.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Karol Wrona <k.wrona@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:55 +09:00
Krzysztof Kozlowski c88cad34d4 ARM: EXYNOS: Handle of_find_device_by_node() and kstrdup() failures
Prevent possible NULL pointer dereference of pointer returned by
of_find_device_by_node(). Handle this by skipping such power domain.

Additionally fail the init on kstrdup() failure. Such case is actually
not fatal because the name for power domain allocated by kstrdup() is
used only in printk. Still as a precaution handle this as an error
condition.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:55 +09:00
Krzysztof Kozlowski ef2156cf4b ARM: EXYNOS: Handle of of_iomap() failure
Prevent possible NULL pointer dereference if of_iomap() fails.
Handle the error by skipping such power domain.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-06 02:17:55 +09:00
Tomi Valkeinen 8dc0a56529 Merge branch 'ti-dra7-dss' into 4.2/fbdev
Merge arch/ changes for TI's DRA7 SoC Display Subsystem.
2015-06-05 16:55:52 +03:00
Catalin Marinas addc8120a7 Merge branch 'arm64/psci-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux
* 'arm64/psci-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux:
  arm64: psci: remove ACPI coupling
  arm64: psci: kill psci_power_state
  arm64: psci: account for Trusted OS instances
  arm64: psci: support unsigned return values
  arm64: psci: remove unnecessary id indirection
  arm64: smp: consistently use error codes
  arm64: smp_plat: add get_logical_index
  arm/arm64: kvm: add missing PSCI include

Conflicts:
	arch/arm64/kernel/smp.c
2015-06-05 11:21:23 +01:00
Ludovic Desroches ea25525ce0 ARM: at91/dt: sama5d4ek: mci0 uses slot 0
Mci0 uses slot 0 not 1.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: 7a4752677c ("ARM: at91: dt: add device tree file for SAMA5D4ek board")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 11:49:12 +02:00
Gaël PORTAY 87835a4baf ARM: at91/dt: kizbox: fix mismatch LED PWM device
The network_red LED uses the 4th PWM device.

Signed-off-by: Gaël PORTAY <g.portay@overkiz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 11:49:11 +02:00
Alexandre Belloni a02d46dd60 ARM: at91/dt: Add Acme Arietta G25
Add a minimum Device Tree for Acme Arietta G25.
http://acme.systems/arietta

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Sergio Tanzilli <tanzilli@acmesystems.it>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 11:48:43 +02:00
Alexandre Belloni e1e6c32248 ARM: at91/dt: sama5d4 xplained: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni 9e73126e08 ARM: at91/dt: sama5d4ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni a08545db54 ARM: at91/dt: sama5d3 xplained: use stdout-path
Use stdout-path to specify the console and remove the bootargs.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni 980853a856 ARM: at91/dt: sama5d3xek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni 5bb27f091e ARM: at91/dt: at91sam9x5ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni 956275739e ARM: at91/dt: at91sam9rlek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:39 +02:00
Alexandre Belloni 7cb5852d9c ARM: at91/dt: at91sam9n12ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni aa070464ba ARM: at91/dt: at91sam9m10g45ek use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni 55f1ec7143 ARM: at91/dt: at91sam9g20ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni 11cfbde407 ARM: at91/dt: at91sam9263ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni a5a51ddc3d ARM: at91/dt: at91sam9261ek: use stdout-path
Use stdout-path to specify the console and remove the console argument from
the kernel command line.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni 927ccfe329 ARM: at91/dt: at91rm9200ek: use stdout-path
Use stdout-path to specify the console.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni 7e5883b5b4 ARM: at91/dt: kizbox: use stdout-path
The kizbox dts are using the deprecated linux,stdout-path. Replace those by
stdout-path.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Gaël PORTAY <g.portay@overkiz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:38 +02:00
Alexandre Belloni ee3b67ccd2 ARM: at91/dt: at91sam9rlek: add RTC
Add RTC support to the at91sam9rlek.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:37 +02:00
Alexandre Belloni e24bf9c6ca ARM: at91/dt: at91sam9rl: fix rtc node
The RTC lives at 0xfffffe00. Also reorder the node properly.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-06-04 10:00:37 +02:00
Tomi Valkeinen 0c53493866 arm/dts: am57xx-beagle-x15.dts: add HDMI
AM57xx Beagle X15 has a HDMI output. This patch adds the device tree
nodes required for HDMI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
2015-06-04 09:02:15 +03:00
Tomi Valkeinen fadf0d0bba arm/dts: dra72-evm.dts: add HDMI
DRA72 EVM has a HDMI output. This patch adds the device tree nodes
required for HDMI.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
2015-06-04 09:02:14 +03:00
Tomi Valkeinen 95c1cd1392 arm/dts: dra7.dtsi: add DSS support
DRA7xxx contains a very similar DSS to OMAP5. The main differences are:

* no DSI or RFBI support.
* 1 or 2 dedicated video PLLs.
* need to do additional configuration to the DRA7 CONTROL module.

DRA72xx has only one video PLL, and DRA74xx has two.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Acked-by: Tony Lindgren <tony@atomide.com>
2015-06-04 09:02:14 +03:00
Tomi Valkeinen 403ee909e4 ARM: OMAP2+: display: detect DRA7 DSS
Add platform code to detect DRA7 DSS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2015-06-04 09:02:14 +03:00
Tomi Valkeinen 5b5992ac64 ARM: OMAP: display: change compat names to array
Simplify the DSS detection logic by creating a list of the omapdss
compat strings, instead of checking each separately with an 'if'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2015-06-04 09:02:09 +03:00
Tomi Valkeinen a3818c6d57 ARM: DRA7: hwmod: set DSS submodule parent hwmods
Set DSS core hwmod as the parent for all the DSS submodules. This
ensures that the parent hwmods are enabled before any DSS submodules are
accessed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
2015-06-04 09:01:23 +03:00
Tomi Valkeinen 42121688f9 ARM: DRA7: hwmod: add DMM hwmod description
Add DMM hwmod entries for DRA7. This is identical to DMM on OMAP5.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
2015-06-04 09:01:23 +03:00
Tomi Valkeinen b21a9c3ee8 arm/dts: dra7xx: add 'ti,set-rate-parent' for dss_dss_clk
We need set-rate-parent flags for the display's clock path so that the
DSS driver can change the clock rate of the PLL.

This patchs adds the ti,set-rate-parent flag to 'dss_dss_clk' clock
node, which is only a gate clock, allowing the setting of the clock rate
to propagate to the PLL.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Acked-by: Tero Kristo <t-kristo@ti.com>
2015-06-04 09:01:23 +03:00
Marek Szyprowski b700451678 ARM: dts: add sysmmu nodes for exynos5420
This patch adds System MMU nodes to all defined devices that are
specific to Exynos5420/5800/5422 series.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-04 08:09:42 +09:00
Marek Szyprowski 6cbfdd73a9 ARM: dts: add sysmmu nodes for exynos5250
This patch adds System MMU nodes to all defined devices that are
specific to Exynos5250 series.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-04 08:09:41 +09:00
Marek Szyprowski ecc3f340b6 ARM: dts: add sysmmu nodes for exynos4415
This patch adds System MMU nodes to all defined devices that are
specific to Exynos4415 series.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-04 08:09:41 +09:00
Marek Szyprowski f5976ce532 ARM: dts: add sysmmu nodes for exynos3250
This patch adds System MMU nodes to the devices that are specific to
Exynos3250 series.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-04 08:09:41 +09:00
Marek Szyprowski 71d3a9fbb2 ARM: dts: add sysmmu nodes for exynos4
This patch adds System MMU nodes that are specific to Exynos4210/4x12
series.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-04 08:09:41 +09:00
Tomi Valkeinen 2d5a3c803d arm: dra7: add DESHDCP clock
Add a new Linux clock for DRA7 based SoCs to control DESHDCP clock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
2015-06-03 14:23:25 +03:00
Shawn Guo 4e415ed814 ARM: dts: imx6dl: add imx6dl gpt specific compatible string
The i.MX6DL/S GPT has a different programming model from i.MX6Q one.
Add the compatible string "fsl,imx6dl-gpt" for it, and leave
"fsl,imx6q-gpt" there to keep the existing/old kernel happy.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 17:04:53 +08:00
Ingo Molnar 71966f3a0b Merge branch 'locking/core' into x86/core, to prepare for dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-06-03 10:07:35 +02:00
Heiko Schocher d94a3d3eac ARM: dts: imx6: add DT for aristainetos2 board
This patch adds support for the imx6dl based aristainetos2 board
with following configuration:

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
MReset cause: POR
MBoard: aristaitenos2
DRAM:  1 GiB
NAND:  1024 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Display: lb07wv8 (800x480)

As this board can be used with 2 different display types, the
differences between them are extracted into 2 DTS files, and
the common settings are collected in a common file.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2015-06-03 15:04:34 +08:00
Fabio Estevam f4b5939de0 ARM: dts: cubox-i/hummingboard: Fix the license text
Arrange the license text a bit to make it clear.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:33 +08:00
Eric Nelson 4dc633e9b0 ARM: dts: sabrelite: use simple-panel instead of display-timings for LVDS0
Also add label for backlight_lvds and connect it to the LVDS display.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:33 +08:00
Eric Nelson 5d5c865128 ARM: dts: nitrogen6x: use simple-panel instead of display-timings for LVDS0
Also add label for backlight_lvds and connect it to the display.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:32 +08:00
Frank Li 5db106bc73 ARM: dts: add imx7d-sdb support
add imx7d sdb board support

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:32 +08:00
Frank Li 9496734502 ARM: dts: add imx7d soc dtsi file
imx7d intergrates the unique display controller for EPD panel, pixel engines
and graphics engines to make it a ideal solution for EPD based devices such
as eReader, Signage, as well as any application rely on the bistable charactersic
of the EPD panel.

imx7d include two ARM Cortex A7 Core and one Cortex-M4 core.
Included Main Peripheral
 - DDR3\LP-DDR2
 - GPMI\BCH\APBH DMA(NAND flash support)
 - QSPI
 - WEIM Nor
 - LCDIF\MIPI DSI
 - CSI\MIPI CSI
 - EPDC
 - PCIe RC\EP
 - USB OTG\Host
 - CAN x2
 - I2C x4
 - SIMv2 x2
 - ENET -x2
 - uSDHC x3
 - eCSPI x1
 - PWM x4
 - OCOTP (fuse)
 - GPT x4
 - WDOG x4
 - Flex Timer x2

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:32 +08:00
Sébastien Szymanski 673254d5b3 ARM: dts: Armadeus Systems APF6 family support (i.MX6)
Add support to the Armadeus Systems APF6 Solo / Dual / Quad SoM and
the Armadeus Systems APF6Dev carrier board.

For more details see:
http://www.armadeus.com/english/products-processor_boards-apf6.html
http://www.armadeus.com/english/products-development_boards-apf6_dev.html

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:00 +08:00
Cory Tusar aa5fec2db1 ARM: dts: vf610: Nomenclature fixup for PTC12 pin used in RMII mode.
This commit includes a minor nomenclature fixup for boards based on the
Freescale VF610 SoC and which make use of the alternate "RMII1_RXD1"
functionality for pin PTC12.  This brings the macro name in-line with
both the datasheet and other similar macros.

Signed-off-by: Cory Tusar <cory.tusar@pid1solutions.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:00 +08:00
Fabio Estevam dca97cee92 ARM: dts: cubox-i: add support for Broadcom Wifi/Bluetooth devices
Add DT support for the Broadcom Wifi/Bluetooth devices found on the
microsom board.

[Modified original Russell King's patch to use mmc-pwrseq]

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Jon Nettleton <jon@solid-run.com>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:04:00 +08:00
Philipp Zabel 29eea64c1b ARM: dts: imx6qdl: Add power-domain phandle to CODA device node
The CODA960 VPU is part of the PU power domain. Add power-domains
phandle so it can be associated with the PU generic pm domain for
power gating.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:59 +08:00
Tim Harvey e9d6d6b62f ARM: dts: Gateworks GW5510 support (i.MX6)
Add support for the Gateworks GW5510 board featuring:
 * i.MX6 SoC
 * up to 512MB DDR3
 * up to 2GB NAND flash
 * 1x miniPCIe socket (with USB)
 * HDMI out (micro-HDMI)
 * HDMI in (micro-HDMI) (currently supported by only vendor kernel)
 * TTL level I/O (supported by GW16111 breakout board):
  * I2C
  * 2x UART
  * CAN
  * 2x DIO (GPIO/PWM)
  * USB OTG

For more details see:
 http://www.gateworks.com/product/item/ventana-gw5510-single-board-computer

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:59 +08:00
Fabio Estevam 0c1e18963d ARM: dts: imx6sl-warp: Fix OTG roles
USBOTG1 always work on peripheral mode and USBOTG in host mode, so fix
their roles accordingly.

Tested by mounting the MMC card as a storage device:

modprobe g_mass_storage file=/dev/mmcblk0p2

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:58 +08:00
Fabio Estevam d000d5e129 ARM: dts: imx6sl-warp: Remove USB regulators
According to the warp schematics there are no regulators for the USB OTG
ports, so let's remove them.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:58 +08:00
Fabio Estevam e6c8b3d49c ARM: dts: imx6sl-warp: Remove unused regulator
The 'reg_1p8v' regulator is not used anywhere, so let's remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:58 +08:00
Frank Li e370bff74e ARM: dts: add pinfunc include file to support imx7d
Addi i.MX7D support:
	pinfunc part except GPIO1

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:57 +08:00
Thomas Niederprüm 0177ec7ea6 ARM: mxs: fix in tree users of ssd1306
This patch updates the in tree-users of the SSD1306 controller for using
the newly introduced DT properties.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:57 +08:00
Fabio Estevam b49b9ee086 ARM: dts: imx6qdl-hummingboard: Add PCIe support
Add PCIe support. Based on a patch from Rabeeh Khoury from the solid-run
tree.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:57 +08:00
Harald Geyer 27a14c9218 ARM: dts: imx23-olinuxino: Add i2c support
The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
This patch enables i2c and selects the pin group used on UEXT connector.
Tested with MOD-LCD1x9 from Olimex.

This patch is based on work by Fadil Berisha with his permission. However
all bugs are mine.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:56 +08:00
Harald Geyer 71a34d829c ARM: dts: imx23: Add i2c support
The imx23-olinuxino board has an i2c interface exposed on UEXT connector.
This patch provides the generic devicetree infrastructure for a follow-up
patch to add support to the actual board files.
Tested all three possible pin groups with MOD-LCD1x9 from Olimex.

This patch is based on work by Fadil Berisha with his permission. However
all bugs are mine.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:56 +08:00
Fabio Estevam 5ce667989a ARM: dts: hummingboard: Remove unneeded 'fsl,mode' property
imx6qdl-hummingboard boards use sgtl5000 codec and the machine file
(imx-sgtl5000) already sets SSI in slave mode and codec in master mode, so there
is no need for having the 'fsl,mode' property.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:56 +08:00
Lucas Stach ac4af82b99 ARM: dts: imx6qdl: move HDMI controller to right location in DT
Currently the HDMI controller is a child device of the AIPS bus in the
DT which is clearly wrong. Move it to the right location.
This introduces no functional change it just aligns the DT representation
with reality.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 15:03:55 +08:00
Arnd Bergmann 0be5da9dc2 ARM: imx: imx7d requires anatop
Like i.MX6, the i.MX7 code calls into the anatop driver, which fails
if that is disabled:

arch/arm/mach-imx/built-in.o: In function `imx7d_init_machine':
arch/arm/mach-imx/mach-imx7d.c:24: undefined reference to `imx_anatop_init'
arch/arm/mach-imx/built-in.o: In function `imx7d_init_irq':
arch/arm/mach-imx/mach-imx7d.c:29: undefined reference to `imx_init_revision_from_anatop'

This patch ensures that for an imx7-only build, we still get anatop
built-in, matching what we do for imx6. We also need to select
HAVE_IMX_MMDC, as that is needed by the anatop code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:31 +08:00
Shawn Guo bea5af41dd ARM: imx: move timer driver into drivers/clocksource
After the cleanup on imx timer driver, now it's ready to be moved into
drivers/clocksource/.  Let's do it.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-06-03 14:52:30 +08:00
Shawn Guo 2321f246e5 ARM: imx: remove platform headers from timer driver
With the cleanup done before, the platform specific headers now can be
removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:29 +08:00
Shawn Guo db2ae4b4f6 ARM: imx: provide gpt device specific irq functions
It splits irq enable/disable/acknowledge operations into device specific
functions as the hooks in imx_gpt_data, so that we can save the use of
timer_is_xxx() and cpu_is_xxx() checking in these irq functions.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:29 +08:00
Shawn Guo 8995552085 ARM: imx: get rid of variable timer_base
We now have pointer to imx_timer structure available where timer base
address is needed, so we can just kill global timer_base by using
imxtm->base instead.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:28 +08:00
Shawn Guo 24f74ad1c7 ARM: imx: define gpt register offset per device type
It defines offset of gpt registers TSTAT, TCN and TCMP per device
type in imx_gpt_data, so that these registers can be accessed in an
way without timer_is_v2() checking.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:28 +08:00
Shawn Guo e510d2015d ARM: imx: move clock event variables into imx_timer
Since we now have imx_timer structure, it makes more sense to move those
clock event related variables into the structure, so that we can save
some global variables.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:27 +08:00
Shawn Guo 5ab0475b70 ARM: imx: set up .set_next_event hook via imx_gpt_data
Set up .set_next_event hook via imx_gpt_data, so that we can save the
use of timer_is_v2().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:27 +08:00
Shawn Guo 9c8694bd6c ARM: imx: setup tctl register in device specific function
It creates a gpt device speicific data structure and adds function hook
gpt_setup_tctl in there to set up gpt TCTL register.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:26 +08:00
Shawn Guo bef11c881b ARM: imx: initialize gpt device type for DT boot
Use different initialization function in CLOCKSOURCE_OF_DECLARE() to
initialize gpt device type for DT boot.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:26 +08:00
Shawn Guo 0931aff722 ARM: imx: define an enum for gpt timer device type
Define an enum for gpt timer device type in include/soc/imx/timer.h to
tell the gpt block differences among SoCs.  Update non-DT users (clock
drivers) to pass the device type.

As we now have include/soc/imx/timer.h, the declaration of
mxc_timer_init() is moved into there as the best fit.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:26 +08:00
Shawn Guo 6dd747825b ARM: imx: move timer resources into a structure
Instead of passing around as individual argument, let's move timer
resources like irq and clocks together with base address into a data
structure, and pass pointer of the structure as argument to simplify
the function call interface.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:25 +08:00
Shawn Guo c7770bbae2 ARM: imx: use relaxed IO accessor in timer driver
Replace the __raw_readl/__raw_writel with readl_relaxed/writel_relaxed
which is endian-safe, as a step of moving the driver code into folder
drivers/clocksource.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:52:25 +08:00
Arnd Bergmann e20d7b5208 ARM: imx: make imx51/3 suspend optional
A recent change to the imx53 power management caused a build
regression when CONFIG_SOC_IMX53 is disabled:

mach-imx/built-in.o:(.init.rodata+0x60): undefined reference to `imx53_suspend'
mach-imx/built-in.o:(.init.rodata+0x64): undefined reference to `imx53_suspend_sz'

This avoids the problem by compiling the code in question
conditionally on the presence of CONFIG_SOC_IMX53. For
consistency, I'm also changing the same thing for
CONFIG_SOC_IMX51.

An additional benefit of this approach is reduced code size
for kernels that only include support for one of the two
SoCs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1579c7b9fe ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:51:44 +08:00
Joe Perches f6d4750298 ARM: mach-imx: iomux-imx31: Use DECLARE_BITMAP
Use the generic mechanism to declare a bitmap instead of unsigned long.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:38 +08:00
Martin Fuzzey 1579c7b9fe ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.
In order to save power the DDR pins should be put into high
impedance when in suspend to RAM.

This requires manually requesting self refresh (rather than using the
automatic mode implemented by the CCM / ESDCTL), followed by
reconfiguring the IOMUXC.

Of course the code to do this cannot itself run from DDR so the
code is copied to and executed from internal memory.

In my tests using a custom i.MX53 board with LPDDR2 RAM
this reduced the suspend power consumption from 200mW to 60mW.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:36 +08:00
Anson Huang 5739b919cf ARM: imx: add msl support for imx7d
Add i.MX7D MSL support.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:35 +08:00
Anson Huang 52d7aec2b8 ARM: imx7d: add low level debug uart support
Add low level uart debug support for imx7d

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Bai Ping <b51503@freescale.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:35 +08:00
Fabio Estevam 666c884418 ARM: imx: mmdc: Include "common.h" header file
Include the "common.h" header file to fix the following sparse warning:

arch/arm/mach-imx/mmdc.c:66:5: warning: symbol 'imx_mmdc_get_ddr_type' was not declared. Should it be static?

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:34 +08:00
Shenwei Wang 65d0a16dce ARM: imx: Correct the comments in time.c
The comments were corrected as the following to reflect
the real situation of Freescale MXC timer IP block.
There are totally 4 version of the timer on Freescale i.MX SoCs.

Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:33 +08:00
Shenwei Wang d0185d96c6 ARM: imx: Remove the duplicated function declaration
Removed the duplicated function declaration of mxc_timer_init
which was already declared in drivers/clk/imx/clk.h.

Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:33 +08:00
Krzysztof Kozlowski 9b589a83cf ARM: imx: Constify irq_domain_ops
The irq_domain_ops are not modified by the driver and the irqdomain core
code accepts pointer to a const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:33 +08:00
Shawn Guo 35e2916f70 ARM: imx6: initialize CCM_CLPCR_LPM into RUN mode earlier
Commit 4631960d26da ("ARM: imx6: set initial power mode in pm function")
moves imx6_set_lpm() from clock init function into
imx6_pm_common_init().  This causes a hang when cpuidle support is
enabled.  The reason for that is ARM core clock is shut down
unexpectedly by WAIT mode.  It happens with the following call stack:

    cpuidle_register_governor()
        cpuidle_switch_governor()
            cpuidle_uninstall_idle_handler()
                synchronize_sched()
                    wait_rcu_gp()
                        wait_for_completion()

When wait_for_completion() is called as above, all cores are idle/WFI.
Hence, the reset value of CCM_CLPCR_LPM - WAIT mode, will trigger a
hardware shutdown of the ARM core clock.

To fix the regression, we need to ensure that CCM_CLPCR_LPM is
initialized into RUN mode earlier than cpuidle governor registration,
which is a postcore_initcall.  This patch creates function
imx6_pm_ccm_init() to map CCM block and initialize CCM_CLPCR_LPM into
RUN mode, and have the function called from machine .init_irq hook,
which should be early enough.

Reported-by: Kevin Hilman <khilman@kernel.org>
Fixes: 8fb76a07e2 ("ARM: imx6: set initial power mode in pm function")
Tested-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:49:18 +08:00
Shawn Guo 11f6812009 ARM: imx: move clock drivers into drivers/clk
After the cleanup on clock drivers, they are now ready to be moved into
drivers/clk.  Let's move them into drivers/clk/imx folder.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2015-06-03 14:44:33 +08:00
Shawn Guo 0c831317e7 ARM: imx: remove inclusions of platform headers
With the cleanup done before, we now can simply define base address and
irq as needed in clock driver, to get those platform header inclusions
removed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:32 +08:00
Shawn Guo 3bec5f8184 ARM: imx: add clk-pllv1 type support
Instead of calling cpu_is_xxx() in clk-pllv1 driver, let's add clk-pllv1
type support to handle the difference/quirk in particular SoC designs.
Doing so will help get clk-pllv1 driver ready for being moved out of
arch/arm/mach-imx folder.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:32 +08:00
Shawn Guo 961dfd37fa ARM: imx6: do not use cpu_is_xxx() in clock driver
As we're about to move clock drivers out of arch/arm/mach-imx,
cpu_is_xxx() shouldn't be used any more.  Let's avoid the call by
looking at the device tree machine compatible string to determine
which SoC the clock driver is running on.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:31 +08:00
Shawn Guo f0b478b5d4 ARM: imx6: let pm code map CCM block on its own
We are about to move imx6 clock driver into drivers/clk, so let's get
imx6 pm code map CCM block on its own rather than relying on clock
driver to do the mapping.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:31 +08:00
Shawn Guo 8fb76a07e2 ARM: imx6: set initial power mode in pm function
Rather than setting initial low-power mode in every single i.MX6 clock
initialization function, we should really do that in pm code.  Let's
move imx6q_set_lpm(WAIT_CLOCKED) call into imx6_pm_common_init().

While at it, let's rename the function to imx6_set_lpm() since it's
actually common for all i.MX6 SoCs.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:31 +08:00
Shawn Guo f3a9249d09 ARM: imx5: let pm code map CCM block on its own
We are about to move imx5 clock driver into drivers/clk, so let's get
imx5 pm code map CCM block on its own rather than relying on clock
driver to do the mapping.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:30 +08:00
Shawn Guo 9bbef18750 ARM: imx: move revision definitions and declarations into a header
The revision definitions and declarations are widely used by clock
drivers.  As a step of moving clock drivers out of arch/arm/mach-imx,
let's create header include/soc/imx/revision.h to accommodate them.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:30 +08:00
Shawn Guo 5ab96a8df0 ARM: imx: use dynamic mapping for CCM
Replace the static mapping of CCM block in clock drivers with dynamic
mapping.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:30 +08:00
Shawn Guo 6c529c499f ARM: imx: use dynamic mapping for timer
Pass physical address of timer block to mxc_timer_init() call, which in
turn does dynamic mapping within the function.  Thus, we can avoid using
static mapping in clock drivers.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-06-03 14:44:29 +08:00
Krzysztof Kozlowski 3a7c01d75f ARM: dts: Add Odroid XU3 Lite support
The Odroid XU3 Lite is almost the same as XU3, except:
1. Lower CPU frequencies (1.8 GHz for A15 and 1.3 GHz for A7, instead of
   2.0 GHz and 1.4 GHz).
2. No DisplayPort.
3. No TI INA231 energy measurement sensors.

This patch moves common nodes (which is almost everything) to a common
DTSI file and adds a new XU3 Lite DTS.

Currently in comparison to XU3, only the INA231 sensors are disabled to
remove the warning:
ina2xx 0-0040: error configuring the device: -6

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:57 +09:00
Krzysztof Kozlowski aac4e06153 ARM: dts: odroidxu3: Enable wake alarm of S2MPS11 RTC
The IRQB of S2MPS11 PMIC is wired to XEINT4 (GPX0-4) through pull-up
resistor.

Add interrupt properties and pinctrl configuration to enable RTC wake
alarm of rtc-s5m driver. This also removes a warning:
sec_pmic 4-0066: No interrupt specified, no interrupts

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:55 +09:00
Andrzej Pietrasiewicz 15b7f0871b ARM: dts: exynos5420: add nodes for jpeg codec
Add nodes for jpeg codec in Exynos5420 SoC.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
[k.kozlowski: fixed up minor differences for applying]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:55 +09:00
Krzysztof Kozlowski 5dd6d26fe9 ARM: dts: s3c2416: Use labels for overriding nodes in SMDK2416
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:54 +09:00
Krzysztof Kozlowski 3ae9d92f7b ARM: dts: s3c2416: Add labels to S3C2416 nodes
Add new labels to certain nodes on S3C2416 so they could be easily
referenced by board DTS files.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:53 +09:00
Krzysztof Kozlowski 8021dda529 ARM: dts: Use labels for overriding nodes in exynos5422-odroidxu3
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:52 +09:00
Krzysztof Kozlowski 01997e3eb6 ARM: dts: Use labels for overriding nodes in exynos5440 boards
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:52 +09:00
Krzysztof Kozlowski e7d7ef3030 ARM: dts: Use labels for overriding nodes in exynos5420-smdk5420
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:51 +09:00
Krzysztof Kozlowski 3a3cf6c4bb ARM: dts: Use labels for overriding nodes in exynos542x
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes. Additionally remove duplicated serial and uart labels
for serial.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:50 +09:00
Krzysztof Kozlowski 5e6b288942 ARM: dts: Use labels for overriding nodes in exynos5420-arndale-octa
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:49 +09:00
Krzysztof Kozlowski 34a2d5aaad ARM: dts: Remove duplicated I2C7 nodes in exynos5250-snow
The i2c_7 node (i2c@12CD0000) with LVDS bridge child node was put in
Exynos5250 Snow DTS file twice. Move the LVDS bridge to proper existing
i2c_7 node.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:49 +09:00
Krzysztof Kozlowski e9a2f4091f ARM: dts: Use labels for overriding nodes in exynos5250
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:48 +09:00
Krzysztof Kozlowski 7c23e7e167 ARM: dts: Add labels to exynos5 nodes
Add new labels to certain nodes so they could be easily referenced by
Exynos5 board DTS files.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:47 +09:00
Peter Chubb 719f39fec5 ARM: dts: exynos5422-odroidxu3: Hook up PWM and use it for LEDs
PWM output wasn't working because it wasn't hooked up to its pincontrol.
This patch:
   - hooks up PWM to its pincontrol, and documents what
     the outputs are on the XU3
   - switches the LEDs that are on PWM outputs to use PWM
     rather than GPIO.

The main effect is that the brightness of the LEDs can be controlled, and
user-mode fan control is enabled via /sys/class/pwm

Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:46 +09:00
Krzysztof Kozlowski 81ce48162a ARM: dts: Use labels for overriding nodes in exynos4412-tiny4412
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:46 +09:00
Krzysztof Kozlowski 1956dd3890 ARM: dts: Use labels for overriding nodes in exynos4412-origen
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:45 +09:00
Krzysztof Kozlowski 1fe9a9427f ARM: dts: Use labels for overriding nodes in exynos4412-trats2
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:44 +09:00
Krzysztof Kozlowski 3d06a5c1d7 ARM: dts: Use labels for overriding nodes in exynos4412-smdk4412
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:43 +09:00
Krzysztof Kozlowski 49c1a163b3 ARM: dts: Use labels for overriding nodes in exynos4412-odroid
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>

For thermal zones:
Acked-by: Eduardo Valentin <edubezval@gmail.com>

Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:42 +09:00
Krzysztof Kozlowski 08c4b441a6 ARM: dts: Use labels for overriding nodes in exynos4412
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:41 +09:00
Krzysztof Kozlowski 13a866d45f ARM: dts: Use labels for overriding nodes in exynos4x12
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:41 +09:00
Krzysztof Kozlowski b14cf1276c ARM: dts: Use labels for overriding nodes in exynos4212
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:40 +09:00
Krzysztof Kozlowski 9b70afd9ea ARM: dts: Use labels for overriding nodes in exynos4210-trats
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:35 +09:00
Krzysztof Kozlowski bad0b9c9ab ARM: dts: Use labels for overriding nodes in exynos4210-smdkv310
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:34 +09:00
Krzysztof Kozlowski 165d658e7d ARM: dts: Use labels for overriding nodes in exynos4210-origen
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:33 +09:00
Krzysztof Kozlowski 070bb0f063 ARM: dts: Use labels for overriding nodes in exynos4210
Usage of labels instead of full paths reduces possible mistakes when
overriding nodes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:31 +09:00
Krzysztof Kozlowski 9c41221e74 ARM: dts: Add labels to exynos4 nodes
Add new labels to certain nodes so they could be easily referenced by
Exynos4 board DTS files.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:56:21 +09:00
Kukjin Kim b9974fa208 Merge branch 'v4.2-next/dt-samsung-3rd' into v4.2-next/dt-samsung-4th 2015-06-03 09:56:00 +09:00
Krzysztof Kozlowski 5ec1d441a4 ARM: dts: Add syscon property to the MIPI DPHY for exynos4415
Since e4b3d38088 ("phy: exynos-video-mipi: Fix regression by adding
support for PMU regmap") the Exynos PMU driver provides regmap to access
the MIPI DPHY registers. The MIPI DPHY driver accesses this regmap
through syscon phandle.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:47:05 +09:00
Krzysztof Kozlowski 21f5278e11 ARM: dts: Remove obsolete MIPI DPHY 'reg' property for exynos4
Since e4b3d38088 ("phy: exynos-video-mipi: Fix regression by
adding support for PMU regmap") the Exynos PMU driver provides
regmap to access the MIPI DPHY registers. The MIPI DPHY node uses
a phandle to syscon to get this regmap. The 'reg' field is obsolete.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:47:00 +09:00
Krzysztof Kozlowski 8d9321fbe2 ARM: dts: Use last parent for clocks during power domain on/off
Replace fixed parent with last parent (obtained with clk_get_parent())
of clocks for devices in mfc and disp power domains. This should improve
behavior if such clocks were reparented by the drivers and new parents
are different than those specified in DTS.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:46:52 +09:00
Anand Moon f882d3cfe8 ARM: exynos_defconfig: Enable CONFIG_SENSORS_INA2XX for Odroid-XU3
Odroid-XU3 board support power monitor sensor.

Below is the output of boot log.
[    3.241438] ina2xx 0-0040: power monitor ina231 (Rshunt = 10000 uOhm)
[    3.248068] ina2xx 0-0041: power monitor ina231 (Rshunt = 10000 uOhm)
[    3.254724] ina2xx 0-0044: power monitor ina231 (Rshunt = 10000 uOhm)
[    3.261354] ina2xx 0-0045: power monitor ina231 (Rshunt = 10000 uOhm)

ina231-i2c-0-40
Adapter: s3c2410-i2c
in0:          +0.00 V
in1:          +1.01 V
power1:      175.00 mW
curr1:        +0.18 A

ina231-i2c-0-41
Adapter: s3c2410-i2c
in0:          +0.00 V
in1:          +1.21 V
power1:       50.00 mW
curr1:        +0.04 A

ina231-i2c-0-44
Adapter: s3c2410-i2c
in0:          +0.00 V
in1:          +1.02 V
power1:       50.00 mW
curr1:        +0.04 A

ina231-i2c-0-45
Adapter: s3c2410-i2c
in0:          +0.00 V
in1:          +1.04 V
power1:       75.00 mW
curr1:        +0.07 A

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:31:29 +09:00
Anand Moon 8c7b53801d ARM: exynos_defconfig: Enable CONFIG_SENSORS_PWM_FAN for Odroid-XU3
Enable CONFIG_SENSORS_PWM_FAN on exynos_defconfig to control fan
power on Odroid-XU3.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-06-03 09:25:52 +09:00
Hans de Goede 16b2a7d4cb ARM: dts: sun6i: Add a dts file for the Mele A1000G quad top set box
The Mele A1000G-quad and the Mele M9 have the same PCB, sofar we've been using
the same dts for both models. Unfortunately this does not work for the otg
controller, on the M9 this is routed to a micro-usb connector on the outside,
while as on the A1000G-quad it is connected to an usb to sata bridge
(which is not populated on the M9 pcb).

This commit adds a new dts for the Mele-A1000G-quad to allow using
different otg controller settings on the 2 boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-02 23:39:46 +02:00
Hans de Goede 19f5c703c5 ARM: dts: sun8i: Add dts file for the GA10H-A33 tablet
The ga10h is an 10" tablet with an A33 or A23 soc, 1G RAM, 8G or 16G nand,
sdio wifi, 2 micro usb ports, 1 otg and 1 host and 1 micro sd slot.

This commit adds a dts file for the v1.1 pcb with an a33 soc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-02 23:36:23 +02:00
Chen-Yu Tsai 4eb0f25fa6 ARM: dts: sun8i-a33: Add dts for Sinlinx SinA33 development board.
The SinA33 is a core/SDK development board by Sinlinx. The core board
does not have any connectors or pads, other than the pads used to connect
it to the SDK board.

The core board only has the A33 SoC, 2 RAM chips, an eMMC flash chip,
the AXP223 PMIC, and supporting discrete components. eMMC is optional.

The SDK board has a USB host, USB OTG, volume control and home buttons,
audio input/output jacks, a micro-SD slot, camera and SDIO expansion
headers, an LCD connector, and a GPIO expansion header, which has
UARTs, MIPI DSI and I2C available. Only UART0 is enabled though.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-02 23:18:09 +02:00
Chen-Yu Tsai 63c6509b0d ARM: dts: sun8i-a33: Add pinmux setting for uart0 on PB pins
The A33 adds an additional pinmux option for uart0 on the PB pins.
This was not present on the A23. Nor is it available on the H3,
which does not have the PB pingroup.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-02 23:14:42 +02:00
Chen-Yu Tsai 93b129d6fa ARM: dts: sun8i: Add pinmux setting for 8bit mmc2
mmc2 is mostly used with eMMC flash chips, as an alternative to
raw NAND flash chips. 8 bit mmc is commonly used.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-02 23:14:39 +02:00
Steffen Trumtrar e0e6f74801 ARM: socfpga: socrates: add gpio-leds
The SOCrates has three HPS LEDs that can be turned on/off via gpio.
Use the first one has heartbeat and add the other two as free LEDs.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-06-02 14:27:11 -05:00
Steffen Trumtrar 81638f1b9f ARM: socfpga: socrates: enable gpio0/1
Enable the gpio0+1 controller.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-06-02 14:20:16 -05:00
Dinh Nguyen ebbce1bbc4 ARM: socfpga: dts: add enable-method property for cpu nodes
Add the enable-method property for the cpu node on socfpga.dtsi and
socfpga_arria10.dtsi. This is for CPU_METHOD_OF_DECLARE to use to enable
the secondary core.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-06-02 14:18:15 -05:00
Dinh Nguyen 479f8df04c ARM: socfpga: dts: add the a9-scu node for arria10
Add a dts node for the A9 SCU on the Arria10 platform.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
2015-06-02 14:18:06 -05:00
Ard Biesheuvel 24bbd929e6 of/fdt: split off FDT self reservation from memreserve processing
This splits off the reservation of the memory occupied by the FDT
binary itself from the processing of the memory reservations it
contains. This is necessary because the physical address of the FDT,
which is needed to perform the reservation, may not be known to the
FDT driver core, i.e., it may be mapped outside the linear direct
mapping, in which case __pa() returns a bogus value.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-06-02 16:31:25 +01:00
Roger Quadros 4cbb08336f ARM: omap2plus_defconfig: Enable TOUCHSCREEN_PIXCIR
Some of the OMAP based boards e.g. am437x-gp-evm have
the Pixcir touch controller. Enable the related device
driver.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-06-02 07:54:50 -07:00
Russell King e001bbae71 ARM: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations
A recent change in kernel/acct.c added a new warning for many
configurations on ARM:

kernel/acct.c: In function 'acct_pin_kill':
arch/arm/include/asm/cmpxchg.h:122:3: warning: value computed is not used [-Wunused-value]

The code is in fact correct, it's just a cmpxchg() call that
intentionally ignores the result, and no other code does that.  The
warning does not show up on x86 because of the way that its cmpxchg()
macro is written. This changes the ARM implementation to use a similar
construct with a compound expression instead of a typecast, which causes
the compiler to not complain about an unused result.

Fix the other macros in this file in a similar way, and place them
just below their function implementations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:20 +01:00
Russell King 31cd08c3a1 ARM: remove __bad_xchg definition
We want link errors if xchg() is called for a variable size we do not
support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:19 +01:00
Stefan Agner 45b0fa09c6 ARM: 8369/1: ARMv7M: define size of vector table for Vybrid
Vybrids has 112 peripheral interrupts which can be routed to the
Cortex-M4's NVIC interrupt controller.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:19 +01:00
Sudeep Holla 0b7402dce4 ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource
The ARM Dual-Timer SP804 module is peripheral found not only on ARM32
platforms but also on ARM64 platforms.

This patch moves the driver out of arch/arm to driver/clocksource
so that it can be used on ARM64 platforms also.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Olof Johansson <olof@lixom.net>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:18 +01:00
Sudeep Holla 1e5f0519f4 ARM: 8365/1: introduce sp804_timer_disable and remove arm_timer.h inclusion
The header asm/hardware/arm_timer.h is included in various machine
specific files to access TIMER_CTRL and initialise to a known state.

This patch introduces a new function sp804_timer_disable to disable
the SP804 timers and uses the same for initialising the timers to
known(off) state, thereby removing the dependency on the header
asm/hardware/arm_timer.h

This change is in prepartion to move sp804 timer support out of arch/arm
so that it can be used on ARM64 platforms.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:18 +01:00
Arnd Bergmann 73c430bf9a ARM: 8364/1: fix BE32 module loading
The new veneer support for loadable modules on ARM uses the
__opcode_to_mem_thumb32() function to count R_ARM_THM_CALL
and R_ARM_THM_JUMP24 relocations.

However, this function is not defined for big-endian kernels
on ARMv5 or before, causing a compile-time error:

arch/arm/kernel/module-plts.c: In function 'count_plts':
arch/arm/kernel/module-plts.c:124:9: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror=implicit-function-declaration]
         __opcode_to_mem_thumb32(0x07ff2fff)))
         ^

As we know that this part of the function is only needed for
Thumb2 kernels, and that those can never happen with BE32,
we can avoid the error by enclosing the code in an #ifdef.

Fixes: 7d485f647c ("ARM: 8220/1: allow modules outside of bl range")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:17 +01:00
Yingjoe Chen 29d2e5631c ARM: 8360/1: add secondary_startup_arm prototype in header file
Put secondary_startup_arm() prototype in arch/arm/include/asm/smp.h
so users doesn't have to add extern prototype in their code.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:16 +01:00
Yingjoe Chen c07b5fd026 ARM: 8359/1: correct secondary_startup_arm mode
secondary_startup_arm is used as ARM mode secondary start up function
when ther kernel is compiled in THUMB mode, however the label itself
is still in .thumb mode. readelf shows:

160979: c020a581   120 FUNC    GLOBAL DEFAULT    2 secondary_startup_arm

Make sure the label is in ARM mode as well.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-02 09:58:16 +01:00
Hans de Goede ef3476e236 ARM: dts: sun8i: Add usb_clk node for a23/a33
Add an usb_clk node for a23/a33.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
2015-06-02 10:26:52 +02:00
Vishnu Patekar e01d9c7551 ARM: dts: sun8i: Add ET-Q8 A33 support
ET-Q8_A33 is A33 based cheap tablet in common Q8 format.

It has 512MB RAM, 4GB Nand, 7" Display, RDA5900P wifi, GSL1680 touch, etc.

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Chen-Yu Tsai <wens@csie.org>
2015-06-02 09:55:36 +02:00
Vishnu Patekar 35af8e4b38 ARM: dts: sun8i: Add sun8i-a33 dtsi
Add a dtsi file for use with a33 based boards based on the new
sun8i-a23-a33.dtsi file.

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Chen-Yu Tsai <wens@csie.org>
2015-06-02 09:54:52 +02:00
Vishnu Patekar a0e9e9be6a ARM: dts: sun8i: Add sun8i-a23-a33 dtsi
Rename sun8i-a23.dtsi to sun8i-a23-a33.dtsi as the base dtsi for the A33
is 99% the same and add a new sun8i-a23.dtsi including sun8i-a23-a33.dtsi
and setting the few things not shared with the A33 (mbus-clk, pio
compatible and interrupts).

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Chen-Yu Tsai <wens@csie.org>
2015-06-02 09:53:49 +02:00
Ingo Molnar f407a82586 Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
	arch/sparc/include/asm/topology_64.h

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-06-02 08:05:42 +02:00
David S. Miller dda922c831 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/phy/amd-xgbe-phy.c
	drivers/net/wireless/iwlwifi/Kconfig
	include/net/mac80211.h

iwlwifi/Kconfig and mac80211.h were both trivial overlapping
changes.

The drivers/net/phy/amd-xgbe-phy.c file got removed in 'net-next' and
the bug fix that happened on the 'net' side is already integrated
into the rest of the amd-xgbe driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-01 22:51:30 -07:00
Pali Rohár a55a744582 ARM: OMAP3: Fix crypto support for HS devices
Register crypto hwmod links only if they are not disabled in DT.
If DT information is missing, enable them only for GP devices.

Before this patch crypto hwmod links were always disabled for all HS
devices and it was not possible to use omap-aes and omap-sham linux
drivers.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
[paul@pwsan.com: move the complex IP-block presence heuristics into their
 own function to simplify the code; fix some checkpatch warnings]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2015-06-01 19:23:04 -06:00
Pali Rohár 6da233589f ARM: OMAP2+: Return correct error values from device and hwmod
Without this patch function pm_runtime_get_sync() returns 0 even when
some omap subfunction fails. This patch properly propagate error codes
from omap functions back to caller.

This patch fix problem, when loading omap-aes driver in qemu cause
kernel oops.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
[paul@pwsan.com: fix a checkpatch warning]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2015-06-01 19:22:59 -06:00
Dave Gerlach fabbe6df13 ARM: OMAP: AM43xx hwmod: Add data for am43xx emif hwmod
Without a hwmod for am43xx emif use counting for emif clockdomain does
not happen correctly so it may be shut off by pm code unintentionally.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2015-06-01 19:22:11 -06:00
Tony Lindgren 63aa945b10 memory: omap-gpmc: Add Kconfig option for debug
We support decoding the bootloader values if DEBUG is defined.
But we also need to change the struct omap_hwmod flags to have
HWMOD_INIT_NO_RESET to avoid the GPMC being reset during the
boot. Otherwise just the default timings will be displayed
instead of the bootloader configured timings.

This also allows us to clean up the various GPMC related
hwmod flags. For debugging, we only need HWMOD_INIT_NO_RESET,
and HWMOD_INIT_NO_IDLE is not needed.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2015-06-01 19:22:10 -06:00
Russell King c76f238e26 ARM: proc-v7: sanitise and document registers around errata
Document that r13 is not a stack in the initialisation function, in
case anyone gets other ideas.

Document the registers available for the errata workarounds, and
specifically which registers contain parts of the MIDR register, as
well as which registers must be preserved.

Lastly, use the lowest numbered available register (r0) rather than
r10 for temporary storage.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:48:42 +01:00
Russell King 4419496884 ARM: proc-v7: clean up MIDR access
We already have the main ID register available in r9, there's no need
to refetch it.  Use the saved value.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:48:41 +01:00
Russell King 17e7bf8669 ARM: proc-v7: move CPU errata out of line
Rather than having a long sprawling __v7_setup function, which is hard
to maintain properly, move the CPU errata out of line.

While doing this, it was discovered that the Cortex-A15 errata had been
incorrectly added:

	ldr	r10, =0x00000c08	@ Cortex-A8 primary part number
	teq	r0, r10
	bne	2f
/* Cortex-A8 errata */
	b	3f
2:	ldr	r10, =0x00000c09	@ Cortex-A9 primary part number
	teq	r0, r10
	bne	3f
/* Cortex-A9 errata */
3:	ldr	r10, =0x00000c0f	@ Cortex-A15 primary part number
	teq	r0, r10
	bne	4f
/* Cortex-A15 errata */
4:

This results in the Cortex-A15 test always being executed after the
Cortex-A8 and Cortex-A9 errata, which is obviously not what is intended.
The 'b 3f' labels should have been updated to 'b 4f'.  The new structure
of:

	/* Cortex-A8 Errata */
	ldr	r10, =0x00000c08	@ Cortex-A8 primary part number
	teq	r0, r10
	beq	__ca8_errata

	/* Cortex-A9 Errata */
	ldr	r10, =0x00000c09	@ Cortex-A9 primary part number
	teq	r0, r10
	beq	__ca9_errata

	/* Cortex-A15 Errata */
	ldr	r10, =0x00000c0f	@ Cortex-A15 primary part number
	teq	r0, r10
	beq	__ca15_errata

__errata_finish:

is much cleaner and easier to see that this kind of thing doesn't
happen.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:48:40 +01:00
Russell King b2c3e38a54 ARM: redo TTBR setup code for LPAE
Re-engineer the LPAE TTBR setup code.  Rather than passing some shifted
address in order to fit in a CPU register, pass either a full physical
address (in the case of r4, r5 for TTBR0) or a PFN (for TTBR1).

This removes the ARCH_PGD_SHIFT hack, and the last dangerous user of
cpu_set_ttbr() in the secondary CPU startup code path (which was there
to re-set TTBR1 to the appropriate high physical address space on
Keystone2.)

Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:48:19 +01:00
Russell King 1221ed10f2 ARM: cleanup early_paging_init() calling
Eliminate the needless nommu version of this function, and get rid of
the proc_info_list structure argument - we no longer need this in order
to fix up the page table entries.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:48:09 +01:00
Russell King d8dc7fbd53 ARM: re-implement physical address space switching
Re-implement the physical address space switching to be architecturally
compliant.  This involves flushing the caches, disabling the MMU, and
only then updating the page tables.  Once that is complete, the system
can be brought back up again.

Since we disable the MMU, we need to do the update in assembly code.
Luckily, the entries which need updating are fairly trivial, and are
all setup by the early assembly code.  We can merely adjust each entry
by the delta required.

Not only does this fix the code to be architecturally compliant, but it
fixes a couple of bugs too:

1. The original code would only ever update the first L2 entry covering
   a fraction of the kernel; the remainder were left untouched.
2. The L2 entries covering the DTB blob were likewise untouched.

This solution fixes up all entries.

Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:46:33 +01:00
Russell King c0b759d87e ARM: keystone2: rename init_meminfo to pv_fixup
The init_meminfo() method is not about initialising meminfo - it's about
fixing up the physical to virtual translation so that we use a different
physical address space, possibly above the 4GB physical address space.
Therefore, the name "init_meminfo()" is confusing.

Rename it to pv_fixup() instead.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:45:56 +01:00
Russell King 39b74fe82f ARM: keystone2: move address space switch printk into generic code
There is no point platform code doing this, let's move it into the
generic code so it doesn't get duplicated.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:45:54 +01:00
Russell King c8ca2b4b29 ARM: keystone2: move update of the phys-to-virt constants into generic code
Make the init_meminfo function return the offset to be applied to the
phys-to-virt translation constants.  This allows us to move the update
into generic code, along with the requirements for this update.

This avoids platforms having to know the details of the phys-to-virt
translation support.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:45:50 +01:00
Russell King 30b5f4d612 ARM: keystone2: move platform notifier initialisation into platform init
We ideally want the init_meminfo function to do nothing but return the
delta to be applied to PHYS_OFFSET - it should do nothing else.  As we
can detect in platform init code whether we are running in the high
physical address space, move the platform notifier initialisation
entirely into the platform init code.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 23:45:47 +01:00
Matthijs van Duin 7a6cb0abe1 ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage
Avoid entering "RTC-only mode" at poweroff. It is unsupported by most
versions of BeagleBone, and risks hardware damage.

The damaging configuration is having system-power-controller
without ti,pmic-shutdown-controller.

Reported-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Tested-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Johan Hovold <johan@kernel.org>
[Matthijs van Duin: added explanatory comments]
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Fixes: http://bugs.elinux.org/issues/143
Cc: stable@vger.kernel.org # v3.12+
[tony@atomide.com: updated comments with the hardware breaking info]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-06-01 12:48:23 -07:00
Tero Kristo b33558c906 ARM: dts: AM35xx: fix system control module clocks
New system control module layout for omap3 overlooked parts of the am35xx
configuration. Basically the am35xx clocks were not converted to use the
changed offsets, which caused weird boot warnings. The errors were not
fatal so far, so they were not caught earlier. Fixed by applying the
proper offsets for the AM35xx scm clocks.

Fixes: b8845074cf ("ARM: dts: omap3: add minimal l4 bus layout with...")

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Jeroen Hofstee <linux-arm@myspectrum.nl>
Cc: Paul Walmsley <paul@pwsan.com>
Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-06-01 10:29:35 -07:00
Arnd Bergmann 7b38951b4e The i.MX cleanup for 4.2:
- Remove eukrea_mbimxsd35 non-DT board files
  - Remove .owner field from gpc platform driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVa+zKAAoJEFBXWFqHsHzOog0IALHDSnLhR/vRHEDL3tHVQqeT
 NDeE6ZUAwBF+31gnw5SsePx47Cz8HL+yJE2NJeoZis1FujvmAHC/cahNmvL2EvJX
 Jig3UeBGlglEhsl/lmt9iVkK+h057Kx6XHym+8BXoRiIgH3b8e3EWtXl5lW3QKP/
 xihe7+cXUi9rOxjaptmaM9cta8LLQqnKokd+35irKdqA3ZgDofbfwiFGBp9BMWRE
 NLp36uE1WiJ388o3R6N/PCfCSvTzK4IHdp7g+z9mRaqCGHkFp+fPWZo3hkT6RBQd
 09QNfgsKKivWr8+Z/Uz+Erc1v5YS+RjVZslch3CgrKFeiehCmJXGfI6U0S6aZYQ=
 =/ETk
 -----END PGP SIGNATURE-----

Merge tag 'imx-cleanup-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup

Merge "The i.MX cleanup for 4.2" from Shawn Guo:

 - Remove eukrea_mbimxsd35 non-DT board files
 - Remove .owner field from gpc platform driver

* tag 'imx-cleanup-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx: gpc: Remove .owner field
  ARM: imx: Remove eukrea_mbimxsd35 non-dt support
2015-06-01 18:09:40 +02:00
Arnd Bergmann c413d7bab0 The i.MX defconfig updates for 4.2:
- Enable i.MX7D and LS1021A SoC support
  - Enable support for WL1271 WIFI/BT, SX8654 I2C touchscreen and PCF8523
    RTC, which can be found on Armadeus Systems APF6 and Cubox-i boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVbArDAAoJEFBXWFqHsHzOaMoIAJrdhMHWKpTys4OmQOao0qE1
 uHCrGHlAcWGy8xgoA617D3PLahP9QMID9GUFxH8cWRa4ifBEybn9nqyQFU/Sp6CM
 cwRNXvscupvnPQcZIbpQlJezaBH2pqm43BOWi5b77/ASdh+xad7JFGniOb6P5L2Q
 iplE12VVDkg70t3tOh7lHgrRs5I/1DL3/JSCTh7KEEjxr0wBkR68/b3ONP3eqnhP
 txa+mW1fh61l3VZ8qzff8T1yvyft/onoqbzfN9BVITlKDrWe3NSM/jalM9h1o5T3
 orlj3rLacJhdSpWUtCK+M8BovdaI549wNk7HnDH1lNzawUJ3m8b7Y1uuAfkAhGI=
 =DIH7
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig

Merge "The i.MX defconfig updates for 4.2" from Shawn Guo:

 - Enable i.MX7D and LS1021A SoC support
 - Enable support for WL1271 WIFI/BT, SX8654 I2C touchscreen and PCF8523
   RTC, which can be found on Armadeus Systems APF6 and Cubox-i boards.

* tag 'imx-defconfig-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v6_v7_defconfig: updates for Armadeus Systems APF6 boards
  ARM: config: imx_v6_v7_defconfig add imx7d support
  ARM: imx_v6_v7_defconfig: Select LS1021A
  ARM: imx_v6_v7_defconfig: Enable RTC PCF8523 support
2015-06-01 18:08:23 +02:00
Arnd Bergmann e897ee70dc Device Tree changes for Ux500 and ARM SOC:
- Document Snoop Control Unit (SCU) bindings
 - Document Ux500 board bindings
 - Define the backup RAM in the DBx500 device tree
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVbEwwAAoJEEEQszewGV1zw5IQAMgEalCaSArXm/a12eogltuE
 rGzJtP6MRwqLA4dGe+rOnUEsw2+jX1uBpUsBt7akBRbl2prRUpm89SJxZg8E5YpG
 u2c+ODrh1lp4sRpAtKiMrLVx+hIjR4YFEa2cW0/OAJKG+4h1RXeQlXW3bw9q0qov
 dO+M+NlcmWHyaJU9bNHYPZNYtG+9rVYY8kEK/LFe1xiY/VYC8KIe+gikR/R9WHI1
 PZgAi1rARLeKAC7eThUDA+XnhzpxwYyqsxHsLV92l0l/cfly6DKCmZ1Zn9jk7v4b
 L24jZ8OpHhJX5s//vsBmLxSobisuL8aLJDHCkrBmIb+geRsphOYmYTwmKdRJ2YkB
 CyuxmvjdpKNiBIb8SGEKplrRaAexRfjXxX1GdNZNzdvIDo7T1hrM3/Fzo5TXxP61
 Tgtu3I2Cwa3luDxFKaGlgldihvhUVPcAoBQUXyF57teWIh4iwTcrGZ3Li9kxTY32
 ZvunTP/z8XjWRKFHv5KFCnnpxoQLDB/aHuv36H94hol5Nf95MC0EjGvBRM582z+u
 1znExgtfSUt0BfqaxFgTieIu8RrQK0bxGcwBK6Okmv+j2BjTnE10ZuoqZSCaurOQ
 QEkO336JNyYSwSu9Bxcwcx5x/qB+X5yuZLvmzhOp8Ld0omUngOqSpBtxdQQNQBK5
 9qwI0QJ0Unc3rSgkJ6Ho
 =IRmr
 -----END PGP SIGNATURE-----

Merge tag 'dt-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt

Merge "Device Tree changes for Ux500 and ARM SOC" from Linus Walleij:

- Document Snoop Control Unit (SCU) bindings
- Document Ux500 board bindings
- Define the backup RAM in the DBx500 device tree

* tag 'dt-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: define the backupram in the device tree
  ARM: ux500: add board documentation
  ARM: scu: document Snoop Control Unit DT bindings
2015-06-01 18:02:44 +02:00
Maxime Coquelin 2526318638 ARM: Kconfig: Select clocksource in STM32 entry
STM32 clocksource driver needs to be selected if ARCH_STM32.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-06-01 17:56:23 +02:00
Arnd Bergmann c9531b4f15 Merge tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux into next/soc
Merge "changes for Broadcom SoCs":

- Dan fixes an error path in the BCM63xx SMP code

- Ray adds the relevant Kconfig selects to enable the Broadcom NAND driver on Cygnus

- Kevin provides a change to the Broadcom GISB arbiter driver to make it work with
  MIPS-based big-endian STB SoCs (this was a long-standing change that had dependencies on
  code in drivers/of/*)

- Gregory enables the use of GPIOLIB for brcmstb SoCs and bumps the number of GPIOs for
  these platforms

* tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux:
  ARM: brcmstb: Add default gpio number
  ARM: brcmstb: Select ARCH_WANT_OPTIONAL_GPIOLIB
  bus: brcmstb_gisb: Honor the "big-endian" and "native-endian" DT properties
  ARM: BCM: Enable NAND support for iProc SoCs
  ARM: BCM63xx: fix an error path in bcm63xx_pmb_power_on_cpu()
2015-06-01 17:54:31 +02:00
Arnd Bergmann 63cb275e6e Merge tag 'arm-soc/for-4.2/dts-fixes' of http://github.com/broadcom/stblinux into next/dt
Merge "This pull request contains a single change" from Florian Fainelli:

- fix the NAND controller node on bcm63138, the original change was a mis-merge that
  did not properly parent it to the "ubus" node

* tag 'arm-soc/for-4.2/dts-fixes' of http://github.com/broadcom/stblinux:
  ARM: dts: BCM63xx: re-parent NAND controller node
2015-06-01 17:41:46 +02:00
Arnd Bergmann e59bff9af4 mvebu dt changes for v4.2 (part #2)
Add 2 new set boards:
 - Armada 385 based Linksys boards
 - DLink DNS-327L
 
 Update the spi-nor flash compatible strings
 
 Use improved armada spi device tree compatible name for each mvebu SoC
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlVo3bwACgkQCwYYjhRyO9UxNgCgn5KoYMnx0qzbbmc7rfoyd9g3
 IF8An0yb+2EFpP7SBPu41s8rXOATCCTb
 =APjz
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-dt-4.2-2' of git://git.infradead.org/linux-mvebu into next/dt

Merge "mvebu dt changes for v4.2 (part #2)" from Gregory CLEMENT:

Add 2 new set boards:
- Armada 385 based Linksys boards
- DLink DNS-327L

Update the spi-nor flash compatible strings

Use improved armada spi device tree compatible name for each mvebu SoC

* tag 'mvebu-dt-4.2-2' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: use improved armada spi device tree compatible name for each SoC
  ARM: mvebu: dts: Add dts file for DLink DNS-327L
  ARM: mvebu: add "jedec,spi-nor" flash compatible binding
  ARM: kirkwood: add "jedec,spi-nor" flash compatible binding
  ARM: mvebu: add support for the new Armada 385 based Linksys boards
2015-06-01 17:38:07 +02:00
Arnd Bergmann 72275b4c08 mvebu drivers change for 4.2
mvebu-mbus: add mv_mbus_dram_info_nooverlap() needed for the new
 Marvell crypto driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlVo26sACgkQCwYYjhRyO9UQ4gCeLb6E7RWXGXtLBXRvRi+1a5Vm
 GckAn2a/4vAQExwlDsiqHMsM2Iw9Phc7
 =1es8
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-drivers-4.2' of git://git.infradead.org/linux-mvebu into next/drivers

Merge "mvebu drivers change for 4.2" from Gregory CLEMENT:

mvebu-mbus: add mv_mbus_dram_info_nooverlap() needed for the new
Marvell crypto driver

* tag 'mvebu-drivers-4.2' of git://git.infradead.org/linux-mvebu:
  bus: mvebu-mbus: add mv_mbus_dram_info_nooverlap()

Based on the earlier bug fixes branch, which contains six other
patches already merged into 4.1.
2015-06-01 17:34:57 +02:00
Arnd Bergmann 1a02b6627b Fix for Exynos3250 RTC wake-up interrupts after converting PMU
wakeup to stacked domains. This allows waking up the device from
 suspend to RAM using S3C RTC driver (the RTC on SoC).
 
 The patch should be applied some time ago, unfortunately
 it seems it slipped through fingers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVa6vkAAoJEME3ZuaGi4PXT1MQAI2det+EigY7nIL2eAKmDQob
 NogWL+omsEOmte0jjXk2QKACjHaOpLcDwAzGe7F1+TitzH7lIheryeXSl+sDRIy9
 3TtdvtOKLAx8u65f1vcycaScEfJmnY1V0U6HG0XPV3Aw0gfaDiTwrn7xDGZSTN1r
 Q4TFCJfIGmWoXWRp0OzUXXhGLmezvu6gnSkRHA5MZORzLFFsAHfqRWwL1lMjUdri
 sXnwWfZPF8YFQmilFehAvwvdzvKcgX9xZ/S0nS5SKTUF5lDje/HuRl893EZeGwSS
 ZYybr+8NN/ZLTWQW6hDdEFnH7w/WCpqeET9H/cKPaw+b0XrpWHdpHVUEyzeuuMQV
 w8FRTIU/+EZNpkumnjfx+uh04pS6nuSi0fkQ1a2iogFKa1VYcf13Fr8Gmgo8JeEy
 wCeHzICp9sBdmotdLwuSzQBj3dtMUXOOHt7YzBRzJxWDf0DosWD6RAJnQz7HAPEp
 8ndhyvsUEUOlZd/SRXKh15tRUepVHZ43RXY4M6c75iSvwZZ5oJmxSeJWFQZZhuYu
 pORcxbcLsfitjg3wnMEd7YdFsOKDGqnXouBTBQfSsrDybZifz32jNjsiOEpmkbQs
 MZoAToVCkJ5zlobLH6GRyrJHTZXEpFLihZblhys0ujxhIOxob4V1/BJ7Q5/hJ6kV
 v8px0A9rb4a4DNj5jHlW
 =BUV3
 -----END PGP SIGNATURE-----

Merge tag 'samsung-fixes-4.1-4' of https://github.com/krzk/linux into fixes

Merge "ARM: EXYNOS: Fix for 4.1, 4th" from Krzysztof Kozlowski:

Fix for Exynos3250 RTC wake-up interrupts after converting PMU
wakeup to stacked domains. This allows waking up the device from
suspend to RAM using S3C RTC driver (the RTC on SoC).

The patch should be applied some time ago, unfortunately
it seems it slipped through fingers.

* tag 'samsung-fixes-4.1-4' of https://github.com/krzk/linux:
  ARM: exynos: Fix wake-up interrupts for Exynos3250
2015-06-01 17:05:43 +02:00
Arnd Bergmann 8f1ab524b1 mvebu fixes for 4.1 (part 3)
Disable unused internal RTC for Mamba from linksys (Armada XP)
 And 2 commits fixing regressions on mvebu-mbus:
 - the first one for Kirkwood or Orion SoC
 - the second one for DMA when the platform have more than 4GB (only
   possible on Armada XP as far as I know)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlVo2BIACgkQCwYYjhRyO9Vf4ACZAUuChGNGu5zOwme4AHCuimp6
 TnYAn2n7DjGJ+0aOHCY6qAsVGCUdnda9
 =FvVk
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-4.1-3' of git://git.infradead.org/linux-mvebu into fixes

Merge "mvebu fixes for 4.1 (part 3)" from Gregory CLEMENT:

Disable unused internal RTC for Mamba from linksys (Armada XP)
And 2 commits fixing regressions on mvebu-mbus:
- the first one for Kirkwood or Orion SoC
- the second one for DMA when the platform have more than 4GB (only
  possible on Armada XP as far as I know)

* tag 'mvebu-fixes-4.1-3' of git://git.infradead.org/linux-mvebu:
  Revert "bus: mvebu-mbus: make sure SDRAM CS for DMA don't overlap the MBus bridge window"
  bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms.
  ARM: mvebu: armada-xp-linksys-mamba: Disable internal RTC
2015-06-01 17:03:44 +02:00
Russell King 02b4e2756e ARM: v7 setup function should invalidate L1 cache
All ARMv5 and older CPUs invalidate their caches in the early assembly
setup function, prior to enabling the MMU.  This is because the L1
cache should not contain any data relevant to the execution of the
kernel at this point; all data should have been flushed out to memory.

This requirement should also be true for ARMv6 and ARMv7 CPUs - indeed,
these typically do not search their caches when caching is disabled (as
it needs to be when the MMU is disabled) so this change should be safe.

ARMv7 allows there to be CPUs which search their caches while caching is
disabled, and it's permitted that the cache is uninitialised at boot;
for these, the architecture reference manual requires that an
implementation specific code sequence is used immediately after reset
to ensure that the cache is placed into a sane state.  Such
functionality is definitely outside the remit of the Linux kernel, and
must be done by the SoC's firmware before _any_ CPU gets to the Linux
kernel.

Changing the data cache clean+invalidate to a mere invalidate allows us
to get rid of a lot of platform specific hacks around this issue for
their secondary CPU bringup paths - some of which were buggy.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-06-01 11:30:26 +01:00
Maxime Ripard 0eb14a8dad ARM: dts: sun7i: Add A20 SRAM and SRAM controller
The A20 has a few SRAM that can be mapped either to a device or to the CPU,
with the mapping being controlled by a SRAM controller.

Add the SRAM controller, the SRAM that it drives and the section that can
be used by the various devices.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
2015-06-01 11:13:27 +02:00
Maxime Ripard 00f69ba94d ARM: dts: sun5i: Add A10s and A13 SRAM and SRAM controller
The A10s and A13 have a few SRAM that can be mapped either to a device or
to the CPU, with the mapping being controlled by a SRAM controller.

Add the SRAM controller, the SRAM that it drives and the section that can
be used by the various devices.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
2015-06-01 11:13:26 +02:00
Maxime Ripard 1fbc15175d ARM: dts: sun4i: Add A10 SRAM and SRAM controller
The A10 has a few SRAM that can be mapped either to a device or to the CPU,
with the mapping being controlled by a SRAM controller.

Add the SRAM controller, the SRAM that it drives and the section that can
be used by the various devices.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
2015-06-01 11:13:26 +02:00
Maxime Ripard 860c186c7d ARM: dts: sunxi: Revert SRAM controller drivers patches
This patch reverts commit ccb4ada2f1 ("ARM: dts: sun7i: Add A20 SRAM and
SRAM controller"), commit e6f51e4bd2 ("ARM: dts: sun5i: Add A13 and A10s
SRAM and SRAM controller") and commit 6d92b80f35 ("ARM: dts: sun4i: Add
A10 SRAM and SRAM controller").

The bindings have been changed in the SRAM driver, and we need to
change the DT accordingly.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-01 11:13:22 +02:00
Chen-Yu Tsai 6d6693c8a7 ARM: dts: sun9i: Add device node for watchdog
On A80 there are 2 watchdogs, one in the main block, and one in the
R (special) block. We do not have information on the R block watchdog,
other than the register layout is the same, and the interrupt number.
Both are able to reset the whole system.

Add the main watchdog, in case the R block is used for special purposes
like running an RTOS.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-06-01 11:08:43 +02:00