cascardo/linux.git
9 years agoMerge tag 'omap-for-v3.17/soc-new' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Sat, 26 Jul 2014 09:33:34 +0000 (11:33 +0200)]
Merge tag 'omap-for-v3.17/soc-new' of git://git./linux/kernel/git/tmlind/linux-omap into next/soc

Merge "SoC related changes for omaps for v3.17 merge window"
from Tony Lindgren:

- Add device tree and hwmod data for various devices
  for new SoCs

- Remove legacy mailbox hwmod data that's no longer
  needed for SoCs that are DT only. Note that this may
  cause a minor merge conflict in mach-omap2/devices.c
  with omap_init_mbox() and omap_init_hdmi_audio(), both
  are legacy code that is getting removed

* tag 'omap-for-v3.17/soc-new' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: DRA7: hwmod: Add data for RTC
  arm: dra7xx: Add hwmod data for MDIO and CPSW
  arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems
  arm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy
  ARM: DRA7: hwmod: Add OCP2SCP3 module
  ARM: DRA7: hwmod: remove interrupts for DMA
  ARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver
  ARM: AM33xx: hwmod_data: Remove legacy mailbox addrs
  ARM: OMAP4: hwmod_data: Remove legacy mailbox addrs
  ARM: OMAP2: hwmod_data: Remove legacy mailbox data and addrs
  ARM: OMAP2+: Avoid mailbox legacy device creation for DT-boot
  ARM: DRA7: hwmod_data: Add mailbox hwmod data
  ARM: dts: DRA7: Add mailbox nodes
  ARM: dts: AM4372: Correct mailbox node data
  ARM: dts: AM33xx: Add mailbox node
  ARM: dts: OMAP4: Add mailbox node
  ARM: dts: OMAP2+: Add mailbox fifo and user information
  ARM: AM43xx: hwmod: add DSS hwmod data

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branch 'omap/cleanup' into next/soc
Arnd Bergmann [Sat, 26 Jul 2014 09:32:47 +0000 (11:32 +0200)]
Merge branch 'omap/cleanup' into next/soc

This is a dependency for the omap/soc branch

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek...
Arnd Bergmann [Wed, 23 Jul 2014 20:49:24 +0000 (22:49 +0200)]
Merge tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek into next/soc

Merge basic support for the Mediatek Cortex-A7 SoCs from Matthias Brugger:

Support is quite basic, as the only component working up to now are the
timers.

* tag 'v3.17-next-mediatek-support' of https://github.com/mbgg/linux-mediatek:
  arm: mediatek: add dts for Aquaris5 mobile phone
  dt-bindings: add documentation for Mediatek SoC
  arm: add basic support for Mediatek MT6589 boards

Signed-off-by: Matthias Brugger matthias.bgg@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
9 years agoMerge branch 'omap-for-v3.17/mailbox' into omap-for-v3.17/soc
Tony Lindgren [Wed, 23 Jul 2014 08:26:02 +0000 (01:26 -0700)]
Merge branch 'omap-for-v3.17/mailbox' into omap-for-v3.17/soc

9 years agoMerge tag 'for-v3.17/omap-hwmod-a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Wed, 23 Jul 2014 08:21:33 +0000 (01:21 -0700)]
Merge tag 'for-v3.17/omap-hwmod-a' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.17/soc

OMAP hwmod data additions for v3.17.  Most of these are DRA7xx-related,
although one patch adds DSS hwmods for AM43xx.

Basic build, boot, and PM test results are available here:

http://www.pwsan.com/omap/testlogs/hwmod-a-v3.17/20140722143514/

9 years agoARM: DRA7: hwmod: Add data for RTC
Lokesh Vutla [Tue, 22 Jul 2014 19:15:57 +0000 (13:15 -0600)]
ARM: DRA7: hwmod: Add data for RTC

Add hwmod data for RTC

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: updated to apply]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for MDIO and CPSW
Mugunthan V N [Tue, 8 Jul 2014 13:16:39 +0000 (18:46 +0530)]
arm: dra7xx: Add hwmod data for MDIO and CPSW

Adding hwmod data for CPSW and MDIO which is present in DRA7xx SoC

Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems
Kishon Vijay Abraham I [Wed, 9 Jul 2014 09:02:47 +0000 (14:32 +0530)]
arm: dra7xx: Add hwmod data for pcie1 and pcie2 subsystems

Added hwmod data for pcie1 and pcie2 subsystem present in DRA7xx SOC.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy
Kishon Vijay Abraham I [Wed, 25 Jun 2014 18:02:45 +0000 (23:32 +0530)]
arm: dra7xx: Add hwmod data for pcie1 phy and pcie2 phy

Added hwmod data for pcie1 and pcie2 phy present in DRA7xx SOC.
Also added the missing CLKCTRL OFFSET macro and CONTEXT OFFSET macro
for pcie1 phy and pcie2 phy.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoARM: DRA7: hwmod: Add OCP2SCP3 module
Roger Quadros [Sat, 5 Jul 2014 23:44:58 +0000 (17:44 -0600)]
ARM: DRA7: hwmod: Add OCP2SCP3 module

This module is needed for the SATA and PCIe PHYs.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoarm: mediatek: add dts for Aquaris5 mobile phone
Matthias Brugger [Sun, 11 May 2014 00:16:13 +0000 (02:16 +0200)]
arm: mediatek: add dts for Aquaris5 mobile phone

The Aquaris5 is a mobile phone based on the MT6589 SoC.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
9 years agodt-bindings: add documentation for Mediatek SoC
Matthias Brugger [Mon, 12 May 2014 23:14:17 +0000 (01:14 +0200)]
dt-bindings: add documentation for Mediatek SoC

