Commit graph

6044 commits

Author SHA1 Message Date
Dave Gerlach 5692fceebe ARM: OMAP2+: Fix build when using split object directories
The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open
drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d72 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-04-18 10:07:13 -07:00
Tony Lindgren 44773ba170 ARM: OMAP2+: Drop unused pm-noop
Looks like these functions don't do anything in the mainline kernel so
we can just drop it.

Note that we must now also remove ir-rx51 pdata as it relies on the dummy
platform data that does not do anything. And ir-rx51 is calling a pdata
callback that doesn't do anything without checking if it exists first.

For configuring device specific minimal latencies, the interface to use
is pm_qos_add_request(). For an example, see what was done in commit
9834ffd1ec ("ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent
glitches"). I've added some comments to ir-rx51 so people using it can
add pm_qos support and test it.

Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-04-16 10:22:40 -07:00
Arnd Bergmann 03de3727b2 ARM: omap2: fix am43xx build without L2X0
When CONFIG_CACHE_L2X0 is disabled, the am43xx specific suspend
implemnentation fails to link:

arch/arm/mach-omap2/sleep43xx.o: In function `get_l2cache_base':
(.text+0x180): undefined reference to `omap4_get_l2cache_base'

This adds an #ifdef protection around the code, like we do for am44xx.

Fixes: 41d37e6137 ("ARM: OMAP2+: Introduce low-level suspend code for AM43XX")
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-04-05 11:06:41 +02:00
Arnd Bergmann 064fe81ef2 Two omap5 specific aux control module patches for v4.17
On omap5 there is an aux control module that we are not handling
 currently for clocks, so let's add support for it.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqz2lIRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXO79xAArmNZj7HmQUCwBlXNV3gRqYo7tznId8aV
 hd2iMnBS0wcHfshfELaUxjZKh3Jc5RoEiEJceOiPOXOQhpetOW42dc7Ok7V3uG+w
 ljsdLtDUWkd5XTJ4BIeynec1p5Y/HKfhuKwruAvem/ZWu+RpfQfehIv7mHgt7+3c
 hxzaPH2uoujurnaQWxF6ROfqlf6sxiR9ZP85ta0toA/gmf4pxIfsWa8nVNRQB6kc
 TWjuDc64Ztn4quucb9pPbpRFTR67FN+D3ohbsM1y11lxhtUyrj15QmRz+yWHUGP+
 UKyCRFb0yphjVVbiJehhXN3/V+F0GQTGgoWJaLBxFp2JeU3jxnp3nIojvrW9b+4B
 G1jDOFxA6Gl8xq9aFpVcdKt+FtRYnTORL48xXQXynCapdVnzUPXFaySJLaLoEfXn
 B1henmgROT4ekjA3Efmfg8fCCTPhxO7gW6dmmjEtJwVxTwuw1xkH2zSOHR0MfbR9
 6hiGdT8CG8EoPGrxuWqsT/eLL2RSMRUWy9LBofVd5U3ZS9OhlWWzk4Sal29TRvM1
 oSj2te59lEySaZAJ0VTWhjhkAAP22MIovk32mSOb7CHOwDUMuCij4wgllujVOLQJ
 qG73rFF5HpKXnhWoZqVjsdlUB2vO+K1DdMt0KIMnTqjiAIkN3SH5Bv9/0U3SBoTs
 Lld09xB1MOQ=
 =WMHn
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "Two omap5 specific aux control module patches for v4.17" from Tony Lindgren:

On omap5 there is an aux control module that we are not handling
currently for clocks, so let's add support for it.

* tag 'omap-for-v4.17/soc-pt2-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP5: control: add support for control module wkup pad config
  ARM: omap2+: control: add support for auxiliary control module instances
2018-03-27 15:48:52 +02:00
Tero Kristo 5aa6d80624 ARM: OMAP5: control: add support for control module wkup pad config
Match the new compatible string in the control module driver. The base
infra maps the required syscon ranges and clock registers if available.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-03-20 08:06:18 -07:00
Tero Kristo 04dfac0906 ARM: omap2+: control: add support for auxiliary control module instances
Control module can have multiple instances in a system, each with separate
address space and features. Add base support for these auxiliary instances,
with support for syscon and clock mappings under them.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-03-20 08:06:07 -07:00
Arnd Bergmann 3bf5c70d06 Driver changes for ti-sysc for v4.17
This series of changes enables the use device tree based sysconfig
 data for ti-sysc driver. As we already have SmartReflex data configured,
 we use that as the first driver to enable. To do that in a way where
 SmartReflex is not probed twice, we need to prepare the SmartReflex
 driver before flipping dts data on for it in the last patch of the
 series.
 
 To avoid regressions, we are checking the passed dts data against
 existing platform data since we still have it available. Then after the
 dts files are converted, we can simply drop the related platform data
 at some point in the future.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqdehERHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXMRihAA2jlmAf4dePwe0K5V1VlQINbAU/FV+tXN
 1oasvGwNBxaJMqJeZAdBd/veuXgrsprIbmlMmF+zP/wQDYiMccr0+ZvzMsUKJ9aA
 mgzpW/pkpZEbi0ncci4UhQVOuZLja1xxtQ+ZGx82Vo7MXyU2jU9/Wzk67B4BZLws
 1MGTsy5VZZh+wicq46eW9AspvFhKCMIw6Ylor3lfmm08H3V/cq9A8dHQeWX2jjsC
 hSw9RzglGMi58FQ8cqNkxbD38r1VZh74OOqzOOlcJ5CwLWzIJwanWfwDesVb4ZTL
 bdrn/Aps5b223LTAFN97vwUmyux/ja17YyCC5fU6C6wskgN+9jhPSslzFbFbU0kT
 4chc5OYcdq5Lhm+vLCe2H5rB14KQxy6Ugb6aT+XAUOq0hw6tRSG17kqlXk/KtwrG
 cDzPJzPjG/PDb8hW0Bd7JcjLqadmh7w1180KtT+9IayQM50XxcwwAOPT0XdUEUeP
 aKIp5cRfOm/75KUIiNomhmoAd1pxX1G6y2qo49p3fbY0nJx09MgtQvWlbDrbhL8+
 ACp2adGAlLqsW26E44cqNwMPPhyVcQXlVD9bc2D04nVhXapvRHtlrW4cRkkbQzfw
 dAiQHDaBn4geSBUqGayQaIvX1WWqeZ6nzpI0JlyHPMiQdkdDvtyUqhJuK2uaY39n
 vyRPw2H09ZM=
 =/hJY
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "Driver changes for ti-sysc for v4.17" from Tony Lindgren:

This series of changes enables the use device tree based sysconfig
data for ti-sysc driver. As we already have SmartReflex data configured,
we use that as the first driver to enable. To do that in a way where
SmartReflex is not probed twice, we need to prepare the SmartReflex
driver before flipping dts data on for it in the last patch of the
series.

To avoid regressions, we are checking the passed dts data against
existing platform data since we still have it available. Then after the
dts files are converted, we can simply drop the related platform data
at some point in the future.

* tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex
  PM / AVS: SmartReflex: Prepare to use device tree based probing
  ARM: OMAP2+: Try to parse earlycon from parent too
  ARM: OMAP2+: Add checks for device tree based sysconfig data
  ARM: OMAP2+: Add functions to allocate module data from device tree
  bus: ti-sysc: Handle some devices in omap_device compatible way
  bus: ti-sysc: Add support for platform data callbacks
  bus: ti-sysc: Remove unnecessary debugging statements
  bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init
  bus: ti-sysc: Handle stdout-path for debug console
  bus: ti-sysc: Add suspend and resume handling
  bus: ti-sysc: Add fck clock alias for children with notifier_block
  ARM: OMAP2+: Prepare to pass auxdata for smartreflex
2018-03-07 16:26:43 +01:00
Arnd Bergmann 18b4788bad Add am335x and am437x PM code for v4.17
This series of changes from Dave Gerlach adds the PM related
 code to allow low-power suspend states. The code consists of
 the SoC specific assembly code and a related PM driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqdeI4RHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXPRoxAA3M1qhApgnJBrvCoVbOQbDsL/Jst5geJz
 eQIQMjqzLTJQDd6+0SJVggjRhDYW2mKk+SYbpbzjVfmdJeKAIX3IZj9MUMstbRSD
 g8YCzSpW9C2EuOHlDhDDd4U6pc7/pMmWHH87PMaj05Qfct+hcSpI7OB5RfntX0Os
 mhQ6e3SxlM9EZikiW2BXXjjKmQHYmqkfSZHhjbiGtpEXTa/zq/fVM67NEjdez7/F
 1Uy3Hefv895H0TU+P3TtzLmvcQQn4JrIXNqi4wWM7ATf6MN9d9cPMxZ9mdTweCgd
 B0nSYgwwzXS2bNd7KhtghAXckGqLRL+0CifB0xw+jCExwL+aOQPwKdvbfnF2JVqe
 R8MochWgDBUAVX8hYpYD+IJ6qeoWFfu4ZEwFeMaQ0M2T7I417SSRwtNF2P9YSYOj
 b6dv8Fe54m8QhPJo2OPD/bbzo2wwNuLqJ9bqI3oy9yrMe5EEAzuhtqGBeg1B4WKB
 zWB2TQYLLl4FVJsfxV7wgsO2fk9xzs1cn70JWqdWMQ1kUl7k0NorZhSVlXt5x+oH
 gPfkWO2S7+Il/FKsOAdb+HeCklDyy/xh/B0VFErHvqXOK78j1IpcUh6I9lgg1GFs
 OXioMaGE13p+yOKQHDGqeK42Qjw2F6cPdkCGm67Mte66IqBV0khLpwK8WwzlcEio
 C5jhVOor2u8=
 =hBzh
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.17/am-pm-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "Add am335x and am437x PM code for v4.17" from Tony Lindgren:

This series of changes from Dave Gerlach adds the PM related
code to allow low-power suspend states. The code consists of
the SoC specific assembly code and a related PM driver.

* tag 'omap-for-v4.17/am-pm-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  soc: ti: Add pm33xx driver for basic suspend support
  ARM: OMAP2+: pm33xx-core: Add platform code needed for PM
  ARM: OMAP2+: Introduce low-level suspend code for AM43XX
  ARM: OMAP2+: Introduce low-level suspend code for AM33XX
2018-03-07 16:21:59 +01:00
Arnd Bergmann 6f566c4f30 Move omap timer to drivers for 4.17
This series from Keerthy and Ladislav Michl move omap dmtimer code
 to drivers. As we don't want to export custom timer functions to
 random drivers, we also need to update the related PWM driver to
 pass the timer specific functions in platform data.
 
 Note that this series is based on a merge of omap1 specific timer
 fix and omap2+ platform data clean-up to keep things working and
 make the move a bit simpler.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlqdd1IRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNziQ/+OywQPRLgeYodIl5AXJCMaZhyFJPN1BP3
 OXsDllCnqJOpH4yjIPz4WoEI3ciVRJw+iBOl28pDtomdyejyE9qx/FmIhL081Wgm
 T7TgJTieungliRfZu3UWRJdinpEyEzvTtEWlSVWa++lH5Bsub7lIPJsZ3A2bYVMh
 9n6uE9bzU/ECdq/1hP9fhM2rssf8mu5l1IKlYmPWuxoFm/YSYoiyneU+rOILnJQ6
 dsbc71p3+VdsZBDI+nMGcLE923LGXKEmxlHoR9+9EY12MOIwbTt/jxcI8j+Iugfk
 vetncsXbpKnbutTP1iXr64IXa5QFOZKtMNlfNqLo4aihWMJ6tV4570w/pxk/qMgq
 +qCidWm9RgVUm1N4t8kMm8aWm1BC1L8g9fw2/l0JFBHcuIlOYewa6cZ6gcUI6XxN
 BqcET9iyxG9HgqgB6yekHRI3niywgGcpw420RS0DLmxIzpnpeQHGkXrva0tVcVS7
 4SZ9UWgLQVCKgm/8mSDv4PkIzuPXyu4fqjxzMihQdNUHAG1xeqODfU8SLsItW43a
 sGojvPPNWhCyvL2hpWuyWsRSOTc8MyAteeowYN1PzoSCO0cI3MTL0TUpxRTBV/9/
 y1l5DYmdc1HUARXxJWreBSl3uToADguqzYUv3rHe/B20+LA19F9GRzoc9uOhqTGn
 ePjiA5EC64o=
 =2B8N
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.17/timer-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "Move omap timer to drivers for 4.17" from Tony Lindgren:

This series from Keerthy and Ladislav Michl move omap dmtimer code
to drivers. As we don't want to export custom timer functions to
random drivers, we also need to update the related PWM driver to
pass the timer specific functions in platform data.

Note that this series is based on a merge of omap1 specific timer
fix and omap2+ platform data clean-up to keep things working and
make the move a bit simpler.

* tag 'omap-for-v4.17/timer-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  clocksource: timer-ti-dm: Check prescaler value
  clocksource: timer-ti-dm: Consolidate set source
  clocksource: timer-ti-dm: Make unexported functions static
  ARM: OMAP: pdata-quirks: Remove unused timer pdata
  pwm: pwm-omap-dmtimer: Adapt driver to utilize dmtimer pdata ops
  clocksource: timer-ti-dm: Hook device platform data if not already assigned
  clocksource: timer-ti-dm: Populate the timer ops to the pdata
  clocksource: timer-ti-dm: Add timer ops to the platform data structure
  ARM: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
  clocksource: timer-ti-dm: Replace architecture
  ARM: OMAP: Move dmtimer.h out of plat-omap
  ARM: OMAP: timer: Wrap the inline functions under OMAP2PLUS define
  ARM: OMAP: dmtimer: Remove all the exports
  ARM: OMAP: Fix dmtimer init for omap1
2018-03-07 16:16:07 +01:00
Tony Lindgren 695eea3d2c ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex
Let's enable ti-sysc probing of child devices. So far we have only used
ti-sysc to probe interconnect target modules to idle them for cases where
the SoC does not have any child devices configured for the module, such
as smartreflex on dra7.

As we have smartreflex driver configured in the device tree for some SoCs,
we need to flip things on with a single patch to prevent both omap_device
and ti-sysc to probe smartreflex. So let's stop probing smartreflex with
omap_device and probe it with ti-sysc by enabling passing the auxdata.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 20:03:21 -08:00
Tony Lindgren 1561825622 ARM: OMAP2+: Try to parse earlycon from parent too
With ti-sysc driver the "ti,hwmods" property will be moved to the
interconnect target module instead of the child device. To keep
earlycon working, we need to match against the interconnect target
module in the ti-sysc case.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 16:32:09 -08:00
Tony Lindgren a884430685 ARM: OMAP2+: Add checks for device tree based sysconfig data
We can check the device tree based sysconfig data against the existing
platform data to make sure we're not introducing regressions. Then at
some point after the sysconfig data comes from device tree, we can just
drop the related platform data.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 16:32:09 -08:00
Tony Lindgren 8c87970543 ARM: OMAP2+: Add functions to allocate module data from device tree
We can have ti-sysc driver manage the interconnect target module via
platform data callback functions to hwmod code. This allows initializing
and idling the devices using dts data instead of the legacy static data
for interconnect target modules.

Let's add functions to configure the module sysconfig data with platform
callbacks from ti-sysc driver.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 16:32:09 -08:00
Tony Lindgren e33509c19d ARM: OMAP2+: Fix typo for wakeup_ns_pa_addr
This is in bank1, not in bank3.

Cc: Tero Kristo <t-kristo@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 14:47:13 -08:00
Tony Lindgren 2402ff05c6 ARM: OMAP2+: Use v7_invalidate_l1 in omap4_finish_suspend
We can use just v7_invalidate_l1 here instead of v7_flush_dcache_all
like the comments say.

Cc: Tero Kristo <t-kristo@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-28 14:46:53 -08:00
Dave Gerlach 41d9d44d72 ARM: OMAP2+: pm33xx-core: Add platform code needed for PM
Most of the PM code needed for am335x and am437x can be moved into a
module under drivers but some core code must remain in mach-omap2 at the
moment. This includes some internal clockdomain APIs and low-level ARM
APIs which are also not exported for use by modules.

Implement a few functions that handle these low-level platform
operations can be passed to the pm33xx module through the use of
platform data.

In addition to this, to be able to share data structures between C and
the sleep33xx and sleep43xx assembly code, we can automatically generate
all of the C struct member offsets and sizes as macros by processing
pm-asm-offsets.c into assembly code and then extracting the relevant
data as is done for the generated platform asm-offsets.h files.

Finally, add amx3_common_pm_init to create a dummy platform_device for
pm33xx so that our soon to be introduced pm33xx module can probe on
am335x and am437x platforms to enable basic suspend to mem and standby
support.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-27 08:53:37 -08:00
Dave Gerlach 41d37e6137 ARM: OMAP2+: Introduce low-level suspend code for AM43XX
Although similar to AM33XX, introduce a new low-level asm file for
suspend containing new context save and restore paths for EMIF and l2
cache disabling and enabling.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-27 08:53:30 -08:00
Dave Gerlach 8a94cd7ec0 ARM: OMAP2+: Introduce low-level suspend code for AM33XX
In preparation for suspend-resume support for AM33XX, add
the assembly file with the code which is copied to internal
memory (OCMC RAM) during bootup and runs from there.

As part of the low power entry (DeepSleep0 mode in AM33XX TRM),
the code running from OCMC RAM does the following
1. Calls routine to store the EMIF configuration
2. Calls routine to place external memory in self-refresh
3. Disables EMIF clock
4. Executes WFI after writing to MPU_CLKCTRL register.

If no interrupts have come, WFI execution on MPU gets registered
as an interrupt with the WKUP-M3. WKUP-M3 takes care of disabling
some clocks which MPU should not (L3, L4, OCMC RAM etc) and takes
care of clockdomain and powerdomain transitions as part of the
DeepSleep0 mode entry.

In case a late interrupt comes in, WFI ends up as a NOP and MPU
continues execution from internal memory. The 'abort path' code
undoes whatever was done as part of the low power entry and indicates
a suspend failure by passing a non-zero value to the cpu_resume routine.

The 'resume path' code is similar to the 'abort path' with the key
difference of MMU being enabled in the 'abort path' but being
disabled in the 'resume path' due to MPU getting powered off.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-27 08:52:42 -08:00
Tony Lindgren ef70b0bdea bus: ti-sysc: Add support for platform data callbacks
We want to pass the device tree configuration for interconnect target
modules from ti-sysc driver to the existing platform hwmod code.

This allows us to first validate the dts data against the existing
platform data before we start dropping the platform data in favor of
device tree data.

To do this, let's add platform data callbacks for PM runtime functions
to call for the interconnect target modules if platform data is
available.

Note that as ti-sysc driver can rebind, omap_auxdata_lookup and related
functions can no longer be __init.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-26 14:16:11 -08:00
Tony Lindgren d060b40523 ARM: OMAP2+: Prepare to pass auxdata for smartreflex
We are still initializing smartreflex with platform data using
omap_device_build(). We can instead pass the platform data in
with auxdata in pdata-quirks.c and make the driver use that
in later patches.

Note that we cannot enable the auxdata use yet, this is done
in the last patch of the series.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-22 13:57:30 -08:00
Keerthy ac30751df9 ARM: OMAP: pdata-quirks: Remove unused timer pdata
Remove unused timer pdata.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-22 10:54:33 -08:00
Keerthy 5ca467c40c ARM: OMAP: Move dmtimer.h out of plat-omap
The header file is currently under plat-omap directory
under arch/omap. Move this out to an accessible place.

No Code changes done to the header file and renamed to timer-ti-dm.h.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-22 10:53:06 -08:00
Suman Anna 1ff4cb677d ARM: OMAP2+: Remove unused gpio header file references
Drop stale references to the generic and OMAP gpio header
files from couple of files which no longer invoke any gpio
functions.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:13 -08:00
Suman Anna 9138f89e7b ARM: OMAP: Move plat/i2c.h into mach-omap1 folder
The current contents of plat/i2c.h are only relevant for OMAP1
platforms, as all the equivalent functions for OMAP2 has been
dropped in commit 65fa3e719f ("ARM: OMAP2+: Remove legacy i2c.c
platform init code"), and which has also moved the left-over code
from plat-omap into mach-omap1. The hwmod is a concept only
applicable for OMAP2 platforms, and the omap_i2c_reset() is
already declared in mach-omap2/i2c.h. So, move the current
plat/i2c.h header file into the mach-omap1 folder, and adjust
the header usage accordingly.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:13 -08:00
Suman Anna 0693036ca8 ARM: OMAP2+: Cleanup omap_mcbsp_dev_attr and other legacy data
The omap_mcbsp_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The legacy McBSP device support
including the usage of the hwmod class revision data has been
dropped in commit 48f6693790 ("ARM: OMAP2+: Remove unused legacy
code for McBSP") and this data is therefore no longer needed.
So, cleanup the structure and all the associated data in various
hwmod data files.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:13 -08:00
Suman Anna 1cddc36458 ARM: OMAP2+: Cleanup omap2_spi_dev_attr and other legacy data
The omap2_spi_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The SPI legacy device support
including the usage of the hwmod class revision data has been
dropped in commit 6f3ab009a1 ("ARM: OMAP2+: Remove unused legacy
code for device init") and this data is therefore no longer needed.
So, cleanup the structure and all the associated data in various
hwmod data files.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:12 -08:00
Suman Anna cc7e3fb641 ARM: OMAP2+: Cleanup omap_timer_capability_dev_attr usage
The omap_timer_capability_dev_attr data was used to supply instance
specific capabilities (like always-on, PWM functionality or ability
to interrupt DSP cores) for legacy non-DT devices. These capabilities
are now provided through device-tree properties. The legacy device
support has been cleaned up in commit 8d39ff3d16 ("ARM: OMAP2+:
Remove unused legacy code for timer") and this data is therefore
no longer needed. So, cleanup the structure and all the associated
data in various hwmod data files.

While at this, remove the stale header in hwmod data files that
already do not have any timer capability data.

Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:12 -08:00
Suman Anna 5297e1d767 ARM: OMAP2+: Cleanup omap_i2c_dev_attr usage
The omap_i2c_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The I2C legacy device support has
been cleaned up in commit 65fa3e719f ("ARM: OMAP2+: Remove legacy
i2c.c platform init code") and this data is therefore no longer
needed. So, cleanup the structure and all the associated data in
various hwmod data files.

The i2c-omap.h header is still needed because of the need for
various OMAP_I2C_IP_VERSION_x macros.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:12 -08:00
Suman Anna a0e37da2a5 ARM: OMAP2+: Cleanup omap_gpio_dev_attr usage
The omap_gpio_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The GPIO legacy device support has
been cleaned up in commit 14944934f8 ("ARM: OMAP2+: Remove legacy
gpio code") a while ago and this data is therefore no longer needed.
So, cleanup the structure and all the associated data in various
hwmod data files.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 10:28:12 -08:00
Tony Lindgren ddd6a9d928 ARM: OMAP2+: Include types.h directly for hwmod data
This is needed in preparation for dropping some unused
headers that indirectly include types.h.

Tested-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 09:35:31 -08:00
Tony Lindgren fe27f16794 ARM: OMAP2+: Fix sar_base inititalization for HS omaps
HS omaps use irq_save_secure_context() instead of irq_save_context()
so sar_base will never get initialized and irq_sar_clear() gets called
with a wrong address for HS omaps from irq_restore_context().

Starting with commit f4b9f40ae9 ("ARM: OMAP4+: Initialize SAR RAM
base early for proper CPU1 reset for kexec") we have it available,
and this ideally would been fixed with that commit already.

Fixes: f4b9f40ae9 ("ARM: OMAP4+: Initialize SAR RAM base early for
proper CPU1 reset for kexec")
Cc: Andrew F. Davis <afd@ti.com>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 08:35:14 -08:00
Tony Lindgren d3be6d2a08 ARM: OMAP3: Fix prm wake interrupt for resume
For platform_suspend_ops, the finish call is too late to re-enable wake
irqs and we need re-enable wake irqs on wake call instead.

Otherwise noirq resume for devices has already happened. And then
dev_pm_disarm_wake_irq() has already disabled the dedicated wake irqs
when the interrupt triggers and the wake irq is never handled.

For devices that are already in PM runtime suspended state when we
enter suspend this means that a possible wake irq will never trigger.

And this can lead into a situation where a device has a pending padconf
wake irq, and the device will stay unresponsive to any further wake
irqs.

This issue can be easily reproduced by setting serial console log level
to zero, letting the serial console idle, and suspend the system from
an ssh terminal. Then try to wake up the system by typing to the serial
console.

Note that this affects only omap3 PRM interrupt as that's currently
the only omap variant that does anything in omap_pm_wake().

In general, for the wake irqs to work, the interrupt must have either
IRQF_NO_SUSPEND or IRQF_EARLY_RESUME set for it to trigger before
dev_pm_disarm_wake_irq() disables the wake irqs.

Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 08:34:28 -08:00
Qi Hou db35340c53 ARM: OMAP2+: timer: fix a kmemleak caused in omap_get_timer_dt
When more than one GP timers are used as kernel system timers and the
corresponding nodes in device-tree are marked with the same "disabled"
property, then the "attr" field of the property will be initialized
more than once as the property being added to sys file system via
__of_add_property_sysfs().

In __of_add_property_sysfs(), the "name" field of pp->attr.attr is set
directly to the return value of safe_name(), without taking care of
whether it's already a valid pointer to a memory block. If it is, its
old value will always be overwritten by the new one and the memory block
allocated before will a "ghost", then a kmemleak happened.

That the same "disabled" property being added to different nodes of device
tree would cause that kind of kmemleak overhead, at least once.

To fix it, allocate the property dynamically, and delete static one.

Signed-off-by: Qi Hou <qi.hou@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-02-14 08:29:45 -08:00
Tony Lindgren 60c99c7749 Merge branch 'omap-for-v4.16/soc' into omap-for-v4.16/fixes 2018-02-14 08:27:41 -08:00
Linus Torvalds fe53d1443a ARM: SoC driver updates for 4.16
A number of new drivers get added this time, along with many low-priority
 bugfixes. The most interesting changes by subsystem are:
 
 bus drivers:
   - Updates to the Broadcom bus interface driver to support newer SoC types
   - The TI OMAP sysc driver now supports updated DT bindings
 
 memory controllers:
   - A new driver for Tegra186 gets added
   - A new driver for the ti-emif sram, to allow relocating
     suspend/resume handlers there
 
 SoC specific:
   - A new driver for Qualcomm QMI, the interface to the modem on MSM SoCs
   - A new driver for power domains on the actions S700 SoC
   - A driver for the Xilinx Zynq VCU logicoreIP
 
 reset controllers:
   - A new driver for Amlogic Meson-AGX
   - various bug fixes
 
 tee subsystem:
   - A new user interface got added to enable asynchronous communication
     with the TEE supplicant.
   - A new method of using user space memory for communication with
     the TEE is added
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJac0fQAAoJEGCrR//JCVIntjEQALc6kflEGJc/FPundbx9V3F/
 b+3+EX/uMnBnKsgZprz9ACPhx5eBH9QWja3A1zmIarb5c+q7zbBZDwhzUb8J8Yg8
 xEb0im7Wx/GcKjUYZVKYBxtz9KjkXDzhrq8IAvPg6ShNcIy/8hq7ZO3iOkGsTDcy
 /PyioWKC5g0dhJgtp91X1kgog5tuTaWOg39uUOqyEzwVu1vYVa4w+eeCzjEd6I//
 68R/zDQ52+hWw6WZGoYOsNYzuriOflnJRnNpwuGhMhLNULBJfWnd4hkqGm4E+hFa
 5dzW6vVAdIqjemFqPzCBT2WB4UG871aZX8DJ9HgnfX+g970nlsm1JY8Ck9MJNJum
 aDkqZG41ArUYzDFWu8vJ2SKsue5lEZp6TEO2mLEVYrdOjOgedj0Zxqmq2DYeigxd
 +ccOVgKJ9SsYw9ft1LkQ5BHCgOh3C7y9Kcg7oBnaEI5OTVvtf5PwEkT2cwbvgxYl
 EVKLhlJ0Af+QXOW8E5JbNQETpYw52DMm6UKHiYn/JCGxB/8J0bgJzImDJI4Dtu2h
 zqJITKJeTepqbfA5pmNfKa+20RhmsktdRCw2NN/QynY7EEtGjHAUVnlpZT2mrDco
 0m62b7Erek/776vJN5ECzE5e6XCs2N0MDE6Anp121C5zEmig/SMBrUosMzP7Jnis
 IDVC/QWkb3u85wK20Vc1
 =yz0k
 -----END PGP SIGNATURE-----

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

Pull ARM SoC driver updates from Arnd Bergmann:
 "A number of new drivers get added this time, along with many
  low-priority bugfixes. The most interesting changes by subsystem are:

  bus drivers:
   - Updates to the Broadcom bus interface driver to support newer SoC
     types
   - The TI OMAP sysc driver now supports updated DT bindings

  memory controllers:
   - A new driver for Tegra186 gets added
   - A new driver for the ti-emif sram, to allow relocating
     suspend/resume handlers there

  SoC specific:
   - A new driver for Qualcomm QMI, the interface to the modem on MSM
     SoCs
   - A new driver for power domains on the actions S700 SoC
   - A driver for the Xilinx Zynq VCU logicoreIP

  reset controllers:
   - A new driver for Amlogic Meson-AGX
   - various bug fixes

  tee subsystem:
   - A new user interface got added to enable asynchronous communication
     with the TEE supplicant.
   - A new method of using user space memory for communication with the
     TEE is added"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (84 commits)
  of: platform: fix OF node refcount leak
  soc: fsl: guts: Add a NULL check for devm_kasprintf()
  bus: ti-sysc: Fix smartreflex sysc mask
  psci: add CPU_IDLE dependency
  soc: xilinx: Fix Kconfig alignment
  soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on clkoutdiv
  soc: xilinx: xlnx_vcu: Depends on HAS_IOMEM for xlnx_vcu
  soc: bcm: brcmstb: Be multi-platform compatible
  soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms
  Revert "soc: brcmstb: Only register SoC device on STB platforms"
  bus: omap: add MODULE_LICENSE tags
  soc: brcmstb: Only register SoC device on STB platforms
  tee: shm: Potential NULL dereference calling tee_shm_register()
  soc: xilinx: xlnx_vcu: Add Xilinx ZYNQMP VCU logicoreIP init driver
  dt-bindings: soc: xilinx: Add DT bindings to xlnx_vcu driver
  soc: xilinx: Create folder structure for soc specific drivers
  of: platform: populate /firmware/ node from of_platform_default_populate_init()
  soc: samsung: Add SPDX license identifiers
  soc: qcom: smp2p: Use common error handling code in qcom_smp2p_probe()
  tee: shm: don't put_page on null shm->pages
  ...
2018-02-01 16:35:31 -08:00
Linus Torvalds adbc128fa8 ARM: SoC platform updates for 4.16
These are mostly minor bugfixes, cleanup and many defconfig updates to
 support added drivers. In particular OMAP and PXA keep cleaning up the
 legacy code base, as usual.
 
 Nvidia adds some more SoC support code for Tegra 186.
 
 For the first time on years, we are actually adding a non-DT platform for,
 the EP93xx based Liebherr controller BK3.1. It's a minor variation of
 the EP93xx reference design and in active use, while EP93xx apparently
 doesn't have enough new development to have any device tree support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJac0azAAoJEGCrR//JCVInuaAQAJBfJeqhFC01JeO+Oy/Sz3qh
 WuZpT0ExfU1EFLnyBhEYJujDmlzNPcVacI53gSazpiksHboLpOodW+pX19NwOyzC
 RSbyLa+W5MH1uXtIzV8dqwXboOWJ/Fh348VTSG4dw2JJ6i4k3U/9xboOVtnynCic
 ww66FEEpFvJfNgch+7zcpHDwACqJ8nsrortNzEM8eV2jA/DOgv48EemTJqf1Lv1E
 Z0nqIBEPvInPgCB3MX3KTD6CgbQ1qZOcWcEgR1tDRqmCuCgvp4xawiOBKos6QHaG
 Iqgi3jI5rPJ391mhIQqK5duU5IKMY0FO6qxir7U+YNZm8vMmijPMwgEmlkG28mTT
 6B7+ZNHXnSnFklpMetvCBDB8a+Lximft/oqecumowKJo0R9vZontnP4Jdbt9HLic
 T99nzw2Xwhxo/J7kQXcGDoLyRAPgS1iiHyWXKbXADRlaftACeXL9iVTg+F9EAveq
 WTDNmN6hbha4fN5PXUkcTAco96JtevT/H2ZDmYFBCSaqHy3QrNPJtDcVSIJd4CGT
 uQJwXINHvR/nJrEl2ZLLsfMSJMBXWp79w7xb+QfkIa6UXL3hUwGC9Wd2jQZsdHf3
 AQ/Q1oJ6epCvd2+4xo0EwiUMjr2MGqfLmtGBQkMzdSbFe50RhHe3w2Amy3VU03X+
 vFB4zAmReWDZXgQ7+Dhg
 =frm4
 -----END PGP SIGNATURE-----

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

Pull ARM SoC platform updates from Arnd Bergmann:
 "These are mostly minor bugfixes, cleanup and many defconfig updates to
  support added drivers. In particular OMAP and PXA keep cleaning up the
  legacy code base, as usual.

  Nvidia adds some more SoC support code for Tegra 186.

  For the first time on years, we are actually adding a non-DT platform
  for the EP93xx based Liebherr controller BK3.1. It's a minor variation
  of the EP93xx reference design and in active use, while EP93xx
  apparently doesn't have enough new development to have any device tree
  support"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits)
  ARM: omap: hwmod: fix section mismatch warnings
  ARM: pxa/tosa-bt: add MODULE_LICENSE tag
  arm64: defconfig: enable CONFIG_ACPI_APEI_EINJ
  arm64: defconfig: enable EDAC GHES option
  arm64: defconfig: enable CONFIG_ACPI_APEI_MEMORY_FAILURE
  ARM: imx_v6_v7_defconfig: enable CONFIG_CPU_FREQ_STAT
  Wind down ARM/TANGO port
  ARM: davinci: constify gpio_led
  ARM: davinci: drop unneeded newline
  soc: Add SoC driver for Gemini
  ARM: SAMSUNG: Add SPDX license identifiers
  ARM: S5PV210: Add SPDX license identifiers
  ARM: S3C64XX: Add SPDX license identifiers
  ARM: S3C24XX: Add SPDX license identifiers
  ARM: EXYNOS: Add SPDX license identifiers
  ARM: imx: remove unused imx3 pm definitions
  ARM: imx: don't abort MMDC probe if power saving status doesn't match
  ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2
  ARM: imx_v6_v7_defconfig: Add missing config for DART-MX6 SoM
  ARM: davinci: Use PTR_ERR_OR_ZERO()
  ...
2018-02-01 16:17:40 -08:00
Linus Torvalds 537433b624 ARM: SoC device tree updates for 4.16
We get a moderate number of new machines this time, and only one
 new SoC variant (Actions S700):
 
 Actions:
   S700 Soc and CubieBoard7 development board
   Allo.com Sparky Single-board-computer
 
 Allwinner:
   Orange Pi R1 development board
   Libre Computer Board ALL-H3-CC H3 single-board computer
 
 ASpeed ast2x00:
    Witherspoon: OpenPower Power9 server manufactured by IBM that uses the ASPEED ast2500
    Zaius: OpenPower Power9 server manufactured by Invatech that uses the ASPEED ast2500
    Q71L: Intel Xeon server manufactured by Qanta that uses the ASPEED ast2400
 
 AT91:
   Axentia Nattis/Natte digital signage
   sama5d2 PTC-ek Evaluation board
 
 Freescale/NXP i.MX:
    SolidRun Humminboard2 development board
    Variscite DART-MX6 SoM and Carrier-board
    Technologic TS-4600 and TS-7970 development board
    Toradex Colibri iMX7D SoM board
    v1.5 variant of Solidrun Cubox-i and Hummingboard
 
 Freescale/NXP Layerscape:
    Moxa UC-8410A Series industrial computer
 
 Gemini:
   D-Link DNS-313 NAS enclosure
 
 OMAP:
   LogicPD OMAP35xx SOM-LV devkit
   LogicPD OMAP35xx Torpedo devkit
 
 Renesas:
   r8a77970 (V3M) Starter Kit board
   r8a7795 (M3-W) Salvator-XS board
 
 We finally managed to get the dtc warnings under control, with no more
 build-time warnings for bad device tree files. This includes fixes for
 the majority of platforms, including nomadik, samsung, lpc32xx, STi,
 spear, mediatek, freescale, qcom, realview, keystone, omap, kirkwood,
 renesas, hisilicon, and broadcom.
 
 Files get rearranged on a few platforms, in particular the Marvell
 Armada 7K/8K device tree files are changed in preparation for future
 SoC support, based on more than two of the same chips in one package,
 and some boards get renamed for oxnas for consistency.
 
 Finally, many existing SoCs gain descriptions for additional on-chip
 devices that we can now support with kernel drivers:
 
   Allwinner A83t (drm, ethernet, i2c, ...), H3/H5 (USB-OTG)
   Amlogic AXG family (clk, pinctrl, pwm, ...), and others (vpu, hdmi)
   Aspeed clk controller support
   Freescale LS1088A, LS1021A device support
   Gemini Ethernet, PCI, TVE, panel
   Keystone gpio, qspi, more uarts
   Mediatek cpufreq, regulator, clock, reset
   Marvell thermal, cpufreq, nand
   Renesas SMP, thermal, timer, PWM, sound, phy, ipmmu
   Rockchip Mipi, GPU, display
   Samsung Exynos5433 PMU, power domain, nfc
   Spreadtrum: sc9860 clocks
   Tegra TX2 PSDI, HDMI, I2C,SMMU, display, fuse, ...
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJac0fiAAoJEGCrR//JCVInGUYP/ikTcjrmtQxmMINdsy88gmN3
 lPk3jGoViyRzc9Y6hGUUXn1YNdK8+IqRkqLnhtVX3cOLS5pP2HwsvSgPmSSB3eQe
 NOhXUNRQaTbeS/eBGZxJbxEKSowQHU+43M2kRNQOht7UQzS8NnBj/1RGaxcFyNSw
 gIixWDZLgVTNCSloPaSrZmiwSa7rSM2q0ncBzzeafAZiTRNeOb6IUpnqu/n0Qnot
 er6VoEyxp6ThFqRB7O8bCAIwgqlyB9xSGBPNR/JI0e0xXo3KVE/2AjHYDHVP/Ttx
 X8vtb3m+RED7tX4oCmlrHb1SAAKpNi1Vzdg4PxmKCa7yb5xPog7OEr3rnpijzCL0
 y8IJLlVSPyx31yB7mIIzCjrcISrT7tOXp0ha88/NgNsGXw5Ln0GVEqTkmSrz/JWo
 z1G2tNwnstS64KK+chHOZfUto4Rzbrpmr9L1ziKIpSQtiNyOmiSu1c3EjHim7x4I
 Mfiv6+8J71faUYuKVK1oaX0gi43oSZHu4NuniQy8dg/OIpgPpHHpG1qCyAzgC6Pa
 r1Am2w33CXrJI78b4zG2pIDx0HghIjFUtjX9tijoFiMs1EZgbV6cJ2meep6Sy+XV
 RBxHXPU8obdcuBfhgjEygwLI0HSe0R78B15qPP/SNxAFeAvE950xfPrGAoZg7qo/
 o6B2iQSfsYQJbD8rUHaA
 =qN1F
 -----END PGP SIGNATURE-----

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

Pull ARM SoC device tree updates from Arnd Bergmann:
 "We get a moderate number of new machines this time, and only one new
  SoC variant (Actions S700):

  Actions:
   - S700 Soc and CubieBoard7 development board
   - Allo.com Sparky Single-board-computer

  Allwinner:
   - Orange Pi R1 development board
   - Libre Computer Board ALL-H3-CC H3 single-board computer

  ASpeed ast2x00:
   - Witherspoon: OpenPower Power9 server manufactured by IBM that uses the ASPEED ast2500
   - Zaius: OpenPower Power9 server manufactured by Invatech that uses the ASPEED ast2500
   - Q71L: Intel Xeon server manufactured by Qanta that uses the ASPEED ast2400

  AT91:
   - Axentia Nattis/Natte digital signage
   - sama5d2 PTC-ek Evaluation board

  Freescale/NXP i.MX:
   - SolidRun Humminboard2 development board
   - Variscite DART-MX6 SoM and Carrier-board
   - Technologic TS-4600 and TS-7970 development board
   - Toradex Colibri iMX7D SoM board
   - v1.5 variant of Solidrun Cubox-i and Hummingboard

  Freescale/NXP Layerscape:
   - Moxa UC-8410A Series industrial computer

  Gemini:
   - D-Link DNS-313 NAS enclosure

  OMAP:
   - LogicPD OMAP35xx SOM-LV devkit
   - LogicPD OMAP35xx Torpedo devkit

  Renesas:
   - r8a77970 (V3M) Starter Kit board
   - r8a7795 (M3-W) Salvator-XS board

  We finally managed to get the dtc warnings under control, with no more
  build-time warnings for bad device tree files. This includes fixes for
  the majority of platforms, including nomadik, samsung, lpc32xx, STi,
  spear, mediatek, freescale, qcom, realview, keystone, omap, kirkwood,
  renesas, hisilicon, and broadcom.

  Files get rearranged on a few platforms, in particular the Marvell
  Armada 7K/8K device tree files are changed in preparation for future
  SoC support, based on more than two of the same chips in one package,
  and some boards get renamed for oxnas for consistency.

  Finally, many existing SoCs gain descriptions for additional on-chip
  devices that we can now support with kernel drivers:

   - Allwinner A83t (drm, ethernet, i2c, ...), H3/H5 (USB-OTG)
   - Amlogic AXG family (clk, pinctrl, pwm, ...), and others (vpu, hdmi)
   - Aspeed clk controller support
   - Freescale LS1088A, LS1021A device support
   - Gemini Ethernet, PCI, TVE, panel
   - Keystone gpio, qspi, more uarts
   - Mediatek cpufreq, regulator, clock, reset
   - Marvell thermal, cpufreq, nand
   - Renesas SMP, thermal, timer, PWM, sound, phy, ipmmu
   - Rockchip Mipi, GPU, display
   - Samsung Exynos5433 PMU, power domain, nfc
   - Spreadtrum: sc9860 clocks
   - Tegra TX2 PSDI, HDMI, I2C,SMMU, display, fuse, ..."

* tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (690 commits)
  arm64: dts: stratix10: fix SPI settings
  ARM: dts: socfpga: add i2c reset signals
  arm64: dts: stratix10: add USB ECC reset bit
  arm64: dts: stratix10: enable USB on the devkit
  ARM: dts: socfpga: disable over-current for Arria10 USB devkit
  ARM: dts: Nokia N9: add support for up/down keys in the dts
  ARM: dts: nomadik: add interrupt-parent for clcd
  ARM: dts: Add ethernet to a bunch of platforms
  ARM: dts: Add ethernet to the Gemini SoC
  ARM: dts: rename oxnas dts files
  ARM: dts: s5pv210: add interrupt-parent for ohci
  ARM: lpc3250: fix uda1380 gpio numbers
  ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property
  ARM: dts: dra7: Reduce shut down temperature of non-cpu thermal zones
  ARM: dts: n900: Add aliases for lcd and tvout displays
  ARM: dts: Update ti-sysc data for existing users
  ARM: dts: Fix smartreflex compatible for omap3 shared mpu-iva instance
  arm64: dts: marvell: armada-80x0: Fix pinctrl compatible string
  arm: spear13xx: Fix spics gpio controller's warning
  arm: spear13xx: Fix dmas cells
  ...
2018-02-01 16:07:54 -08:00
Linus Torvalds 0fc7e74663 MTD changes:
Core changes:
   * Rework core functions to avoid duplicating generic checks in
     NAND/OneNAND sub-layers
   * Update the MAINTAINERS entry to reflect the fact that MTD
     maintainers now use a single git tree
 
   Driver changes:
   * CFI: use macros instead of inline functions to limit stack
     usage and make KASAN happy
 
 NAND changes:
   Core changes:
   * Fix NAND_CMD_NONE handling in nand_command[_lp]() hooks
   * Introduce the ->exec_op() infrastructure
   * Rework NAND buffers handling
   * Fix ECC requirements for K9F4G08U0D
   * Fix nand_do_read_oob() to return the number of bitflips
   * Mark K9F1G08U0E as not supporting subpage writes
 
   Driver changes:
   * MTK: Rework the driver to support new IP versions
   * OMAP OneNAND: Full rework to use new APIs (libgpio, dmaengine) and fix
     DT support
   * Marvell: Add a new driver to replace the pxa3xx one
 
 SPI NOR changes:
   Core changes:
   * Add support to new ISSI and Cypress/Spansion memory parts.
   * Fix support of Micron memories by checking error bits in the FSR.
   * Fix update of block-protection bits by reading back the SR.
   * Restore the internal state of the SPI flash memory when removing the
     device.
 
   Driver changes:
   * Maintenance for Freescale, Intel and Metiatek drivers.
   * Add support of the direct access mode for the Cadence QSPI controller.
 -----BEGIN PGP SIGNATURE-----
 
 iQJABAABCAAqBQJabumAIxxib3Jpcy5icmV6aWxsb25AZnJlZS1lbGVjdHJvbnMu
 Y29tAAoJEGXtNgF+CLcA0eAP/1s4u/Vs0RaDL2Jog0z+3fdx9HKYTK01hiQoe5Vf
 0ouGH0lR9usAmmJlXxxNpBHFvJxsofJoCNaciHAiydCMBpX6oAQMYMMcPs4Qo7C/
 vydLBDBmKZNyQ9dv6FbjP+3Y/5drIGF+VfxXZwhGA3lwP5CSVbB9ndI8+A5bScIV
 m2RMOA/lorbNHQahEkt7FHd92yQxBXlbhHBf5Foy2dGhO3rpTWzL/d1KPAkcfeli
 ehjfazkbuwFxGlYBFsrWxsnm0zqrqIWtdTE5/0i8iC1FfbxL5KjRnAFg8AsXIepn
 C2rCAxM/890mIFypT/8xhu+1u8+Bmb1r/pA9G+f3zpkiAHcUGC3eMO3IhX/jkcAd
 jCD/zeaSW8uHrBoJA6mGhO1tkBA97w15XCQC38UZkRMaJsY8Rv50ST4afA4in7mi
 bdRnpOOBYsBv9LvLm+FzQ0EgRQl642mFY8rae+gAjkF/zt8zGHSt6UNgtwMRxqZJ
 ns/TyhNm7roYV3cPpAgOWK//9XAGII9YZ6x9XmPNZLq62yf+zqJnfeuy7bXATRfG
 GGYk6wd+VdN+Ax2mqVKEJMCArjz0kLAHOtpIwv2/RxB1dlNMdugaDPUcqFteZbXh
 wlgORLXLqZ8jfy+ITFB5HMDs/NMyuRr815jdPGZafHIx8xOBQD32Izv7cpYctfWU
 f2NU
 =Mxo2
 -----END PGP SIGNATURE-----

Merge tag 'mtd/for-4.16' of git://git.infradead.org/linux-mtd

Pull MTD updates from Boris Brezillon:
 "MTD core changes:
   - Rework core functions to avoid duplicating generic checks in
     NAND/OneNAND sub-layers
   - Update the MAINTAINERS entry to reflect the fact that MTD
     maintainers now use a single git tree

  MTD driver changes:
   - CFI: use macros instead of inline functions to limit stack usage
     and make KASAN happy

  NAND core changes:
   - Fix NAND_CMD_NONE handling in nand_command[_lp]() hooks
   - Introduce the ->exec_op() infrastructure
   - Rework NAND buffers handling
   - Fix ECC requirements for K9F4G08U0D
   - Fix nand_do_read_oob() to return the number of bitflips
   - Mark K9F1G08U0E as not supporting subpage writes

  NAND driver changes:
   - MTK: Rework the driver to support new IP versions
   - OMAP OneNAND: Full rework to use new APIs (libgpio, dmaengine) and
     fix DT support
   - Marvell: Add a new driver to replace the pxa3xx one

  SPI NOR core changes:
   - Add support to new ISSI and Cypress/Spansion memory parts.
   - Fix support of Micron memories by checking error bits in the FSR.
   - Fix update of block-protection bits by reading back the SR.
   - Restore the internal state of the SPI flash memory when removing
     the device.

  SPI NOR driver changes:
   - Maintenance for Freescale, Intel and Metiatek drivers.
   - Add support of the direct access mode for the Cadence QSPI
     controller"

* tag 'mtd/for-4.16' of git://git.infradead.org/linux-mtd: (93 commits)
  mtd: nand: sunxi: Fix ECC strength choice
  mtd: nand: gpmi: Fix subpage reads
  mtd: nand: Fix build issues due to an anonymous union
  mtd: nand: marvell: Fix missing memory allocation modifier
  mtd: nand: marvell: remove redundant variable 'oob_len'
  mtd: nand: marvell: fix spelling mistake: "suceed"-> "succeed"
  mtd: onenand: omap2: Remove redundant dev_err call in omap2_onenand_probe()
  mtd: Remove duplicate checks on mtd_oob_ops parameter
  mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing
  mtd: mtdpart: Make ECC stat handling consistent
  mtd: onenand: omap2: print resource using %pR format string
  mtd: mtk-nor: modify functions' name more generally
  mtd: onenand: samsung: remove incorrect __iomem annotation
  MAINTAINERS: Add entry for Marvell NAND controller driver
  ARM: OMAP2+: Remove gpmc-onenand
  mtd: onenand: omap2: Configure driver from DT
  mtd: onenand: omap2: Decouple DMA enabling from INT pin availability
  mtd: onenand: omap2: Do not make delay for GPIO OMAP3 specific
  mtd: onenand: omap2: Convert to use dmaengine for memcpy
  mtd: onenand: omap2: Unify OMAP2 and OMAP3 DMA implementation
  ...
2018-01-29 11:11:56 -08:00
Arnd Bergmann 0ca14cdea7 ARM: omap: hwmod: fix section mismatch warnings
Older compilers choose not to inline _setup_clkctrl_provider(),
leading to a harmless warning:

WARNING: vmlinux.o(.text+0x27b34): Section mismatch in reference from the function _setup_clkctrl_provider() to the function .init.text:memblock_virt_alloc_try_nid()
The function _setup_clkctrl_provider() references
the function __init memblock_virt_alloc_try_nid().
This is often because _setup_clkctrl_provider lacks a __init
annotation or the annotation of memblock_virt_alloc_try_nid is wrong.

This annotates it as __init as well, which lets the linker
see that it is actually correct.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-01-22 12:39:36 +01:00
Ladislav Michl 2514830b8b ARM: OMAP2+: Remove gpmc-onenand
As OneNAND driver is now using devicetree gpmc-onenand and its
platform data is unused and can be removed.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2018-01-12 16:41:15 +01:00
Olof Johansson 8102324d86 TI sysc driver updates for v4.16 merge window
We now have gotten ti-sysc driver to the point where it can parse
 interconnect target configuration from device tree instead of the
 legacy platform data. This series updates the device tree binding
 and adds parsing to the driver for quirks and capabilities.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlo9SDIRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXMnOA/9HboJqef8A3cHFKdbM/PVrRNUl7E9ozm2
 mEFios7yde4WYx1GVTal66oX8h0YJY/l3jUtBe/IiWosUCZP/vDbo+w0rWrJaVhC
 xitZ5mIQniduM/7LnQOpznVXVFgVezefbJFKRVI4Fs+dUlJjDnyawob5Jr9egMxj
 613l28FJX817y3jZ9CYf2/qBdRt8HwpkAI3V0PRXn0r6wik+0XohipHUvotDZFpb
 V8woyAX1H7gzSkNKw53ViL38bJCQ4/DlhRbaSojzBF8Lm4xMx37TWty/wbR3aYjS
 0FoQtQR9URBQSRyCbBLL0m9/fY92tMQlltT5/Pd/Yc6CBDhhGQr+e7DE23lHKpWH
 qTc3YnHOAqHEC8oTLfL6Yknkm4MXf11OX9HKPJP9KOGKYq7YdGrG/AJnvyOXMIUE
 o68k91ST3mn9HbG4gPvVoHhHqe2GV15LI2ey5HJ8jk46BJGaaDW0WuFw7m5G/CMB
 q++9Lbu/MQSJtI3eJexLxJBlOQr7lUmC/ACa3Fl+W7C1F5LUPsio/aJrvX3YqNZ3
 th8arjGkkfZx9WEsXfW7kHi1ljYzvrP8wnwX14sydbpoPgoWlRpA9d4EbOPPy9Wb
 c9/XUzOrPk3xgo5KntqJmCIjoa/OXxHrW5nWBU7cxbQbjH6IOW9lb4gO8sTUtE3H
 HA8uV88RU4U=
 =Hwvv
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.16/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers

TI sysc driver updates for v4.16 merge window

We now have gotten ti-sysc driver to the point where it can parse
interconnect target configuration from device tree instead of the
legacy platform data. This series updates the device tree binding
and adds parsing to the driver for quirks and capabilities.

* tag 'omap-for-v4.16/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Add parsing of module capabilities
  bus: ti-sysc: Handle module quirks based dts configuration
  bus: ti-sysc: Detect i2c interconnect target module based on register layout
  bus: ti-sysc: Add register bits for interconnect target modules
  bus: ti-sysc: Make omap_hwmod_sysc_fields into sysc_regbits platform data
  ARM: OMAP2+: Move all omap_hwmod_sysc_fields to omap_hwmod_common_data.c
  ARM: dts: Add generic ti,sysc compatible in addition to the custom ones
  dt-bindings: ti-sysc: Update binding for timers and capabilities

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-01-04 23:06:04 -08:00
Olof Johansson dcd47b0d90 Second set of SoC changes for omaps for v4.16 merge window
We can now drop some more of legacy platform data for omap3 as
 it's been booting in device tree only mode for quite a while now.
 This clock related data is coming from device tree configured
 clocks now.
 
 The other changes add support for detecting new dra762 SoC variant.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlo9R00RHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNT4Q/+Ot2akuMyQcX4zeQZ8E8YqF3afzCTBFCB
 /P0IuMqq3YQ4cjGLflnJr6p18X6I1/5cJLRLDmU9Ei8E1q6q2iAEY0UshY7Vz8Lu
 0AqevhKqRlHT9BIctwCe8PKrhrLiKeRam66EtCuO5WwtMY4qWeW4vIfP3Wew55Vg
 23kd/frGKgYTFOSw6HTeBjw0fyLvRHqDFaEBhhuTl8JvDa/Qo4nP82qJtyoaWefQ
 AZ9bZh8WSjbEH4hCGXMAp5l/bl6ENQfwuIQahYM7//ZKTfOq0isE0C6neLWjMxH7
 ZenFKup0b6O6MvFdLowYIMTME/+b6U8CVD9YEbrOJ+39YRr2VWsR8qQZLcfG4ana
 s0Aa2sKxDFMUltCpfBDxleKbPwYZ0D3kcQYVLQTKicQ3Opa/e/R/9CgQ+btAcNnG
 ZlwdAs9Iui+6mlaBaf2GbjmxSOa1uSSJGG4bluj4tvMBlNTCUOlmiYKQ8aX9lItB
 /IxGgKd4O9m9YOq8FpGysQidiQefm/AlUD/N9i0tvdpu5muCZJeelcN5Dgq1yMH1
 8xN6qEj3IcpQPRf0xGHI/87PaxvQ/bIQjXz+NMxz/Rd9WBBkLRSQhpLGAlvCizFF
 fzjk+sTJJPDv8VGDACUdPsE+XHLvE+jxED6vThyHyeOF9iISbaZUjZV65VjanCZ/
 GH8smDT1mq4=
 =wejU
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.16/soc-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Second set of SoC changes for omaps for v4.16 merge window

We can now drop some more of legacy platform data for omap3 as
it's been booting in device tree only mode for quite a while now.
This clock related data is coming from device tree configured
clocks now.

The other changes add support for detecting new dra762 SoC variant.

* tag 'omap-for-v4.16/soc-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: dra762: Register package specific hwmod
  ARM: OMAP2+: dra762: Add support for device package identification
  ARM: OMAP2+: Drop unused legacy data for prcm_reg_id and module_bit

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-01-04 23:04:38 -08:00
Tero Kristo 392ea5dd0f ARM: OMAP2+: hwmod_core: enable optional clocks before main clock
The optional clocks must be enabled before the main clock after the
transition to clkctrl controlled clocks is done. Otherwise the module
we attempt to enable might be stuck in transition.

Reported-by: Keerthy <j-keerthy@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-22 10:48:07 -08:00
Arnd Bergmann 24ff73a0af Clock related dts changes for omaps for v4.16 merge window
This branch contains a series of dts changes from Tero Kristo to
 start using clkctrl clocks.
 
 Note that this branch is based on a merge of omap-for-v4.16/soc-signed
 and an immutable commit from Tero Kristo fe7020e64f ("clk: ti: omap4:
 clkctrl data fixes for opt-clocks") that is also in clk-next.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAloym5wRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXMdhg/+NOHIbfac/F1pMg+xNHHJLwgC2FkMAxcH
 8fdQveZrjB92W2UCcwZ95yQ6wQ+dq2xNIEovw1ak5zxI2AjJnpiLGCq3SvQwzTUp
 KhUj4/bcCX+A6LrM0QREEOQluRqfdql7v4x1E8FkyHqmsHpAaBmZHw5vPbKmKcPO
 /aq+xKfkxzZ8l6yLe4dh4evssUiYFCxy1tFFc82KnA7LxRF3un1eqz/qsPTxPDAw
 xxS9Wn3SJENFYFL1PztHCItjM8pNpgyzX6ea//tM/m4L9/LF2t/Q5njRkNGnVi0i
 D6LfQoDkyiKUJHP+FwX4LV0bq8ZOeAQO9ZbNRZWuYvK7f9HLetcUlKErTIWLYYnO
 UZgmFGVVThF2lCu0BGPb5sPoj4ObWhyQfOVC8lTaMIhqUoch2l3KBzQ21DiOFSza
 vVWknTwt7CYdARJD3tiliH0UO53aJ5f8FUDBo2L3aQYUQjtgb82LKWgKdCIGhtjA
 4QBsIXUdgxZNKgs6RttT5BQUili0DQefozAJWosGqe/yN4bSWk7OE0gJdep3jnax
 8EB+71kExKQWAcvyEgt7G9YT47J/mKAsn/eIi2YEgnnn5J2yE+qTHg63OdBjPCFB
 rcWnztQEgm1qUa3RQXHWVvQsVt9KH+UQOm5soL5b0XooyevtT0B/Hw6+EdPUtTwA
 4NYbnpRhnz8=
 =uhHY
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.16/dt-clk-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt

Pull "Clock related dts changes for omaps for v4.16 merge window" from
Tony Lindgren:

This branch contains a series of dts changes from Tero Kristo to
start using clkctrl clocks.

Note that this branch is based on a merge of omap-for-v4.16/soc-signed
and an immutable commit from Tero Kristo fe7020e64f ("clk: ti: omap4:
clkctrl data fixes for opt-clocks") that is also in clk-next.

* tag 'omap-for-v4.16/dt-clk-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (57 commits)
  ARM: dts: dm816x: add clkctrl nodes
  ARM: dts: dm814x: add clkctrl nodes
  ARM: dts: am43xx: add clkctrl nodes
  ARM: dts: am33xx: add clkctrl nodes
  ARM: dts: dra7: add clkctrl nodes
  ARM: dts: omap5: add clkctrl nodes
  ARM: dts: omap4: add clkctrl nodes
  ARM: dts: dm816x: add bus functionality to base PRCM node
  ARM: dts: am43xx: add bus functionality to base PRCM node
  ARM: dts: am33xx: add bus functionality to base PRCM node
  ARM: dts: dra7: add bus functionality to base PRCM nodes
  ARM: dts: omap4: add bus functionality to base PRCM nodes
  ARM: dts: omap5: add bus functionality to base PRCM nodes
  ARM: dts: dm816x: add fck under timers1/2
  ARM: dts: dm814x: add fck under timers1/2
  ARM: dts: dra7: add fck under timer1
  ARM: dts: am43xx: add fck under timers1/2
  ARM: dts: am33xx: add fck under timers1/2
  ARM: dts: omap4: add fck under timer1
  ARM: dts: omap5: add fck under timer1
  ...
2017-12-21 17:19:38 +01:00
Arnd Bergmann 4e34e2702d SoC changes for omaps for v4.16 merge window
For most part this is a series from Tero Kristo to prepare things
 for using clkctrl clocks with DTS data. The other changes are to
 make few data structures const.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAloymdARHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXPIPw//dJxt2vlYgPrbsQNmdrvsa8ruq7bs2IbT
 ZrxjIyWnTFJJSvNFHLqeK6NH7eikpEHK9Emoq8DShFxhQPBnFVGbgBoC6M09arr/
 0up/l6O9VvJzpypwexuezZi/q91k4Sdd4zzbrfzunsP82Dxd4vCRwMCskHVUSLaB
 pSn8Khn4zBl6tRLZURcfk6kxGfajNJMehbWsJTkSPDcXYA4t0uzFSlfiA7AjpR10
 fwG+PSWSmUskmW4U6+oNBe4oNJtCA7Ciiq9Qof0uFjEspegacyH04X67h5la78sz
 /t6VSXKS9jcTQaeW5k8C+Nr9380qWne6d25bPE3PZ8qtRzUkzgSDY6+x0bYV7h2k
 YV8EnpQf3JyMcTqQfxyY7eKC4zRzmGGqZEQmEbe+w1Iw+oL5Y+tEHB2gApMAl1K3
 e6XeBfUo1xli4DDLOJEZnaBJBjeLmR4ACGjB5VZi4MIXmB9VUfdORoCIrCXUJ4+Q
 ehIK67NpGNZfeJmHCCJbUg1HGM5lKoPo5tVCubsYeDhRIdKHDUpCZh35eogIL2y9
 8dOKs5Sa+oVQGzwZJe6ejbOYqR5hxsoyye0ld+HV2eZ5IaH3TlWUg4nfolFR/5RS
 HMIIw1/VdVECn4vC7ELbA4R9PLq6mKXfV3e01Mq2IkIwsqiSQRBIsfWfO6gmQ4FW
 7AbS2DEEhrk=
 =QUSG
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "SoC changes for omaps for v4.16 merge window" from Tony Lindgren:

For most part this is a series from Tero Kristo to prepare things
for using clkctrl clocks with DTS data. The other changes are to
make few data structures const.

* tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: CM: make cm_ll_data structures as const
  ARM: OMAP2+: CM: make some pointers and function arguments as const
  ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod
  ARM: OMAP2+: hwmod: calculate physical register address on am33xx
  ARM: AM33xx: CM: add support for getting physical address for a register
  ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API
  ARM: OMAP2+: hwmod: fix clkctrl address translation logic
  ARM: OMAP4: CMINST: add support for translating clkctrl addresses
  ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register
2017-12-21 17:17:40 +01:00
Tony Lindgren 49a0a3d805 bus: ti-sysc: Make omap_hwmod_sysc_fields into sysc_regbits platform data
We want to be able to configure hwmod sysc data from ti-sysc driver using
platform data callbacks. So let's make struct omap_hwmod_sysc_fields into
struct sysc_data and have it available for both ti-sysc driver and hwmod
code.

Note that we can make it use s8 instead of u8 as the hwmod code uses the
feature flags to check for this field. However, for ti-sysc we can use
-ENODEV to indicate a feature is not supported in the hardware and can
simplify the code that way.

And let's add also emufree_shift as the dts files will be describing the
hardware for the SYSCONFIG register capbilities mask.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-21 07:28:54 -08:00
Tony Lindgren bf80705222 ARM: OMAP2+: Move all omap_hwmod_sysc_fields to omap_hwmod_common_data.c
We want to be able to eventually allocate these dynamically with the
data for omap_hwmod_class_sysconfig coming from dts.

Note that omap_hwmod_sysc_type_smartreflex is the same as the older
omap36xx_sr_sysc_fields, so let's use the earlier omap36xx_sr_sysc_fields
instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-21 07:28:54 -08:00
Lokesh Vutla 234c91d4a3 ARM: OMAP2+: dra762: Register package specific hwmod
Register dra762 abz package specific hwmod. Also move registering rtc hwmod
into respective SoC conditional statements instead of doing it separately.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-21 07:05:15 -08:00
Lokesh Vutla 987d13f6d7 ARM: OMAP2+: dra762: Add support for device package identification
dra762 comes in two packages:
- ABZ: Pin compatible package with DRA742 and DDR@1333MHz
- ACD: High performance(OPP_PLUS) package with new IPs

Both the above packages uses the same IDCODE hence needs to
differentiate using package information in DIE_ID_2.
Add support for the same.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-21 07:04:10 -08:00
Tony Lindgren a7cb4671e1 ARM: OMAP2+: Drop unused legacy data for prcm_reg_id and module_bit
We are now using clock drivers in driver/clk/ti for enabling and disabling
modules and these are all unused.

Let's also remove the related unused defines in cm-regbits-24xx.h and
cm-regbits-34xx.h.

Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-14 08:23:33 -08:00
Tony Lindgren fdf3632938 Merge branch '4.15-rc1-clkctrl-mach-omap2' of https://github.com/t-kristo/linux-pm into omap-for-v4.16/soc 2017-12-11 07:46:40 -08:00
Bhumika Goyal 60af58cde4 ARM: OMAP2+: CM: make cm_ll_data structures as const
Make these const as they are only getting passed to the functions
cm_register and cm_unregister having the arguments as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 07:40:38 -08:00
Bhumika Goyal a529f8de26 ARM: OMAP2+: CM: make some pointers and function arguments as const
Make the pointer cm_ll_data of type cm_ll_data as const as it does not
modify the fields of the structure it points too.
After this change, make the argument of cm_register function as const as
it is used to initialise cm_ll_data or used inside an if condition.
Make the pointer argument of cm_unregister function as const as it is only
used inside an if condition.
Add const to the function prototypes too.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-12-11 07:40:34 -08:00
Arnd Bergmann 863204cfda ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds
In configurations without CONFIG_OMAP3 but with secure RAM support,
we now run into a link failure:

arch/arm/mach-omap2/omap-secure.o: In function `omap3_save_secure_ram':
omap-secure.c:(.text+0x130): undefined reference to `save_secure_ram_context'

The omap3_save_secure_ram() function is only called from the OMAP34xx
power management code, so we can simply hide that function in the
appropriate #ifdef.

Fixes: d09220a887 ("ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context")
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-12-07 15:52:21 +01:00
Tero Kristo 71d50393ab ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod
"default_sata_clkdm" does not exist, instead replace this with the
correct clockdomain name which is just "default_clkdm".

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 2b96be3df5 ARM: OMAP2+: hwmod: calculate physical register address on am33xx
Add support for the address translation logic for am33xx. Needed for
mapping hwmods towards their corresponding clkctrl providers and clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 85ab016cc3 ARM: AM33xx: CM: add support for getting physical address for a register
Needed for mapping the hwmods towards their corresponding clkctrl
providers and clocks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 17d56e80f1 ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API
This is no longer used for anything so it can be dropped.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 6e83ecaa45 ARM: OMAP2+: hwmod: fix clkctrl address translation logic
There are cases where clkctrl clock offsets do not match the corresponding
clockdomain, and this case the existing mapping functionality will fail.
Fix this by adding the whole address range for a clkctrl provider and
matching the actual clkctrl registers against these ranges.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:21 +02:00
Tero Kristo 1055d92ccf ARM: OMAP4: CMINST: add support for translating clkctrl addresses
Needed to map clkctrl clocks against hwmods. This patch also removes
the obsolete clkdm_xlate_address function which is no longer needed
for anything.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:20 +02:00
Tero Kristo 5fa4a3cc58 ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register
Add a new CM API for fetching the physical address of a hwmod clkctrl
register. This is needed to map omap hwmods against clkctrl clocks, the
existing support for clkdm address translation was not sufficient to
handle the mutant cases where the clockdomain offset is completely
off from the clkctrl ones.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
2017-12-04 11:35:20 +02:00
Tony Lindgren 124dcf7960 Merge branch 'omap-for-v4.14/fixes' into omap-for-v4.15/fixes-v2 2017-11-28 08:22:57 -08:00
Tony Lindgren 2db57789e6 Merge branch 'soc-fixes' into omap-for-v4.15/fixes 2017-11-28 07:06:34 -08:00
Dan Carpenter e9a9bb4e47 ARM: OMAP2+: Missing error code in omap_device_build()
We need to set the error code if omap_device_alloc() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-11-28 07:03:26 -08:00
Keerthy b6d6af7226 ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
Referring TRM Am335X series:
http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf

The LastPowerStateEntered bitfield is present only for PM_CEFUSE
domain. This is not present in any of the other power domains. Hence
remove the generic am33xx_pwrdm_read_prev_pwrst hook which wrongly
reads the reserved bit fields for all the other power domains.

Reading the reserved bits leads to wrongly interpreting the low
power transitions for various power domains that do not have the
LastPowerStateEntered field. The pm debug counters values are wrong
currently as we are incrementing them based on the reserved bits.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-11-28 07:03:26 -08:00
Tony Lindgren d09220a887 ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
With the CMA changes from Joonsoo Kim <iamjoonsoo.kim@lge.com>, it
was noticed that n900 stopped booting. After investigating it turned
out that n900 save_secure_ram_context does some whacky virtual to
physical address translation for the SRAM data address.

As we now only have minimal parts of omap3 idle code copied to SRAM,
running save_secure_ram_context() in SRAM is not needed. It only gets
called on PM init. And it seems there's no need to ever call this from
SRAM idle code.

So let's just keep save_secure_ram_context() in DDR, and pass it the
physical address of the parameters. We can do everything else in
omap-secure.c like we already do for other secure code.

And since we don't have any documentation, I still have no clue what
the values for 0, 1 and 1 for the parameters might be. If somebody has
figured it out, please do send a patch to add some comments.

Debugged-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-11-28 07:03:26 -08:00
Linus Torvalds 8c60969856 ARM: SoC platform updates for 4.15
Most of the commits are for defconfig changes, to enable newly added
 drivers or features that people have started using. For the changed
 lines lines, we have mostly cleanups, the affected platforms are
 OMAP, Versatile, EP93xx, Samsung, Broadcom, i.MX, and Actions.
 
 The largest single change is the introduction of the TI "sysc" bus
 driver, with the intention of cleaning up more legacy code.
 
 Two new SoC platforms get added this time:
 - Allwinner R40 is a modernized version of the A20 chip, now
   with a Quad-Core ARM Cortex-A7. According to the manufacturer,
   it is intended for "Smart Hardware"
 - Broadcom Hurricane 2 (Aka Strataconnect BCM5334X) is a family
   of chips meant for managed gigabit ethernet switches, based
   around a Cortex-A9 CPU.
 
 Finally, we gain SMP support for two platforms: Renesas R-Car E2
 and Amlogic Meson8/8b, which were previously added but only supported
 uniprocessor operation.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaDgf/AAoJEGCrR//JCVIntcMQAKI2q0Dr2giWtKSoH9GDh5co
 137MamTj1YExIcmtbDVO22jV4WSKhIduo+rRBYmQ/uvrkUe9tf7I172JeAIzMzGf
 HGYJ6fxpaEMUAbUlNcjuXJc7jQXNKLBK2X9CMuwXX3X3HddxKkL38D1d/Mxv5RGu
 G1pEe0j734Qio9LpACnb0xnluwyUBJOYNwo7Agj5RWzOrXZ+TdwkiIW0JdQiG7Z5
 wabzDa7OW1maB+hVYMAM3wHcqO7DKEvGvjYLRoT12cnOLXq7BNbXqXFufuMUNmNE
 ABhWA1h9SYrXT3n5pQLwoonvvTsI7KXCefrZ0wuxbjrdD4yGW1gmgpRee9RfoggD
 A6/62wpmSS61X5QWC6BLEa5v/o5NKewndyWhnjLllgJX8sRUbnPQa/xKv7ngdlN5
 7YL5HWoNpMQv7fEweSc6j5l/F3yRBndn9TpeKiqCiUiNDrIGlZYhYKIcr9rGESFk
 pu2KgK+e9+1k7F4s7LotsA65Q5bZIMveyyVtx0XHXz1G4O8NksoQCLJ3wcqQ2pzI
 WpyOO5R1CNltPhKGC7EP3OZcIMlCtCnsNcedb/AGHgPS+ert2UxBnlSeSMBQlLZY
 4fDwEAlA1qx9PuG9N3xrK/gAFiFLafK2sNxtVc7NSmXkkdm3xgJ95Y9sa72Y2qNO
 rU2LL8SM7cOwhXHrlEFB
 =jlJ2
 -----END PGP SIGNATURE-----

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

Pull ARM SoC platform updates from Arnd Bergmann:
 "Most of the commits are for defconfig changes, to enable newly added
  drivers or features that people have started using. For the changed
  lines lines, we have mostly cleanups, the affected platforms are OMAP,
  Versatile, EP93xx, Samsung, Broadcom, i.MX, and Actions.

  The largest single change is the introduction of the TI "sysc" bus
  driver, with the intention of cleaning up more legacy code.

  Two new SoC platforms get added this time:

   - Allwinner R40 is a modernized version of the A20 chip, now with a
     Quad-Core ARM Cortex-A7. According to the manufacturer, it is
     intended for "Smart Hardware"

   - Broadcom Hurricane 2 (Aka Strataconnect BCM5334X) is a family of
     chips meant for managed gigabit ethernet switches, based around a
     Cortex-A9 CPU.

  Finally, we gain SMP support for two platforms: Renesas R-Car E2 and
  Amlogic Meson8/8b, which were previously added but only supported
  uniprocessor operation"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (118 commits)
  ARM: multi_v7_defconfig: Select RPMSG_VIRTIO as module
  ARM: multi_v7_defconfig: enable CONFIG_GPIO_UNIPHIER
  arm64: defconfig: enable CONFIG_GPIO_UNIPHIER
  ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b
  ARM: meson: Add SMP bringup code for Meson8 and Meson8b
  ARM: smp_scu: allow the platform code to read the SCU CPU status
  ARM: smp_scu: add a helper for powering on a specific CPU
  dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation
  ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init()
  ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init()
  ARM: defconfig: select the right SX150X driver
  arm64: defconfig: Enable QCOM_IOMMU
  arm64: Add ThunderX drivers to defconfig
  arm64: defconfig: Enable Tegra PCI controller
  cpufreq: imx6q: Move speed grading check to cpufreq driver
  arm64: defconfig: re-enable Qualcomm DB410c USB
  ARM: configs: stm32: Add MDMA support in STM32 defconfig
  ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1
  bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove
  bus: ti-sysc: mark PM functions as __maybe_unused
  ...
2017-11-16 14:05:12 -08:00
Arnd Bergmann da18392fd0 Few coccinelle robot clean-up patches for careless human coding
issues for v4.15 merge window sent by their human operatorrrrrs.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAln3VUIRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXOBcxAA07MX90Ao/48PLf3nLTYNWm6AurLNgbol
 wEcb4xxFW/kn1OlF3YrQmo+3kYmFpt9iEMMY46VT6kuYYvLLTDPlIxt3xcdDlQtJ
 sHX+51EudFH4f9qLZp3zhPtTN/JjvF866Wnp66+l5lI1c50jD9TtI6RYbsdvprvl
 8kVB4eFQzMJvoKUjmOkpheACaH91HPOiWNgS0R2PRFNN63Oyy8UwE1Mtl3Ry9Ayx
 eSc6V0JZzIgogG3Np9VnKiK78toYWsaphO50HLLOsGezOEmG7IUgxWxvFCge83ew
 BKT3fk5yY8D1kLrGYirkJj0VkLTSO8+P/cgxLXw8VJu5P6uwXBKbjwBJEejmxFRZ
 hnCy1VJM6df88Bx/PalhSd5LWreQH5xlt67FmKwGXlRRVqTay2wKN+AZid/tMjqC
 A97BUIHjnXIAk31R1pNXjBWInN9oaEA10ueihIDFWFJw23dP/MFb0Gs1Yi5ZwPPW
 Dv/7AGhSicCS20LgsF37Ye7wFihNI8K6mQYFqUgJjsVQ9+k/G3wNtRh1My3aHiK5
 F63Pq0ySfPx6p6Ka9+9SjgXqflE1NJ10OPasQ973TC12UG1uwMiI228Wh55Wij6E
 AeyXYbfLJ1T5jrmOTb1+WEL8KRM5nYG3pNL19vRvB3IoRUGHz8rdFV8/6a5fzMvO
 xkep0b0++30=
 =vA9m
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.15/coccinelle-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "omap coccinelle warning fixes for v4.15 merge window" from Tony Lindgren:

Few coccinelle robot clean-up patches for careless human coding
issues for v4.15 merge window sent by their human operatorrrrrs.

* tag 'omap-for-v4.15/coccinelle-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init()
  ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init()
  ARM: omap1: add const and initconst to omap_lcd_config
2017-11-02 16:39:46 +01:00
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Tony Lindgren f0c96c6d40 ARM: OMAP2+: Fix smatch found issue for omap_device
The patch d85a2d6143: "ARM: OMAP2+: Populate legacy resources for
dma and smartreflex" from Oct 10, 2017, leads to the following Smatch
complaint:

arch/arm/mach-omap2/omap_device.c:453 omap_device_copy_resources()
         error: we previously assumed 'oh' could be null (see line 394)

Fixes: d85a2d6143: ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-30 10:01:39 -07:00
Tero Kristo 6301d58477 ARM: OMAP2/3: CM: fix cm_split_idlest functionality
cm_split_idlest doesn't take the CM base offset into account right now,
causing it to read reserved registers which show idlestatus as active
always. This will cause the wait_module_ready functionality to be
effectively an expensive NOP, which will cause problems if the
module hasn't really activated during its execution. Fix by adding
the CM offset into the calculation so the wait_module_ready will
access correct register.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Filip Matijevic <filip.matijevic.pz@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-30 09:14:55 -07:00
Tero Kristo 3c4d296e58 ARM: OMAP3: hwmod_data: add missing module_offs for MMC3
MMC3 hwmod data is missing the module_offs definition. MMC3 belongs under
core, so add CORE_MOD for it.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-30 09:14:50 -07:00
Markus Elfring d9ecbef394 ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init()
The local variable "bus" will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-25 09:54:08 -07:00
Markus Elfring f33aadd266 ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init()
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-25 09:54:02 -07:00
Arnd Bergmann ab63d1efc5 Drop omap legacy platform data for IRQ, DMA and IO resources. With the
dts files fixed up to contain the necessary data for basic resources, we
 can drop the related platform data.
 
 Note that this branch depends on the "omap-for-v4.15/fixes-dt-signed"
 branch and the patches with dependencies are based on a merge with that
 branch.
 
 These patches first ensure things keep working for the legacy "ti,hwmods"
 property when we start making it optional, then adds a minimal TI sysc
 interconnect target device driver to handle the new generic "ti,sysc"
 compatible property. And then we can finally drop the legacy platform
 data for IRQ, DMA and IO resources as seen in the diffstats.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlnpH4MRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXOflw//a6XK67MvvBAni0jUrEvVsXkIszk/V8bm
 2rTnBT+8mdH7QjH2QQrvtS5XX7uVSY27Pay9yiudhB/ZvHdih4SguSZB2JC9nMyf
 uAJAk5JUXvGdlj7NjMhIEEQZHzb2GYXlwNWKW8201FgjTrUs/miRLb0+bBi0+a5O
 02FFYb45Gcv0xQlwcG7yAWzjCpy5a0Vd75M/Q+aGeNXeZagrH1bLtc6dNY59RPKs
 0D51XGQNHyVDITArBms9Q6O+MyIHnRcL3zdKRGrWMhNXBwP5jwE6EE1Jnmcsge9m
 vPSdCpRlPQPPhBgLKAqZfHKXEpaVQfPjq7vp/ZFUiBSMuyNb2SP7YCOnh06cZwjZ
 hz4eMIQVvABBNvGMmg934hWP7OHSQkgxn5+zPo5o3gYvv+GvrKRUmxfaDpUoX4Ld
 oLUUcCfb4r0YAr5S+iCXaGtEdYhXdL1xzndSKFNlf+tx95BxbsfQ4u7pITMjLTAB
 vXBJASquuLQYRumWXPnMUDkKuTEJPq/ndSIOfdSU+09jFKGwkv/2C15YO8uZsH6m
 fWSUEGyD+c9hbnYDNE5mXkB4OeP7aGeCJC0RaucHXOeNNJJPRgNXPeHJA2aXYam+
 ml28jwoPRoOCE+SjGV0RtxjDAjMuc3Xknq6xq5GmHp8peHdeG+GaD4qdJThlcgRl
 yLnaNnEoZsI=
 =UKzm
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "more soc changes for omaps for v4.15 merge window" from Tony Lindgren:

Drop omap legacy platform data for IRQ, DMA and IO resources. With the
dts files fixed up to contain the necessary data for basic resources, we
can drop the related platform data.

Note that this branch depends on the "omap-for-v4.15/fixes-dt-signed"
branch and the patches with dependencies are based on a merge with that
branch.

These patches first ensure things keep working for the legacy "ti,hwmods"
property when we start making it optional, then adds a minimal TI sysc
interconnect target device driver to handle the new generic "ti,sysc"
compatible property. And then we can finally drop the legacy platform
data for IRQ, DMA and IO resources as seen in the diffstats.

* tag 'omap-for-v4.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (25 commits)
  bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove
  bus: ti-sysc: mark PM functions as __maybe_unused
  ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
  ARM: OMAP2+: Drop legacy struct omap_hwmod_addr_space
  ARM: OMAP2+: Drop omap_hwmod_dma_info
  ARM: OMAP2+: Drop omap_hwmod_irq_info
  ARM: OMAP4: Remove legacy IRQ for PRM
  ARM: OMAP3: Remove legacy IRQ for PRM
  bus: ti-sysc: Add minimal TI sysc interconnect target driver
  ARM: OMAP2+: Populate legacy resources for dma and smartreflex
  ARM: OMAP2+: Parse module IO range from dts for legacy "ti,hwmods" support
  ARM: dts: Configure SmartReflex only to idle the interconnect target module
  ARM: dts: Add nodes for missing omap4 interconnect target modules
  dt-bindings: bus: Minimal TI sysc interconnect target module binding
  ARM: dts: Add missing hwmod related properties for dra7
  ARM: dts: Add missing hwmod related nodes for am33xx
  ARM: dts: Add missing dma hwmod property for omap5
  ARM: dts: Add missing wdt3 node for omap4
  ARM: dts: Add missing hsi node for omap4
  ARM: dts: Add missing onewire node for omap4
  ...
2017-10-20 00:43:31 +02:00
Arnd Bergmann a1bc4e7cee SoC changes for omaps for v4.15 merge window that are mostly non-urgent
fixes and clean-up in preparation for dropping more platform data later
 on:
 
 - Fix am33xx/am437x MMC address space offsets
 
 - Fix overwriting clkctrl and modulemode values when dts data is
   used
 
 - Drop unused platform init code for omap_init_hdq
 
 - Drop unused struct omap_hwmod_mux_info
 
 - Remove duplicate define for dra722 es1.0 silicon revision
 
 - Add support for dra71x es2.1
 
 - Make omap_dma_dev_info __initdata
 
 - A series of fixes for Coccinelle found issues
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlng6dwRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNHxw//U61yomGBb5cEjDnRwB0cYVkPWSFGgUvB
 HW125O5EWmN8+IHzsd9SHk6jrQ35LcNknQzbiG1F/E9X5C+xtnUGed3B/xHxeTl4
 80HCYSBdZv4CnDJPK1JzYxKPSsfR6caTg57cWcxqs8mCjs7qTjUKCbqOouW9SyEh
 Vjd0QxTBbB8FIGn367WcZhacmbRikp549M//WC2VQUMln9AWzFaCXSuP1Od7jb+p
 juau0hwgmgH0aDh4T8jqp3xEm3nIqAmjCgPp9RQiAmmNMDVWd/SERQ4nVoylFiaX
 R25l7cZUF9hSC0TJSWxXVbSgnrObVId4jpi/kIOrQwPmJq1VdCS8Egv3jujULZjG
 dPeyvcOGWSwl7uiA5j13vtgQZgkUIG4yIlJul5IlSGgwBvv25zG6ot6ErC0h/Zli
 MwJ0UCGXet4PvX1lZLw5QHWHuUaWAL7qahOM0dZn7ki9xtJmMi125eMU9uBDpRVR
 aQAZxuiw58TdHzK/EHm5K3HSOSWj2AZKJnk52BWTB8F3AY4d/j5ZubHya532BSzh
 P1AMfvdrxZ7RpEWH92rhcC5JRtPFEpKYuUakdjV6mnWgNdQyDICQvIp5b3gC4Y1L
 wL3AdFeYFT/klK8UCwNN/q2JINBntbWPM2//YMcEM28IbZgSM0FVIwX+4bImjaL+
 vq0zTJrWWjg=
 =oSR0
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.15/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc

Pull "OMAP soc changes for omaps for v4.15 merge window" from Tony Lindgren:

SoC changes for omaps for v4.15 merge window that are mostly non-urgent
fixes and clean-up in preparation for dropping more platform data later
on:

- Fix am33xx/am437x MMC address space offsets

- Fix overwriting clkctrl and modulemode values when dts data is
  used

- Drop unused platform init code for omap_init_hdq

- Drop unused struct omap_hwmod_mux_info

- Remove duplicate define for dra722 es1.0 silicon revision

- Add support for dra71x es2.1

- Make omap_dma_dev_info __initdata

- A series of fixes for Coccinelle found issues

* tag 'omap-for-v4.15/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: Fix typos in two comment lines in _omap_dm_timer_request()
  ARM: OMAP: Use kcalloc() in omap_system_dma_probe()
  ARM: OMAP: Improve a size determination in two functions
  ARM: OMAP: Delete an error message for a failed memory allocation in two functions
  ARM: OMAP2+: make omap_dma_dev_info __initdata
  ARM: DRA722: Add support for DRA71x Silicon Rev 2.1
  ARM: DRA722: remove redundant definition of 1.0 device
  ARM: OMAP2+: Drop unused omap_hwmod_mux_info
  ARM: OMAP2+: Drop unused omap_init_hdq
  ARM: OMAP2+: Fix overwriting of clkctrl and modulemode values
  ARM: OMAP2+: Fix MMC address space mismatch for am33xx and am43xx
2017-10-19 22:44:20 +02:00
Wei Yongjun 552ee3021c ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources()
Fix to return error code -EINVAL from the irq_of_parse_and_map() error
handling case instead of 0, as done elsewhere in this function.

Fixes: d85a2d6143 ("ARM: OMAP2+: Populate legacy resources for dma
and smartreflex")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-13 10:07:40 -07:00
Tony Lindgren 9cffb1a050 ARM: OMAP2+: Drop legacy struct omap_hwmod_addr_space
With all of mach-omap2 booting now in device tree only mode,
we can get the module IO range from device tree and just drop
the legacy hwmod struct omap_hwmod_addr_space.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:27:33 -07:00
Tony Lindgren c2b84a9bb3 ARM: OMAP2+: Drop omap_hwmod_dma_info
We have all of mach-omap2 booting in device tree only
mode now, and this data is populated from device tree.

Note that once we have removed support for the omap legacy
DMA, we can also drop struct omap_dma_dev_attr.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:27:26 -07:00
Tony Lindgren fe97874a41 ARM: OMAP2+: Drop omap_hwmod_irq_info
With the previous patches removing the need for legacy IRQs
now that all of mach-omap2 is booting in device tree only mode,
we can drop struct omap_hwmod_irq_info.

Note that we can now also finally drop omap4_xlate_irq.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:27:19 -07:00
Tony Lindgren 3da5216725 ARM: OMAP4: Remove legacy IRQ for PRM
We have the PRM IRQ mapped in device tree and this legacy code
is no longer needed.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:27:13 -07:00
Tony Lindgren 82e5051ba4 ARM: OMAP3: Remove legacy IRQ for PRM
We have this coming from device tree and legacy booting is
no longer needed.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:27:06 -07:00
Tony Lindgren 0eecc636e5 bus: ti-sysc: Add minimal TI sysc interconnect target driver
We can handle the sysc interconnect target module in a generic way
for many TI SoCs. Initially let's just enable runtime PM with
autosuspend, and probe the children. This can already be used for
idling interconnect target modules that don't have any device driver
available for the child devices.

For now, the "ti,hwmods" custom binding is still required. That will
be eventually deprecated in later patches. And more features will be
added, such as parsing for sysc capabilities so we can continue
removing the legacy platform data.

Cc: Benoît Cousson <bcousson@baylibre.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Matthijs van Duin <matthijsvanduin@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:23:43 -07:00
Tony Lindgren d85a2d6143 ARM: OMAP2+: Populate legacy resources for dma and smartreflex
We can populate the legacy resources needed by dma and smartreflex
from device tree in omap_device_build().

There should be no need to do this for other devices, and eventually
these two remaining users will be gone too. The legacy dma will be
dropped when the remaining users have been converted to use the
dmaengine driver, and smartreflex can now become just a regular
device driver with a few pdata callbacks.

This is needed in order to remove remaining device dma, irq and io
resources from the interconnect code.

And while at it, let's simplify things by removing otherwise
unused omap_device_build_ss() as we will never call it for more
than one hwmod.

Cc: "Benoît Cousson" <bcousson@baylibre.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:23:35 -07:00
Tony Lindgren 6c72b35506 ARM: OMAP2+: Parse module IO range from dts for legacy "ti,hwmods" support
When removing legacy platform data for IO ranges for the hwmod
interconnect code, we still need to support the "ti,hwmods"
property.

And as we're going to use a generic sysc device driver to handle the
interconnect target instances, we can parse the information needed
for legacy "ti,hwmods" IO range from the dts. It's always the first
range the interconnect target module provides.

Note that we want to parse the range instead of the first child
device IO regs as the child device may not always be defined.

The child IP device node may not exist in cases where there is no
driver binding for the device, or when the child IP block may not
even be functional for some SoC revisions. But the IO range of the
interconnect target module is always known.

Cc: "Benoît Cousson" <bcousson@baylibre.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-10 14:23:27 -07:00
Bhumika Goyal 10e998ffc9 ARM: OMAP2+: make omap_dma_dev_info __initdata
Make this __initdata as it is only modified only during the initialisation
phase in the function omap2_system_dma_init_dev and after this it is not
referenced anywhere in the kernel.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-02 12:48:53 -07:00
Vishal Mahaveer cf14dd05fa ARM: DRA722: Add support for DRA71x Silicon Rev 2.1
DRA71x processors are reduced pin and software compatible
derivative of DRA72 processors.

Silicon Rev 2.1 is a minor variant of DRA71x Rev 2.0 with
various fixes including the following:
 - NAND boot fixes
 - ROM update for secure boot crypto enhancement

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-02 12:41:15 -07:00
Vishal Mahaveer d44223a36a ARM: DRA722: remove redundant definition of 1.0 device
Remove duplicate definition of Rev 1.0 device.

Fixes: 81032e34e1 ("ARM: DRA752: Add ID detect for ES2.0")
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-10-02 12:41:04 -07:00
Tony Lindgren dd33074ac6 ARM: OMAP2+: Drop unused omap_hwmod_mux_info
This is no longer used as we boot in device tree
only mode.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 11:05:03 -07:00
Tony Lindgren 680dc624f1 ARM: OMAP2+: Drop unused omap_init_hdq
We now boot all of mach-omap2 in device tree only mode and
this is now dead code.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 11:04:56 -07:00
Tony Lindgren 8823ddf25d ARM: OMAP2+: Fix overwriting of clkctrl and modulemode values
We are currently overwiting the hwmod clkctrl registers if we
configure a clock ctrl clock from device tree.

While this does not expose any bugs except for kernel coders
when debugging things, it should be fixed for correctness.
It is now impossible to use the hwmod data for checking the
clkctrl register values after booting for debugging or
generating dts data from hwmod data.

Let's fix the issue by adding a helper to detect if clkctrl
clock is configured.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 11:04:44 -07:00
Tony Lindgren 6963c58461 ARM: OMAP2+: Fix MMC address space mismatch for am33xx and am43xx
The address space currently set up for the interconnect data
is different compared to the dts data. We have hwmod data with
offset 0x100 to account for the revision, sysc and syss
register offsets. Let's fix the issue by correcting the MMC
register offsets in hwmod data and removing the unnecessary
duplicate IO range data that we get from device tree anyways.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 11:04:33 -07:00
H. Nikolaus Schaller 20547dfd85 ARM: OMAP2+: hsmmc: fix logic to call either omap_hsmmc_init or omap_hsmmc_late_init but not both
With 4.13 kernel I get this boot message:

[    1.051727] ------------[ cut here ]------------
[    1.051818] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74
[    1.051849] sysfs: cannot create duplicate filename '/devices/platform/omap_hsmmc.2'
[    1.051879] Modules linked in:
[    1.051971] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-letux+ #1360
[    1.052001] Hardware name: Generic OMAP3 (Flattened Device Tree)
[    1.052062] [<c010f690>] (unwind_backtrace) from [<c010bba8>] (show_stack+0x10/0x14)
[    1.052124] [<c010bba8>] (show_stack) from [<c075dc88>] (dump_stack+0x98/0xd0)
[    1.052185] [<c075dc88>] (dump_stack) from [<c012f398>] (__warn+0xd0/0x100)
[    1.052215] [<c012f398>] (__warn) from [<c012f3fc>] (warn_slowpath_fmt+0x34/0x44)
[    1.052276] [<c012f3fc>] (warn_slowpath_fmt) from [<c02ebcb4>] (sysfs_warn_dup+0x54/0x74)
[    1.052337] [<c02ebcb4>] (sysfs_warn_dup) from [<c02ebd90>] (sysfs_create_dir_ns+0x74/0x84)
[    1.052398] [<c02ebd90>] (sysfs_create_dir_ns) from [<c0761b8c>] (kobject_add_internal+0xd0/0x294)
[    1.052429] [<c0761b8c>] (kobject_add_internal) from [<c0761f00>] (kobject_add+0x6c/0x8c)
[    1.052490] [<c0761f00>] (kobject_add) from [<c04e831c>] (device_add+0xe4/0x510)
[    1.052551] [<c04e831c>] (device_add) from [<c04ec6e4>] (platform_device_add+0x130/0x1c0)
[    1.052612] [<c04ec6e4>] (platform_device_add) from [<c01281c0>] (omap_hsmmc_late_init+0x3c/0x60)
[    1.052673] [<c01281c0>] (omap_hsmmc_late_init) from [<c0b0fa44>] (omap3_pandora_legacy_init+0x24/0xb4)
[    1.052734] [<c0b0fa44>] (omap3_pandora_legacy_init) from [<c0128178>] (pdata_quirks_check+0x30/0x3c)
[    1.052795] [<c0128178>] (pdata_quirks_check) from [<c0b0f950>] (omap_generic_init+0xc/0x18)
[    1.052856] [<c0b0f950>] (omap_generic_init) from [<c0b03480>] (customize_machine+0x1c/0x28)
[    1.052917] [<c0b03480>] (customize_machine) from [<c0101938>] (do_one_initcall+0xa8/0x150)
[    1.052947] [<c0101938>] (do_one_initcall) from [<c0b00d70>] (kernel_init_freeable+0x110/0x1d4)
[    1.053009] [<c0b00d70>] (kernel_init_freeable) from [<c076f198>] (kernel_init+0x8/0x10c)
[    1.053070] [<c076f198>] (kernel_init) from [<c01070f0>] (ret_from_fork+0x14/0x24)
[    1.055023] ---[ end trace 44e490b09ac4ab88 ]---

This can be traced down to the calls of

	omap_hsmmc_init(pandora_mmc3);
	omap_hsmmc_late_init(pandora_mmc3);

in omap3_pandora_legacy_init().

It turns out that both funcions disagree how to decide if the other one was alredy called.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 10:59:26 -07:00
Keerthy 06480f8cf5 ARM: OMAP2+: dra7xx: Set OPT_CLKS_IN_RESET flag for gpio1
gpio1 soft reset fails in the kexec path as the optional clock
is not enabled hence enable the HWMOD_CONTROL_OPT_CLKS_IN_RESET
flag for gpio1 hwmod.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-09-19 10:43:23 -07:00
Linus Torvalds 8fac2f96ab Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King:
 "Low priority fixes and updates for ARM:

   - add some missing includes

   - efficiency improvements in system call entry code when tracing is
     enabled

   - ensure ARMv6+ is always built as EABI

   - export save_stack_trace_tsk()

   - fix fatal signal handling during mm fault

   - build translation table base address register from scratch

   - appropriately align the .data section to a word boundary where we
     rely on that data being word aligned"

* 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8691/1: Export save_stack_trace_tsk()
  ARM: 8692/1: mm: abort uaccess retries upon fatal signal
  ARM: 8690/1: lpae: build TTB control register value from scratch in v7_ttb_setup
  ARM: align .data section
  ARM: always enable AEABI for ARMv6+
  ARM: avoid saving and restoring registers unnecessarily
  ARM: move PC value into r9
  ARM: obtain thread info structure later
  ARM: use aliases for registers in entry-common
  ARM: 8689/1: scu: add missing errno include
  ARM: 8688/1: pm: add missing types include
2017-09-12 06:10:44 -07:00
Linus Torvalds 7f1b9be13a ARM/arm64: SoC platform updates for v4.14
This branch contains platform updates for 32- and 64-bit ARM,
 including defconfig updates to enable new options, drivers and
 platforms. There are also a few fixes and cleanups for some existing vendors.
 
 Some of the things worth highlighting here are:
 
  - Enabling new crypt drivers on arm64 defconfig
  - QCOM IPQ8074 clocks and pinctrl drivers on arm64 defconfig
  - Debug support enabled for Renesas r8a7743
  - Various config updates for Renesas platforms (sound, USB, other drivers)
  - Platform support (including SMP) for TI dra762
  - OMAP cleanups: Move to use generic 8250 debug_ll, removal of stale DMA code
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZtdXjAAoJEIwa5zzehBx3ExIQAJQ6anSZlkGysXqptA4c1HuL
 vgGq/U5xZ1Wa4Z/YX7//wuCMwRClc1j/zSJ5PP+wP0YsaviN7iF/8H1P/HQtCiTT
 DcEQPSI770829wzW4oMNW0PyU/ZnWMtuiMB+FAjdPVjbS8bT4PIK72D8PYKrT7f8
 8bU51+QezjSLamQaA8S2RyX+kYI/4znTa/9Aco4AlCtioV8h9gQanFYd2EI/EMhU
 1uvR3xUFf/YK49+M5J6m3DvtFffllHU9TKV/EAQD1Bhl1s5VPfem+a8JbVh1m7M+
 NzQOOoPJ9jYOGfjlaQQVmZ/1E4iKac1oK4x44Djk/i+RFjl+AT/2co3RcaEq9Npw
 5HNsK8ujnjzWB3xHu5wK5CbrjLNYco9hOpJaGkSeClo4ElDJVSKxyqWkZuhhnSA8
 bXXV5VraMX67tjG7Ou8+NtdbMkGdOUqnNbuBlCxkxpWxhtaUQG1YHHQDofUXNguy
 rtVhKRZRSkNYrp4lDCKCXVFFO077FGzP2Boq6JVzLv+U1l6JlZkkr3EWKYMY45HC
 o2rVcAB4lMR/k6tqE5MAmQC53jCNlFZt2xtf1WRVKf+0TfBVIGX3MxvFxl4E9wA+
 9pdJ9ujZWsPjTcZcktA6AsaK7uevRxcB2YZYv4pXVjR1RcZ/SfiEf4UW+md3j4QB
 igKej5WsRiCPwnkMFKs0
 =g8cF
 -----END PGP SIGNATURE-----

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

Pull ARM/arm64 SoC platform updates from Olof Johansson: "This branch
  contains platform updates for 32- and 64-bit ARM, including defconfig
  updates to enable new options, drivers and platforms. There are also a
  few fixes and cleanups for some existing vendors.

  Some of the things worth highlighting here are:

   - Enabling new crypt drivers on arm64 defconfig

   - QCOM IPQ8074 clocks and pinctrl drivers on arm64 defconfig

   - Debug support enabled for Renesas r8a7743

   - Various config updates for Renesas platforms (sound, USB, other
     drivers)

   - Platform support (including SMP) for TI dra762

   - OMAP cleanups: Move to use generic 8250 debug_ll, removal of stale
     DMA code"

* tag 'armsoc-platforms' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (109 commits)
  ARM: multi_v7_defconfig: make eSDHC driver built-in
  arm64: defconfig: enable rockchip graphics
  MAINTAINERS: Update Cavium ThunderX2 entry
  ARM: config: aspeed: Add I2C, VUART, LPC Snoop
  ARM: configs: aspeed: Update Aspeed G4 with VMSPLIT_2G
  ARM: s3c24xx: Fix NAND ECC mode for mini2440 board
  ARM: davinci_all_defconfig: enable tinydrm and ST7586
  arm64: defconfig: Enable QCOM IPQ8074 clock and pinctrl
  ARM: defconfig: tegra: Enable ChipIdea UDC driver
  ARM: configs: Add Tegra I2S interfaces to multi_v7_defconfig
  ARM: tegra: Add Tegra I2S interfaces to defconfig
  ARM: tegra: Update default configuration for v4.13-rc1
  MAINTAINERS: update ARM/ZTE entry
  soc: versatile: remove unnecessary static in realview_soc_probe()
  ARM: Convert to using %pOF instead of full_name
  ARM: hisi: Fix typo in comment
  ARM: multi_v7_defconfig: add CONFIG_BRCMSTB_THERMAL
  arm64: defconfig: add CONFIG_BRCMSTB_THERMAL
  arm64: defconfig: add recently added crypto drivers as modules
  arm64: defconfig: enable CONFIG_UNIPHIER_WATCHDOG
  ...
2017-09-10 20:35:46 -07:00
Russell King e558bdc21a Merge branches 'fixes' and 'misc' into for-linus 2017-09-09 16:34:41 +01:00
Linus Torvalds 968c61f7da - New Drivers
- RK805 Power Management IC (PMIC)
    - ROHM BD9571MWV-M MFD Power Management IC (PMIC)
    - Texas Instruments TPS68470 Power Management IC (PMIC) & LEDs
 
  - New Device Support
    - Add support for HiSilicon Hi6421v530 to hi6421-pmic-core
    - Add support for X-Powers AXP806 to axp20x
    - Add support for X-Powers AXP813 to axp20x
    - Add support for Intel Sunrise Point LPSS to intel-lpss-pci
 
  - New Functionality
    - Amend API to provide register layout; atmel-smc
 
 - Fix-ups
    - DT re-work; omap, nokia
    - Header file location change {I2C => MFD}; dm355evm_msp, tps65010
    - Fix chip ID formatting issue(s); rk808
    - Optionally register touchscreen devices; da9052-core
    - Documentation improvements; twl-core
    - Constification; rtsx_pcr, ab8500-core, da9055-i2c, da9052-spi
    - Drop unnecessary static declaration; max8925-i2c
    - Kconfig changes (missing deps and remove module support)
    - Slim down oversized licence statement; hi6421-pmic-core
    - Use managed resources (devm_*); lp87565
    - Supply proper error checking/handling; t7l66xb
 
  - Bug Fixes
    - Fix counter duplication issue; da9052-core
    - Fix potential NULL deference issue; max8998
    - Leave SPI-NOR write-protection bit alone; lpc_ich
    - Ensure device is put into reset during suspend; intel-lpss
    - Correct register offset variable size; omap-usb-tll
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJZsP0YAAoJEFGvii+H/HdhrJUP/RB6BTCDMf3WCi5e6PN8IFST
 JspCcf4bwKVc5lDvORQglVRfBhKY/uSr7F9xlfXtHx8V60ZNo1VOQcyJBTKIz+IJ
 +FQQgM3lEMKIn3QCcu9lKSRomJx55YDnF5SrZ8FzkC8pGLrCYEru5HfqFqOTfPqq
 OH2wZSqiX4H/jYdfVzp3bgqXkDff/nSEGTeFankFkv4wRvLGRxlpVuqkRJcvEJA3
 d8N9MoBBxkZAtAn2j1H5cHyPx5NrBEM2gkXpDfdd+kJNnFzjL72xsXd6rp+N6rcm
 d20eL+1fyJVyvGhGiDOhFwqRAZEqvjPSI4k5kQdRk8IdioGgbmaI74eUbv+rGAKp
 P9QdR7n1ctYyVgwnawIwKTPMzdZo5+9kdagCtu8IBVT02zQqVSDKZM7dAYo2rJuF
 yw24jONcwHFrKA25n1pLJmMbJGHq83kqqw3q5kl17nyArvOOcyspCTODIL9iskhZ
 L0IoIMwQYEj/pnI+iuXl9bJ30v2FIJxyCzUR2u7OJnrH7G27rsoOL0WDqxbp3Dp9
 7tD+6OzMiyIEDxtcd74kjg7g9p5HCmcY3FiDWirmQuZIR3abSET4ap+cTYPdFqVZ
 widS5Pi4PP40ZFN6+4lbBHLlh6MgpHpig9M03kFAr1SyZnH8nf4TnCsFV+wYPyTb
 LR3cKpFeTY8IyFWaLoSg
 =TKIm
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers
   - RK805 Power Management IC (PMIC)
   - ROHM BD9571MWV-M MFD Power Management IC (PMIC)
   - Texas Instruments TPS68470 Power Management IC (PMIC) & LEDs

  New Device Support:
   - Add support for HiSilicon Hi6421v530 to hi6421-pmic-core
   - Add support for X-Powers AXP806 to axp20x
   - Add support for X-Powers AXP813 to axp20x
   - Add support for Intel Sunrise Point LPSS to intel-lpss-pci

  New Functionality:
   - Amend API to provide register layout; atmel-smc

  Fix-ups:
   - DT re-work; omap, nokia
   - Header file location change {I2C => MFD}; dm355evm_msp, tps65010
   - Fix chip ID formatting issue(s); rk808
   - Optionally register touchscreen devices; da9052-core
   - Documentation improvements; twl-core
   - Constification; rtsx_pcr, ab8500-core, da9055-i2c, da9052-spi
   - Drop unnecessary static declaration; max8925-i2c
   - Kconfig changes (missing deps and remove module support)
   - Slim down oversized licence statement; hi6421-pmic-core
   - Use managed resources (devm_*); lp87565
   - Supply proper error checking/handling; t7l66xb

  Bug Fixes:
   - Fix counter duplication issue; da9052-core
   - Fix potential NULL deference issue; max8998
   - Leave SPI-NOR write-protection bit alone; lpc_ich
   - Ensure device is put into reset during suspend; intel-lpss
   - Correct register offset variable size; omap-usb-tll"

* tag 'mfd-next-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (61 commits)
  mfd: intel_soc_pmic: Differentiate between Bay and Cherry Trail CRC variants
  mfd: intel_soc_pmic: Export separate mfd-cell configs for BYT and CHT
  dt-bindings: mfd: Add bindings for ZII RAVE devices
  mfd: omap-usb-tll: Fix register offsets
  mfd: da9052: Constify spi_device_id
  mfd: intel-lpss: Put I2C and SPI controllers into reset state on suspend
  mfd: da9055: Constify i2c_device_id
  mfd: intel-lpss: Add missing PCI ID for Intel Sunrise Point LPSS devices
  mfd: t7l66xb: Handle return value of clk_prepare_enable
  mfd: Add ROHM BD9571MWV-M PMIC DT bindings
  mfd: intel_soc_pmic_chtwc: Turn Kconfig option into a bool
  mfd: lp87565: Convert to use devm_mfd_add_devices()
  mfd: Add support for TPS68470 device
  mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Haswell/Broadwell
  mfd: syscon: atmel-smc: Add helper to retrieve register layout
  mfd: axp20x: Use correct platform device ID for many PEK
  dt-bindings: mfd: axp20x: Introduce bindings for AXP813
  mfd: axp20x: Add support for AXP813 PMIC
  dt-bindings: mfd: axp20x: Add AXP806 to supported list of chips
  mfd: Add ROHM BD9571MWV-M MFD PMIC driver
  ...
2017-09-07 13:51:13 -07:00
Olof Johansson 9ec83463d6 Merge branch 'next/cleanup' into next/soc
* next/cleanup:
  soc: versatile: remove unnecessary static in realview_soc_probe()
  ARM: Convert to using %pOF instead of full_name
  ARM: hisi: Fix typo in comment
  ARM: OMAP4+: PRM: fix of_irq_get() result checks
  ARM: OMAP3+: PRM: fix of_irq_get() result check
  ARM: dts: dra72-evm-revc: workaround incorrect DP83867 RX_CTRL pin strap
  ARM: dts: dra71-evm: workaround incorrect DP83867 RX_CTRL pin strap
  ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq
  bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
2017-09-05 20:29:46 -07:00
Wolfram Sang a205425658 mfd: twl: Move header file out of I2C realm
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-09-04 14:41:02 +01:00