OSDN Git Service

uclinux-h8/linux.git
5 years agoMerge tag 'imx-soc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Olof Johansson [Mon, 29 Apr 2019 16:26:04 +0000 (09:26 -0700)]
Merge tag 'imx-soc-5.2' of git://git./linux/kernel/git/shawnguo/linux into arm/soc

i.MX SoC update for 5.2:
 - Optimize i.MX6 cpuidle driver a little bit by omitting the
   unnecessary unmask of GINT for WAIT_CLOCKED mode.

* tag 'imx-soc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx6: cpuidle: omit the unnecessary unmask of GINT

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'lpc32xx-soc-for-5.2' of https://github.com/vzapolskiy/linux-lpc32xx into...
Olof Johansson [Mon, 29 Apr 2019 16:24:11 +0000 (09:24 -0700)]
Merge tag 'lpc32xx-soc-for-5.2' of https://github.com/vzapolskiy/linux-lpc32xx into arm/soc

ARM: lpc32xx: platform updates for v5.2

Here are the changes for ARM NXP LPC32xx platform files:

* removed TEST_CLK_SEL setup out of common clock framework control,
* unnecessary header files are removed from inclusion,
* registration of SSP0 and SSP1 is removed as done through device tree,
* switched the main platform file to SPDX license identifier.

* tag 'lpc32xx-soc-for-5.2' of https://github.com/vzapolskiy/linux-lpc32xx:
  ARM: lpc32xx: use SPDX license identifier
  ARM: lpc32xx: remove platform data of SSP0 and SSP1 controllers
  ARM: lpc32xx: remove redundant included headers
  ARM: lpc32xx: stop overwriting TEST_CLK_SEL

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'ixp4xx-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Olof Johansson [Mon, 29 Apr 2019 06:43:07 +0000 (23:43 -0700)]
Merge tag 'ixp4xx-for-armsoc' of git://git./linux/kernel/git/linusw/linux-nomadik into arm/soc

This modernizes the IXP4xx platform and adds initial Device Tree
Support. We migrate to MULTI_IRQ_HANDLER, bumps the IRQs to
offset 16, converts to SPARSE_IRQ, then we add proper subsystem
drivers in each subsystem for irqchip, GPIO and clocksource and
switch over to using these new drivers.

Next we modernize the NPE and QMGR drivers and push them down
into drivers/soc.

This has been tested on the IXP4xx NSLU2 and the Gateworks
GW2358-4.

* tag 'ixp4xx-for-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: (31 commits)
  ARM: dts: Add queue manager and NPE to the IXP4xx DTSI
  soc: ixp4xx: qmgr: Add DT probe code
  soc: ixp4xx: qmgr: Add DT bindings for IXP4xx qmgr
  soc: ixp4xx: npe: Add DT probe code
  soc: ixp4xx: Add DT bindings for IXP4xx NPE
  soc: ixp4xx: qmgr: Pass resources
  soc: ixp4xx: Remove unused functions
  soc: ixp4xx: Uninline several functions
  soc: ixp4xx: npe: Pass addresses as resources
  ARM: ixp4xx: Turn the QMGR into a platform device
  ARM: ixp4xx: Turn the NPE into a platform device
  ARM: ixp4xx: Move IXP4xx QMGR and NPE headers
  ARM: ixp4xx: Move NPE and QMGR to drivers/soc
  ARM: dts: Add some initial IXP4xx device trees
  ARM: ixp4xx: Add device tree boot support
  ARM: ixp4xx: Add DT bindings
  gpio: ixp4xx: Add OF probing support
  gpio: ixp4xx: Add DT bindings
  clocksource/drivers/ixp4xx: Add OF initialization support
  clocksource/drivers/ixp4xx: Add DT bindings
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'renesas-arm-soc-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 29 Apr 2019 06:40:51 +0000 (23:40 -0700)]
Merge tag 'renesas-arm-soc-for-v5.2' of https://git./linux/kernel/git/horms/renesas into arm/soc

Renesas ARM Based SoC Updates for v5.2

* Power Management
  - Fix a leaked reference by adding missing of_node_put

* R-Car M2-W (R8A77910) based Porter board
  - Enable regulator quirk

* tag 'renesas-arm-soc-for-v5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: fix a leaked reference by adding missing of_node_put
  ARM: shmobile: porter: enable R-Car Gen2 regulator quirk

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'tegra-for-5.2-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 29 Apr 2019 06:34:46 +0000 (23:34 -0700)]
Merge tag 'tegra-for-5.2-firmware' of git://git./linux/kernel/git/tegra/linux into arm/soc

firmware: tegra: Changes for v5.2-rc1

This set of changes includes improvements for Trusted Foundations and
also moves the source files for this support into the standard location
under drivers/firmware.

* tag 'tegra-for-5.2-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: Move Trusted Foundations support
  ARM: tegra: Sort dependencies alphabetically
  ARM: tegra: Add firmware calls required for suspend-resume on Tegra30
  ARM: tegra: Always boot CPU in ARM-mode
  ARM: tegra: Don't apply CPU erratas in insecure mode
  ARM: tegra: Set up L2 cache using Trusted Foundations firmware
  ARM: trusted_foundations: Provide information about whether firmware is registered
  ARM: trusted_foundations: Make prepare_idle call to take mode argument
  ARM: trusted_foundations: Support L2 cache maintenance

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: debug-ll: add default address for digicolor
Arnd Bergmann [Wed, 17 Apr 2019 15:13:27 +0000 (17:13 +0200)]
ARM: debug-ll: add default address for digicolor

The digicolor platform has three UARTs, but the Kconfig.debug
file explicitly lists port zero as the one to be used for the
console, while not providing any default values.