This adds a DT binding documentation for the MT6589 SoC from Mediatek.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
9 years agoarm: add basic support for Mediatek MT6589 boards
Matthias Brugger [Mon, 12 May 2014 23:06:13 +0000 (01:06 +0200)]
arm: add basic support for Mediatek MT6589 boards

This adds a generic devicetree board file and a dtsi for boards
based on MT6589 SoCs from Mediatek.

Apart from the generic parts (gic, clocks) the only component
currently supported are the timers.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
9 years agoARM: DRA7: hwmod: remove interrupts for DMA
Nishanth Menon [Thu, 12 Jun 2014 11:45:23 +0000 (17:15 +0530)]
ARM: DRA7: hwmod: remove interrupts for DMA

DMA interrupts are now available in of, and the definitions are
duplicates in hwmod. This prevents us from dynamically allocating
interrupt resources for dma from devicetree.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
9 years agoARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver
Nishanth Menon [Thu, 12 Jun 2014 11:45:22 +0000 (17:15 +0530)]
ARM: OMAP2+: DMA: remove requirement of irq for platform-dma driver

we have currently 2 DMA drivers that try to co-exist.
drivers/dma/omap-dma.c which registers it's own IRQ and is device tree
aware and uses arch/arm/plat-omap/dma.c instance created by
arch/arm/mach-omap2/dma.c to maintain channel usage (omap_request_dma).

Currently both try to register interrupts and mach-omap2/plat-omap dma.c
attempts to use the IRQ number registered by hwmod to register it's own
interrupt handler.

Now, there is no reasonable way of static allocating DMA irq in GIC
SPI when we use crossbar. However, since the dma_chan structure is
freed as a result of IRQ not being present due to devm allocation,
maintaining information of channel by platform code fails at a later
point in time when that region of memory is reused.

So, if hwmod does not indicate an IRQ number, then, assume that
dma-engine will take care of the interrupt handling.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
9 years agoMerge tag 'for-v3.17/omap-clock-a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Tony Lindgren [Mon, 21 Jul 2014 07:35:38 +0000 (00:35 -0700)]
Merge tag 'for-v3.17/omap-clock-a' of git://git./linux/kernel/git/pjw/omap-pending into omap-for-v3.17/soc

An OMAP clock cleanup series for 3.17 from Tero Kristo.
This is in preparation for moving this code into drivers/clk/ti.

Basic build, boot, and PM test logs are here:

http://www.pwsan.com/omap/testlogs/clock-a-v3.17/20140717034329/

9 years agoMerge tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Olof Johansson [Sat, 19 Jul 2014 22:03:08 +0000 (15:03 -0700)]
Merge tag 'exynos-cpuidle' of git://git./linux/kernel/git/kgene/linux-samsung into next/soc

Merge "Samsung exynos cpuidle update for v3.17" from Kukjin Kim:

- add callbacks exynos_suspend() and exynos_powered_up()
  for support cpuidle through mcpm
- skip exynos_cpuidle for exynos5420 because is uses
  cpuidle-big-liggle generic cpuidle driver
- add generic functions to calculate cpu number is used
  for pmu and this is required for exynos5420 multi-cluster
- add of_device_id structure for big.LITTLE cpuidle and
  add "samsung,exynos5420" compatible string for exynos5420

* tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm
  ARM: EXYNOS: do not allow cpuidle registration for exynos5420
  cpuidle: big.LITTLE: init driver for exynos5420
  cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config
  ARM: EXYNOS: add generic function to calculate cpu number
  cpuidle: big.LITTLE: add of_device_id structure
  + Linux 3.16-rc5

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu into next/soc
Olof Johansson [Sat, 19 Jul 2014 21:28:06 +0000 (14:28 -0700)]
Merge tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu into next/soc

Merge "ARM: mvebu SoC changes for v3.17 (round 2)" from Jason Cooper:

"Yeah, it's just one patch, but it's a beautiful one!  Thanks to the
efforts of many people over the last couple years, and in particular,
Andrew Lunn, Kirkwood has been completely converted to DT."

 - kirkwood
   * Remove mach-kirkwood/, It's fully supported in mach-mvebu/

* tag 'mvebu-soc-3.17-2' of git://git.infradead.org/linux-mvebu:
  ARM: Kirkwood: Remove mach-kirkwood

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'sunxi-core-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sat, 19 Jul 2014 19:22:47 +0000 (12:22 -0700)]
Merge tag 'sunxi-core-for-3.17' of git://git./linux/kernel/git/mripard/linux into next/soc

Merge "Allwinner core additions for 3.17" from Maxime Ripard:

Nothing very fancy here, only the introduction from the new Allwinner A23 SoC.

* tag 'sunxi-core-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  ARM: sunxi: select MFD_SUN6I_PRCM when sun8i arch support is enabled
  ARM: sunxi: Add earlyprintk support using R_UART (sun6i/sun8i)
  ARM: sunxi: Introduce Allwinner A23 support

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'imx-soc-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Olof Johansson [Sat, 19 Jul 2014 18:56:39 +0000 (11:56 -0700)]
Merge tag 'imx-soc-3.17' of git://git./linux/kernel/git/shawnguo/linux into next/soc

Merge "ARM: imx: SoC changes for 3.17" from Shawn Guo:

The i.MX SoC changes for 3.17:
 - Add devicetree support for i.MX1 and i.MX21 clock driver
 - Use CLOCKSOURCE_OF_DECLARE() to initialize timer for DT targets
 - Use of_clk_init() to initialize i.MX25 and i.MX27 clock driver in
   device tree boot
 - Remove i.MX1 camera support
 - Remove i.MX27 IP Camera and Lite-Kit board support
 - Add suspend and cpuidle support for i.mx6sx
 - Clean up unused clk_register_clkdev() lookups
 - Update imx-weim bus driver to support populating devices on a simple
   bus
 - Switch i.MX27 and i.MX6QDL clock driver to use macro for clock IDs
 - Make i.MX51 a DT only platform and clean up the non-DT support code
 - Support disabling supervisor protect via DT
 - Random defconfig updates

* tag 'imx-soc-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (69 commits)
  ARM: imx: clk-vf610: fix FlexCAN clock gating
  ARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targets
  ARM: i.MX53: globally disable supervisor protect
  ARM: i.MX: allow disabling supervisor protect via DT
  ARM: i.MX27 clk: Add 26 MHz oscillator circuit clock gate
  ARM: i.MX27 clk: Remove unused definitions
  ARM: i.MX27 clk: Introduce DT include for clock provider
  ARM: i.MX: Remove Freescale Logic Product Development i.MX27 Lite-Kit board support
  ARM: i.MX: Remove excess symbols ARCH_MX1, ARCH_MX25 and MACH_MX27
  ARM: i.MX: Remove i.MX1 camera support
  ARM: imx: use PTR_ERR_OR_ZERO
  bus: imx-weim: populate devices on a simple bus
  ARM: imx: build cpu_is_imx6sl function conditionally
  ARM: imx: imx6sx uses imx6q cpuidle code
  ARM: imx: drop PL310 errata 588369 and 727915
  ARM: imx_v6_v7_defconfig: add FSL_EDMA and PRINTK_TIME
  ARM: imx: clk-imx6sx: register SSI/SSI_IPG as shared gate clocks
  ARM: imx_v6_v7_defconfig: Enable flexcan driver for can support
  ARM: imx_v6_v7_defconfig: Enable STMPE gpio support
  ARM: imx: mark .dt_compat as const
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-clock2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sat, 19 Jul 2014 04:30:26 +0000 (21:30 -0700)]
Merge tag 'renesas-clock2-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Second Round of Renesas ARM Based SoC Clock Updates for v3.17" from
Simon Horman:

- Add legacy clocks for SCI for SoCs that do not yet have CCF support.
  This is to allow SCI (serial) devices to be enabled using DT and
  will be removed after CCF support is added for each SoC.

* tag 'renesas-clock2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: sh73a0: add SCI clock support for DT
  ARM: shmobile: r8a7740: correct SCI clock support for DT
  ARM: shmobile: r8a73a4: add SCI clock support for DT
  ARM: shmobile: r8a7778: add SCI clock support for DT

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: EXYNOS: populate suspend and powered_up callbacks for mcpm
Chander Kashyap [Fri, 4 Jul 2014 21:24:35 +0000 (06:24 +0900)]
ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm

In order to support cpuidle through mcpm, suspend and powered-up
callbacks are required in mcpm platform code.
Hence populate the same callbacks.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Chander Kashyap <k.chander@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoARM: EXYNOS: do not allow cpuidle registration for exynos5420
Chander Kashyap [Fri, 4 Jul 2014 21:24:35 +0000 (06:24 +0900)]
ARM: EXYNOS: do not allow cpuidle registration for exynos5420

Exynos5420 is big.Little Soc. It uses cpuidle-big-litle generic cpuidle driver.
Hence do not allow exynos cpuidle driver registration for Exynos5420.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agocpuidle: big.LITTLE: init driver for exynos5420
Chander Kashyap [Fri, 4 Jul 2014 21:24:35 +0000 (06:24 +0900)]
cpuidle: big.LITTLE: init driver for exynos5420

Add "samsung,exynos5420" compatible string to initialize generic
big-little cpuidle driver for Exynos5420.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agocpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config
Chander Kashyap [Fri, 4 Jul 2014 21:24:35 +0000 (06:24 +0900)]
cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config

Add support to select generic big-little cpuidle driver for Samsung Exynos
series SoC's. This is required for Exynos big-llittle SoC's eg, Exynos5420.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoARM: EXYNOS: add generic function to calculate cpu number
Chander Kashyap [Fri, 4 Jul 2014 21:24:35 +0000 (06:24 +0900)]
ARM: EXYNOS: add generic function to calculate cpu number

The address of cpu power registers in pmu is based on cpu number
offsets. This function calculate the same. This is essentially
required in case of multi-cluster SoC's e.g Exynos5420.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agocpuidle: big.LITTLE: add of_device_id structure
Chander Kashyap [Fri, 4 Jul 2014 21:24:34 +0000 (06:24 +0900)]
cpuidle: big.LITTLE: add of_device_id structure

This driver will be used by many big.Little Soc's. As of now it does
string matching of hardcoded compatible string to init the driver. This
comparison list will keep on growing with addition of new SoC's.
Hence add of_device_id structure to collect the compatible strings of
SoC's using this driver.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoARM: imx: clk-vf610: fix FlexCAN clock gating
Stefan Agner [Tue, 15 Jul 2014 12:56:19 +0000 (14:56 +0200)]
ARM: imx: clk-vf610: fix FlexCAN clock gating

Extend the clock control for FlexCAN with the second gate which
enable the clocks in the Clock Divider (CCM_CSCDR2) register too.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targets
Alexander Shiyan [Sun, 13 Jul 2014 05:34:00 +0000 (09:34 +0400)]
ARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targets