This can get an automated randconfig build stuck in a loop
waiting for the user to input the number. As we already know
the physical address, this patch provides that number as
default, along with a reasonable default value for the virtual
address.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'maintainers_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 29 Apr 2019 06:15:01 +0000 (23:15 -0700)]
Merge tag 'maintainers_for_v5.2' of git://git./linux/kernel/git/dinguyen/linux into arm/soc

MAINTAINERS
- Add Intel Agilex platform under Dinh Nguyen

* tag 'maintainers_for_v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  MAINTAINERS: Add arm64/intel entry for SoCFPGA

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: u300: regulator: add MODULE_LICENSE()
Arnd Bergmann [Tue, 16 Apr 2019 12:29:57 +0000 (14:29 +0200)]
ARM: u300: regulator: add MODULE_LICENSE()

The missing license showed up as a randconfig warning now, no idea
why we never saw that earlier.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: ep93xx: move private headers out of mach/*
Arnd Bergmann [Mon, 15 Apr 2019 20:17:12 +0000 (22:17 +0200)]
ARM: ep93xx: move private headers out of mach/*

gpio-ep93xx.h, hardware.h, and platform.h are only used in
arch/arm/mach-ep93xx, so we can move them one there and no
longer expose them to device drivers.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: ep93xx: move pinctrl interfaces into include/linux/soc
Arnd Bergmann [Mon, 15 Apr 2019 20:17:11 +0000 (22:17 +0200)]
ARM: ep93xx: move pinctrl interfaces into include/linux/soc

ep93xx does not have a proper pinctrl driver, but does things
ad-hoc through mach/platform.h, which is also used for setting
up the boards.

To avoid using mach/*.h headers completely, let's move the interfaces
into include/linux/soc/. This is far from great, but gets the job
done here, without the need for a proper pinctrl driver.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: ep93xx: keypad: stop using mach/platform.h
Arnd Bergmann [Mon, 15 Apr 2019 20:17:10 +0000 (22:17 +0200)]
ARM: ep93xx: keypad: stop using mach/platform.h

We can communicate the clock rate using platform data rather than setting
a flag to use a particular value in the driver, which is cleaner and
avoids the dependency.

No platform in the kernel currently defines the ep93xx keypad device
structure, so this is a rather pointless excercise.  Any out of tree
users are probably dead now, but if not, they have to change their
platform code to match the new platform_data structure.

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: ep93xx: move network platform data to separate header
Arnd Bergmann [Mon, 15 Apr 2019 20:17:09 +0000 (22:17 +0200)]
ARM: ep93xx: move network platform data to separate header

The header file is the only thing preventing us from building the
driver in a cross-platform configuration, so move the structure
we are interested in to the global platform_data location
and enable compile testing.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'davinci-for-v5.2/soc' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Mon, 29 Apr 2019 06:07:37 +0000 (23:07 -0700)]
Merge tag 'davinci-for-v5.2/soc' of git://git./linux/kernel/git/nsekhar/linux-davinci into arm/soc

This update for DaVinci SoC support simplifies the VBUS enable
and overcurrent handling code in DA8XX OHCI driver by modeling
vbus GPIO as a regulator. This unifies code for all users, device
tree and non-device-tree.

The OHCI driver patches have been acked by its maintainer.

* tag 'davinci-for-v5.2/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  usb: ohci-da8xx: drop the vbus GPIO
  ARM: davinci: da830-evm: add a fixed regulator for ohci-da8xx
  ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx
  usb: ohci-da8xx: disable the regulator if the overcurrent irq fired
  usb: ohci-da8xx: let the regulator framework keep track of use count
  ARM: davinci: add missing sentinels to GPIO lookup tables

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'pxa-for-5.2' of https://github.com/rjarzmik/linux into arm/soc
Olof Johansson [Mon, 29 Apr 2019 06:06:29 +0000 (23:06 -0700)]
Merge tag 'pxa-for-5.2' of https://github.com/rjarzmik/linux into arm/soc

This is the pxa changes for 5.2 cycle :
 - only a little fix the PXA SSP removal path

* tag 'pxa-for-5.2' of https://github.com/rjarzmik/linux:
  ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'samsung-soc-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk...
Olof Johansson [Mon, 29 Apr 2019 06:04:41 +0000 (23:04 -0700)]
Merge tag 'samsung-soc-5.2' of https://git./linux/kernel/git/krzk/linux into arm/soc

Samsung mach/soc changes for v5.2

1. Cleanup in mach code.
2. Add necessary fixes for Suspend to RAM on Exynos5422 boards (tested
   with Odroid XU3/XU4/HC1 family).  Finally this brings a working S2R
   on these Odroid boards (still other drivers might have some issues
   but mach code seems to be finished).
3. Require MCPM for Exynos542x boards because otherwise not all of cores
   will come online.
4. GPIO regulator cleanup on S3C6410 Craig.

* tag 'samsung-soc-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: s3c64xx: Tidy up handling of regulator GPIO lookups
  ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs
  ARM: exynos: Fix infinite loops on CPU powerup failure
  ARM: exynos: Fix a leaked reference by adding missing of_node_put
  ARM: exynos: Fix undefined instruction during Exynos5422 resume
  ARM: exynos: Add CPU state management for Exynos542x under secure firmware
  ARM: exynos: Add Exynos SMC values for secure memory write
  ARM: exynos: Move Exynos542x CPU state reset to pm_prepare()

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'omap-for-v5.2/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 29 Apr 2019 06:03:35 +0000 (23:03 -0700)]
Merge tag 'omap-for-v5.2/ti-sysc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into arm/soc

Driver changes for ti-sysc for v5.2 merge window

This series of changes for ti-sysc interconnect target module driver
gets us to the point where we can actually drop legacy platform data
for many devices in favor of device tree data.

To do this, we improve ti-sysc driver not to rely on platform data
callbacks to manage module clocks, and handle more quirks needed for
some devices. Also few minor fixes are needed, but were considered
not needed to be sent separately as they only show up with this series.

Then we drop several thousands of lines of legacy platform data for
omap4, omap5, dra7, am335x and am437x. We drop platform data for mmc,
i2c, gpio and uart devices to start with as those are typically
easily tested on all devices. In case of unexpected issues, we can just
add back the legacy platform data for a single device type if needed.

Finally we add initial support for enabling and disabling some devices
without legacy platform data callbacks. I was planning on sending the
dropping of legacy platform data as a separate series, but already
applied Roger's patch on top and pushed it out.

Note that this series depends on related SoC and is based on those.

* tag 'omap-for-v5.2/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (33 commits)
  bus: ti-sysc: Add generic enable/disable functions
  ARM: OMAP2+: Drop mcspi platform data for omap4
  ARM: OMAP2+: Drop uart platform data for dra7
  ARM: OMAP2+: Drop gpio platform data for dra7
  ARM: OMAP2+: Drop i2c platform data for dra7
  ARM: OMAP2+: Drop mmc platform data for dra7
  ARM: OMAP2+: Drop uart platform data for omap5
  ARM: OMAP2+: Drop gpio platform data for omap5
  ARM: OMAP2+: Drop i2c platform data for omap5
  ARM: OMAP2+: Drop mmc platform data for omap5
  ARM: OMAP2+: Drop uart platform data for am33xx and am43xx
  ARM: OMAP2+: Drop gpio platform data for am33xx and am43xx
  ARM: OMAP2+: Drop i2c platform data for am33xx and am43xx
  ARM: OMAP2+: Drop mmc platform data for am330x and am43xx
  ARM: OMAP2+: Drop uart platform data for omap4
  ARM: OMAP2+: Drop gpio platform data for omap4
  ARM: OMAP2+: Drop i2c platform data for omap4
  ARM: OMAP2+: Drop mmc platform data for omap4
  Documentation: bus: ti-sysc: fix spelling mistakes "multipe" and "interconnet"
  bus: ti-sysc: Detect DMIC for debugging
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoMerge tag 'omap-for-v5.2/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 29 Apr 2019 06:02:56 +0000 (23:02 -0700)]
Merge tag 'omap-for-v5.2/soc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into arm/soc

SoC changes for omap variants for v5.2 merge window

This series of changes mostly consists of ti-sysc interconnect driver
related preparation work. With these changes and the related ti-sysc
driver changes, we can start dropping legacy omap_hwmod_*data.c platform
data for many devices.

There are also two am335x and am437x related PM changes for secure
devices that have ROM handling some parts and needs EFUSE power domain
active.

* tag 'omap-for-v5.2/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: pm33xx-core: Do not Turn OFF CEFUSE as PPA may be using it
  ARM: OMAP2+: Wakeupgen: AM43xx HS devices should save context like non-HS
  ARM: OMAP2+: Handle reset quirks for dynamically allocated modules
  ARM: OMAP2+: Remove hwmod .rev data and use local SoC checks instead
  ARM: OMAP2+: Allocate struct omap_hwmod based on dts data
  ARM: OMAP2+: Define _HWMOD_STATE_DEFAULT and use it
  ARM: OMAP2+: Prepare class allocation for dynamically allocated modules
  ARM: OMAP2+: Make interconnect target module allocation functions static
  ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
  ARM: dts: Fix dcan clkctrl clock for am3

Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: stm32: add AMBA support for stm32 family
Ludovic Barre [Thu, 11 Apr 2019 13:44:08 +0000 (15:44 +0200)]
ARM: stm32: add AMBA support for stm32 family

This patch enables AMBA support for stm32 family.
stm32 family embeds different amba pl180 variants.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
5 years agoARM: dts: Add queue manager and NPE to the IXP4xx DTSI
Linus Walleij [Sun, 10 Feb 2019 22:43:33 +0000 (23:43 +0100)]
ARM: dts: Add queue manager and NPE to the IXP4xx DTSI

The AHB queue manager and Network Processing Engines are
present on all IXP4xx SoCs, so we add them to the overarching
device tree include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: qmgr: Add DT probe code
Linus Walleij [Sun, 10 Feb 2019 22:41:49 +0000 (23:41 +0100)]
soc: ixp4xx: qmgr: Add DT probe code

This makes the queue manager driver able to probe from the device
tree. It only needs to get a memory resource and two interrupts
and the platform device provides these as resources, so all is
pretty simple.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: qmgr: Add DT bindings for IXP4xx qmgr
Linus Walleij [Sun, 10 Feb 2019 22:40:28 +0000 (23:40 +0100)]
soc: ixp4xx: qmgr: Add DT bindings for IXP4xx qmgr

This adds device tree bindings for the Intel IXP4xx AHB
Queue Manager.

Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: npe: Add DT probe code
Linus Walleij [Sun, 10 Feb 2019 21:42:26 +0000 (22:42 +0100)]
soc: ixp4xx: npe: Add DT probe code

This makes the NPE driver able to probe from the device tree.
It only needs to get three memory resources and the plaform
device provide these, so all is pretty simple.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: Add DT bindings for IXP4xx NPE
Linus Walleij [Sun, 10 Feb 2019 21:40:48 +0000 (22:40 +0100)]
soc: ixp4xx: Add DT bindings for IXP4xx NPE

This adds DT bindings for the Intel IXP4xx Network Processing
Engine (NPE). These are three firmware-executing units found in
the IXP4xx SoC. These bindings use YAML.

Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: qmgr: Pass resources
Linus Walleij [Sun, 10 Feb 2019 19:20:10 +0000 (20:20 +0100)]
soc: ixp4xx: qmgr: Pass resources

Instead of using hardcoded base address implicitly
obtained through <linux/io.h>, pass the physical base
for the QMGR block as a memory resource and remap
it in the driver.

Also pass the two IRQs as resources and obtain them
in the driver.

Use devm_* accessors and simplify the error path in the
process. Drop memory region request as this is done by
the devm_ioremap* functions.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: Remove unused functions
Linus Walleij [Sun, 10 Feb 2019 19:18:06 +0000 (20:18 +0100)]
soc: ixp4xx: Remove unused functions

These former inlines turn out to be unused in the kernel.
If they are needed in the future, they can be resurrected
by reverting or studying this commit.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: Uninline several functions
Linus Walleij [Sun, 10 Feb 2019 19:15:11 +0000 (20:15 +0100)]
soc: ixp4xx: Uninline several functions

These inline functions immediately exploit the static ioremaps
for the queue manager memory region. This does not work with
multiplatform where everything need to be dynamically remapped,
so get rid of these inlines and create new exports for those
used by other drivers.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agosoc: ixp4xx: npe: Pass addresses as resources
Linus Walleij [Sun, 10 Feb 2019 18:35:08 +0000 (19:35 +0100)]
soc: ixp4xx: npe: Pass addresses as resources

Instead of using hardcoded base addresses implicitly
obtained through <linux/io.h>, pass the physical base
for the three NPE blocks as memory resources and remap
these in the driver.

Drop the memory request region business, this will
anyways be done by devm_* remapping functions.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Turn the QMGR into a platform device
Linus Walleij [Sun, 10 Feb 2019 16:14:10 +0000 (17:14 +0100)]
ARM: ixp4xx: Turn the QMGR into a platform device

Instead of registering everything related to the QMGR
unconditionally in the module_init() call (which will
never work with multiplatform) create a platform device
and probe the QMGR like any other device.

Put the device second in the list of devices added for
the platform so it is there when the dependent network
and crypto drivers probe later on.

This probe() path will not be taken unconditionally on
device tree boots, so remove the DT guard.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Turn the NPE into a platform device
Linus Walleij [Sun, 10 Feb 2019 16:05:29 +0000 (17:05 +0100)]
ARM: ixp4xx: Turn the NPE into a platform device

Instead of registering everything related to the NPE
unconditionally in the module_init() call (which will
never work with multiplatform) create a platform device
and probe the NPE like any other device.

Put the device first in the list of devices added for
the platform so it is there when the dependent network
and crypto drivers probe later on.

This probe() path will not be taken unconditionally on
device tree boots, so remove the DT guard.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Move IXP4xx QMGR and NPE headers
Linus Walleij [Sun, 10 Feb 2019 13:55:58 +0000 (14:55 +0100)]
ARM: ixp4xx: Move IXP4xx QMGR and NPE headers

This moves the IXP4xx Queue Manager and Network Processing
Engine headers out of the <mack/*> include path as that is
incompatible with multiplatform.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Move NPE and QMGR to drivers/soc
Linus Walleij [Sun, 10 Feb 2019 13:45:47 +0000 (14:45 +0100)]
ARM: ixp4xx: Move NPE and QMGR to drivers/soc

The Network Processing Engine and Queue Manager are
versatile firmware components used by several IXP4xx
drivers.

Drivers are relying on getting access to these components
using <mach/*> headers which does not work with
multiplatform. We need to find a better place for the
drivers to live.

Let's first move them to drivers/soc and the start to
refactor a bit by passing resources and moving headers.

This patch introduce static IRQ assignments but that
will be fixed by later patches in this series.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: dts: Add some initial IXP4xx device trees
Linus Walleij [Sun, 27 Jan 2019 13:11:41 +0000 (14:11 +0100)]
ARM: dts: Add some initial IXP4xx device trees

This adds a device tree for the IXP4xx-based Linksys
NSLU2 and Gateworks GW2358 which encompass the Gateworks
Cambria family.

These will be the first IXP4xx device tree platforms.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Add device tree boot support
Linus Walleij [Sun, 27 Jan 2019 13:08:36 +0000 (14:08 +0100)]
ARM: ixp4xx: Add device tree boot support

This adds a minimal support for booting IXP4xx systems
from device tree.

We have to add hacks to the QMGR, NPE and notably also
ethernet and watchdog drivers so that they don't crash
the platform: these drivers are unconditionally starting
to grab regions of statically remapped IO space with no
concern of the device model or other platforms.

We will go in and properly fix these drivers as we go
along but for now this hack gets us to a place where we
can start working on proper device tree support for these
platforms.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Add DT bindings
Linus Walleij [Sun, 3 Feb 2019 13:51:12 +0000 (14:51 +0100)]
ARM: ixp4xx: Add DT bindings

This adds initial device tree bindings for the IXP4xx machines.
This time I tried something wild and crazy and try to make proper
JSON-style YAML bindings for the top level.

Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agogpio: ixp4xx: Add OF probing support
Linus Walleij [Mon, 28 Jan 2019 20:16:44 +0000 (21:16 +0100)]
gpio: ixp4xx: Add OF probing support

This adds device tree probe and registration support for
the IXP4xx GPIO driver.

Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agogpio: ixp4xx: Add DT bindings
Linus Walleij [Fri, 1 Feb 2019 20:11:44 +0000 (21:11 +0100)]
gpio: ixp4xx: Add DT bindings

This adds DT bindings for the IXP4xx GPIO controller.

Cc: devicetree@vger.kernel.org
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoclocksource/drivers/ixp4xx: Add OF initialization support
Linus Walleij [Sun, 27 Jan 2019 13:06:56 +0000 (14:06 +0100)]
clocksource/drivers/ixp4xx: Add OF initialization support

This adds support for setting up the IXP4xx timer driver from
device tree.

Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoclocksource/drivers/ixp4xx: Add DT bindings
Linus Walleij [Fri, 1 Feb 2019 18:12:58 +0000 (19:12 +0100)]
clocksource/drivers/ixp4xx: Add DT bindings

This adds device tree bindings for the Intel IXP4xx
timers.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoirqchip: ixp4xx: Add OF initialization support
Linus Walleij [Sun, 27 Jan 2019 13:05:53 +0000 (14:05 +0100)]
irqchip: ixp4xx: Add OF initialization support

This adds support for probing and settin up the IXP4xx
irqchip from device tree.

Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoirqchip: ixp4xx: Add DT bindings
Linus Walleij [Fri, 1 Feb 2019 16:09:46 +0000 (17:09 +0100)]
irqchip: ixp4xx: Add DT bindings

This adds device tree bindings for the IXP4xx interrupt
controller. It's a standard 2-cell controller.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Switch to use new timer driver
Linus Walleij [Fri, 25 Jan 2019 23:51:51 +0000 (00:51 +0100)]
ARM: ixp4xx: Switch to use new timer driver

This augments the IXP4xx to select and use the new
timer driver in drivers/clocksource and removes the old
code in the machine.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoclocksource/drivers/ixp4xx: Add driver
Linus Walleij [Fri, 25 Jan 2019 23:49:19 +0000 (00:49 +0100)]
clocksource/drivers/ixp4xx: Add driver

This adds a new slightly rewritten timer driver for the
Intel IXP4xx clocksource, clockevent and delay timer.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Switch to use new IRQ+GPIO drivers
Linus Walleij [Fri, 25 Jan 2019 21:58:39 +0000 (22:58 +0100)]
ARM: ixp4xx: Switch to use new IRQ+GPIO drivers

This deletes the old irq+gpiochip combo from the IXP4xx
machine and switches it over to use the new drivers merged
in respective subsystem.

Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agogpio: ixp4xx: Add driver for the IXP4xx GPIO
Linus Walleij [Fri, 25 Jan 2019 20:59:11 +0000 (21:59 +0100)]
gpio: ixp4xx: Add driver for the IXP4xx GPIO

This adds a driver for the IXP4xx GPIO block found in
the Intel XScale IXP4xx systems.

The GPIO part of this block is pretty straight-forward and
just uses the generic MMIO GPIO library.

The irqchip side of this driver is hierarchical where
the main irqchip will receive a processed level trigger
in response to the edge detector of the GPIO block,
so for this reason the v2 version of the irqdomain API
is used (as well as in the parent IXP4xx irqchip) and
masking, unmasking and setting up the type on IRQ
happens on several levels.

Currently this GPIO controller will grab the parent
irqdomain using a special function, but as the platform
move toward device tree probing, this will not be needed:
we can just look up the parent irqdomain from the device
tree.

Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: lpc32xx: use SPDX license identifier
Vladimir Zapolskiy [Fri, 19 Apr 2019 19:55:28 +0000 (22:55 +0300)]
ARM: lpc32xx: use SPDX license identifier

Replace GPLv2+ header with the SPDX identifier.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
5 years agoARM: lpc32xx: remove platform data of SSP0 and SSP1 controllers
Vladimir Zapolskiy [Fri, 19 Apr 2019 19:55:27 +0000 (22:55 +0300)]
ARM: lpc32xx: remove platform data of SSP0 and SSP1 controllers

Both controllers are described in lpc32xx.dtsi and there is no any
specific platform data added in the platform file.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
5 years agoARM: lpc32xx: remove redundant included headers
Vladimir Zapolskiy [Fri, 19 Apr 2019 19:55:26 +0000 (22:55 +0300)]
ARM: lpc32xx: remove redundant included headers

While the majority of platform data was moved to device tree description
the list of included header files remained untouched, the change cleans
it up to an irreducible and observable subset.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
5 years agoARM: lpc32xx: stop overwriting TEST_CLK_SEL
Alexandre Belloni [Thu, 11 Apr 2019 14:12:09 +0000 (16:12 +0200)]
ARM: lpc32xx: stop overwriting TEST_CLK_SEL

While the UDA1380 is described in some lpc3250 device trees, there is
currently no real user of that codec. Anyway, if the codec needs a clock,
it should take it explicitly.

lpc3250_machine_init is called for all the lpc32xx machines and some are
using test1_clk (for example to strobe an HW watchdog). Overwriting
TEST_CLK_SEL prevents booting those platforms.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
5 years agoirqchip: Add driver for IXP4xx
Linus Walleij [Fri, 25 Jan 2019 15:41:25 +0000 (16:41 +0100)]
irqchip: Add driver for IXP4xx

The IXP4xx (arch/arm/mach-ixp4xx) is an old Intel XScale
platform that has very wide deployment and use.

As part of modernizing the platform, we need to implement a
proper irqchip in the irqchip subsystem.

The IXP4xx irqchip is tightly jotted together with the GPIO
controller, and whereas in the past we would deal with this
complex logic by adding necessarily different code, we can
nowadays modernize it using a hierarchical irqchip.

The actual IXP4 irqchip is a simple active low level IRQ
controller, whereas the GPIO functionality resides in a
different memory area and adds edge trigger support for
the interrupts.

The interrupts from GPIO lines 0..12 are 1:1 mapped to
a fixed set of hardware IRQs on this IRQchip, so we
expect the child GPIO interrupt controller to go in and
allocate descriptors for these interrupts.

For the other interrupts, as we do not yet have DT
support for this platform, we create a linear irqdomain
and then go in and allocate the IRQs that the legacy
boards use. This code will be removed on the DT probe
path when we add DT support to the platform.

We add some translation code for supporting DT
translations for the fwnodes, but we leave most of that
for later.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Convert to SPARSE_IRQ
Linus Walleij [Sat, 29 Dec 2018 14:47:52 +0000 (15:47 +0100)]
ARM: ixp4xx: Convert to SPARSE_IRQ

This localizes the <mach/irqs.h> header to the mach-ixp4xx
directory, removes NR_IRQS and switches IXP4xx over to using
SPARSE_IRQ.

This is a prerequisite for DT support.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Pass IRQ resource to beeper
Linus Walleij [Sat, 29 Dec 2018 14:49:08 +0000 (15:49 +0100)]
ARM: ixp4xx: Pass IRQ resource to beeper

All IXP4xx devices except the beeper passes the IRQ as a
resource, augment the NSLU2 beeper to do the same.

This is a prerequisite for SPARSE_IRQ.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Convert to MULTI_IRQ_HANDLER
Linus Walleij [Sat, 29 Dec 2018 13:30:27 +0000 (14:30 +0100)]
ARM: ixp4xx: Convert to MULTI_IRQ_HANDLER

This rewrites the IXP4xx to use MULTI_IRQ_HANDLER and
create an irqdomain for the irqchip in the platform. We
convert the timer to request the interrupt like any other
driver in the process.

We bump all IRQs to 16+offset to avoid using IRQ 0 and
set NR_IRQS to 512 (the default for most systems).
This conveniently fits with the first 16 IRQs being
pre-allocated when using SPARSE_IRQ.

This is a prerequisite for SPARSE_IRQ and DT boot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoARM: ixp4xx: Add myself as maintainer
Linus Walleij [Tue, 19 Mar 2019 07:25:05 +0000 (08:25 +0100)]
ARM: ixp4xx: Add myself as maintainer

I am working on the platform right now so might as well
maintain it for a bit.

Suggested-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agofirmware: Move Trusted Foundations support
Thierry Reding [Wed, 10 Apr 2019 08:47:28 +0000 (10:47 +0200)]
firmware: Move Trusted Foundations support

Move the Trusted Foundations support out of arch/arm/firmware and into
drivers/firmware where most other firmware support implementations are
located.

Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoMAINTAINERS: Add arm64/intel entry for SoCFPGA
Dinh Nguyen [Mon, 8 Apr 2019 18:40:22 +0000 (13:40 -0500)]
MAINTAINERS: Add arm64/intel entry for SoCFPGA

Add arch/arm64/boot/dts/intel/ under Dinh Nguyen.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
5 years agoARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"
YueHaibing [Tue, 29 Jan 2019 08:03:24 +0000 (16:03 +0800)]
ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data"

Since commit 1c459de1e645 ("ARM: pxa: ssp: use devm_ functions")
kfree, iounmap, clk_put etc are not needed anymore in remove path.

Fixes: 1c459de1e645 ("ARM: pxa: ssp: use devm_ functions")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
[ commit message spelling fix ]
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
5 years agoARM: s3c64xx: Tidy up handling of regulator GPIO lookups
Charles Keepax [Fri, 12 Apr 2019 07:14:58 +0000 (09:14 +0200)]
ARM: s3c64xx: Tidy up handling of regulator GPIO lookups

Rather than unconditionally registering the GPIO lookup table only do so
for devices that require it.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
[Fixed up to also handle wm5102 and wm5102 reva]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agousb: ohci-da8xx: drop the vbus GPIO
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:40 +0000 (14:36 +0200)]
usb: ohci-da8xx: drop the vbus GPIO

All users now setup a fixed regulator for the vbus supply. We can drop
the vbus GPIO code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: davinci: da830-evm: add a fixed regulator for ohci-da8xx
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:39 +0000 (14:36 +0200)]
ARM: davinci: da830-evm: add a fixed regulator for ohci-da8xx

Instead of directly using the vbus GPIO we should model it as a fixed
regulator. Add all necessary fix-ups for the regulator to be registered
and configure the vbus GPIO as its enable pin.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:38 +0000 (14:36 +0200)]
ARM: davinci: omapl138-hawk: add a fixed regulator for ohci-da8xx

Instead of directly using the vbus GPIO we should model it as a fixed
regulator. Add all necessary fix-ups for the regulator to be registered
and configure the vbus GPIO as its enable pin.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agousb: ohci-da8xx: disable the regulator if the overcurrent irq fired
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:37 +0000 (14:36 +0200)]
usb: ohci-da8xx: disable the regulator if the overcurrent irq fired

Historically the power supply management in this driver has been handled
in two separate places in parallel. Device-tree users simply defined an
appropriate regulator, while two boards with no DT support (da830-evm and
omapl138-hawk) passed functions defined in their respective board files
over platform data. These functions simply used legacy GPIO calls to
watch the oc GPIO for interrupts and disable the vbus GPIO when the irq
fires.

Commit d193abf1c913 ("usb: ohci-da8xx: add vbus and overcurrent gpios")
updated these GPIO calls to the modern API and moved them inside the
driver.

This however is not the optimal solution for the vbus GPIO which should
be modeled as a fixed regulator that can be controlled with a GPIO.

In order to keep the overcurrent protection available once we move the
board files to using fixed regulators we need to disable the enable_reg
regulator when the overcurrent indicator interrupt fires. Since we
cannot call regulator_disable() from interrupt context, we need to
switch to using a oneshot threaded interrupt.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agousb: ohci-da8xx: let the regulator framework keep track of use count
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:36 +0000 (14:36 +0200)]
usb: ohci-da8xx: let the regulator framework keep track of use count

There's no reason to have a separate variable to keep track of the
regulator state. The regulator core already does that. Remove
reg_enabled from struct da8xx_ohci_hcd.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: davinci: add missing sentinels to GPIO lookup tables
Bartosz Golaszewski [Fri, 12 Apr 2019 12:36:35 +0000 (14:36 +0200)]
ARM: davinci: add missing sentinels to GPIO lookup tables

Some GPIO lookup tables defined in davinci board files are missing
array sentinels. If an entry for given device cannot be found, this
will cause a kernel panic.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
5 years agoARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs
Marek Szyprowski [Tue, 9 Apr 2019 09:56:02 +0000 (11:56 +0200)]
ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs

Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all
CPU cores on all currectly supported platforms: Peach Pit (Exynos5420),
Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800).
Without it some CPU cores fail to come online. Remove then the ability to
disable MCPM and make it mandatory when Exynos542x/5800 support is
enabled.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: tegra: Sort dependencies alphabetically
Thierry Reding [Wed, 10 Apr 2019 08:17:47 +0000 (10:17 +0200)]
ARM: tegra: Sort dependencies alphabetically

The list of dependencies has become unsorted, which makes it difficult
to find the right place to insert new dependencies. Restore alphabetical
order to make future additions easier.

Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agobus: ti-sysc: Add generic enable/disable functions
Roger Quadros [Mon, 8 Apr 2019 09:52:39 +0000 (12:52 +0300)]
bus: ti-sysc: Add generic enable/disable functions

For non legacy cases, add generic sysc_enable_module()
and sysc_disable_module() functions.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: pm33xx-core: Do not Turn OFF CEFUSE as PPA may be using it
Kabir Sahane [Tue, 9 Apr 2019 15:05:17 +0000 (08:05 -0700)]
ARM: OMAP2+: pm33xx-core: Do not Turn OFF CEFUSE as PPA may be using it

This area is used to store keys by HSPPA in case of AM438x SOC. Leave it
active.

Signed-off-by: Kabir Sahane <x0153567@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Wakeupgen: AM43xx HS devices should save context like non-HS
Andrew F. Davis [Tue, 9 Apr 2019 15:05:16 +0000 (08:05 -0700)]
ARM: OMAP2+: Wakeupgen: AM43xx HS devices should save context like non-HS

Unlike some previous generation devices, AM43xx HS IRQ and Wakegen
context is handled by the ROM for us, and no secure service call
is needed or supported. Non-GP AM43xx devices should take the
same path as GP.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: tegra: Add firmware calls required for suspend-resume on Tegra30
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:10 +0000 (01:52 +0300)]
ARM: tegra: Add firmware calls required for suspend-resume on Tegra30

In order to suspend-resume CPU with Trusted Foundations firmware being
present on Tegra30, the LP1/LP2 boot vectors and CPU caches need to be
set up using the firmware calls and then suspend code shall avoid
re-disabling parts that were disabled by the firmware.

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: tegra: Always boot CPU in ARM-mode
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:09 +0000 (01:52 +0300)]
ARM: tegra: Always boot CPU in ARM-mode

CPU always jumps into reset handler in ARM-mode from the Trusted
Foundations firmware, hence let's make CPU to always jump into kernel
in ARM-mode regardless of the firmware presence. This is required to
make Thumb-2 kernel working with the Trusted Foundations firmware on
Tegra30.

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: tegra: Don't apply CPU erratas in insecure mode
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:08 +0000 (01:52 +0300)]
ARM: tegra: Don't apply CPU erratas in insecure mode

CPU isn't allowed to touch secure registers while running under secure
monitor. Hence skip applying of CPU erratas in the reset handler if
Trusted Foundations firmware presents.

Partially based on work done by Michał Mirosław [1].

[1] https://www.spinics.net/lists/arm-kernel/msg594768.html

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: tegra: Set up L2 cache using Trusted Foundations firmware
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:07 +0000 (01:52 +0300)]
ARM: tegra: Set up L2 cache using Trusted Foundations firmware

On Tegra30 L2 cache should be initialized using firmware call if CPU
is running in insecure mode. Set up the required outer-cache write_sec()
callback early during boot using the firmware API, it is always a NO-OP
on T114+ and is NO-OP on T20/30 if Trusted Foundations firmware node
isn't present in device-tree.

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: trusted_foundations: Provide information about whether firmware is registered
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:06 +0000 (01:52 +0300)]
ARM: trusted_foundations: Provide information about whether firmware is registered

Add a helper that provides information about whether Trusted Foundations
firmware operations have been registered.

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: trusted_foundations: Make prepare_idle call to take mode argument
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:05 +0000 (01:52 +0300)]
ARM: trusted_foundations: Make prepare_idle call to take mode argument

The Trusted Foundations firmware call varies depending on the required
suspend-mode. Make the firmware API to take the mode argument in order
to expose all of the modes to firmware user.

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: trusted_foundations: Support L2 cache maintenance
Dmitry Osipenko [Sun, 17 Mar 2019 22:52:04 +0000 (01:52 +0300)]
ARM: trusted_foundations: Support L2 cache maintenance

Implement L2 cache initialization firmware callback that should be
invoked early during boot in order to set up the required outer cache
driver's callbacks and add the callback required for L2X0 maintenance.

Partially based on work done by Michał Mirosław [1].

[1] https://www.spinics.net/lists/arm-kernel/msg594765.html

Tested-by: Robert Yang <decatf@gmail.com>
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
5 years agoARM: exynos: Fix infinite loops on CPU powerup failure
Marek Szyprowski [Tue, 26 Mar 2019 14:03:59 +0000 (15:03 +0100)]
ARM: exynos: Fix infinite loops on CPU powerup failure

Add timeout to infinite loops during the CPU powerup procedures. It
is better to report an error instead of busylooping for infinite time
in case of failure.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoARM: OMAP2+: Drop mcspi platform data for omap4
Tony Lindgren [Mon, 1 Apr 2019 17:17:18 +0000 (10:17 -0700)]
ARM: OMAP2+: Drop mcspi platform data for omap4

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop uart platform data for dra7
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop uart platform data for dra7

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop gpio platform data for dra7
Tony Lindgren [Thu, 21 Mar 2019 16:38:36 +0000 (09:38 -0700)]
ARM: OMAP2+: Drop gpio platform data for dra7

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop i2c platform data for dra7
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop i2c platform data for dra7

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop mmc platform data for dra7
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop mmc platform data for dra7

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop uart platform data for omap5
Tony Lindgren [Tue, 26 Mar 2019 18:24:49 +0000 (11:24 -0700)]
ARM: OMAP2+: Drop uart platform data for omap5

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop gpio platform data for omap5
Tony Lindgren [Tue, 26 Mar 2019 18:22:53 +0000 (11:22 -0700)]
ARM: OMAP2+: Drop gpio platform data for omap5

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop i2c platform data for omap5
Tony Lindgren [Tue, 26 Mar 2019 18:21:25 +0000 (11:21 -0700)]
ARM: OMAP2+: Drop i2c platform data for omap5

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop mmc platform data for omap5
Tony Lindgren [Tue, 26 Mar 2019 18:17:50 +0000 (11:17 -0700)]
ARM: OMAP2+: Drop mmc platform data for omap5

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop uart platform data for am33xx and am43xx
Tony Lindgren [Tue, 26 Mar 2019 17:59:14 +0000 (10:59 -0700)]
ARM: OMAP2+: Drop uart platform data for am33xx and am43xx

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop gpio platform data for am33xx and am43xx
Tony Lindgren [Tue, 26 Mar 2019 17:54:40 +0000 (10:54 -0700)]
ARM: OMAP2+: Drop gpio platform data for am33xx and am43xx

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop i2c platform data for am33xx and am43xx
Tony Lindgren [Tue, 26 Mar 2019 17:51:24 +0000 (10:51 -0700)]
ARM: OMAP2+: Drop i2c platform data for am33xx and am43xx

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop mmc platform data for am330x and am43xx
Tony Lindgren [Tue, 26 Mar 2019 15:17:47 +0000 (08:17 -0700)]
ARM: OMAP2+: Drop mmc platform data for am330x and am43xx

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop uart platform data for omap4
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop uart platform data for omap4

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop gpio platform data for omap4
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop gpio platform data for omap4

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop i2c platform data for omap4
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop i2c platform data for omap4

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoARM: OMAP2+: Drop mmc platform data for omap4
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
ARM: OMAP2+: Drop mmc platform data for omap4

We can now drop legacy platform data one interconnect target module at
a time in favor of the device tree based data that has been added earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agoDocumentation: bus: ti-sysc: fix spelling mistakes "multipe" and "interconnet"
Colin Ian King [Thu, 4 Apr 2019 11:16:57 +0000 (12:16 +0100)]
Documentation: bus: ti-sysc: fix spelling mistakes "multipe" and "interconnet"

There is are a couple of spelling mistakes in the Documentation. Fix them.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Detect DMIC for debugging
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
bus: ti-sysc: Detect DMIC for debugging

Detect DMIC to see what we have connected if config DEBUG is enabled.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Handle swsup idle mode quirks
Tony Lindgren [Thu, 21 Mar 2019 20:27:08 +0000 (13:27 -0700)]
bus: ti-sysc: Handle swsup idle mode quirks

In preparation of dropping interconnect target module platform data in
favor of devicetree based data, we must pass swsup idle quirks to the
platform data functions.

For now, let's only tag the UART modules with the SWSUP_SIDLE_ACT quirk.
The other modules will get tagged with swsup quirks as we drop the
platform data and test the changes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Pass clockactivity quirk to platform functions
Tony Lindgren [Fri, 22 Mar 2019 15:08:06 +0000 (08:08 -0700)]
bus: ti-sysc: Pass clockactivity quirk to platform functions

We already have the clockactivity quirk set for some modules like i2c,
timers and smartreflex. But we're not passing it to the platform functions
yet. Let's start doing that in preparation of dropping interconnect target
module platform data in favor of device tree based data.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Add quirk handling for external optional functional clock
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
bus: ti-sysc: Add quirk handling for external optional functional clock

We cannot access mcpdm registers at all unless there is an optional pdmclk
configured. As this is currently only needed for mcpdm, let's check for
mcpdm in sysc_get_clocks(). If it turns out to be needed for other modules
too, we can add more flags to the quirks table for this.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Add support for early quirks based on register address
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
bus: ti-sysc: Add support for early quirks based on register address

At least mcpdm needs an optional external clock enabled to function and
this clock typically comes from the PMIC. We can detect mcpdm based on
the interconnect target module address and set a quirk flag early.

To do this, let's initialize the clocks a bit later and add a new
function for sysc_init_early_quirks(). Note that we cannot yet enable
the early quirks for mcpdm until the optional external clocks are
handled in the in the following patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
5 years agobus: ti-sysc: Move rstctrl reset to happen later
Tony Lindgren [Thu, 21 Mar 2019 18:00:21 +0000 (11:00 -0700)]
bus: ti-sysc: Move rstctrl reset to happen later

We can do the rsstctrl a bit later, but need to deassert rstctrl reset
before the clocks are enabled if asserted. Let's only init restctrl
in sysc_init_resets() and do the reset later on just before we enable
the device clocks.

Signed-off-by: Tony Lindgren <tony@atomide.com>