This patch uses clocksource_of_init() call for DT targets.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX53: globally disable supervisor protect
Steffen Trumtrar [Mon, 7 Jul 2014 09:41:27 +0000 (11:41 +0200)]
ARM: i.MX53: globally disable supervisor protect

Most peripherals on the i.MX53 have an
  Off-Platform Peripheral Access Control Register (OPACR)
in which the access rights (together with the MPROT registers) can be declared.
However, this does not seem to work for example for SSI1+SDMA, because the
supervisor bit is not set for the SDMA unit.
It does work for SSI2, the QSB for example uses SSI2 for its audio. But SSI2 only
works because it does NOT have an OPACR.

The right solution would be to fix the access rights for the SDMA, but the unit
responsible for this is the Central Security Unit (CSU), which of course is NOT
documented. So, until documentation for this is openly available, turn off the
supervisor protection because it cripples the hardware.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: allow disabling supervisor protect via DT
Steffen Trumtrar [Mon, 7 Jul 2014 09:41:26 +0000 (11:41 +0200)]
ARM: i.MX: allow disabling supervisor protect via DT

The i.MX SoCs allow to setup fine grained access rights to peripherals on the
AIPS bus.
This is done via the Peripheral Access Register (PAR) in e.g. the i.MX21
or in later SoC versions the Off-Platform Peripheral Access Control Register
(OPACR), e.g. i.MX53.
Under certain circumstances this leads to problems in which bus masters are
not granted their access rights to peripherals.
To be able to disable these restrictions on DT platforms, add a helper function
that looks for AIPS nodes in the DT and disables them for every compatible node
it finds.
The compatible has to be declared in the mach-specific entry file, where this
helper function should then be called.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX27 clk: Add 26 MHz oscillator circuit clock gate
Alexander Shiyan [Sat, 5 Jul 2014 05:36:09 +0000 (09:36 +0400)]
ARM: i.MX27 clk: Add 26 MHz oscillator circuit clock gate

This patch adds missing 26 MHz oscillator circuit clock gate support.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX27 clk: Remove unused definitions
Alexander Shiyan [Sat, 5 Jul 2014 05:36:08 +0000 (09:36 +0400)]
ARM: i.MX27 clk: Remove unused definitions

This patch removes definitions which not used anywhere in the driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX27 clk: Introduce DT include for clock provider
Alexander Shiyan [Sat, 5 Jul 2014 05:36:06 +0000 (09:36 +0400)]
ARM: i.MX27 clk: Introduce DT include for clock provider

Use clock defines in order to make devicetrees more human readable.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove Freescale Logic Product Development i.MX27 Lite-Kit board support
Alexander Shiyan [Sat, 5 Jul 2014 05:00:01 +0000 (09:00 +0400)]
ARM: i.MX: Remove Freescale Logic Product Development i.MX27 Lite-Kit board support

The board has no insufficient support to be fully functional and seems
has no users. This patch removes support for this board.
However, the support may be added in the future by using the devicetree.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove excess symbols ARCH_MX1, ARCH_MX25 and MACH_MX27
Alexander Shiyan [Sat, 5 Jul 2014 04:51:57 +0000 (08:51 +0400)]
ARM: i.MX: Remove excess symbols ARCH_MX1, ARCH_MX25 and MACH_MX27

This patch removes excess symbols ARCH_MX1, ARCH_MX25 and MACH_MX27.
Instead we use SOC_IMX*.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove i.MX1 camera support
Alexander Shiyan [Sat, 5 Jul 2014 04:51:38 +0000 (08:51 +0400)]
ARM: i.MX: Remove i.MX1 camera support

i.MX1 camera driver has been removed by the commit 90b055898e.
This patch removes remaining support files for this camera.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: use PTR_ERR_OR_ZERO
Fabian Frederick [Fri, 4 Jul 2014 19:03:10 +0000 (21:03 +0200)]
ARM: imx: use PTR_ERR_OR_ZERO

replace IS_ERR/PTR_ERR

Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agobus: imx-weim: populate devices on a simple bus
Liu Ying [Fri, 4 Jul 2014 09:00:41 +0000 (17:00 +0800)]
bus: imx-weim: populate devices on a simple bus

There could be some memory map devices located in
a certain chip select region of the i.MX WEIM.
The devices could be attached to a simple bus(for
example, a AXI bus) whose root node is one child
device tree node of the i.MX WEIM device tree node.
There should be a bridge(very likely, software
transparent) bewteen the i.MX WEIM and the simple bus.
This patch makes the i.MX WEIM driver possible to
populate devices on a simple bus.  In this way, people
may try various IPs(in a FPGA, maybe) outside of i.MX
chips with the i.MX WEIM embedded.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: build cpu_is_imx6sl function conditionally
Arnd Bergmann [Thu, 3 Jul 2014 14:22:54 +0000 (16:22 +0200)]
ARM: imx: build cpu_is_imx6sl function conditionally

imx6q_pm_enter calls imx6sl_set_wait_clk when run on an imx6sl
based machine. However if support for imx6sl is not enabled
at compile time, this prevents us from building the kernel and
we get this link error instead:

arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':
:(.text+0x4b84): undefined reference to `imx6sl_set_wait_clk'

This makes the cpu_is_imx6sl function conditionally return false
if imx6sl is disabled at compile-time, which matches what the
older cpu_is_mx* macros did. We have similar inline functions for
the other imx6 variants, but so far I have not run into a case
where the extra #ifdef is necessary.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: imx6sx uses imx6q cpuidle code
Arnd Bergmann [Thu, 3 Jul 2014 14:16:06 +0000 (16:16 +0200)]
ARM: imx: imx6sx uses imx6q cpuidle code

Building a kernel for imx6sx but without imx6q support results in
this link error because of the missing cpuidle driver:

arch/arm/mach-imx/built-in.o: In function `imx6sx_init_late'::(.init.text+0xc228):
 undefined reference to `imx6q_cpuidle_init'

This patch adds a Makefile entry so we always build support for
the imx6q_cpuidle code when at least one of the 6sx or 6q variants
are enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: drop PL310 errata 588369 and 727915
Shawn Guo [Wed, 2 Jul 2014 07:24:30 +0000 (15:24 +0800)]
ARM: imx: drop PL310 errata 588369 and 727915

The PL310 integrated on i.MX6 series and VF610 are revision r3p1 and
later.  Per ARM PL310 errata document, 588369 is fixed in r2p0 and
727915 is fixed in r3p1.  Neither is needed for i.MX6 or VF610.  So
let's drop them.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx_v6_v7_defconfig: add FSL_EDMA and PRINTK_TIME
Stefan Agner [Wed, 2 Jul 2014 19:13:19 +0000 (21:13 +0200)]
ARM: imx_v6_v7_defconfig: add FSL_EDMA and PRINTK_TIME

Add EDMA for DMA support for Vybrid SoCs. Also add printk time.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: clk-imx6sx: register SSI/SSI_IPG as shared gate clocks
Fabio Estevam [Wed, 2 Jul 2014 14:58:51 +0000 (11:58 -0300)]
ARM: imx: clk-imx6sx: register SSI/SSI_IPG as shared gate clocks

SSI and SSI_IPG are clocks controlled by the same clock gating field, so
register them with imx_clk_gate2_shared.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx_v6_v7_defconfig: Enable flexcan driver for can support
Silvio Fricke [Tue, 1 Jul 2014 11:09:02 +0000 (13:09 +0200)]
ARM: imx_v6_v7_defconfig: Enable flexcan driver for can support

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx_v6_v7_defconfig: Enable STMPE gpio support
Silvio Fricke [Tue, 1 Jul 2014 11:08:58 +0000 (13:08 +0200)]
ARM: imx_v6_v7_defconfig: Enable STMPE gpio support

Enable STMPE gpio support as this is used on MX6 Data Modul edm-qmx6
board.

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: mark .dt_compat as const
Shawn Guo [Tue, 1 Jul 2014 08:03:00 +0000 (16:03 +0800)]
ARM: imx: mark .dt_compat as const

Otherwise GCC will mark the .init.rodata section R/W, which causes
a compile error once we add other real R/O data.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: mx6: Only check for 1.2GHz for mx6quad
Fabio Estevam [Tue, 1 Jul 2014 03:12:52 +0000 (00:12 -0300)]
ARM: mx6: Only check for 1.2GHz for mx6quad

It is only the mx6quad variant that can run up to 1.2GHz, so add the check
accordingly.

This avoids getting the following warning on a mx6solo:

failed to disable 1.2 GHz OPP

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx_v4_v5_defconfig: Add USB device options
Fabio Estevam [Wed, 25 Jun 2014 20:28:53 +0000 (17:28 -0300)]
ARM: imx_v4_v5_defconfig: Add USB device options

Allow USB device to work by default.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX25 clk: Use of_clk_init() for DT case
Denis Carikli [Wed, 25 Jun 2014 12:41:36 +0000 (14:41 +0200)]
ARM: i.MX25 clk: Use of_clk_init() for DT case

Replace .init_time() hook with of_clk_init() for DT targets.

Based on:
  d4347ee ARM: i.MX27 clk: Use of_clk_init() for DT case

Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM i.MX25 clk: Fix gpt timer clock.
Denis Carikli [Wed, 25 Jun 2014 12:41:34 +0000 (14:41 +0200)]
ARM i.MX25 clk: Fix gpt timer clock.

The gpt0 timer clock has been wrong since:
  6bbaec5 ARM i.MX25: implement clocks using common clock framework

Signed-off-by: Denis Carikli <denis@eukrea.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX21 clk: Add devicetree support
Alexander Shiyan [Sun, 22 Jun 2014 13:17:09 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Add devicetree support

This patch adds devicetree support CCM module for i.MX21 CPUs.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX21 clk: Cleanup driver
Alexander Shiyan [Sun, 22 Jun 2014 13:17:08 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Cleanup driver

This is a cleanup for i.MX21 clk driver. This change includes:
- Reduce license text.
- Remove unused definitions.
- Remove unused #include and sort the rest.
- Remove useless comment.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX21 clk: Remove clk_register_clkdev() for unused clocks
Alexander Shiyan [Sun, 22 Jun 2014 13:17:07 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Remove clk_register_clkdev() for unused clocks

This patch removes clk_register_clkdev() for the clocks that do not
have any users for boards and drivers.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX21 clk: Clock initialization rework
Alexander Shiyan [Sun, 22 Jun 2014 13:17:06 +0000 (17:17 +0400)]
ARM: i.MX21 clk: Clock initialization rework

This patch perform rework i.MX21 clock initialization. This includes
adding missing clocks and sort clocks by register address.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: clk-imx51-imx53: Remove clk_register_clkdev()
Fabio Estevam [Tue, 24 Jun 2014 18:42:58 +0000 (15:42 -0300)]
ARM: clk-imx51-imx53: Remove clk_register_clkdev()

mx51 and mx53 are device tree only platforms, so we no longer need all these
calls to clk_register_clkdev().

Only keep cpu0 and gpc_dvfs clk_register_clkdev() calls.

Tested on imx51-babbage and imx53-qsb boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add standby mode support for suspend
Anson Huang [Mon, 23 Jun 2014 08:42:44 +0000 (16:42 +0800)]
ARM: imx: add standby mode support for suspend

Add standby mode support for suspend, to enter standby mode:

echo standby > /sys/power/state;

Use UART or RTC alarm to wake up system, when system enters
standby mode, SOC will enter STOP mode with ARM core kept
power on and 24M XTAL on.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: mem bit must be cleared before entering DSM mode
Anson Huang [Mon, 23 Jun 2014 08:42:43 +0000 (16:42 +0800)]
ARM: imx: mem bit must be cleared before entering DSM mode

According to hardware design, mem bit must be clear before
entering DSM mode, as ARM core will be power gated in DSM mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx6qdl: switch to use macro for clock ID
Shawn Guo [Sun, 15 Jun 2014 11:35:10 +0000 (19:35 +0800)]
ARM: imx6qdl: switch to use macro for clock ID

Instead of using enum for clock ID, let's switch imx6qdl clock driver to
use macro.  In this case, device tree can reuse these macros to improve
readability.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add cpuidle support for i.mx6sx
Anson Huang [Fri, 20 Jun 2014 05:44:05 +0000 (13:44 +0800)]
ARM: imx: add cpuidle support for i.mx6sx

Add cpuidle support for i.MX6SX, derive from i.MX6Q's
cpuidle, two levels supported:

1. WFI;
2. WAIT mode.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: add suspend support for i.mx6sx
Anson Huang [Fri, 20 Jun 2014 05:20:54 +0000 (13:20 +0800)]
ARM: imx: add suspend support for i.mx6sx

Add suspend support for i.MX6SX.

To enter suspend, echo mem > /sys/power/state.
To exit suspend, using RTC alarm or enable debug UART wakeup.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove Freescale i.MX27 IP Camera board support
Alexander Shiyan [Wed, 18 Jun 2014 17:26:39 +0000 (21:26 +0400)]
ARM: i.MX: Remove Freescale i.MX27 IP Camera board support

The board has no insufficient support to be fully functional and seems
has no users. This patch removes support for this board. However, the
support may be added in the future by using the devicetree.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX system: Add a reset fallback if base address of watchdog is not set
Alexander Shiyan [Fri, 13 Jun 2014 07:26:13 +0000 (11:26 +0400)]
ARM: i.MX system: Add a reset fallback if base address of watchdog is not set

This patch adds a reset fallback if base address of watchdog is not set.
This is intended for a targets not compatible with imx-21 watchdog,
i.MX1 for example.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX system: Simplify handling watchdog clock
Alexander Shiyan [Fri, 13 Jun 2014 07:26:12 +0000 (11:26 +0400)]
ARM: i.MX system: Simplify handling watchdog clock

This patch simplifies handling watchdog clock a bit.
As an additional change, now we properly check WDT clock in a reset
function.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx_v6_v7_defconfig: Select CONFIG_SOC_IMX6SX
Fabio Estevam [Tue, 17 Jun 2014 00:15:52 +0000 (21:15 -0300)]
ARM: imx_v6_v7_defconfig: Select CONFIG_SOC_IMX6SX

Let mx6sx be built by default.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX clk: Move clock check function in common location
Alexander Shiyan [Tue, 10 Jun 2014 15:40:26 +0000 (19:40 +0400)]
ARM: i.MX clk: Move clock check function in common location

This patch moves clock check function in common i.MX location
and switch i.MX clk drivers to use this new function.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX27 clk: Use of_clk_init() for DT case
Alexander Shiyan [Sat, 7 Jun 2014 16:09:26 +0000 (20:09 +0400)]
ARM: i.MX27 clk: Use of_clk_init() for DT case

Replace .init_time() hook with of_clk_init() for DT targets.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX27 clk: Separate DT and non-DT init procedure
Alexander Shiyan [Sat, 7 Jun 2014 16:09:25 +0000 (20:09 +0400)]
ARM: i.MX27 clk: Separate DT and non-DT init procedure

This patch separates DT and non-DT clock initialization procedure,
so we can avoid a lot of unneeded clk_register_clkdev() for DT case.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove excess variable
Alexander Shiyan [Tue, 27 May 2014 09:04:47 +0000 (13:04 +0400)]
ARM: i.MX: Remove excess variable

Base address for driver is global, there are no need to use
intermediate variable for it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Use of_clk_get_by_name() for timer clocks for DT case.
Alexander Shiyan [Tue, 27 May 2014 09:04:46 +0000 (13:04 +0400)]
ARM: i.MX: Use of_clk_get_by_name() for timer clocks for DT case.

Use of_clk_get_by_name() for timer clocks for DT case.
This patch eliminates a lot of unneeded clk_register_clkdev()
calls for GPT.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: defconfig: Select CONFIG_FHANDLE
Fabio Estevam [Fri, 23 May 2014 13:27:37 +0000 (10:27 -0300)]
ARM: imx: defconfig: Select CONFIG_FHANDLE

CONFIG_FHANDLE=y is needed when running systemd with version >=210, so that it
can spawn a serial tty via getty.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove mx51.h and mx53.h
Shawn Guo [Tue, 20 May 2014 07:54:58 +0000 (15:54 +0800)]
ARM: imx5: remove mx51.h and mx53.h

Now all the macros in mx51.h and mx53.h are used nowhere, so remove
them.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: clean function declarations in mx51.h
Shawn Guo [Tue, 20 May 2014 07:09:42 +0000 (15:09 +0800)]
ARM: imx5: clean function declarations in mx51.h

The mx51_display_revision() is a dead declaration.  Remove it.  Also,
move mx51_revision() into common.h.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove file mm-imx5.c
Shawn Guo [Tue, 20 May 2014 07:46:46 +0000 (15:46 +0800)]
ARM: imx5: remove file mm-imx5.c

The only code left in mm-imx5.c is to create static mapping.  While all
IMX platform code are moved to use dynamic mapping, the file can just be
removed now.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: move init hooks into mach-imx5x.c
Shawn Guo [Tue, 20 May 2014 07:34:06 +0000 (15:34 +0800)]
ARM: imx5: move init hooks into mach-imx5x.c

These imx5 init_early[late] hooks are called only from mach-imx5x.c.
Let's move them into mach-imx5x.c.

While at it, replace the static mapping in imx51_ipu_mipi_setup() with
dynamic mapping.  Also this function and imx_src_init() do not
necessarily to be called at .init_early hook, so move them into
.init_machine.

The mxc_iomux_v3_init() is dropped from imx51_init_early() in the
moving, since it's only needed by non-DT boot.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: use dynamic mapping for Cortex and GPC block
Shawn Guo [Tue, 20 May 2014 06:55:15 +0000 (14:55 +0800)]
ARM: imx5: use dynamic mapping for Cortex and GPC block

The imx5 pm code uses static mapping to access Cortex and GPC registers.
The patch create struct imx5_pm_data to encode physical address of
Cortex and GPC block, and create dynamic mapping for them at run-time.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: reuse clock CCM mapping in pm code
Shawn Guo [Tue, 20 May 2014 05:41:36 +0000 (13:41 +0800)]
ARM: imx5: reuse clock CCM mapping in pm code

The imx5 pm code needs to access CCM registers.  Let's remove the use
of CCM static mapping in pm code by reusing the dynamic mapping created
in clock code.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: use dynamic mapping for DPLL block
Shawn Guo [Tue, 20 May 2014 05:08:45 +0000 (13:08 +0800)]
ARM: imx5: use dynamic mapping for DPLL block

Replace the static mapping of DPLL block with dynamic mapping by
calling ioremap().  Ideally, this should be done by calling of_iomap(),
so that the physical address of DPLL can also be retrieved from device
tree.  But unfortunately, DPLL blocks are not defined in DT in the first
place.  So to maintain the compatibility of existing DTB, we use
ioremap() with physical address defines in the code.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: use dynamic mapping for CCM block
Shawn Guo [Tue, 20 May 2014 03:20:28 +0000 (11:20 +0800)]
ARM: imx5: use dynamic mapping for CCM block

Replace the static mapping of CCM block with dynamic mapping and
retrieve CCM base address from device tree.  Though it's not nice to
encode the variable ccm_base in macros, it helps to avoid a massive
churn on the code.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove header crm-regs-imx5.h
Shawn Guo [Tue, 20 May 2014 02:23:50 +0000 (10:23 +0800)]
ARM: imx5: remove header crm-regs-imx5.h

Most of the macros in crm-regs-imx5.h are used nowhere.  Let's move the
needed ones into the C files, and remove the header.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: retrieve iim base from device tree
Shawn Guo [Mon, 19 May 2014 14:23:43 +0000 (22:23 +0800)]
ARM: imx5: retrieve iim base from device tree

Instead of using static define and mapping, the patch changes imx5 code
that reads chip revision from IIM to retrieve base address from device
tree and use dynamic mapping.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: call mxc_timer_init_dt() on imx51
Shawn Guo [Mon, 19 May 2014 13:15:03 +0000 (21:15 +0800)]
ARM: imx5: call mxc_timer_init_dt() on imx51

Since i.MX51 supports DT only, it's more appropriate to call
mxc_timer_init_dt() than mxc_timer_init() to initialize timer.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove function imx51_soc_init()
Shawn Guo [Mon, 19 May 2014 13:08:43 +0000 (21:08 +0800)]
ARM: imx5: remove function imx51_soc_init()

The function imx51_soc_init() was used by non-DT boot only.  Since
i.MX51 supports DT only, the function can be removed now.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: tzic_init_irq() can directly be .init_irq hook
Shawn Guo [Mon, 19 May 2014 12:19:06 +0000 (20:19 +0800)]
ARM: imx5: tzic_init_irq() can directly be .init_irq hook

After i.MX51 supports DT only, tzic_init_irq() can figure out the
tzic_base on its own.  Thus, it can directly be .init_irq hook, and
mx51[53]_init_irq() can be saved.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: drop arguments from mx5_clocks_common_init()
Shawn Guo [Mon, 19 May 2014 07:47:32 +0000 (15:47 +0800)]
ARM: imx5: drop arguments from mx5_clocks_common_init()

The function mx5_clocks_common_init() was created with a number of
arguments to pass oscillator clock rate in non-DT boot.  Since i.MX5
is DT only platform, the arguments can be dropped, and the clock rate
can just be retrieved from device tree.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: make mx51_clocks_init() a DT call
Shawn Guo [Mon, 19 May 2014 07:43:42 +0000 (15:43 +0800)]
ARM: imx5: make mx51_clocks_init() a DT call

Since i.MX51 becomes a DT only platform, we can make mx51_clocks_init()
a DT call and save function mx51_clocks_init_dt() now.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove i.MX5 non-DT device registration helpers
Shawn Guo [Mon, 19 May 2014 06:19:11 +0000 (14:19 +0800)]
ARM: imx5: remove i.MX5 non-DT device registration helpers

i.MX5 is DT only platforms, so these non-DT device registration helpers
is used nowhere.  Remove them.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: remove imx51 non-DT support files
Shawn Guo [Mon, 19 May 2014 06:01:54 +0000 (14:01 +0800)]
ARM: imx5: remove imx51 non-DT support files

Since i.MX51 becomes a DT only platform, those non-DT support files can
be removed now.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: drop option MACH_IMX51_DT
Shawn Guo [Mon, 19 May 2014 05:47:43 +0000 (13:47 +0800)]
ARM: imx5: drop option MACH_IMX51_DT

Since i.MX51 becomes DT only now, we can drop option MACH_IMX51_DT and
just use SOC_IMX51 instead.  While at it, rename imx51-dt.c to
mach-imx51.c to align with the name schema of other IMX DT only
platforms.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx5: move SOC_IMX5 and SOC_IMX51 into 'Device tree only'
Shawn Guo [Mon, 19 May 2014 05:37:50 +0000 (13:37 +0800)]
ARM: imx5: move SOC_IMX5 and SOC_IMX51 into 'Device tree only'

After moving SOC_IMX51 support over to device tree, all i.MX5 support
becomes device tree only now.  So options SOC_IMX5 and SOC_IMX51 can
just be under 'Device tree only'.

While at it, 'select ARCH_MXC_IOMUX_V3' is dropped, since it's only
needed by non-DT build before.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: move EHCI platform defines out of platform_data header
Shawn Guo [Mon, 19 May 2014 12:41:52 +0000 (20:41 +0800)]
ARM: imx: move EHCI platform defines out of platform_data header

The platform_data header usb-ehci-mxc.h has a lot of stuff used by only
IMX platform code.  They shouldn't be really in this header but a IMX
platform local header.  Create ehci.h and move these stuff into it.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Remove registration helper for i.MX1 USB UDC
Alexander Shiyan [Tue, 20 May 2014 16:43:51 +0000 (20:43 +0400)]
ARM: i.MX: Remove registration helper for i.MX1 USB UDC

imx_udc driver was removed from the kernel of about 10 months ago.
This patch removes a registration helper for this driver and
orphaned driver header.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX1 clk: Add devicetree support
Alexander Shiyan [Tue, 20 May 2014 16:43:49 +0000 (20:43 +0400)]
ARM: i.MX1 clk: Add devicetree support

This patch adds devicetree support CCM module for i.MX1 (MC9328MX1) CPUs.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: imx: remove unused defines
Paul Bolle [Fri, 16 May 2014 09:09:29 +0000 (11:09 +0200)]
ARM: imx: remove unused defines

None of the defines "for modules using static and dynamic DMA channels"
are used. Remove these.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: i.MX: Select HAVE_IMX_SRC for i.MX5 globally
Alexander Shiyan [Mon, 19 May 2014 05:21:17 +0000 (13:21 +0800)]
ARM: i.MX: Select HAVE_IMX_SRC for i.MX5 globally

No reason to choose a symbol HAVE_IMX_SRC separately for each supported
i.MX5 CPU, this patch selects this symbol globally for i.MX5.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoMerge tag 'imx-fixes-3.16-2' into imx/soc
Shawn Guo [Fri, 18 Jul 2014 08:09:07 +0000 (16:09 +0800)]
Merge tag 'imx-fixes-3.16-2' into imx/soc

The i.MX fixes for 3.16, 2nd take:

It fixes a hard machine hang regression for boards where only pcie is
active but no sata, as the latest imx6-pcie driver is no longer enabling
the upstream clock directly but only lvds clk out.

9 years agoARM: clk-imx6q: parent lvds_sel input from upstream clock gates
Lucas Stach [Thu, 17 Jul 2014 10:20:14 +0000 (12:20 +0200)]
ARM: clk-imx6q: parent lvds_sel input from upstream clock gates

The i.MX6 reference manual doesn't make a clear distinction
between the fixed clock divider and the enable gate for the
pcie and sata reference clocks. This lead to the lvds mux
inputs in the imx6q clk driver to be parented from the
ref clock (which is the divider) instead of the actual gate,
which in turn prevents the upstream clock to actually be
enabled when lvds clk out is active.

This fixes a hard machine hang regression in kernel 3.16 for
boards where only pcie is active but no sata, as with this
kernel version the imx6-pcie driver is no longer enabling
the upstream clock directly but only lvds clk out.

Reported-by: Arne Ruhnau <arne.ruhnau@target-sg.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Arne Ruhnau <arne.ruhnau@target-sg.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoARM: OMAP2+: clock/interface: remove some headers from clkt_iclk.c file
Tero Kristo [Wed, 2 Jul 2014 08:47:47 +0000 (11:47 +0300)]
ARM: OMAP2+: clock/interface: remove some headers from clkt_iclk.c file

Instead, copy the used constants from the header file to the source file.
This allows the code to be migrated under drivers folder where we don't
have access to the OMAP specific header files.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoARM: OMAP2+: clock/dpll: remove unused header includes from dpll3xxx.c
Tero Kristo [Wed, 2 Jul 2014 08:47:46 +0000 (11:47 +0300)]
ARM: OMAP2+: clock/dpll: remove unused header includes from dpll3xxx.c

Some of the machine specific header includes are no longer used, so remove
these from the source file. This allows migration of the file under clock
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
9 years agoARM: OMAP2+: clock/dpll: remove unused header includes from clkt_dpll.c
Tero Kristo [Wed, 2 Jul 2014 08:47:45 +0000 (11:47 +0300)]
ARM: OMAP2+: clock/dpll: remove unused header includes from clkt_dpll.c

Some of the machine specific header includes are no longer used, so remove
these from the source file. This allows migration of the file under clock
driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>