Commit graph

6044 commits

Author SHA1 Message Date
Arnd Bergmann d1bbc82378 ARM: OMAP2+: fix missing variable declaration
The function that was added doesn't actually build:

arch/arm/mach-omap2/display.c: In function 'omapdss_init_fbdev':
arch/arm/mach-omap2/display.c:184:2: error: 'r' undeclared (first use in this function)

This adds a declaration for 'r' to fix it.

Fixes: 5ce783025c ("ARM: OMAP2+: Don't register omapdss device for omapdrm")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-24 15:17:25 +03:00
Arnd Bergmann 2ad93fa37f Non-urgent fixes for omaps for v4.14 merge window. These all
can wait for the merge window as we have not seemed to hit
 any of these so far:
 
 - Fix error handling in omap_ocp2scp_probe affecting runtime
   PM error path
 
 - Drop broken RPM status update for omap_device
 
 - Two fixes for of_irq_get() usage that can return 0
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlmV1ZwRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXOggBAAww/zeW/QgmQjVgcDlVRYYM+ZgJNnhZB8
 BMZzXXr0+OGmpdC6oV3134Ww+ZDRacRWZIAL8fTqLm1eoCb0BJDGcwh3yleLoVqG
 AS96ogWrZjlLvu2KQXnJeZCksEpkgxm+8HJTn2uw3x3TRIqx8s//vA39wufV3BN0
 mWSiolH0ri4/ucIPYVCLXJMF6/h0L8yVg8xmNxUlSAAgvBgewDjgp85WF/vsdiG1
 /gzbO7cgy0mUxH0uBpi0LoSr3cFkzO6/p5oM4+613BoI7qK3KRQFt3hWB5JG0Z0C
 ldRfFSANjzKTadzxjh74fWIoItIKw1Pa8vnuqMtXP8Rse9/h9fukbdlwDJfeH2lA
 7fZC033SLvHcY8xwhwohtzKEM8FhdIWis8pZIA8AL8u/B4tRFKKjDq0ePWfWNvTF
 ceuC/7DdbmmVejFTie6ddSHl/BqCNV7p+L9obAdIrxfZqFXA2OdAlBc49vUeByeP
 SlrfwXDOsYqOyuDmgQXZtOW2ZobbVbQjV16YLN5myZfkMACALdt2mpr/Lpg0lwSg
 tmkmeXwLSmwFtJbJpLYt+Fh08Pgh05q27y5h3xyAyGn1x2Ie7fpNqlS7X5lYn/9f
 7oHykqzNbVzVvioBl6DBfYdofoBt1OXK8zi/ThaMeqAo0IclTfhrJwGwfJWnGMyi
 rklzIc0WwKQ=
 =+wbL
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.14/fixes-not-urgent-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

Pull "non-urgent fixes for omaps for v4.14" from Tony Lindgren:

Non-urgent fixes for omaps for v4.14 merge window. These all
can wait for the merge window as we have not seemed to hit
any of these so far:

- Fix error handling in omap_ocp2scp_probe affecting runtime
  PM error path

- Drop broken RPM status update for omap_device

- Two fixes for of_irq_get() usage that can return 0

* tag 'omap-for-v4.14/fixes-not-urgent-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4+: PRM: fix of_irq_get() result checks
  ARM: OMAP3+: PRM: fix of_irq_get() result check
  ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq
  bus: omap-ocp2scp: Fix error handling in omap_ocp2scp_probe
2017-08-19 00:07:56 +02:00
Arnd Bergmann a968bc52fe SoC updates for omaps for v4.14. Most of the chages are to add
support for new dra762 SoC. The other changes are are for legacy
 DMA code removal, and MMC quirk and iodelay config for dra7.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlmTIokRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXPLXw//bdosInQAgxNoRHOeXt8B8U4kmHrWVHIj
 DDuuY2Vh5/DBUbXFizpWi2O7LrzXOFMw3zWLzRnZsA56/sNlojwW70NV4J/KGHVa
 tmVQ12iEV+blLdt9rypoUgHT4XFtYZ8WEfo4XPjDB23DhPcRYgRikn0O0LqvUV2r
 nPMemfhGc/E1SIN/hGFUG7AqL3N+TPlFhmzZRLYsrbWECnSr17dpIgYbSD7Dviiq
 PuSd8jbj88ugPjtUjb6CXyV04o2uRcxFqHceJOghc0jQtARxJBxCzInMLZ4JPPH5
 ZBRNKfervmpc4b24Vmlf+23t2iMieOHpqrSvfYy1ErBzyWFgOF32w2kkqbBWO+oB
 TLd02DdX5ks3bnG6C5fVDk4ztSB6vUO8K+MatdDGnqbAc8f+RRUmYVDE35TTfyHK
 QcjG8fkC3sze3iO+Jlg6UPO8uGYXYN7wVxm6oJqnQ5R1gVSXTbt2LEDNuKy3usxR
 IkvkdjkVOei4pYrewgc7bkNLOQ+XMY1Mxy0G/XwoEG9SlCVcEi4N0Vn9LptgJRph
 Mm3kpb3E93U8qUCR0NnXCpMqrek4foSoOKGcOFFukvSWF67xvnoUbooIIzEtXh/R
 9K5ftL1XlgPzYcQEWEp3MT7q4FkgKSpDup+8eHOUH+ozhWi3n4umlm3FzqiT3vXM
 ADACrqr8CgM=
 =FBGl
 -----END PGP SIGNATURE-----

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

Pull "soc changes for omaps for v4.14" from Tony Lindgren:

SoC updates for omaps for v4.14. Most of the chages are to add
support for new dra762 SoC. The other changes are are for legacy
DMA code removal, and MMC quirk and iodelay config for dra7.

* tag 'omap-for-v4.14/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: dra7: powerdomain data: Register SoC specific powerdomains
  ARM: dra762: Enable SMP for dra762
  ARM: dra7: hwmod: Register dra76x specific hwmod
  ARM: dra762: Add support for device identification
  ARM: OMAP2+: board-generic: add support for dra762 family
  ARM: OMAP2+: Select PINCTRL_TI_IODELAY for SOC_DRA7XX
  ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM
  ARM: OMAP2+: Remove unused legacy code for DMA
2017-08-16 22:34:15 +02:00
Rob Herring a8e65e06ec ARM: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "Benoît Cousson" <bcousson@baylibre.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-08-16 22:25:30 +02:00
Laurent Pinchart 5ce783025c ARM: OMAP2+: Don't register omapdss device for omapdrm
The omapdrm driver doesn't need the omapdss device anymore. Although it
can't be removed completely as the fbdev driver still requires it, we
can condition its registration to the usage of the omapfb driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-16 15:38:51 +03:00
Laurent Pinchart d86bd82c1a ARM: OMAP2+: Remove unused omapdrm platform device
The omapdrm platform device is unused, as a replacement is now
registered in the omapdss driver. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-16 15:38:51 +03:00
Sergei Shtylyov 879dce7953 ARM: OMAP4+: PRM: fix of_irq_get() result checks
of_irq_get() may return 0 as well as a nagative error number on failure,
(and never on success), however omap44xx_prm_late_init() regards 0 as a
valid IRQ -- fix this.

Fixes: a8f83aefcd ("ARM: OMAP4+: PRM: register interrupt information from DT")
Fixes: c5b3955828 ("ARM: OMAP4: Fix legacy code clean-up regression")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-15 08:53:28 -07:00
Sergei Shtylyov d683878dbe ARM: OMAP3+: PRM: fix of_irq_get() result check
of_irq_get() may return 0 as well as a nagative error number on failure
(and never on success), however omap3xxx_prm_late_init() regards 0 as a
valid IRQ -- fix this.

Fixes: 1e037794f7 ("ARM: OMAP3+: PRM: register interrupt information from DT")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-15 08:53:18 -07:00
Laurent Pinchart 07e72f9a3f ARM: OMAP2+: Register SoC device attributes from machine .init()
SoC device attributes are registered with a call to
soc_device_register() from the machine .init_late() operation, which is
called from the late initcall, after all drivers built-in drivers have
been probed. This results in the impossibility for drivers to use SoC
device matching in their probe function.

The omap_soc_device_init() function is safe to call from the machine
.init() operation, as all data it depends on is initialized from the
.init_early() operation. Move SoC device attribute registration to
machine .init() like on all other ARM platforms.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Lokesh Vutla 3af6ccc3d1 ARM: OMAP: dra7: powerdomain data: Register SoC specific powerdomains
Custom efuse powerdomain is always on in dra72 ES2.0
and dra76 SoCs. So register it as aon for these SoCs.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-14 10:33:29 -07:00
Lokesh Vutla 59895a7b41 ARM: dra762: Enable SMP for dra762
smp specific routines are called based on soc_is_*() api in omap-smc.c.
Add soc_is_dra76x() to the condition so that smp specific routines are
called for dra76 SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-14 10:33:13 -07:00
Lokesh Vutla 6694c7497e ARM: dra7: hwmod: Register dra76x specific hwmod
Certain IPs are available on dra76 which are not present
either in dra74 or dra72. So add provision to register dra76
specific IPs separately.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-14 10:32:22 -07:00
Lokesh Vutla c15ab99637 ARM: dra762: Add support for device identification
Add ID code detection for dra762 SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-14 10:32:02 -07:00
Lokesh Vutla 4dc6760d3d ARM: OMAP2+: board-generic: add support for dra762 family
Adding board generic support for dra762 family.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-14 10:31:26 -07:00
Russell King 1abd350237 ARM: align .data section
Robert Jarzmik reports that his PXA25x system fails to boot with 4.12,
failing at __flush_whole_cache in arch/arm/mm/proc-xscale.S:215:

   0xc0019e20 <+0>:     ldr     r1, [pc, #788]
   0xc0019e24 <+4>:     ldr     r0, [r1]	<== here

with r1 containing 0xc06f82cd, which is the address of "clean_addr".
Examination of the System.map shows:

c06f22c8 D user_pmd_table
c06f22cc d __warned.19178
c06f22cd d clean_addr

indicating that a .data.unlikely section has appeared just before the
.data section from proc-xscale.S.  According to objdump -h, it appears
that our assembly files default their .data alignment to 2**0, which
is bad news if the preceding .data section size is not power-of-2
aligned at link time.

Add the appropriate .align directives to all assembly files in arch/arm
that are missing them where we require an appropriate alignment.

Reported-by: Robert Jarzmik <robert.jarzmik@free.fr>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2017-08-14 16:22:55 +01:00
Kishon Vijay Abraham I c2818a190a ARM: OMAP2+: Select PINCTRL_TI_IODELAY for SOC_DRA7XX
PINCTRL_TI_IODELAY should be enabled so that "pinctrl_dev" can be created
for pinctrl entries populated with iodelay values in device tree data.
Select PINCTRL_TI_IODELAY for SOC_DRA7XX here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-10 09:56:20 -07:00
Sekhar Nori fc66ce0b72 ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM
DRA74x EVM Rev H EVM comes with revision 2.0 silicon.
However, earlier versions of EVM can come with either
revision 1.1 or revision 1.0 of silicon.

The device-tree file is written to support rev 2.0 of
silicon. pdata quirks are used to then override the
settings needed for PG 1.1 silicon.

PG 1.1 silicon has limitations w.r.t frequencies at
which MMC1/2/3 can operate as well as different IOdelay
numbers.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-10 09:02:37 -07:00
Tony Lindgren 0278bad18e ARM: OMAP2+: Remove unused legacy code for DMA
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Let's leave the dummy omap2_system_dma_init_dev() check
in place for now to avoid a pointless merge conflict with
tusb6010 dmaengine conversion as pointed out by Peter
Ujfalusi <peter.ujfalusi@ti.com>.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-10 08:21:40 -07:00
Johan Hovold 90de9634a5 ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq
Since commit a8636c8964 ("PM / Runtime: Don't allow to suspend a
device with an active child"), which went into 4.10, it is no longer
permitted to set RPM_SUSPENDED state for a device with active children
(unless power.ignore_children is set).

This specifically means that the attempts to do just that from the omap
pm-domain suspend_noirq callback have since been failing whenever a
child is active, for example:

  am335x-usb-childs 47400000.usb: runtime PM trying to suspend
    device but active child

Silence this warning by dropping the broken pm_runtime_set_suspended()
call from the omap suspend_noirq callback along with the redundant
pm_runtime_set_active() in resume_noirq.

This effectively reverts commit 3522bf7bfa ("ARM: OMAP2+: omap_device:
maintain sane runtime pm status around suspend/resume"), which started
updating the RPM state after the runtime_suspend callback (!) for active
omap devices had been called during system suspend. The rationale was
that a later pm_runtime_get_sync() would then fail (even after runtime
pm had been disabled) and that this in turn would avoid any external
aborts when accessing registers with clocks disabled. (See also commit
6f3c77b040 ("PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE,
even when disabled, v2").

But during the suspend_noirq phase all children would already have been
suspended and their drivers would specifically not attempt any further
register accesses. And if this was all just a workaround for random
device drivers doing cross-tree calls during system suspend, those
drivers should be fixed and updated to explicitly model such
dependencies using device-links instead (and either way, any such calls
have been causing crashes since 4.10).

Fixes: 3522bf7bfa ("ARM: OMAP2+: omap_device: maintain sane runtime pm status around suspend/resume")
Fixes: a8636c8964 ("PM / Runtime: Don't allow to suspend a device with an active child")
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-08-10 08:06:39 -07:00
Linus Torvalds 65f4740e72 ARM: SoC fixes for 4.13
This comes a bit later than I planned, and as a consequence is a larger
 than it should be.
 
 Most of the changes are devicetree fixes, across lots of platforms:
 Renesas, Samsung Exynos, Marvell EBU, TI OMAP, Rockchips, Amlogic Meson,
 Sigma Desings Tango, Allwinner SUNxi and TI Davinci.
 
 Also across many platforms, I applied an older series of simple randconfig
 build fixes. This includes making the CONFIG_MTD_XIP option compile again,
 which had been broken for many years and probably has not been missed, but
 it felt wrong to just remove it completely.
 
 The only other changes are:
 
  - We enable HWSPINLOCK in defconfig to get some Qualcomm boards
    to work out of the box.
 
  - A few regression fixes for Texas Instruments OMAP2+.
 
  - A boot regression fix for the Renesas regulator quirk.
 
  - A suspend/resume fix for Uniphier SoCs, fixing the resume of the
    system bus.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWYTonGCrR//JCVInAQJTrw/+Kv+Y1EybtFFJuMgVqH0FserTKAonNv25
 OJxby86GQQTKkju9U7jYM4MmpufBEMKnY9kn83rviUKfiuVDsJcRWp2jMynJtE5m
 W1aIFCu1L8TsKAQJpmBPe8G/cSG7SRH2OoX9Ee5ozii0cBUTOCy6UGDYJqsY0MKy
 8KPUWcHqYhLCT+0F0raf1+F5LqJlDh44q1+UVDPphqO4pbguio7PfXA+ut8VMHS7
 YSDgiXb3UoXy8tSXRX4JcYJfFG+jIqg0vWpkOW9mlLc5e/+Ndmj5CWlDZPt4hWaR
 3Us5VVkI8SXq7VGcJV/mA6JO7M4L4oP1caTATxzDdK1C2u/SuhdnMcenOy8LtRLi
 gImdeZLK7+RFPS+Sp/mhQQ0UtULw0kQ5BEzpN0jVI1CKybK4TN2+GrJdZLR9Usas
 TkavAUl0X5E7YXws7yb8qTJqDLXxTxyN8H4gMaTh+rCssh9+I8bvChoJ0gpGRIMl
 iAHodqGFBvlVQWtUefc4BfDCqj7sVmtfBcAeOK7LVQPjb9D+hPvHJ50yfN3qMpMa
 eVvEz4l91W4k/vxI5HsA/r7RybDujTLvgR/BGU0kLZAsEP/FpkrIKgmi5yuzyf1u
 Sd3OiK8V7FXB3dBPf0i0wagaBjuEUcEuE0GQU+bM7qX5aW8flLxbEhj4SEv0NqvL
 bHiaTEi9uAU=
 =a2dO
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "This comes a bit later than I planned, and as a consequence is a
  larger than it should be.

  Most of the changes are devicetree fixes, across lots of platforms:
  Renesas, Samsung Exynos, Marvell EBU, TI OMAP, Rockchips, Amlogic
  Meson, Sigma Desings Tango, Allwinner SUNxi and TI Davinci.

  Also across many platforms, I applied an older series of simple
  randconfig build fixes. This includes making the CONFIG_MTD_XIP option
  compile again, which had been broken for many years and probably has
  not been missed, but it felt wrong to just remove it completely.

  The only other changes are:

   - We enable HWSPINLOCK in defconfig to get some Qualcomm boards to
     work out of the box.

   - A few regression fixes for Texas Instruments OMAP2+.

   - A boot regression fix for the Renesas regulator quirk.

   - A suspend/resume fix for Uniphier SoCs, fixing the resume of the
     system bus"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
  ARM: dts: tango4: Request RGMII RX and TX clock delays
  bus: uniphier-system-bus: set up registers when resuming
  ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge
  ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk
  arm64: defconfig: enable missing HWSPINLOCK
  ARM: pxa: select both FB and FB_W100 for eseries
  ARM: ixp4xx: fix ioport_unmap definition
  ARM: ep93xx: use ARM_PATCH_PHYS_VIRT correctly
  ARM: mmp: mark usb_dma_mask as __maybe_unused
  ARM: omap2: mark unused functions as __maybe_unused
  ARM: omap1: avoid unused variable warning
  ARM: sirf: mark sirfsoc_init_late as __maybe_unused
  ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l}
  ARM: omap1/ams-delta: warn about failed regulator enable
  ARM: rpc: rename RAM_SIZE macro
  ARM: w90x900: normalize clk API
  ARM: ep93xx: normalize clk API
  ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros
  arm64: allwinner: sun50i-a64: Correct emac register size
  ARM: dts: sunxi: h3/h5: Correct emac register size
  ...
2017-08-04 15:12:15 -07:00
Arnd Bergmann 293ea3d0ab ARM: omap2: mark unused functions as __maybe_unused
The omap_generic_init() and omap_hwmod_init_postsetup() functions are
used in the initialization for all OMAP2+ SoC types, but in the
extreme case that those are all disabled, we get a warning about
unused code:

arch/arm/mach-omap2/io.c:412:123: error: 'omap_hwmod_init_postsetup' defined but not used [-Werror=unused-function]
arch/arm/mach-omap2/board-generic.c:30:123: error: 'omap_generic_init' defined but not used [-Werror=unused-function]

This annotates both as __maybe_unused to shut up that warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-07-27 22:57:48 +02:00
Arnd Bergmann d4e740053a Few fixes for omaps for issues found recently:
- Fix disable_irq related shared IRQ warnings for omap3 PRM
 
 - Fix omap4 legacy code regression that accidentally removed code that
   we still need for PRM interrupts
 
 - Fix dm8168-evm NAND pins and MMC write protect pin direction
 
 - Fix dra71-evm mdio impedance values
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAlld8MERHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXPnxRAAkGl1Q0HYGFl6+0YCLzk4jAD8Tx3T8kS6
 Y+zaXkUowyQj548Sx55hSbCfxIyJETF2VBFWbMVMeNaDE1Gge+2rj6NdELAP1olu
 cOIuRlJt4R6xBXRhJKMu4yA2DqslOD6C2rNM6B0qmNFoO+O4/9uhYZEAD03/RFRJ
 8EXvr5lGjCfljEC/EgN7kfyPCOjU4aknbREZOUknQ/CMYm53G6FrNzppNNe0CVmj
 59/Pp6lgYVPrBNXMpcD1LXu8fkOcp6vQ70h+WFLrdaf1GOZSj7SDHD50Lk2tNnN6
 UWJ3aRE3cGnaNBwcnnrMkwMyIWBU6mEWSAOl/bQgf/jFiyFcgqDk+/i9POqGqzou
 p3Jyn9of8Cg3SoIbImOsPODMgtesDmxy36nYcR+EH6x/mGDnwFzhxR74RB/X2ltq
 RoeT8RbJxckz+h80Zjp6IbJQoJ6CcNqtPDiaf/GqsloSEYcUh51CBrP0teT51nFU
 VZk9PRRsasIc7mpgyDg8jODZCtzvK0KTyTU3l6b6Oct7o8b/BOMAunKTAvujsT5Q
 gqFCIJZ/iNTZ5GN8I6qEOTD4um5NFDl//tiQlVbU4/t/k2eUzlHErl0sc+ycv+N5
 pRmz843Zs7U3lSithCF4/840BG7dQ0cTbx9binYtSCUOI9wKKORWz6ieKOf7mZi2
 TR/Sqx+i0dI=
 =ibLi
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.13/fixes-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Pull "Few fixes for omaps for issues found recently" from Tony Lindgren:

- Fix disable_irq related shared IRQ warnings for omap3 PRM

- Fix omap4 legacy code regression that accidentally removed code that
  we still need for PRM interrupts

- Fix dm8168-evm NAND pins and MMC write protect pin direction

- Fix dra71-evm mdio impedance values

* tag 'omap-for-v4.13/fixes-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: dra71-evm: mdio: Fix impedance values
  ARM: dts: dm816x: Correct the state of the write protect pin
  ARM: dts: dm816x: Correct NAND support nodes
  ARM: OMAP4: Fix legacy code clean-up regression
  ARM: OMAP2+: Fix omap3 prm shared irq
2017-07-27 12:50:35 +02:00
Faiz Abbas ba64792ff9 ARM: OMAP2+: hsmmc.c: Remove dead code
Most platforms using OMAP hsmmc driver have switched to device tree
for passing platform data to omap_hsmmc.c driver.

The hsmmc.c file in mach-omap2 exists only to support pandora board
which uses wl1251 driver in legacy platform data mode.

Hence, remove the dead code not used by the pandora board.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-07-17 15:04:47 +02:00
Linus Torvalds 8ca302e9c6 ARM: SoC platform updates
SoC platform changes (arch/arm/mach-*). This merge window, the bulk is
 for a few platforms:
 
 - Andres Färber adds initial support for the Actions Semi S500 (a.k.a.
   'owl') platform, a close relative of the S900 platform he adds for arm64.
 
 - in mach-omap2, we remove more legacy code
 
 - Rockchips gains support for the RV1108 SoC designed for camera
   applications.
 
 - For Atmel, we gain support for MMU-less SoCs (SAME70/V71/S70/V70)
 
 - Minor updates for other platforms, including davinci, s3c64xx,
   prima2, stm32, broadcom nsp, amlogic, pxa, imx and renesas
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWVo7+GCrR//JCVInAQKbMA//WeEPEDUt0boJCUfuzXfZ35S5ksBMBGQa
 NaOJvcW3T//7Tfa88YlBEB7h1w22u1Sv4/CfcistdSPbUwZLyYo6aUz53AwlUnLs
 bVHnd8+h1xN6qSDjzOPIEQQHg9OVIRBD49moBgJ1BkXzyqR/RI1jPPyyRl5vucSW
 MYRxhPkplmjFL5+6uvFoSOdd3Z/FLoEYRrkIk4iu+KgKtnNlj4P1FNSdm6Yb29dj
 yzmXoSpxEzbq0ahGlkjrekEJxTWvW1vOq9d+xTKwTbXoM7pbzXnBRzx4q2Fg9GAT
 BJseMx+uDEG/+eYrFZA7jX/HgpKB1fAlCGp+dK6GIcJoEM6lFKJRsJrP702KPzg0
 PqOMM/htq/4hZ7Waz+Yj3lyVF2C+A6Dn/fXPaHJGdTLj4r0OLgZayhBXFHp1VX2G
 9ERx1UCnfxeY91VBUM99qo21ECT7j0C/bZLln8MFjwX8tk3OATkElIAtnsEHxJ5d
 v4TEkI/AcpMW4lMj/u/hp1PJMCvhlSreWPGx1PRax6va+YB5Ov19DshVgyfoTTq9
 kArUJWQdKo4aKqB+feg9NHNC01xSLw5ywKb+oIyYP3jZzMexzRyP5L7EAVOu6Cel
 iHeIRpo8VjX63gltE+9u4aZ/aEMREGVcgkzuwBTKqbVQ3ismrmGYe54VnFAushJS
 m+XSB250Vz8=
 =8F3w
 -----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:
 "SoC platform changes (arch/arm/mach-*). This merge window, the bulk is
  for a few platforms:

   - Andres Färber adds initial support for the Actions Semi S500 (aka
     'owl') platform, a close relative of the S900 platform he adds for
     arm64.

   - in mach-omap2, we remove more legacy code

   - Rockchips gains support for the RV1108 SoC designed for camera
     applications.

   - For Atmel, we gain support for MMU-less SoCs (SAME70/V71/S70/V70)

   - Minor updates for other platforms, including davinci, s3c64xx,
     prima2, stm32, broadcom nsp, amlogic, pxa, imx and renesas"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (74 commits)
  ARM: owl: smp: Drop bogus holding pen
  ARM: owl: Drop custom machine
  ARM: owl: smp: Implement SPS power-gating for CPU2 and CPU3
  soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating
  soc: actions: Add Owl SPS
  dt-bindings: power: Add Owl SPS power domains
  MAINTAINERS: Update Actions Semi section with SPS
  ARM: owl: Implement CPU enable-method for S500
  MAINTAINERS: Add Actions Semi Owl section
  ARM: Prepare Actions Semi S500
  ARM: socfpga: Increase max number of GPIOs
  ARM: stm32: Introduce MACH_STM32F469 flag
  ARM: prima2: remove redundant select CPU_V7
  ARM: davinci: fix const warnings
  ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ALWAYS_ON
  ARM: OMAP4: hwmod_data: add SHAM crypto accelerator
  ARM: OMAP4: hwmod data: add des
  ARM: OMAP4: hwmod data: add aes2
  ARM: OMAP4: hwmod data: add aes1
  ARM: pxa: Delete an error message for a failed memory allocation in pxa3xx_u2d_probe()
  ...
2017-07-04 14:34:51 -07:00
Linus Torvalds 362f6729cb USB/PHY patches for 4.13-rc1
Here is the big patchset of USB and PHY driver updates for 4.13-rc1.
 
 On the PHY side, they decided to move files around to "make things
 easier" in their tree.  Hopefully that wasn't a mistake, but in
 linux-next testing, we haven't had any reported problems.
 
 There's the usual set of gadget and xhci and musb updates in here as
 well, along with a number of smaller updates for a raft of different USB
 drivers.  Full details in the shortlog, nothing really major.
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWVpavQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymJrgCgp8Pso8bs+bnIknUSQFSguWd3wM0AnA8X3NHf
 lrdCuqw+2oxGOQrecacz
 =5L4Q
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB/PHY updates from Greg KH:
 "Here is the big patchset of USB and PHY driver updates for 4.13-rc1.

  On the PHY side, they decided to move files around to "make things
  easier" in their tree. Hopefully that wasn't a mistake, but in
  linux-next testing, we haven't had any reported problems.

  There's the usual set of gadget and xhci and musb updates in here as
  well, along with a number of smaller updates for a raft of different
  USB drivers. Full details in the shortlog, nothing really major.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (173 commits)
  Add USB quirk for HVR-950q to avoid intermittent device resets
  USB hub_probe: rework ugly goto-into-compound-statement
  usb: host: ohci-pxa27x: Handle return value of clk_prepare_enable
  USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
  usbip: Fix uninitialized variable bug in vhci
  usb: core: read USB ports from DT in the usbport LED trigger driver
  dt-bindings: leds: document new trigger-sources property
  usb: typec: ucsi: Add ACPI driver
  usb: typec: Add support for UCSI interface
  usb: musb: compress return logic into one line
  USB: serial: propagate late probe errors
  USB: serial: refactor port endpoint setup
  usb: musb: tusb6010_omap: Convert to DMAengine API
  ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines
  usb: musb: tusb6010: Handle DMA TX completion in DMA callback as well
  usb: musb: tusb6010_omap: Allocate DMA channels upfront
  usb: musb: tusb6010_omap: Create new struct for DMA data/parameters
  usb: musb: tusb6010_omap: Use one musb_ep_select call in tusb_omap_dma_program
  usb: musb: tusb6010: Add MUSB_G_NO_SKB_RESERVE to quirks
  usb: musb: Add quirk to avoid skb reserve in gadget mode
  ...
2017-07-03 19:30:55 -07:00
Tony Lindgren c5b3955828 ARM: OMAP4: Fix legacy code clean-up regression
Commit 2a26d31b1b ("ARM: OMAP2+: Remove unused legacy code for PRM")
removed PRM platform init code that I thought is unused. Turns out omap4
still needs this code, so let's do a partial revert to add it back.

I probably missed this earlier as the comments used to say
"OMAP4+ is DT only now" for !of_have_populated_dt() to exit early and
missed the negative test. Let's not add those lines back as they are
confusing and no longer needed as we only boot in device tree mode.

Without things things can mysterious fail for i2c, for example LM75
I2C temperature sensor can stop working as the PRM interrupts won't work.

Fixes: 2a26d31b1b ("ARM: OMAP2+: Remove unused legacy code for PRM")
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-30 03:37:03 -07:00
Tony Lindgren 324dd7a6ac ARM: OMAP2+: Fix omap3 prm shared irq
Shared interrupts with IRQ_NOAUTOEN got a warning added with commit
04c848d398 ("genirq: Warn when IRQ_NOAUTOEN is used with shared
interrupts").

Let's just drop the IRQ_NOAUTOEN use for omap3 PRM shared interrupt as
it does not seem to cause any other issues based on my testing. We have
moved a lot of the code to initialize later, and whatever problems the
legacy booting had seem to be gone now with pinctrl driver and device
tree based booting.

Otherwise we will get:

WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:1348 __setup_irq+0x5d0/0x64c
[<c01b0260>] (__setup_irq) from [<c01b0480>]
(request_threaded_irq+0xdc/0x188)
[<c01b0480>] (request_threaded_irq) from [<c051c780>]
(pcs_probe+0x6ec/0x8a4)
[<c051c780>] (pcs_probe) from [<c05a84b8>] (platform_drv_probe+0x50/0xb0)
[<c05a84b8>] (platform_drv_probe) from [<c05a6288>]
(driver_probe_device+0x33c/0x478)

Note that we also need to remove the related enable_irq() to avoid
getting the following:

WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:529 enable_irq+0x34/0x70
[<c01afa04>] (enable_irq) from [<c0c0f1fc>] (omap3_pm_init+0x118/0x3f8)
[<c0c0f1fc>] (omap3_pm_init) from [<c0c0ae7c>] (am35xx_init_late+0x10/0x18)

Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-29 23:30:18 -07:00
Peter Ujfalusi 868772d89d ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines
The external request lines are used by tusb6010 on OMAP24xx platforms.
Update the map so the driver can use dmaengine API to request the DMA
channel. At the same time add temporary map containing only the external
DMA request numbers for DT booted case on omap24xx since the tusb6010 stack
is not yet supports DT boot.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-20 11:45:01 +08:00
Olof Johansson 2b1ee3061f SoC changes for omap variants for v4.13 merge window:
- PM clean-up in preparation of adding am335x/am437x PM support
 
 - Fixes for issues found by Coccinelle
 
 - Legacy code removal now that everything boots in device
   tree only mode
 
 - Interconnect changes in preparation of moving clkctrl clocks
   to be managed by clkctrl clock driver
 
 - Interconnect changes to add omap4 crypto acceclerator
   support
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAllBD1ERHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNn+w/9F+Ae/yaNtfeQuOinKV0wAG/noA8PEZCk
 MJ7DqyA+RTV29a099OB+i7odsIKwGxWsKWe5bcR40jvd4sFuobiRMChP08nl9oTe
 lDKh8P9e1OFJEMYyCBlT7LubGdN+9fTbJ/zwzASw8jwgt3oUEv7juv6wkOjmT0RJ
 Ntkj0N+2gFFuk1/SdRGFy7swZJ014Q8Me1RiWfS+DiiM6er7Pr7XDMfncXRd8dCa
 YDxP276kBtdTJpOHZRRo8pqPVWsKvwExEE+7m/vy+nWpsgQAe8Rn9PuPIyFYzap+
 bUxIeOSlHUvVLt1gd6VlweE/hoUG9Hhm7Beezj2dckdSR/nW6GvV9o7C54NWysKV
 TLRFZ7IWW4UcXuUAcOyivclSVfZMeU/RgUYzQ/wq7KL2ojfqmcsFgx8EbOXJMVv0
 oON/iVruMwDzuLTERoVQ5H1ZVpoMNhQrb5F5ZE4W3BtgrJBT6nl8JzHH94ByjBEv
 z8ENbPKeWwT/mBt8l23F5cTdtWtPBN33SoeUwoKi005BLhZgsZxd9EvpAAEV+ST5
 S6ZWe4cAF8wkZMdq9Ag6aHE0kSDR/8T3Oud2HGZ/0cZIi6ddPqM4ek1AYcBwC7y9
 P4PIbQGlSPr6k/bWd/zmAB1Gf+Li7TuvYS//YsrkttBO1at/CZeEbij5pV+EwAC4
 YbfDZIxHaH0=
 =8du/
 -----END PGP SIGNATURE-----

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

SoC changes for omap variants for v4.13 merge window:

- PM clean-up in preparation of adding am335x/am437x PM support

- Fixes for issues found by Coccinelle

- Legacy code removal now that everything boots in device
  tree only mode

- Interconnect changes in preparation of moving clkctrl clocks
  to be managed by clkctrl clock driver

- Interconnect changes to add omap4 crypto acceclerator
  support

* tag 'omap-for-v4.13/soc-v4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (27 commits)
  ARM: OMAP4: hwmod_data: add SHAM crypto accelerator
  ARM: OMAP4: hwmod data: add des
  ARM: OMAP4: hwmod data: add aes2
  ARM: OMAP4: hwmod data: add aes1
  ARM: OMAP2+: Remove unused legacy code for n8x0
  ARM: OMAP2+: Remove unused legacy code for watchdog
  ARM: OMAP2+: Remove unused legacy code for interconnects
  ARM: OMAP2+: Remove unused legacy code for PRM
  ARM: OMAP2+: Remove unused legacy code for io.c
  ARM: OMAP2+: Remove unused legacy code for McBSP
  ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions
  ARM: OMAP2+: Use kcalloc() in sr_set_nvalues()
  ARM: OMAP2+: Improve a size determination in sr_dev_init()
  ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions
  ARM: OMAP2+: Remove unused legacy code for device init
  ARM: OMAP2+: Remove unused legacy code for PMU
  ARM: OMAP2+: Remove unused legacy code for opp
  ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available
  ARM: OMAP4: cminst: add support for clkdm_xlate_address
  ARM: omap2+: clockdomain: add clkdm_xlate_address
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-06-18 20:46:30 -07:00
Daniel Lezcano ba5d08c0ea clocksource/drivers: Rename clocksource_probe to timer_probe
The function name is now renamed to 'timer_probe' for consistency with
the CLOCKSOURCE_OF_DECLARE => TIMER_OF_DECLARE change.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2017-06-14 11:59:16 +02:00
Tero Kristo 1df5eaa6bc ARM: OMAP4: hwmod_data: add SHAM crypto accelerator
OMAP4 SoC contains SHAM crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-14 00:53:51 -07:00
Sebastian Reichel ebea90df78 ARM: OMAP4: hwmod data: add des
This fixes the following error during kernel boot:

platform 480a5000.des: Cannot lookup hwmod 'des'

Unfortunately the DES module is only documented partly
in the OMAP4430 TRM. I found an old patch from Joel,
which I took over and updated for currently mainline.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-14 00:52:57 -07:00
Sebastian Reichel 478523dd03 ARM: OMAP4: hwmod data: add aes2
This adds the hwmod entry for the second AES module
available on OMAP4.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-14 00:52:38 -07:00
Sebastian Reichel 9a9ded89ad ARM: OMAP4: hwmod data: add aes1
This fixes the following error during kernel boot:

platform 4b501000.aes: Cannot lookup hwmod 'aes1'

Unfortunately the AES module is only documented partly
in the OMAP4430 TRM. I found an old patch from Joel,
which I took over and updated for currently mainline.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-14 00:51:35 -07:00
Tony Lindgren 67d00470ac Merge branch 'omap-for-v4.13/clkctrl' into omap-for-v4.13/soc-v4 2017-06-12 03:27:30 -07:00
Tony Lindgren 018b732458 Merge branch 'omap-for-v4.13/legacy-v2' into omap-for-v4.13/soc-v3 2017-06-12 00:07:44 -07:00
Tony Lindgren 0e78b1218d ARM: OMAP2+: Remove unused legacy code for n8x0
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
[tony@atomide.com: left out probe changes to avoid merge conflict]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Tony Lindgren 279ebec8f4 ARM: OMAP2+: Remove unused legacy code for watchdog
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Tony Lindgren 1aa8f0cb19 ARM: OMAP2+: Remove unused legacy code for interconnects
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Tony Lindgren 2a26d31b1b ARM: OMAP2+: Remove unused legacy code for PRM
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Tony Lindgren 58a641c827 ARM: OMAP2+: Remove unused legacy code for io.c
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Tony Lindgren 48f6693790 ARM: OMAP2+: Remove unused legacy code for McBSP
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 04:15:10 -07:00
Markus Elfring c76e4d2e50 ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions
Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 03:02:32 -07:00
Markus Elfring 6b72de4d33 ARM: OMAP2+: Use kcalloc() in sr_set_nvalues()
* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus use the corresponding function "kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data structure by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 03:02:31 -07:00
Markus Elfring 1dfb5b59d6 ARM: OMAP2+: Improve a size determination in sr_dev_init()
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 03:02:31 -07:00
Markus Elfring 1a61a2a5a6 ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions
Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 03:02:31 -07:00
Tony Lindgren 6f3ab009a1 ARM: OMAP2+: Remove unused legacy code for device init
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Note that omap_init_sti() won't do anything so we can
remove omap2_init_devices() as pointed out by Sebastian
Reichel <sebastian.reichel@collabora.co.uk>.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 02:57:38 -07:00
Tony Lindgren 7bd6934477 ARM: OMAP2+: Remove unused legacy code for PMU
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 02:57:27 -07:00
Tony Lindgren 99b3587deb ARM: OMAP2+: Remove unused legacy code for opp
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Note that the volt_data is still being used.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-08 02:57:16 -07:00
Tero Kristo 70f05be321 ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available
If clkctrl clocks are available on a device, populate these automatically
to replace hwmod main_clk info. First, the patch parses all "ti,clkctrl"
compatible nodes and maps these against existing clockdomain data. Once
done, individual hwmod init routines can search for a clkctrl clock
handle based on the clockdomain info and the created mapping.

This patch also drops the obsolete "_mod_ck" search as the implementation
required for this was not accepted usptream.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:14:06 -07:00
Tero Kristo 308b4e381b ARM: OMAP4: cminst: add support for clkdm_xlate_address
This function gets the physical base address of a clockdomain.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:14:01 -07:00
Tero Kristo 0bf76e00e5 ARM: omap2+: clockdomain: add clkdm_xlate_address
This new function can be used to get the physical address of a
clockdomain. Required for mapping the clkctrl clocks under hwmod
without modification to DT data.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:13:56 -07:00
Tero Kristo 9012933671 ARM: OMAP2+: PRCM: store also physical addresses for instances
In some cases the physical address info is needed, so store this
under the existing cm*_base, prm_base and prcm_mpu_base variables.
These are converted now to structs that contain both virtual and
physical address base for the instance.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:13:51 -07:00
Tero Kristo 24d8d498a8 ARM: OMAP4: hwmod_data: add opt clks for dss_hdmi and dss_venc
These extra optional clocks are required as main clock for these modules
are going to be routed to the main module clock. Otherwise, the hdmi / tv
clocks are not going to be enabled during usage, leading to failure.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:13:46 -07:00
Tero Kristo 138f7ca78f ARM: OMAP2+: timer: add support for fetching fck handle from DT
The mux clock handle shall be provided via "fck" DT handle. This avoids
the need to lookup the main clock via hwmod core, which will not work
with the clkctrl clock support anymore; the main clock is not going to
be a mux.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:13:41 -07:00
Tony Lindgren 8d39ff3d16 ARM: OMAP2+: Remove unused legacy code for timer
We are now booting all mach-omap2 in device tree only mode.
Any code that is only called in legacy boot mode where
of_have_populated_dt() is not set is safe to remove now.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-06-06 00:02:36 -07:00
Arnd Bergmann 0527873b29 ARM: remove duplicate 'const' annotations'
gcc-7 warns about some declarations that are more 'const' than necessary:

arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const ramc_ids[] __initconst = {
arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const timer_of_match[] __initconst = {
arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {

The ones in arch/arm were apparently all introduced accidentally by one
commit that correctly marked a lot of variables as __initconst.

Fixes: 19c233b79d ("ARM: appropriate __init annotation for const data")
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-05-19 10:12:55 +02:00
Olof Johansson 5252d73756 Linux 4.12-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJZF2pwAAoJEHm+PkMAQRiG9aAIAJJyV6Ux9kaX+glqO3KIs0wm
 0K/yqMOv1JTfJ1UUgY4iZbk5XOPPmXv1bdKJFECZfuAHdymJUF/RVNNvDlZbaLdd
 K8vDEi92eRwcf07a5b/Q2F8yNfADKKmRAA/oAbuQLBhJ0dPHig70PIvi9gq9kqiE
 Ft1MinbsZLavYatLm7oVDr/nsYebEDMGwTy0EX5bF2YjydfAlCvVWnI5ld5wisiV
 0fQF4W7MMjjcpAzG8uq3atEB8iQcWS2Ykz2chZRbYzHcdV2WJW751Vge9xc05Hzi
 rxlqn6peZFiFyM0qdPLhY0ktGzSTZcCFeb3aZicvm5aOamy2KJjOSZrEwjU8kts=
 =VHpx
 -----END PGP SIGNATURE-----

Merge tag 'v4.12-rc1' into fixes

We've received a few fixes branches with -rc1 as base, but our contents was
still at pre-rc1. Merge it in expliticly to make 'git merge --log' clear on
hat was actually merged.

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-05-18 23:54:47 -07:00
Dave Gerlach 33d3842d64 ARM: OMAP2+: pm: Remove __init from omap_pm_clkdms_setup
omap_pm_clkdms_setup gets called from pm init functions and now that
pm33xx and pm43xx can be loaded as modules this must be kept to be
called at any point during runtime.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-05-16 08:44:58 -07:00
Dave Gerlach 12b28ba6d6 ARM: OMAP2+: timer: Add suspend-resume callbacks for clkevent device
OMAP timer code registers two timers - one as clocksource
and one as clockevent. Since AM33XX has only one usable timer
in the WKUP domain one of the timers needs suspend-resume
support to restore the configuration to pre-suspend state.

commit adc78e6b99 ("timekeeping: Add suspend and resume
of clock event devices") introduced .suspend and .resume
callbacks for clock event devices. Leverage these
callbacks to have AM33XX clockevent timer behave properly
across system suspend. Extend the use of the .suspend and
.resume callbacks used by am335x clockevent to am437x as well.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-05-16 08:44:49 -07:00
Dave Gerlach e1a9e61e14 ARM: OMAP: Wakeupgen: Add context save/restore for AM43XX
AM43XX has the same wakeupgen IP as OMAP4/5. The only
notable difference is the presence of 7 register banks
and lack of SAR area which has been used in OMAP4/5 for
saving and restoring the context around low power states.

In case of AM43XX the context is saved and restored by
the kernel. Introduce wakeupgen_ops so that context save
and restore can be set on a per-SoC basis during init.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-05-16 08:44:31 -07:00
Linus Torvalds b5a53b61a2 Sort of on the quieter side this time, which is probably due more
to me not catching up as quickly on patch review than anything else.
 Overall it seems normal though, a few small changes to the core, mostly
 small non-critical fixes here and there as well as driver updates for new
 and existing hardware support. The biggest things are the TI clk driver
 rework to lay the groundwork for clkctrl support in the next merge window
 and the AmLogic audio/graphics clk support.
 
 Core:
  * clk_possible_parents debugfs file so we know which parents a clk
    could possibly have
  * Fix to make clk rate change notifiers stop on the first failure instead
    of continuing
 
 New Drivers:
  * Mediatek MT6797 SoCs
  * hi655x PMIC clks
  * AmLogic Meson SoC i2s and spdif audio clks and Mali graphics clks
  * Allwinner H5 SoCs and PRCM hardware
 
 Updates:
  * Nvidia Tegra T210 cleanups and non-critical fixes
  * TI OMAP cleanups in preparation for clkctrl support
  * Trivial fixes like kcalloc(), devm_* conversions, and seq_puts()
  * ZTE zx296718 SoC VGA clks
  * Rockchip clk-ids, fixups, and rename of rk1108 to rv1108
  * Support for IDT VersaClock 5P49V5935
  * Renesas R-Car H3 and M3-W IMR clks and ES2.0 rev of R-Car H3 support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJZE0YJAAoJEK0CiJfG5JUl9tEQAKVJx8VztYGt1REoFMtEEHmO
 azhxT/uYGgdOMAr9a3mQxqfm5cJbjnb1EZj2RfC1XHs31BF66j40y9+5d8hY8Hzu
 5IkY86s77TlqxGLwQcAsU75Q9cFrEW9X0KJ6OSzlrcc5hKlAEk/Z5lBKoQAm3mlU
 JqD4DSyFqP0X3YSxV5R7yfarb/X3ekCiQ13EDrPRRhyvHUi6ReUJDDgbPHtA+O2c
 ftLAARmxjzitzyvdXokXudkfNm8F5KePK+QkVikf6D/q+kx1D0BNJwZIjhpoiksn
 z6LImLQ8l91AWghmqqpOFXolxQncPU+bJIL9Pox76p5b3EzbQuthIafiso8KsDST
 4g3mHm42Yfx9uoF+U+pR8IeZfj5yQT91bvf8naPz/ngWMAlLP1IKJUvJN6jeTiwe
 cO6GIec1OH40Xl7v/9EafMwDcnFG0cwQmzr/M6wi1dUlmbSygP9NOMTHlr6W/0wa
 K2hCD6b5UHEgHmdfiJbZ2tKxLO0e8LABW+AU8fQH5S2eNe14vY0GvCzfAq5MArIz
 QRpso/kdtGpTpwMEvV6PUmJ0IxYEjtNJVjGJYbORwios0SK0Xl6bJWf7gwn5crB6
 nua9tVZtJEOHJS7S+ESp3VvuXj2/UGPoRRf5OsERo1S6ydGUQH+wDi1SJMdo/vtX
 bIPzIw6WPxMp24JyKOhh
 =/5a/
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "Sort of on the quieter side this time, which is probably due more to
  me not catching up as quickly on patch review than anything else.
  Overall it seems normal though, a few small changes to the core,
  mostly small non-critical fixes here and there as well as driver
  updates for new and existing hardware support.

  The biggest things are the TI clk driver rework to lay the groundwork
  for clkctrl support in the next merge window and the AmLogic
  audio/graphics clk support.

  Core:
   - clk_possible_parents debugfs file so we know which parents a clk
     could possibly have
   - Fix to make clk rate change notifiers stop on the first failure
     instead of continuing

  New Drivers:
   - Mediatek MT6797 SoCs
   - hi655x PMIC clks
   - AmLogic Meson SoC i2s and spdif audio clks and Mali graphics clks
   - Allwinner H5 SoCs and PRCM hardware

  Updates:
   - Nvidia Tegra T210 cleanups and non-critical fixes
   - TI OMAP cleanups in preparation for clkctrl support
   - trivial fixes like kcalloc(), devm_* conversions, and seq_puts()
   - ZTE zx296718 SoC VGA clks
   - Rockchip clk-ids, fixups, and rename of rk1108 to rv1108
   - IDT VersaClock 5P49V5935 support
   - Renesas R-Car H3 and M3-W IMR clks and ES2.0 rev of R-Car H3
     support"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (151 commits)
  clk: x86: pmc-atom: Checking for IS_ERR() instead of NULL
  clk: ti: divider: try to fix ti_clk_register_divider
  clk: mvebu: Use kcalloc() in two functions
  clk: mvebu: Use kcalloc() in of_cpu_clk_setup()
  clk: nomadik: Delete error messages for a failed memory allocation in two functions
  clk: nomadik: Use seq_puts() in nomadik_src_clk_show()
  clk: Improve a size determination in two functions
  clk: Replace four seq_printf() calls by seq_putc()
  clk: si5351: Delete an error message for a failed memory allocation in si5351_i2c_probe()
  clk: si5351: Use devm_kcalloc() in si5351_i2c_probe()
  clk: at91: Use kcalloc() in of_at91_clk_pll_get_characteristics()
  reset: mediatek: Add MT2701 ethsys reset controller include file
  clk: mediatek: add mt2701 ethernet reset
  clk: hi6220: Add the hi655x's pmic clock
  clk: ti: fix building without legacy omap3
  clk: ti: fix linker error with !SOC_OMAP4
  clk: hi3620: Fix a typo in one variable name
  clk: hi3620: Delete error messages for a failed memory allocation in two functions
  clk: hi3620: Use kcalloc() in hi3620_mmc_clk_init()
  clk: hisilicon: Delete error messages for failed memory allocations in hisi_clk_init()
  ...
2017-05-10 13:38:18 -07:00
Arnd Bergmann 6f92120892 ARM: omap2+: make omap4_get_cpu1_ns_pa_addr declaration usable
When CONFIG_PM is disabled, we get a build error:

arch/arm/mach-omap2/omap-smp.c: In function 'omap4_smp_maybe_reset_cpu1':
arch/arm/mach-omap2/omap-smp.c:309:20: error: implicit declaration of function 'omap4_get_cpu1_ns_pa_addr'; did you mean 'omap4_get_scu_base'? [-Werror=implicit-function-declaration]

We need to fix this in multiple files, to ensure the declaration is visible,
to actually build the function without CONFIG_PM, and to only call it
when OMAP4 and/or OMAP5 are enabled.

Fixes: 351b7c4907 ("ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
2017-05-09 21:13:25 +02:00
Linus Torvalds 8d648aad05 ARM: SoC platform updates
SoC platform changes (arch/arm/mach-*). This merge window, the bulk is
 for a few platforms:
 
 * Gemini:
  - Legacy platform that Linus Walleij has converted to multiplatform
    and DT, so a handful of various tweaks there, removal of some old
    stale support, etc.
 
 * Atmel AT91:
  - Fixup of various power management related pieces
  - Move of SoC detection to a drivers/soc driver instead
 
 * ST Micro STM32:
  - New SoC support: STM32H743
 
 * TI platforms:
  - More driver support for Davinci (SATA in particular)
  - Removal of some old stale hwmod files (linkspace platform)
 
 * Misc:
  - A couple of smaller patches for i.MX, sunxi, hisi
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZEANUAAoJEIwa5zzehBx3XS8P/0qIIbAW2UvPMTN7ONVAarQL
 Ri+ZfmxxUmgWBkXEV6XICrwGwwH8l87o8+TLvQZbPmSnZa9gxT8/OF8smQhYhGqr
 5hpmRpg2yhssLgxMaL9YQtwl7Au/EvYHgvVPaE6UxI/DEN1QzDiI4x0gsEu5f4oz
 3cLh1JqFnP5X0j0wdtsn4B21dQGbqQsUVbqysq48NYHuDOlbwfUj2f8y8TMmCVBP
 gn736jHUxinQd4vDUFiSmVflNPS2ApaIaVs1KTedmkFA3yZMJUNVp6QqDc+Xpk8l
 tIMcrSdATckgIIgbs2bCBQr4Ji4jkyWnlR1rqsg1GKCP+OQdnnTyEEzWOwW2KXRF
 faSr+CKB9mM79TZkRdjV494uwbc8Xg+JnfTHLAaO8fmMmNE8z5pnTNw2RBnS6BIk
 wpgUVEcCJWEzUodNhuByB328qUXhQ716N3jYb+IN9vEv1MbjuGpsH/DC9EkMv0+k
 cLuhiNmLVbIfHX3u6xTsqtVWjipV0D0cb7WI1a4SZHx/hTmlKc7Q4/wQXH1IykDA
 Y/36NG+jxIjx7a3sFc59LoIvuZOkuGf3EaSSxsrbt3/mFdKXjdq0vNCiluVpSakZ
 2rzzKePktKr//PxYVB7tvpSs9f/IBpsiy47NDxVvH2DvtohfhEnVxTIKZQiA01U4
 sjVToA5ovDHJAne9sIAB
 =ZdtJ
 -----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 Olof Johansson:
 "SoC platform changes (arch/arm/mach-*). This merge window, the bulk is
  for a few platforms:

  Gemini:
   - Legacy platform that Linus Walleij has converted to multiplatform
     and DT, so a handful of various tweaks there, removal of some old
     stale support, etc.

  Atmel AT91:
   - Fixup of various power management related pieces
   - Move of SoC detection to a drivers/soc driver instead

  ST Micro STM32:
   - New SoC support: STM32H743

  TI platforms:
   - More driver support for Davinci (SATA in particular)
   - Removal of some old stale hwmod files (linkspace platform)

  Misc:
   - A couple of smaller patches for i.MX, sunxi, hisi"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits)
  ARM: davinci: Add clock for CPPI 4.1 DMA engine
  ARM: mxs: add support for I2SE Duckbill 2 boards
  MAINTAINERS: Update the Allwinner sunXi entry
  ARM: i.MX25: globally disable supervisor protect
  ARM: at91: move SoC detection to its own driver
  ARM: at91: pm: correct typo
  ARM: at91: pm: Remove at91_pm_set_standby
  ARM: at91: pm: Merge all at91sam9*_pm_init
  ARM: at91: pm: Tie the USB clock mask to the pmc
  ARM: at91: pm: Tie the memory controller type to the ramc id
  ARM: at91: pm: Workaround DDRSDRC self-refresh bug with LPDDR1 memories.
  ARM: at91: pm: Simplify at91rm9200_standby
  ARM: at91: pm: Use struct at91_pm_data in pm_suspend.S
  ARM: at91: pm: Move global variables into at91_pm_data
  ARM: at91: pm: Move at91_ramc_read/write to pm.c
  ARM: at91: pm: Cleanup headers
  MAINTAINERS: Add memory drivers to AT91 entry
  MAINTAINERS: Update AT91 entry
  ARM: davinci: add pata_bk3710 libata driver support
  ARM: OMAP2+: mark omap_init_rng as __init
  ...
2017-05-09 09:49:36 -07:00
Linus Torvalds 857f864014 pci-v4.12-changes
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZEHmsAAoJEFmIoMA60/r88SgQAJbFddueb0+DfJ+USDud4b/Z
 akfS+G1UAm+TgtMyh1wM49dHzFssp36uWJxtWI+bPqBzuy94PMCbz7JVUV28gX9G
 tFhFuc5YH94I/3y85rbZnolb6uZN9MhLjzTFqDC9ilW6HFqmwK4t4wlHSCjQN1St
 svLYvs2G6n6/VK3Fre7/wOvdZ1erG4Qod+kn5Tx3K5TQydmRlaSBfK+DRANuDBkM
 KzGO7Bkc/Cx8hb9pHmaey/wxmNrrgmVjTtWrEnb2tEq833zP4h6GhUIJEKodMSi5
 gXPNZgKlu3n5L592M0UCh4EoHejzkv9wrcsoDm+djmsc5Zg2Howq4kAdHP8k4hUG
 0gt8n0ni9vhJN56jikrGi7cAdHCKSNnx2Ue/qTCbX0ncB3XUMuJxJwCsgW/6wa9f
 oU7tRtTS03UltnKoFAcyYclS4TaSY4SA4ySaK6Hi+cRkdVFDdyHQYbHHNSU7MsA+
 IS2tXvGoIdSYyrZMHSRcl2rRTfYQUkmPEvBF3LvqZr32M4mJMmUNAPLZaly373ZE
 iwq0ZJlrLeM0cqdFIG3S60RtJyQk/HBN1NMqrYHArWOxvWIgNd5F8NCsTTxY3wU3
 IxgBIuUFcbVwVkqEHGs8K5AvB3oghqdnA3eGOV79799eMtLn3LOvyIlpHMSw9WUq
 ags00JtMLitfNPBH3eSl
 =eE4D
 -----END PGP SIGNATURE-----

Merge tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:

 - add framework for supporting PCIe devices in Endpoint mode (Kishon
   Vijay Abraham I)

 - use non-postable PCI config space mappings when possible (Lorenzo
   Pieralisi)

 - clean up and unify mmap of PCI BARs (David Woodhouse)

 - export and unify Function Level Reset support (Christoph Hellwig)

 - avoid FLR for Intel 82579 NICs (Sasha Neftin)

 - add pci_request_irq() and pci_free_irq() helpers (Christoph Hellwig)

 - short-circuit config access failures for disconnected devices (Keith
   Busch)

 - remove D3 sleep delay when possible (Adrian Hunter)

 - freeze PME scan before suspending devices (Lukas Wunner)

 - stop disabling MSI/MSI-X in pci_device_shutdown() (Prarit Bhargava)

 - disable boot interrupt quirk for ASUS M2N-LR (Stefan Assmann)

 - add arch-specific alignment control to improve device passthrough by
   avoiding multiple BARs in a page (Yongji Xie)

 - add sysfs sriov_drivers_autoprobe to control VF driver binding
   (Bodong Wang)

 - allow slots below PCI-to-PCIe "reverse bridges" (Bjorn Helgaas)

 - fix crashes when unbinding host controllers that don't support
   removal (Brian Norris)

 - add driver for MicroSemi Switchtec management interface (Logan
   Gunthorpe)

 - add driver for Faraday Technology FTPCI100 host bridge (Linus
   Walleij)

 - add i.MX7D support (Andrey Smirnov)

 - use generic MSI support for Aardvark (Thomas Petazzoni)

 - make Rockchip driver modular (Brian Norris)

 - advertise 128-byte Read Completion Boundary support for Rockchip
   (Shawn Lin)

 - advertise PCI_EXP_LNKSTA_SLC for Rockchip root port (Shawn Lin)

 - convert atomic_t to refcount_t in HV driver (Elena Reshetova)

 - add CPU IRQ affinity in HV driver (K. Y. Srinivasan)

 - fix PCI bus removal in HV driver (Long Li)

 - add support for ThunderX2 DMA alias topology (Jayachandran C)

 - add ThunderX pass2.x 2nd node MCFG quirk (Tomasz Nowicki)

 - add ITE 8893 bridge DMA alias quirk (Jarod Wilson)

 - restrict Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
   (Manish Jaggi)

* tag 'pci-v4.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (146 commits)
  PCI: Don't allow unbinding host controllers that aren't prepared
  ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
  MAINTAINERS: Add PCI Endpoint maintainer
  Documentation: PCI: Add userguide for PCI endpoint test function
  tools: PCI: Add sample test script to invoke pcitest
  tools: PCI: Add a userspace tool to test PCI endpoint
  Documentation: misc-devices: Add Documentation for pci-endpoint-test driver
  misc: Add host side PCI driver for PCI test function device
  PCI: Add device IDs for DRA74x and DRA72x
  dt-bindings: PCI: dra7xx: Add DT bindings to enable unaligned access
  PCI: dwc: dra7xx: Workaround for errata id i870
  dt-bindings: PCI: dra7xx: Add DT bindings for PCI dra7xx EP mode
  PCI: dwc: dra7xx: Add EP mode support
  PCI: dwc: dra7xx: Facilitate wrapper and MSI interrupts to be enabled independently
  dt-bindings: PCI: Add DT bindings for PCI designware EP mode
  PCI: dwc: designware: Add EP mode support
  Documentation: PCI: Add binding documentation for pci-test endpoint function
  ixgbe: Use pcie_flr() instead of duplicating it
  IB/hfi1: Use pcie_flr() instead of duplicating it
  PCI: imx6: Fix spelling mistake: "contol" -> "control"
  ...
2017-05-08 19:03:25 -07:00
Kees Cook 063246641d format-security: move static strings to const
While examining output from trial builds with -Wformat-security enabled,
many strings were found that should be defined as "const", or as a char
array instead of char pointer.  This makes some static analysis easier,
by producing fewer false positives.

As these are all trivial changes, it seemed best to put them all in a
single patch rather than chopping them up per maintainer.

Link: http://lkml.kernel.org/r/20170405214711.GA5711@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Jes Sorensen <jes@trained-monkey.org>	[runner.c]
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
Cc: Salil Mehta <salil.mehta@huawei.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Florian Westphal <fw@strlen.de>
Cc: Antonio Quartulli <a@unstable.cc>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Kejian Yan <yankejian@huawei.com>
Cc: Daode Huang <huangdaode@hisilicon.com>
Cc: Qianqian Xie <xieqianqian@huawei.com>
Cc: Philippe Reynes <tremyfr@gmail.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Christian Gromm <christian.gromm@microchip.com>
Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Cc: Jason Litzinger <jlitzingerdev@gmail.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-05-08 17:15:14 -07:00
Kishon Vijay Abraham I 2c949ce38f ARM: DRA7: clockdomain: Change the CLKTRCTRL of CM_PCIE_CLKSTCTRL to SW_WKUP
The PCIe programming sequence in TRM suggests CLKSTCTRL of PCIe should be
set to SW_WKUP. There are no issues when CLKSTCTRL is set to HW_AUTO in RC
mode. However in EP mode, the host system is not able to access the
MEMSPACE and setting the CLKSTCTRL to SW_WKUP fixes it.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-04-28 10:23:20 -05:00
Dave Gerlach 04abaf07f6 ARM: OMAP2+: omap_device: Sync omap_device and pm_runtime after probe defer
Starting from commit 5de85b9d57 ("PM / runtime: Re-init runtime PM
states at probe error and driver unbind") pm_runtime core now changes
device runtime_status back to after RPM_SUSPENDED after a probe defer.
Certain OMAP devices make use of "ti,no-idle-on-init" flag which causes
omap_device_enable to be called during the BUS_NOTIFY_ADD_DEVICE event
during probe, along with pm_runtime_set_active.

This call to pm_runtime_set_active typically will prevent a call to
pm_runtime_get in a driver probe function from re-enabling the
omap_device. However, in the case of a probe defer that happens before
the driver probe function is able to run, such as a missing pinctrl
states defer, pm_runtime_reinit will set the device as RPM_SUSPENDED and
then once driver probe is actually able to run, pm_runtime_get will see
the device as suspended and call through to the omap_device layer,
attempting to enable the already enabled omap_device and causing errors
like this:

omap-gpmc 50000000.gpmc: omap_device: omap_device_enable() called from
invalid state 1
omap-gpmc 50000000.gpmc: use pm_runtime_put_sync_suspend() in driver?

We can avoid this error by making sure the pm_runtime status of a device
matches the omap_device state before a probe attempt. By extending the
omap_device bus notifier to act on the BUS_NOTIFY_BIND_DRIVER event we
can check if a device is enabled in omap_device but with a pm_runtime
status of RPM_SUSPENDED and once again mark the device as RPM_ACTIVE to
avoid a second incorrect call to omap_device_enable.

Fixes: 5de85b9d57 ("PM / runtime: Re-init runtime PM states at probe
error and driver unbind")
Tested-by: Franklin S Cooper Jr. <fcooper@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-04-04 08:49:56 -07:00
Arnd Bergmann f0e6876606 ARM: OMAP2+: mark omap_init_rng as __init
I found this section mismatch when building with an older
compiler release:

WARNING: vmlinux.o(.text+0x3051c): Section mismatch in reference from the
function omap_init_rng() to the function .init.text:omap_device_build()

Obviously this one function should be __init as well. Normally
we don't get a warning as the function gets inlined into its
caller.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[tony@atomide.com: formatted error message a bit]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-28 14:10:09 -07:00
Kevin Hilman 49e9e6163c ARM: OMAP2+: dm81xx: Add clkdm and hwmod for SATA
Add the SATA clockdomain (part of CM_DEFAULT) and a hwmod for the SATA
block on dm81xx.

Tested on DM8168 EVM.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
[Bartosz: removed an unused define]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-28 14:10:03 -07:00
Roger Quadros e2d54fe769 ARM: DRA7: hwmod_data: Prevent wait_target_disable error for usb_otg_ss
It seems that if L3_INIT clkdomain is kept in HW_AUTO while usb_otg_ss
is in use then there are random chances that the usb_otg_ss module
will fail to completely idle. i.e. IDLEST = 0x2 instead of 0x3.

Preventing L3_INIT from HW_AUTO while usb_otg_ss module is in use
fixes this issue.

We don't know yet if usb_otg_ss instances 3 and 4 are affected by this
issue or not so don't add this flag for those instances.

Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-28 14:09:58 -07:00
Roger Quadros a241623836 ARM: DRA7: hwmod: Fix DCAN1 stuck in transition
Add HWMOD_CLKDM_NOAUTO flag to DCAN1 module.

Without this DCAN1 module remains stuck in transition
after the CAN interface is brought down. This is also suggested
in Errata i893 "DCAN Initialization Sequence".

Add the HWMOD_CLKDM_NOAUTO to DCAN2 module as well
as it is mentioned in Errata i893.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-28 14:09:54 -07:00
Tony Lindgren 351b7c4907 ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot
Commit 3251885285 ("ARM: OMAP4+: Reset CPU1 properly for kexec") started
unconditionally resetting CPU1 because of a kexec boot issue I was seeing
earlier on omap4 when doing kexec boot between two different kernel
versions.

This caused issues on some systems. We should only reset CPU1 as a last
resort option, and try to avoid it where possible. Doing an unconditional
CPU1 reset causes issues for example when booting a bootloader configured
secure OS running on CPU1 as reported by Andrew F. Davis <afd@ti.com>.

We can't completely remove the reset of CPU1 as it would break kexec
booting from older kernels. But we can limit the CPU1 reset to cases
where CPU1 is wrongly parked within the memory area used by the booting
kernel. Then later on we can add support for parking CPU1 for kexec out
of the SDRAM back to bootrom.

So let's first fix the regression reported by Andrew by making CPU1 reset
conditional. To do this, we need to:

1. Save configured AUX_CORE_BOOT_1 for later

2. Modify AUX_CORE_BOOT_0 reading code to for HS SoCs to return
   the whole register instead of the CPU mask

3. Check if CPU1 is wrongly parked into the booting kernel by the
   previous kernel and reset if needed

Fixes: 3251885285 ("ARM: OMAP4+: Reset CPU1 properly for kexec")
Reported-by: Andrew F. Davis <afd@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Tested-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-27 10:10:42 -07:00
Roger Quadros 8ff42da411 ARM: OMAP2+ hwmod: Allow modules to disable HW_AUTO
Introduce HWMOD_CLKDM_NOAUTO flag that allows the hwmod's
clockdomain to be prevented from HW_AUTO while the hwmod is active.

This is needed to workaround some modules which don't function
correctly with HW_AUTO. e.g. DCAN on DRA7.

Signed-off-by: Roger Quadros <rogerq@ti.com>
[nsekhar@ti.com: rebased to v4.9 kernel]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-23 13:19:59 -07:00
Sekhar Nori 390c06828d ARM: OMAP2+: omap_hwmod: provide space for more hwmod flags
'flags' member of omap_hwmod structure is fast running
out of space with 16 different flags already defined.

Make flags a 32-bit entity so as to allow for more flags.

This results is a ~2.3K data section size increase with
omap2plus_defconfig on v4.11-rc2.

before:
   text	   data	    bss	    dec	    hex	filename
8186930	3082444	8252992	19522366	129e33e	vmlinux

after:
   text	   data	    bss	    dec	    hex	filename
8186922	3084812	8252992	19524726	129ec76	vmlinux

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-23 13:19:26 -07:00
Tony Lindgren 6bff547451 Merge branch 'hwmod-cleanup' into omap-for-v4.12/soc 2017-03-23 11:31:46 -07:00
Tony Lindgren 3cdf2f800b ARM: OMAP2+: Make hwmod clkdm_name const
This can be const, and will need to be const when we start initializing
it from clkdm data.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-14 13:13:20 -07:00
Tony Lindgren ca5339b18c ARM: OMAP2+: Remove unused CLOCKACT_TEST_ICLK
This is not used so let's remove it.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-14 13:13:19 -07:00
Tony Lindgren b8e1bddc98 ARM: OMAP2+: Use list_for_each_entry for hwmod slave_ports
We are just iterating over the slave_ports lists, so we can
use list_for_each_entry() no problem.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-14 13:13:19 -07:00
Tony Lindgren a1e312355d ARM: OMAP2+: Remove mostly unused hwmod linkspace
We want to be able to dynamically allocate struct omap_hwmod_ocp_if and
struct omap_hwmod at device driver probe time based on .dts data.

Current setup with the linkspace using memblock_virt_alloc() makes
this tricky, so let's get rid of struct linkspace and directly set up
struct omap_hwmod_ocp_if as the master and slave lists.

As we are currently not using the master_ports either, let's remove it
too. And let's add the struct omap_hwmod_ocp_if node directly to the
slave_ports list.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-14 13:13:19 -07:00
Tero Kristo 6c0afb5039 clk: ti: convert to use proper register definition for all accesses
Currently, TI clock driver uses an encapsulated struct that is cast into
a void pointer to store all register addresses. This can be considered
as rather nasty hackery, and prevents from expanding the register
address field also. Instead, replace all the code to use proper struct
in place for this, which contains all the previously used data.

This patch is rather large as it is touching multiple files, but this
can't be split up as we need to avoid any boot breakage.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2017-03-08 13:06:15 +02:00
Tero Kristo 2e1a294c0f clk: ti: move omap2_init_clk_clkdm under TI clock driver
This is not needed outside the driver, so move it inside it and remove
the prototype from the public header also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2017-03-08 12:59:30 +02:00
Tero Kristo b6f27b2db2 clk: ti: add clkdm_lookup to the exported functions
This will be needed to move some additional clockdomain functionality
under clock driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2017-03-08 12:58:41 +02:00
Geert Uytterhoeven 342bef7c88 ARM: OMAP: PM: Drop useless checks for PM_SUSPEND_STANDBY
As OMAP uses the standard suspend_valid_only_mem() for its
platform_suspend_ops.valid() callback, its platform_suspend_ops.enter()
callback will never be called with state equal to PM_SUSPEND_STANDBY.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-06 10:38:19 -08:00
Tony Lindgren e24bce8fb4 Linux 4.11-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYvHxaAAoJEHm+PkMAQRiGqd8H/1tNYYnkk57WROf2pg4dpT/k
 jK25fO0pC5AzwRd6TGM5I/Pg4Gh+eoXnO/mTiBJwxcvQY09cV2cW+1Pz7R/MLTfY
 lVU4CmQbM96JN1Wz44WS7H25ByYfWChbPmRzSiA0IjdJvm+C7vWFK0cf18i+EbbE
 pHFbFcIlwPx9cGVQQ7YWN5IGJU0mUYK51n1IHMcjHdMDJdBWtS1rjM+mk/O5ZBl/
 p0OpcO9P5HXhljy4xDgHn6uotTvjB/aZudyfsg7b/sGtIX5GKxXHLOAu7x2kM+a7
 G6+L+48GfjHbt6VEdWA8YmFxyl+se3IG0uIVXTz78cVWfOsd33bCE3s0mOhWFVc=
 =kYFG
 -----END PGP SIGNATURE-----

Merge tag 'v4.11-rc1' into omap-for-v4.11/fixes

Linux 4.11-rc1
2017-03-06 08:37:53 -08:00
Guenter Roeck b92675d998 ARM: OMAP2+: Release device node after it is no longer needed.
The device node returned by of_find_node_by_name() needs to be released
after it is no longer needed to avoid a device node leak.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-04 08:27:50 -08:00
Guenter Roeck 10e5778f54 ARM: OMAP2+: Fix device node reference counts
After commit 0549bde0fc ("of: fix of_node leak caused in
of_find_node_opts_by_path"), the following error may be
reported when running omap images.

OF: ERROR: Bad of_node_put() on /ocp@68000000
CPU: 0 PID: 0 Comm: swapper Not tainted 4.10.0-rc7-next-20170210 #1
Hardware name: Generic OMAP3-GP (Flattened Device Tree)
[<c0310604>] (unwind_backtrace) from [<c030bbf4>] (show_stack+0x10/0x14)
[<c030bbf4>] (show_stack) from [<c05add8c>] (dump_stack+0x98/0xac)
[<c05add8c>] (dump_stack) from [<c05af1b0>] (kobject_release+0x48/0x7c)
[<c05af1b0>] (kobject_release)
	from [<c0ad1aa4>] (of_find_node_by_name+0x74/0x94)
[<c0ad1aa4>] (of_find_node_by_name)
	from [<c1215bd4>] (omap3xxx_hwmod_is_hs_ip_block_usable+0x24/0x2c)
[<c1215bd4>] (omap3xxx_hwmod_is_hs_ip_block_usable) from
[<c1215d5c>] (omap3xxx_hwmod_init+0x180/0x274)
[<c1215d5c>] (omap3xxx_hwmod_init)
	from [<c120faa8>] (omap3_init_early+0xa0/0x11c)
[<c120faa8>] (omap3_init_early)
	from [<c120fb2c>] (omap3430_init_early+0x8/0x30)
[<c120fb2c>] (omap3430_init_early)
	from [<c1204710>] (setup_arch+0xc04/0xc34)
[<c1204710>] (setup_arch) from [<c1200948>] (start_kernel+0x68/0x38c)
[<c1200948>] (start_kernel) from [<8020807c>] (0x8020807c)

of_find_node_by_name() drops the reference to the passed device node.
The commit referenced above exposes this problem.

To fix the problem, use of_get_child_by_name() instead of
of_find_node_by_name(); of_get_child_by_name() does not drop
the reference count of passed device nodes. While semantically
different, we only look for immediate children of the passed
device node, so of_get_child_by_name() is a more appropriate
function to use anyway.

Release the reference to the device node obtained with
of_get_child_by_name() after it is no longer needed to avoid
another device node leak.

While at it, clean up the code and change the return type of
omap3xxx_hwmod_is_hs_ip_block_usable() to bool to match its use
and the return type of of_device_is_available().

Cc: Qi Hou <qi.hou@windriver.com>
Cc: Peter Rosin <peda@axentia.se>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-03-04 08:27:46 -08:00
Ingo Molnar e601757102 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h>
We are going to split <linux/sched/clock.h> out of <linux/sched.h>, which
will have to be picked up from other headers and .c files.

Create a trivial placeholder <linux/sched/clock.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:27 +01:00
Linus Torvalds d4f4cf77b3 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King:

 - nommu updates from Afzal Mohammed cleaning up the vectors support

 - allow DMA memory "mapping" for nommu Benjamin Gaignard

 - fixing a correctness issue with R_ARM_PREL31 relocations in the
   module linker

 - add strlen() prototype for the decompressor

 - support for DEBUG_VIRTUAL from Florian Fainelli

 - adjusting memory bounds after memory reservations have been
   registered

 - unipher cache handling updates from Masahiro Yamada

 - initrd and Thumb Kconfig cleanups

* 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (23 commits)
  ARM: mm: round the initrd reservation to page boundaries
  ARM: mm: clean up initrd initialisation
  ARM: mm: move initrd init code out of arm_memblock_init()
  ARM: 8655/1: improve NOMMU definition of pgprot_*()
  ARM: 8654/1: decompressor: add strlen prototype
  ARM: 8652/1: cache-uniphier: clean up active way setup code
  ARM: 8651/1: cache-uniphier: include <linux/errno.h> instead of <linux/types.h>
  ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly
  ARM: 8649/2: nommu: remove Hivecs configuration is asm
  ARM: 8648/2: nommu: display vectors base
  ARM: 8647/2: nommu: dynamic exception base address setting
  ARM: 8646/1: mmu: decouple VECTORS_BASE from Kconfig
  ARM: 8644/1: Reduce "CPU: shutdown" message to debug level
  ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol
  ARM: 8640/1: Add support for CONFIG_DEBUG_VIRTUAL
  ARM: 8639/1: Define KERNEL_START and KERNEL_END
  ARM: 8638/1: mtd: lart: Rename partition defines to be prefixed with PART_
  ARM: 8637/1: Adjust memory boundaries after reservations
  ARM: 8636/1: Cleanup sanity_check_meminfo
  ARM: add CPU_THUMB_CAPABLE to indicate possible Thumb support
  ...
2017-02-28 11:50:53 -08:00
Ladislav Michl ac28e47ccc ARM: OMAP2+: Remove legacy gpmc-nand.c
This code is no longer used and can be removed as we
are using device tree.

Removing this code also removes a dependency between
drivers/mtd and arch/arm/mach-omap2 making furhter driver
changes easier.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
[tony@atomide.com: removed from header too, updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-02-28 09:08:33 -08:00
Ladislav Michl 7807e086a2 ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
gpmc_probe_onenand_child returns success even on gpmc_onenand_init
failure. Fix that.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-02-28 09:06:23 -08:00
Florian Fainelli 64fc2a947a ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol
All low-level PM/SMP code using virt_to_phys() should actually use
__pa_symbol() against kernel symbols. Update code where relevant to move
away from virt_to_phys().

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2017-02-28 11:06:10 +00:00
Masahiro Yamada 183b8021fc scripts/spelling.txt: add "intialization" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  intialization||initialization

The "inintialization" in drivers/acpi/spcr.c is a different pattern but
I fixed it as well in this commit.

Link: http://lkml.kernel.org/r/1481573103-11329-16-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Linus Torvalds 6ae52c65e0 ARM: SoC platform updates
In the SoC branch we normally collect classic arch/arm/mach-* contents, i.e.
 C code changes for SoC platforms. This release cycle the diffstat is quite
 nice, in that we're removing 3x the amount of code that's being added.
 
 The main reason for this is that there's a removal of camera drivers for
 Freescale i.MX chips (driver was removed so the device registration isn't
 needed any more). There's also removal of display initialization code for OMAP
 that is no longer needed.
 
 The rest are mostly minor tweaks and cleanups; constification on Samsung
 platforms, cleanup of ux500 platform data, purge of other unused platform
 data/device seutp on i.MX and other good stuff.
 
 New SoC support this cycle is for two Allwinner platforms, H2+ and V3s.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYrMs4AAoJEIwa5zzehBx34LQP/j/pzJOw2cLr0iiHwNl/3jyC
 XFt/F6NFfPuBOCldUoMsZzD2lOR1Qbhp96fAQtDzs/HkGRVxokcHRVJC1QWozSkt
 18wm8tc4HtLvjWoeXyh3zFvwl4wiqx4d4r4yxw1wZKA0uhEXrSNJu4P/RgtXH4SK
 TycfodE35kJ8wCxLNXYr1vaAMKgjmBkk8DAQa5t6XXBnSLGJmNAa5+vCJKab1im+
 9mOZ1EigtrkRR6eL6OJmru3MaZYLg7q+oxq5i/5NOIOZsCWq6Wk4r+5HnTg+8aVf
 QVs766sEjwZJ5ozZYhYucp8pvQhyatG36vwB51x1XlTA4XzAJwMEgPAtb5Pc/owU
 cst8d4m24Gc7oChcxlbmrqK64hpF1s5LK/ZbfdLPHaK1PS/ng/teHfVA2Q2HXwur
 HcHA8dDqgTVCNcCpLX1OgBUbq9S0aopuL9bdeg6q6fU8Skb49BmeHK2Iji3MZSkO
 8XdY8H7oKtkwLFx18GJzmdXtH55vIXpHYMvgpjMaWAujtoqZCZ7+GHCmM3GyNCrF
 +KzJMVdx1lg6yYhfo4rZBWGzK2CrHvq5u5Vq7GExxhVCPsOx3mRQQ0JY/adGWU/y
 WTCbogwxUNbjlugffwQa+dYdF2KU2kAHAyEFDITndZmp60xJohWPYVJw+7imF5wR
 0Qbcj6OvffBcaTdxKzTE
 =YE8v
 -----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:
 "In the SoC branch we normally collect classic arch/arm/mach-*
  contents, i.e. C code changes for SoC platforms. This release cycle
  the diffstat is quite nice, in that we're removing 3x the amount of
  code that's being added.

  The main reason for this is that there's a removal of camera drivers
  for Freescale i.MX chips (driver was removed so the device
  registration isn't needed any more). There's also removal of display
  initialization code for OMAP that is no longer needed.

  The rest are mostly minor tweaks and cleanups; constification on
  Samsung platforms, cleanup of ux500 platform data, purge of other
  unused platform data/device seutp on i.MX and other good stuff.

  New SoC support this cycle is for two Allwinner platforms, H2+ and
  V3s"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits)
  ARM: ux500: remove deleted file from Makefile
  ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  ARM: ux500: cut some platform data
  MAINTAINERS: Update for the current location of the bcm2835 tree.
  ARM: davinci: remove BUG_ON() from da850_register_sata()
  ARM: davinci: da850: model the SATA refclk
  ARM: davinci: da850: add con_id for the SATA clock
  ARM: davinci: da8xx-dt: add OF_DEV_AUXDATA entry for SATA
  arm: mvebu: support for SMP on 98DX3336 SoC
  dt-bindings: video: exynos7-decon: Remove obsolete samsung,power-domain property
  soc: dove: constify reset_control_ops structures
  ARM: mv78xx0: fix possible PCI buffer overflow
  MAINTAINERS: transfer maintainership for the EZX platform
  ARM: shmobile: rcar-gen2: Add more register documentation
  ARM: tegra: paz00: Fix __initdata placement
  ARM: OMAP: clock: Remove unused mpurate cmdline option
  ARM: davinci: add skeleton for pdata-quirks
  arm: sunxi: add support for V3s SoC
  ARM: OMAP2+: omap_hwmod: Add support for earlycon
  arm: hisi: drop extern hip01_cpu_die
  ...
2017-02-23 15:33:54 -08:00
Linus Torvalds af8999f672 ARM: SoC non-urgent fixes for merge window
We sometimes collect non-critical fixes that come in during the later part
 of the merge window in a branch for the next release instead, and this is
 that contents for v4.11.
 
 Most of these are OMAP fixes, dealing with OMAP36/37 detection, quirks
 and setup. There's also some fixes for Davinci and a Kconfig fix for SCPI
 to only enable on ARM{,64}.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYrMlHAAoJEIwa5zzehBx3oZ4P/3nRgb4dtwEwXwFmJf8Xd4nu
 yetQbcwRreHvh8utsU2Pe+8tffV8jLgsW8TxZ43d6deYFii046HhZAXtvTTVgFpE
 OA0fJpNJ00KYqP1Nx5q/kwZoH3uBz442uMUQ9lyziB3RpimhRsiKyHwnTyuWljyx
 hPmO1XKcF6pQBXk1uwOzO1lSDUeOn4eAmeLonlG1gQ5qtrkU0WbrTPxpmn/CB546
 LH5Nj0qVRzEa7xr8O+2nzeKPVwcXGwsKVKCDbSJmsey2KOEDnEjjxpToAh3WnA4W
 Tm1av5QdyqsLVqAMkNYezrS8EzBjRKa1ma4xUqsNoIhO1XI7xa/LkonU8a0+ZdSX
 p48DCvv7IHX5IqdIHHB0s1eICvTsW8Cp/4YUJzuZDFbS9B2t5b3412+n43tVa8l3
 HYPeTzL5S3VOrMtpQKkGAFrw5OGm+URy4CYQxpX5DxSRSqvXTj12ajBHRbfdbzCO
 r2i2rhKL07PF3DAf8L1coHcBQDS7Vc/k+fhKCQy+W1RDxmjYwYKSI9agOyZi1HQ7
 X+0HuUyKTthCE2kUrj4rye/87MffWwdjNgnOZiHR1X7YtWgnjp1g9K+mLZHh/y5m
 Tq/M55cK9h6dOghx121jYFkkvDclEQDemJuDbKY0sEMDrDXtppcI/T+znZ1LTq7i
 1eaK4lTyAX7dbQJUQCwe
 =NhZq
 -----END PGP SIGNATURE-----

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

Pull ARM SoC non-urgent fixes from Arnd Bergmann:
 "We sometimes collect non-critical fixes that come in during the later
  part of the merge window in a branch for the next release instead, and
  this is that contents for v4.11.

  Most of these are OMAP fixes, dealing with OMAP36/37 detection, quirks
  and setup. There's also some fixes for Davinci and a Kconfig fix for
  SCPI to only enable on ARM{,64}"

* tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  firmware: arm_scpi: Add hardware dependencies
  ARM: OMAP3: Fix SoC detection of OMAP36/37 Family
  ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART
  ARM: dts: Fix compatible for ti81xx uarts for 8250
  ARM: dts: Fix am335x and dm814x scm syscon to probe children
  ARM: OMAP2+: Fix init for multiple quirks for the same SoC
  ARM: dts: Fix omap3 off mode pull defines
  bus: da850-mstpri: fix my e-mail address
  ARM: davinci: da850: fix da850_set_pll0rate()
  ARM: davinci: da850: coding style fix
2017-02-23 15:28:04 -08:00
Linus Torvalds ff58d005cd media updates for v4.11-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJYrH0jAAoJEAhfPr2O5OEVwaAQAJDaz4Qs7qt8mNDUerxT/ec0
 soiA5Bg8Xaa2WXmGgfPNXBTy5N6X0ArhvGoUQxMp6ef1Wjw8btjs36PnPUmMfbq6
 /Hb6mnU7g8hkXRCeSRI9ATCAxcQy+pR0by48+BX5Do/KS0b9DICMT83sMkikAmAb
 Y1ATUpc2kmCLY7RgSOI/HXOWV/2pC4OwhscXjj6BE9BLmiRY9eYOsbcFQ+cJoz6G
 jiTUL68M0MZxkxeFiuWzTgRJ0F00HTqjXFeI2ccynmwKO4etXmI0kFi2om2bXVsc
 cLHn6SJTByoHeIbtBhh2InsBvyT7oODOnNcwkpV8PUuBnmQc9F3uUufxgVRTwQTW
 6wv3pqJ4fHpNOWWejYNehmCVVHN9w1Bx8r4T1DB5a6UdlZ5yModOW93NV3JtPFSD
 xfsIR6fiETcVpsxrKmBzqvUnxEKduinQPPCQi/Xcr9Ups1WRSHkEaHqGtRhYqYKp
 gDp5QAwXmGphrJKuJHo/v3wl9l3b5qvKsoyt+ScNwr56qlMkgWf95zahRg0BMh88
 ytu+mE3EpxhZzXKTHw0F9OdU54uXPfN0VzzIvP4mUyDVpJLa+OWDGSw0HGLAGrvt
 YHSvs9KYqW4m9Gr/+zwMQAm3CDD26vIGRIhyC8yRIRtf8a8fpPGxbyjse+RhaWmO
 Rj/UZhR3incKUurT0cqI
 =LgNQ
 -----END PGP SIGNATURE-----

Merge tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - new drivers:
       - i.MX6 Video Data Order Adapter's (VDOA)
       - Toshiba et8ek8 5MP sensor
       - STM DELTA multi-format video decoder V4L2 driver
       - SPI connected IR LED
       - Mediatek IR remote receiver
       - ZyDAS ZD1301 DVB USB interface driver

 - new RC keymaps

 - some very old LIRC drivers got removed from staging

 - RC core gained support encoding IR scan codes

 - DVB si2168 gained support for DVBv5 statistics

 - lirc_sir driver ported to rc-core and promoted from staging

 - other bug fixes, board additions and driver improvements

* tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (230 commits)
  [media] mtk-vcodec: fix build warnings without DEBUG
  [media] zd1301: fix building interface driver without demodulator
  [media] usbtv: add sharpness control
  [media] cxusb: Use a dma capable buffer also for reading
  [media] ttpci: address stringop overflow warning
  [media] dvb-usb-v2: avoid use-after-free
  [media] add Hama Hybrid DVB-T Stick support
  [media] et8ek8: Fix compiler / Coccinelle warnings
  [media] media: fix semicolon.cocci warnings
  [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter
  [media] v4l: of: check for unique lanes in data-lanes and clock-lanes
  [media] coda/imx-vdoa: constify structs
  [media] st-delta: debug: trace stream/frame information & summary
  [media] st-delta: add mjpeg support
  [media] st-delta: EOS (End Of Stream) support
  [media] st-delta: rpmsg ipc support
  [media] st-delta: add memory allocator helper functions
  [media] st-delta: STiH4xx multi-format video decoder v4l2 driver
  [media] MAINTAINERS: add st-delta driver
  [media] ARM: multi_v7_defconfig: enable STMicroelectronics DELTA Support
  ...
2017-02-21 16:58:32 -08:00
Matthijs van Duin 448c077eeb ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build
'adr' yields a data-pointer, not a function-pointer.

Fixes: 999f934de1 ("ARM: omap5/dra7xx: Enable booting secondary
CPU in HYP mode")
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-02-16 13:12:15 -08:00
Tony Lindgren 179125085b ARM: OMAP3: Fix smartreflex platform data regression
Commit d9d9cec028 ("ARM: OMAP2+: Remove legacy data from hwmod for
omap3") dropped platform data that should no longer be used as we're
booting with device tree. It turns out that smartreflex is still
using platform data and produces the following errors during probe:

smartreflex smartreflex.0: invalid resource
smartreflex smartreflex.0: omap_sr_probe: ioremap fail
smartreflex: probe of smartreflex.0 failed with error -22
smartreflex smartreflex.1: invalid resource
smartreflex smartreflex.1: omap_sr_probe: ioremap fail
smartreflex: probe of smartreflex.1 failed with error -22

Let's fix the regression by adding back the smartreflex hwmod data.
The long term is to update the smartreflex driver to use device tree
based probing.

Fixes: d9d9cec028 ("ARM: OMAP2+: Remove legacy data from hwmod
for omap3")
Reported-by: Adam Ford <aford173@gmail.com>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-02-14 10:26:03 -08:00
Sean Young 922ee72da7 [media] rx51: broken build
As reported by kernel build test:

   In file included from arch/arm/mach-omap2/pdata-quirks.c:15:0:
>> arch/arm/mach-omap2/pdata-quirks.c:536:49: error: 'rx51_lirc_data' undeclared here (not in a function)
     OF_DEV_AUXDATA("nokia,n900-ir", 0, "n900-ir", &rx51_lirc_data),
                                                    ^
   include/linux/of_platform.h:52:21: note: in definition of macro 'OF_DEV_AUXDATA'
       .platform_data = _pdata }
                        ^~~~~~

Since "a92def1 [media] ir-rx51: port to rc-core" the build fails on
some arm configurations.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-31 07:23:59 -02:00
Sean Young a92def1bec [media] ir-rx51: port to rc-core
This driver was written using lirc since rc-core did not support
transmitter-only hardware at that time. Now that it does, port
this driver.

Compile tested only.

Signed-off-by: Sean Young <sean@mess.org>
Cc: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30 14:25:04 -02:00
Viresh Kumar 8a31d9d942 PM / OPP: Update OPP users to put reference
This patch updates dev_pm_opp_find_freq_*() routines to get a reference
to the OPPs returned by them.

Also updates the users of dev_pm_opp_find_freq_*() routines to call
dev_pm_opp_put() after they are done using the OPPs.

As it is guaranteed the that OPPs wouldn't get freed while being used,
the RCU read side locking present with the users isn't required anymore.
Drop it as well.

This patch also updates all users of devfreq_recommended_opp() which was
returning an OPP received from the OPP core.

Note that some of the OPP core routines have gained
rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
within them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-01-30 09:22:21 +01:00
Olof Johansson f0d0b8cb6b SoC changes for omaps for v4.11 merge window. This adds support
for keeping the interconnect target module active for uart if
 earlycon is specified. And we're adding Aaro Koskinen as a
 co-maintainer for omap1 to make sure things stay working for
 omap1. The other changes are mostly clean-up of old legacy code:
 
 - Remove unused omap_display_init()
 
 - Make omapdss_find_dss_of_node() function static
 
 - Add support for earlycon
 
 - Tidy up omap1 usb logging output with pr_cont
 
 - Make omap_otg_init() static
 
 - Delete redundant CPU class checks for omap1
 
 - Remove unused mpurate cmdline option that has not done
   anything for past 1.5 years at least
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEkgNvrZJU/QSQYIcQG9Q+yVyrpXMFAliHc5MRHHRvbnlAYXRv
 bWlkZS5jb20ACgkQG9Q+yVyrpXNVVBAAoNj2A8PfRJMYhQthtmUn0ORPe9QrF3k7
 5WaIRWhithkRIJl+kVuGLTzR0Uqvzo1CCXug+rJxs0JQ6PJEe+cp++ygioZzjZwE
 t0oHugvT1+MYCM475OwMG9ajgKYBX/GMsWDmuuG5nLm1JRzWQfMAQsmuyP0Oey+D
 bWOC0Hlz1gHn2xrlvjZah54rkERaWnKUIdi1YMqAAjmh/RuDED5VNskOcacVbqI1
 0C8wLC7mOviM3RyiQSCNTIKLC5illanjoZ/QHFnPLHV36KXJWCL/dB8gnAX+ORpF
 oCsL3t8erjq6cyhJIchs+UbqCEZv7HpIgbJBwc1oli3ExzS5iqmGQjhNkVN7Q+8Z
 TEQP6OhpPL4EXNEYOnE5pDgXATluWhD0rsg6XHt2CEsLZCOTzPTZCl0Of0vg3kcE
 eID7dz9CPXRquzyilVmyYla9Ty4XF3ePhdvLuI/06WgGU/M+6AvlZ40L8G73xKAu
 0wHx2rpN0H4ySXsAtnyanCxld5njPGiLn5Ehmnib0CQU16Zxc6mbxVQVfaaSSbAu
 LJrLHBdeqWYEkUJV6n+lBg1WeCgL4qDolMTm8aRhESTCBHQEaLYXe57dluYCt0g2
 2Rj1g/OuGFw+cViT2ICCvsAwE3jcHj32g8iJdnvfsypJ8pIO0znp2Sk7T7AYUXzw
 AafZ0ClGrws=
 =GiAL
 -----END PGP SIGNATURE-----

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

SoC changes for omaps for v4.11 merge window. This adds support
for keeping the interconnect target module active for uart if
earlycon is specified. And we're adding Aaro Koskinen as a
co-maintainer for omap1 to make sure things stay working for
omap1. The other changes are mostly clean-up of old legacy code:

- Remove unused omap_display_init()
- Make omapdss_find_dss_of_node() function static
- Add support for earlycon
- Tidy up omap1 usb logging output with pr_cont
- Make omap_otg_init() static
- Delete redundant CPU class checks for omap1
- Remove unused mpurate cmdline option that has not done
  anything for past 1.5 years at least

* tag 'omap-for-v4.11/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: clock: Remove unused mpurate cmdline option
  ARM: OMAP2+: omap_hwmod: Add support for earlycon
  MAINTAINERS: Add Aaro Koskinen as TI omap1 SoC co-maintainer
  ARM: OMAP1: USB: delete redundant CPU class checks
  ARM: OMAP1: USB: make omap_otg_init() static
  ARM: OMAP1: USB: tidy up logging output
  ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static
  ARM: OMAP2+: Remove unused omap_display_init() function

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-01-29 17:15:36 -08:00
Andrew Murray 8c4bc91063 ARM: OMAP: clock: Remove unused mpurate cmdline option
The 'mpurate' option, historically used for specifying an initial
MPU rate at boot, no longer has any effect due to the supporting
code being removed as it was 'wrong and dangerous' [1].

This patch removes the remaining dead code associated with the
__setup macros to avoid confusion and reduce bloat.

[1] https://patchwork.kernel.org/patch/5954631/

Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-24 07:20:02 -08:00
Lokesh Vutla 8dd6666f49 ARM: OMAP2+: omap_hwmod: Add support for earlycon
Hwmod core tries to reset and idles each IP that is registered with hwmod.
In case of earlycon, that specific uart IP cannot be reset or keep it in
idle state else earlycon hangs once hwmod resets that uart IP. So add support
to not reset uart that is being used as earlycon only if CONFIG_SERIAL_EARLYCON
is enabled.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-20 10:39:10 -08:00
Adam Ford 631af44c10 ARM: OMAP3: Fix SoC detection of OMAP36/37 Family
The OMAP36/37 families are similar, but there are a few features sections
that can help identify some of them.  Let's add checks for 3630/3730,
OMAP3621, DM3725, OMAP3615/DM3715, OMAP3611, and AM3703 all based on
features similar to what was done for the OMAP34xx/35xx series

The checkpatch flags some warnings for braces, but I kept the coding style
to match the adjacent code for consistency.

I don't have an OMAP36xx to test, but this was tested on both a DM3730 and
AM3703.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-20 10:13:06 -08:00
Vignesh R bd5e444bf1 ARM: OMAP5: Add HWMOD_SWSUP_SIDLE_ACT flag for UART
According to the commit ca43ea345d ("ARM: OMAP2+: hwmod: Add a new
flag to handle SIDLE in SWSUP only in active"), UART IP needs the sidle
mode to be controlled in SW only while they are active. Once inactive,
the IP needs to be put back in HW control so they are also wakeup
capable. The flag HWMOD_SWSUP_SIDLE takes care of this. So add this flag
to all instances of UART.

With this change, 8250 UART now gives out proper RX Timeout interrupts
and is usable as console.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-20 10:08:57 -08:00
Tony Lindgren 6e613ebf44 ARM: OMAP2+: Fix init for multiple quirks for the same SoC
It's possible that there are multiple quirks that need to be initialized
for the same SoC. Fix the issue by not returning on the first match.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-06 08:54:24 -08:00
Adam Ford a3ac350793 ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
Commit 485fa1261f ("ARM: OMAP2+: LogicPD Torpedo + Wireless: Add Bluetooth")
set the wrong baud rate for the UART. The Baud rate was 300,000 and it should
be 3,000,000 for WL1283.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-05 09:29:09 -08:00
Laurent Pinchart 7afa44e0e8 ARM: OMAP2+: Make the omapdss_find_dss_of_node() function static
The omapdss_find_dss_of_node() function isn't used outside of its
compilation unit, make it static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-05 08:58:37 -08:00
Laurent Pinchart 8635cb2c2b ARM: OMAP2+: Remove unused omap_display_init() function
The omap_display_init() function is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2017-01-05 08:58:20 -08:00
Tony Lindgren 74de7126fc Merge branch 'omap-for-v4.10/legacy' into omap-for-v4.10/fixes 2016-12-27 10:29:24 -08:00
Markus Elfring 9a6b6f75d9 ARM: OMAP2+: PRM: Delete an error message for a failed memory allocation
Omit an extra message for a memory allocation failure in this function.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-12-27 10:06:00 -08:00
Maninder Singh 5066d5296f ARM: omap2+: fixing wrong strcat for Non-NULL terminated string
Issue caught with static analysis tool:
"Dangerous usage of 'name' (strncpy doesn't always 0-terminate it)"

Use strlcpy _includes_ the NUL terminator, and  strlcat() which ensures
that it won't overflow the buffer.

Reported-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Vaneet Narang <v.narang@samsung.com>
CC: Russell King <linux@armlinux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-12-27 10:05:47 -08:00
Grygorii Strashko f86a2c875f ARM: omap2+: am437x: rollback to use omap3_gptimer_timer_init()
The commit 55ee7017ee ("arm: omap2: board-generic: use
omap4_local_timer_init for AM437x") unintentionally changes the
clocksource devices for AM437x from OMAP GP Timer to SyncTimer32K.

Unfortunately, the SyncTimer32K is starving from frequency deviation
as mentioned in commit 5b5c013591 ("ARM: OMAP2+: AM43x: Use gptimer
as clocksource") and, as reported by Franklin [1], even its monotonic
nature is under question (most probably there is a HW issue, but it's
still under investigation).

Taking into account above facts It's reasonable to rollback to the use
of omap3_gptimer_timer_init().

[1] http://www.spinics.net/lists/linux-omap/msg127425.html

Fixes: 55ee7017ee ("arm: omap2: board-generic: use
omap4_local_timer_init for AM437x")
Reported-by: Cooper Jr., Franklin <fcooper@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-12-27 09:38:04 -08:00
Thomas Gleixner a5a1d1c291 clocksource: Use a plain u64 instead of cycle_t
There is no point in having an extra type for extra confusion. u64 is
unambiguous.

Conversion was done with the following coccinelle script:

@rem@
@@
-typedef u64 cycle_t;

@fix@
typedef cycle_t;
@@
-cycle_t
+u64

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
2016-12-25 11:04:12 +01:00
Linus Torvalds e79ab194d1 ARM: SoC platform updates for v4.10
These are updates for platform specific code on 32-bit ARM machines,
 essentially anything that can not (yet) be expressed using DT files.
 
 Noteworthy changes include:
 
 - Added support for the TI DRA71x family of SoCs in mach-omap2,
   this is an new variant of the the DRA72x/DRA74x automotive
   infotainment chips we already supported for a while.
 
 - Added support for the ST STM32F746 SoC, the first Cortex-M7
   based microcontroller we support, related to the smaller
   STM32F4 family.
 
 - Renesas adds support for r8a7743 and r8a7745 in mach-shmobile,
   see http://elinux.org/RZ-G
 
 - SMP is now supported on the OX820 platform
 
 - A lot of code in mach-omap2 gets removed as a follow-up to
   removing support for board files in the previous release
 
 - Davinci has some new work to improve USB support
 
 - For i.MX, the performance monitor now supports profiling the
   memory controller using 'perf'
 
 Conflicts:
 arch/arm/mach-shmobile/setup-rcar-gen2.c: rcar_gen2_clocks_init()
 is gone, calling of_clk_init(NULL) is sufficient now.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWFMS9WCrR//JCVInAQIG+Q/7BElvubqO/Cc/VEAyoB5iF9OB9wPD2t5p
 O0KwtrTtzqJZJNGTmPiesR4DMZH07O1XoW8HqvBPeXtB7/t0tmOegwK+WABbpkSE
 ZQgUjtrIGwteJXYqU2BbhooO8G6mEsfWaqdGX8ZiIk40fPhMN6536lG+JA8DV7uv
 ckAPHCZkIf34lDtwljN97Cvj1TT9lBFp04bx7alKqfg1IMV+iMSxvSRHuuFlxRCk
 kzwVXDmFlZLmueU2KbQXTuOUrvehIGlZ/X5QWlxfrjwCwnOvr54p8WDoVWu2UkHm
 Dc8BVfsBny8mCZJRzfDD1S0PD0mWn1msdOhRb4VRzsC9DnRI4qbL0/Hstu8A7yUQ
 kBtMyVtFTzvRSclABbHHN6Mnm37AyNwSIKIB8h2U1m7YHqZGwHLaflVT5sf3tl7m
 4arTVqHtR8oSU5G5a2FTznMM2rfIx4LcCBbLQxWqzmO4Qrh4j6t7c2i7+VTfFAja
 0bToLgTArKK/cep6PWeBnMH14nzlXoKtBf2T8qwQPuAmLKy9E0ZduLKZ01B/nqrj
 OXcsnG0OUuqU4RgbIaDssRU4ohKIk8JcAl60TdRFhzj+/LTbeMaWVwbWuQS+iHd3
 zfzGUoUIhElx0vHt6ghR0BYQadszb1z9V0NEs3UM0v5cWlNodX//3okH8lZmSW6w
 +fO4dSnIKIA=
 =BF6Y
 -----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 updates for platform specific code on 32-bit ARM machines,
  essentially anything that can not (yet) be expressed using DT files.

  Noteworthy changes include:

   - Added support for the TI DRA71x family of SoCs in mach-omap2, this
     is an new variant of the the DRA72x/DRA74x automotive infotainment
     chips we already supported for a while.

   - Added support for the ST STM32F746 SoC, the first Cortex-M7 based
     microcontroller we support, related to the smaller STM32F4 family.

   - Renesas adds support for r8a7743 and r8a7745 in mach-shmobile, see
     http://elinux.org/RZ-G

   - SMP is now supported on the OX820 platform

   - A lot of code in mach-omap2 gets removed as a follow-up to removing
     support for board files in the previous release

   - Davinci has some new work to improve USB support

   - For i.MX, the performance monitor now supports profiling the memory
     controller using 'perf'"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (95 commits)
  ARM: davinci: da830-evm: use gpio descriptor for mmc pins
  ARM: davinci: da850-evm: use gpio descriptor for mmc pins
  ARM: davinci: hawk: use gpio descriptor for mmc pins
  ARM: ARTPEC-6: add select MFD_SYSCON to MACH_ARTPEC6
  ARM: davinci: da8xx: Fix ohci device name
  ARM: oxnas: Add OX820 config and makefile entry
  ARM: oxnas: Add OX820 SMP support
  ARM: davinci: PM: fix build when da850 not compiled in
  ARM: orion5x: remove legacy support of ls-chl
  ARM: integrator: drop EBI access use syscon
  ARM: BCM5301X: Add back handler ignoring external imprecise aborts
  ARM: davinci: PM: support da8xx DT platforms
  ARM: davinci: PM: cleanup: remove references to pdata
  ARM: davinci: PM: rework init, remove platform device
  ARM: Kconfig: Introduce MACH_STM32F746 flag
  ARM: mach-stm32: Add a new SOC - STM32F746
  ARM: shmobile: document SK-RZG1E board
  ARM: shmobile: r8a7745: basic SoC support
  ARM: imx: mach-imx6ul: add imx6ull support
  ARM: zynq: Reserve correct amount of non-DMA RAM
  ...
2016-12-15 15:39:02 -08:00
Linus Torvalds 3ec5e8d82b ARM: SoC non-urgent fixes for v4.10
As usual, we queue up a few fixes that don't seem urgent enough to go in
 through -rc, or that just came a little too late given their size.
 
 The zx fixes make the platform finally boot on real hardware, the
 davinci and imx31 get the DT support working better for some of
 the machines that are still normally used with classic board files.
 One tegra fix is important for new bootloader versions, but the
 bug has been around for a while without anyone noticing.
 
 The other changes are mostly cosmetic.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWFLum2CrR//JCVInAQJTJhAAmLTsJE0O9akmxytLzlMsy+xhIHvXBfkx
 mCDr0sVwHFVm2vcH0bPlK4sNrjGYjIV0Qfsh4Br9NzohCxe6s8xFvPA78aYk5AZp
 kiHRv8Gap3dYTV2p6P2loeQ3o0zN7kl9/gUPOy6v4La84kUyZi9RRpyhA+HlEuwW
 loQQ6LaSVQb8dMo8Lz5GdOk4YfWyy1DSoZ1uNwD/2bqgfIDQ5MPdjwQzHeK259xE
 8WfVKtS4RXl54Psj26BfHRrH8VE8cMxfZ3eZwGykiXpOusrjNVbIEPJK8nKHuGHJ
 Ui/nAMzvCD23bsVX2JCYAKa/zRWjXqpvrHEzLJsaWq1VqtmWFS7g9wi1DjZmBBoC
 eJZI8Sg/7qL8Rkc69XSzyRUdMxdS6JfWQ6HrM/qzouja6MoRdFdbzl1WiPyYaVGd
 gBa7Lx6hQJgSWkeu0mvERdDAzjf4weeZyMFOFov0CwzMZ4VTKCR6Rk4lc8I1A/Hz
 0QcCmUj7uXC+gA6U+ZBlvDkG+e1u0Me5i+0gCCphd3UaReB5WaEriNubEwEMitci
 QI9BGIMzG974UXU9CCIwcnpFvJKSRwuZsQmPpulP1vbfIb8ajZXQ779PW5szE6qI
 h9VMtnKlDbOUEzdj6l/sCs2mWrobCr8/44cWOz7R8b31ZhBZxyJRWhIE/YvZFEvF
 Dq5OzaCNLxM=
 =i2l2
 -----END PGP SIGNATURE-----

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

Pull ARM SoC non-urgent fixes from Arnd Bergmann:
 "As usual, we queue up a few fixes that don't seem urgent enough to go
  in through -rc, or that just came a little too late given their size.

  The zx fixes make the platform finally boot on real hardware, the
  davinci and imx31 get the DT support working better for some of the
  machines that are still normally used with classic board files. One
  tegra fix is important for new bootloader versions, but the bug has
  been around for a while without anyone noticing.

  The other changes are mostly cosmetic"

* tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
  arm64: tegra: Add missing Smaug revision
  arm64: tegra: Add VDD_GPU regulator to Jetson TX1
  arm64: dts: zte: clean up gic-v3 redistributor properties
  arm64: dts: zx: Fix gic GICR property
  bus: vexpress-config: fix device reference leak
  soc: ti: qmss: fix the case when !SMP
  ARM: lpc32xx: drop duplicate header device.h
  ARM: ixp4xx: drop duplicate header gpio.h
  ARM: socfpga: fix spelling mistake in error message
  ARM: dts: imx6q-cm-fx6: fix fec pinctrl
  ARM: dts: imx7d-pinfunc: fix UART pinmux defines
  ARM: dts: imx6qp: correct LDB clock inputs
  ARM: OMAP2+: pm-debug: Use seq_putc() in two functions
  ARM: OMAP2+: Remove the omapdss_early_init_of() function
  mfd: tps65217: Fix mismatched interrupt number
  ARM: zx: Fix error handling
  ARM: spear: Fix error handling
  ARM: davinci: da850: Fix pwm name matching
  ARM: clk: imx31: properly init clocks for machines with DT
  clk: imx31: fix rewritten input argument of mx31_clocks_init()
  ...
2016-12-15 15:15:13 -08:00
Grygorii Strashko 14944934f8 ARM: OMAP2+: Remove legacy gpio code
OMAP2+ GPOs are initialized now using device tree, so legacy gpio
initialization code can be removed.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-23 08:22:10 -08:00
Olof Johansson 6d1e66bb4e Legacy platform_data removal for omaps for v4.10 merge window.
We've dropped the last legacy boot board-*.c files for mach-omap2
 for v4.9 so now we can start removing the unused platform_data.
 
 All of the below has been unused since v4.9 merge window:
 
 - Drop legacy pmic init code
 
 - Apply seq_puts() fixes for legacy mux code, then drop it
 
 - Drop legacy serial init
 
 - Drop legacy i2c init
 
 - Drop legacy PM init
 
 - Drop legacy twl4030 platform init
 
 - Drop legacy USB host init
 
 - Drop legacy muxing for tusb6010, n8x0 is still using it's
   platform init via pdata-quirks.c
 
 - Drop legacy musb init
 
 - Drop hwmod related legacy mux code
 
 - Drop legacy hwmod data for omap3
 
 - Drop legacy smsc911x and smc91x init
 
 - Drop legacy board flash init
 
 - Drop legacy ads7846 init
 
 - Drop legacy sdram timings
 -----BEGIN PGP SIGNATURE-----
 
 iQIuBAABCAAYBQJYK1nqERx0b255QGF0b21pZGUuY29tAAoJEBvUPslcq6Vzt9MP
 /0mUByIMqhtrJYcb8tpFyzoyM6j4YGbWYLVTD4wzJ+r+CXR3khNHZ+FznbDF3u5U
 YPTa/l4T8XNg9LVHavEBP6fj2dcM7nEwiL4b8JvtrAx6QCnpImkQCGxUVrmP/t1f
 WdMzUw6I5T2paMRLAA0uR7rOSrNxKn/sx45LHr3+702lL/sjlfrkQxFwv1C/K8rf
 Znf3Te4qC+JW4/gZvI+Y0Rgq6KmlIljhYPB/xvbQhjxdOM8gYmnbZizL1LkgMv15
 wvRs/S6lJN0fVQp0cAJzTb8G/r0eTgDYsfHZKJWu37l2wfNu42gBvBCb7GFU4hW3
 7TVJjDhaDRXxB9z2RvqGJXyt/MjNN1eghDE3u7xgL2+/KdM4SkrMbjWYr6ZeMCVq
 u/neLGlIAh4gsWs5FKL3uZbJ+e/ElJzB3EKVXxbU8sRvkYyfvIE5jGR8nMcs74X8
 x5JnbLh29z82QoTFt+QNSChXN4RA7P9WegtahwAfiTtHkWMZHCn799P1Yo4yW23s
 r/Ka7kpAt8VfNFUB6EKHBKSQYjM7U0+jyJz1M7wqEZZJMKDcE0gf1WEik/Bw5pqQ
 YckYsB4SXNEneXQxD17aoSqI2SYsZmfbP9dA9SF5/lSn9JmJrvyCCZbOxZC6i+69
 MdnDN7fcfZGz1OTVla+87g/7AQ2Nem8BD77umhvEd8jF
 =GbYF
 -----END PGP SIGNATURE-----

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

Legacy platform_data removal for omaps for v4.10 merge window.
We've dropped the last legacy boot board-*.c files for mach-omap2
for v4.9 so now we can start removing the unused platform_data.

All of the below has been unused since v4.9 merge window:

- Drop legacy pmic init code
- Apply seq_puts() fixes for legacy mux code, then drop it
- Drop legacy serial init
- Drop legacy i2c init
- Drop legacy PM init
- Drop legacy twl4030 platform init
- Drop legacy USB host init
- Drop legacy muxing for tusb6010, n8x0 is still using it's
  platform init via pdata-quirks.c
- Drop legacy musb init
- Drop hwmod related legacy mux code
- Drop legacy hwmod data for omap3
- Drop legacy smsc911x and smc91x init
- Drop legacy board flash init
- Drop legacy ads7846 init
- Drop legacy sdram timings

* tag 'omap-for-v4.10/legacy-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits)
  ARM: OMAP2+: Drop legacy sdram timings
  ARM: OMAP2+: Drop legacy ads7846 init
  ARM: OMAP2+: Remove legacy board-flash.c
  ARM: OMAP2+: Remove legacy smsc911x and smc91x GPMC support
  ARM: OMAP2+: Remove legacy data from hwmod for omap3
  ARM: OMAP2+: Remove legacy mux code
  ARM: OMAP2+: Remove legacy hwmod mux code
  ARM: OMAP2+: Remove legacy usb-musb.c platform init code
  ARM: OMAP2+: Remove legacy muxing for usb-tusb6010.c
  ARM: OMAP2+: Remove legacy usb-host.c platform init code
  ARM: OMAP2+: Remove legacy twl4030 platform init code
  ARM: OMAP2+: Remove legacy PM init
  ARM: OMAP2+: Remove legacy i2c.c platform init code
  ARM: OMAP2+: Remove legacy serial.c
  ARM: OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show()
  ARM: OMAP2+: mux: Replace three seq_printf() calls by seq_puts()
  ARM: OMAP: kill omap_pmic_init
  ARM: OMAP2: kill omap2_pmic_init
  ARM: OMAP3: kill omap3_pmic_init
  ARM: OMAP3: kill omap3_pmic_get_config and twl_{get,set}_voltage
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
2016-11-18 16:49:23 -08:00
Tony Lindgren 2bb6375f5c Merge branch 'omap-for-v4.10/cpuidle-v2' into omap-for-v4.10/soc 2016-11-14 15:58:18 -08:00
Tony Lindgren 19944b3a4a ARM: OMAP2+: Drop legacy sdram timings
These are no longer used. If somebody needs to configure
memory timings for various idle modes, they should be
implemented as a device driver callbacks from the PM
code.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 16:07:32 -07:00
Tony Lindgren dbf828ec4c ARM: OMAP2+: Drop legacy ads7846 init 2016-11-10 15:46:13 -07:00
Javier Martinez Canillas 6a6e640bc1 ARM: OMAP2+: Remove legacy board-flash.c
Legacy board files in mach-omap2 used the helper functions
board_{nor,nand,onenand}_init() to initialize the flash
devices attached to the GPMC.

With Device Tree booting the initialization is handled by
the GPMC driver gpmc_probe_*_child() functions so this
code is not needed anymore now that OMAP2+ is DT-only.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 15:32:33 -07:00
Javier Martinez Canillas b7b23ffcf7 ARM: OMAP2+: Remove legacy smsc911x and smc91x GPMC support
When connecting an ethernet chip to the GPMC, such as smc91x
or smsc911x, a GPIO has to be requested to be used as an IRQ
and also the IO memory for a GPMC chip-select.

When booting with DT the chip-select allocation is handled
in a generic manner in the GPMC driver and the GPIO to IRQ
mapping is made by the DT core so this code is not needed
anymore now that mach-omap2 related boards are DT-only.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 15:31:31 -07:00
Tony Lindgren d9d9cec028 ARM: OMAP2+: Remove legacy data from hwmod for omap3
This data is now coming from device tree so we can remove the
duplicate data. Let's keep the DSS and DMA related things for now
until those have been converted to device tree completely.

While at it, let's also add the trailing commas to data structures
so further processing with scripts will be a bit easier.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 14:03:19 -07:00
Tony Lindgren e9f5f1e456 ARM: OMAP2+: Remove legacy mux code
All the boards booting with device tree use
drivers/pinctrl-single.c instead.

Note that mach-omap1 is still using the legacy mux,
so let's move the related Kconfig options from plat-omap
to mach-omap1.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 12:42:49 -07:00
Tony Lindgren b42814557f ARM: OMAP2+: Remove legacy hwmod mux code
This is no longer needed when booted with device tree.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 12:42:38 -07:00
Tony Lindgren 4e37d32fef ARM: OMAP2+: Remove legacy usb-musb.c platform init code
This is no longer needed when booted with device tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 12:42:28 -07:00
Tony Lindgren 602105ed74 ARM: OMAP2+: Remove legacy muxing for usb-tusb6010.c
We are moving to device tree based booting, and this should be
done using pinctrl-single instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 12:42:15 -07:00
Tony Lindgren 9080b8dc76 ARM: OMAP2+: Remove legacy usb-host.c platform init code
This is no longer needed when booted with device tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 12:41:32 -07:00
Tony Lindgren 0d07c1cba3 ARM: OMAP2+: Remove legacy twl4030 platform init code
This code is no longer used and can be removed as we
are using device tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 09:18:45 -07:00
Tony Lindgren cb6675d6a8 ARM: OMAP2+: Remove legacy PM init
This is no longer needed when booted with device tree.
And let's replace cpu_is with soc_is for the PM code to
avoid confusion, they do the same thing.

Note that omap_pmic_late_init() now just calls
omap3_twl_init() and omap4_twl_init() to initialize the
voltage layer so we can remove the remaining references
to twl-common code and remove it in the following patch.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 09:01:33 -07:00
Tony Lindgren 65fa3e719f ARM: OMAP2+: Remove legacy i2c.c platform init code
We can now initialize I2C for mach-omap2 using device tree. And we
can move the remaining code in plat-omap/i2c.c into mach-omap1/i2c.c.

Note that we cannot remove some of the I2C bus reset functions
as they are being used by hwmod code.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 08:53:30 -07:00
Tony Lindgren f3b78f7289 ARM: OMAP2+: Remove legacy serial.c
We can now initialize the UARTs using device tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-10 08:53:18 -07:00
Nishanth Menon 6cd9699c6b ARM: DRA7: hwmod: Do not register RTC on DRA71
RTC is not available on DRA71x, so accessing any of the RTC
register or clkctrl register will lead to a crash. So, do not
register RTC hwmod for DRA71x.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:59:18 -07:00
Lokesh Vutla a2af765adb ARM: OMAP2+: board-generic: add support for DRA71x family
DRA71x processor family is a derivative of DRA722 ES2.0 targetted for
infotainment systems.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:59:02 -07:00
Lokesh Vutla d88d30e7b5 ARM: AMx3xx: hwmod: Add data for RNG
Hardware random number generator is present in both AM33xx and AM43xx
SoC's. So moving the hwmod data to common data.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:39:41 -07:00
Lokesh Vutla d7e4c12856 ARM: AM43xx: hwmod: Add data for DES
AM43xx SoC contains DES crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:56 -07:00
Joel Fernandes c2ce5fb3f3 ARM: OMAP: DRA7xx: Make L4SEC clock domain SWSUP only
Using HWSUP for l4sec clock domain is causing warnings in HWMOD code for
DRA7. Based on some observations, once the clock domain goes into an IDLE
state (because of no activity etc), the IDLEST for the module goes to '0x2'
value which means Interface IDLE condition. So far so go, however once the
MODULEMODE is set to disabled for the particular IP, the IDLEST for the
module should go to '0x3', per the HW AUTO IDLE protocol. However this is
not observed and there is no reason per the protocl for the transition to
not happen. This could potentially be a bug in the HW AUTO state-machine.

Work around for this is to use SWSUP only for the particular clockdomain.
With this all the transitions of IDLEST happen correctly and warnings
don't occur.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:46 -07:00
Joel Fernandes 7a825cc885 ARM: DRA7: hwmod: Add data for RNG IP
DRA7 SoC contains hardware random number generator. Add hwmod data for
this IP so that it can be utilized.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[t-kristo@ti.com: squashed the RNG hwmod IP flag fixes from Lokesh,
                  squashed the HS chip fix from Daniel Allred]
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:27 -07:00
Lokesh Vutla 7e45f17998 ARM: DRA7: hwmod: Add data for SHA IP
DRA7 SoC contains SHA crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:22 -07:00
Joel Fernandes 628d758731 ARM: DRA7: hwmod: Add data for AES IP
DRA7 SoC contains AES crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[t-kristo@ti.com: squash in support for both AES1 and AES2 cores]
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:17 -07:00
Joel Fernandes c311864310 ARM: DRA7: hwmod: Add data for DES IP
DRA7 SoC contains DES crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 15:35:09 -07:00
Markus Elfring 195c7a52b7 ARM: OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show()
A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc".

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>
2016-11-09 15:34:09 -07:00
Markus Elfring 5c02b01d23 ARM: OMAP2+: pm-debug: Use seq_putc() in two functions
A single character (line break) should be put into a sequence at the end.
Thus use the corresponding function "seq_putc".

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>
2016-11-09 15:33:33 -07:00
Markus Elfring bbf193fc3c ARM: OMAP2+: mux: Replace three seq_printf() calls by seq_puts()
Strings which did not contain data format specification should be put into
a sequence. Thus use the corresponding function "seq_puts".

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>
2016-11-09 15:32:37 -07:00
Nicolae Rosia 76eddd6046 ARM: OMAP: kill omap_pmic_init
Last user of this function was removed in commit
9b714 ("ARM: OMAP2+: Drop legacy board file for n900") during
legacy board file removal.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:46:10 -07:00
Nicolae Rosia 30bfa0deb3 ARM: OMAP2: kill omap2_pmic_init
Last call of function was removed with commit
bfd46a ("ARM: OMAP: Fix i2c init for twl4030")

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:46:06 -07:00
Nicolae Rosia 873fe3f9ef ARM: OMAP3: kill omap3_pmic_init
Last user of this function was removed in commit
e92fc4 ("ARM: OMAP2+: Drop legacy board file for LDP") during
legacy board file removal.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:46:00 -07:00
Nicolae Rosia 482fde8c2d ARM: OMAP3: kill omap3_pmic_get_config and twl_{get,set}_voltage
Last user of these functions was removed in commit
e92fc4 ("ARM: OMAP2+: Drop legacy board file for LDP") during
legacy board file removal.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:45:54 -07:00
Nicolae Rosia c01cda4c35 ARM: OMAP4: kill omap4_pmic_init and omap4_pmic_get_config
Last user of these functions was deleted in commit
b42b91 ("ARM: OMAP2+: Remove board-omap4panda.c") during DT transition.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:45:49 -07:00
Laurent Pinchart 71b2e2e3b3 ARM: OMAP2+: Remove the omapdss_early_init_of() function
The function is empty, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-09 14:38:47 -07:00
Santosh Shilimkar 7abdb0e23e ARM: OMAP5: Add basic cpuidle MPU CSWR support
Add OMAP5 CPUIDLE support.

This patch adds MPUSS low power states in cpuidle.

        C1 - CPU0 WFI + CPU1 WFI + MPU ON
        C2 - CPU0 RET + CPU1 RET + MPU CSWR

Modified from TI kernel tree commit 605967fd2205 ("ARM: DRA7: PM:
cpuidle MPU CSWR support") except enable cpuidle for omap5 instead
of dra7.

According to Nishanth Menon <nm@ti.com>, cpuidle on dra7 is not
supported properly in the hardware so we don't want to enable it.
However, for omap5 this adds some nice power savings. Note that
the TI 3.8 based tree has other cpuidle states that we may be able
to enable later on.

On omap5-uevm, the power consumption eventually settles down to about
920mW with ehci-omap and ohci-omap3 unloaded compared to about 1.7W
without these patches. Note that it seems to take few minutes after
booting for the idle power to go down to 920mW from 1.3W, no idea so
far what might be causing that.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[ j-keerthy@ti.com rework on 3.14]
Signed-off-by: Keerthy <j-keerthy@ti.com>
[nm@ti.com: updates based on profiling]
[tony@atomide.com: dropped CPUIDLE_FLAG_TIME_VALID no longer used,
changed for omap5 only as requested by Nishanth, updated comments]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:52:14 -07:00
Tony Lindgren cbf2642872 ARM: OMAP4+: Fix bad fallthrough for cpuidle
We don't want to fall through to a bunch of errors for retention
if PM_OMAP4_CPU_OSWR_DISABLE is not configured for a SoC.

Fixes: 6099dd37c6 ("ARM: OMAP5 / DRA7: Enable CPU RET on suspend")
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:52:05 -07:00
Tony Lindgren 8a8be46afe ARM: OMAP5: Fix mpuss_early_init
We need to properly initialize mpuss also on omap5 like we do on omap4.
Otherwise we run into similar kexec problems like we had on omap4 when
trying to kexec from a kernel with PM initialized.

Fixes: 0573b957fc ("ARM: OMAP4+: Prevent CPU1 related hang with kexec")
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:51:58 -07:00
Tony Lindgren da6d5993bf ARM: OMAP5: Fix build for PM code
It's CONFIG_SOC_OMAP5, not CONFIG_ARCH_OMAP5. Looks like make randconfig
builds have not hit this one yet.

Fixes: b3bf289c1c ("ARM: OMAP2+: Fix build with CONFIG_SMP and CONFIG_PM
is not set")
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:50:10 -07:00
Nicolae Rosia 0ab11d8ea4 ARM: OMAP2+: avoid NULL pointer dereference
For OMAP4, volt_data is set in omap44xx_voltagedomains_init.
If the SoC is neither OMAP443X or OMAP446X, we end up with a
NULL in volt_data which causes a kernel oops.
This is the case when booting OMAP4470.

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:24:53 -07:00
Colin Ian King 4ae46efcff ARM: OMAP2+: PRM: initialize en_uart4_mask and grpsel_uart4_mask
In the case where has_uart4 is false, en_uart4_mask and grpsel_uart4_mask
are not initialized and so any garbage value is being logically or'd into
the write of PM_WKEN and OMAP3430_PM_MPUGRPSEL.  Fix this by initializing
these masks to zero.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:21:53 -07:00
Dave Gerlach 72bb40b8b7 ARM: AM43XX: Select OMAP_INTERCONNECT in Kconfig
AM437x makes use of the omap_l3_noc driver so explicitly select
OMAP_INTERCONNECT in the Kconfig for SOC_AM43XX to ensure it gets enabled
for AM43XX only builds.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 16:20:04 -07:00
Tony Lindgren 85566ca6b6 ARM: OMAP3: Fix formatting of features printed
With the printk cleanups merged into v4.9-rc1, we now get the omap
revision printed on multiple lines. Let's fix that and also remove the
extra empty space at the end of the features. And let's update things
to use scnprintf as suggested by Ivaylo Dimitrov
<ivo.g.dimitrov.75@gmail.com>.

Reported-by: Adam Ford <aford173@gmail.com>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-11-07 14:52:39 -07:00
Linus Torvalds a771151a83 ARM: SoC cleanups for v4.9
The cleanups for v4.9 are a little larger that usual, but thankfully
 that is almost exclusively due to removing a significant number of
 files that have become obsolete after the still ongoing conversion
 of old board files to devicetree.
 
 - for mach-omap2, which is still the largest platform in arch/arm/,
   the conversion to DT is finally complete after the Nokia N900 is
   now fully supported there, along with the omap3 LDP, and we can
   remove those two board files.
   If no regressions are found, another large cleanup for the platform
   will happen as a follow-up, removing dead code and restructuring
   the platform based on being DT-only.
 
 - In mach-imx, similar work is ongoing, but has not come that far.
   This time, we remove the obsolete board file for the i.MX1
   generation, which like i.MX25, i.MX5, i.MX6, and i.MX7 is now DT-only.
   The remaining board files are for i.MX2 and i.MX3 machines
   based on old ARM926 or ARM1136 cores that should work with DT
   in principle.
 
 - realview has just been converted from board files to DT, and a lot
   of code gets removed in the process. This is the last
   ARM/Keil/Versatile derived platform that was still using board
   files, the other ones being integrator, versatile and vexpress.
   We can probably merge the remaining code into a single directory
   in the near future.
 
 - clps711x had completed the conversion in v4.8, but we accidentally
   left the files in place that should have been deleted then.
 
 Conflicts: two files deleted here have been modified upstream,
 the changes can be discarded.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAV/guBGCrR//JCVInAQJoaQ/+N42zjmqDg6zO2JSs3q793AHskllT7kJo
 2G36Afl3hOZqy2TFF8nq5Iv8/hb45+3bHBIlq+JrOq5Fep3wFVfT0d1HMQ8UG6+K
 jSMikItIZkOJdmjuZLEBzhjUFIEIpIrSuSY1Pej5Sy8zDzxT+n68gVqcm/qxa2w6
 gPThdL69/XDo7JkF9TbYn0nrECey3ps9XnikNITWyQTrvCmlDVtGp6B+Cwi4cyvh
 FfJ690GAJU3/9op+xLomtEt1sli/+xJUdpH0IktfuNrc/2i96NsiUgPbqprIP6C6
 rGRN40tDClYa1viRexZlZdkCd7nH9PC+VCC59FONYiY8WmpwtNPVZ8px4D/rv7AX
 GHDnqeVbzUK/CMxRsQC0bnvQnD/oDqkSkDD7ixzfUh2TQiJASXvuj1vOej5k06Vc
 KFkpjh1dSZkehkUp106F2Obm8Sh7nNoG2olzrlzlza97OuYxAEBungIn95vjYbUj
 IRrTQdKgv3gVVGXzHjH7TMr46MZLk6K4mHjDeuQr/NN8JyPH0uLTy6pjsdXRWCvO
 sIWVhyMohKMU2q5NeBWmY0OtDje93JchRVeKfRaQ3+YysPMUTBK5ZtI5GB9tsM14
 7/GA7MO4FA0MZWW2E/GllQzgreaokUzTxBbhANzcEyjGh9OEx4gYaSF68PRy/HBa
 TlhH1PR3PNg=
 =WaLy
 -----END PGP SIGNATURE-----

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

Pull ARM SoC cleanups from Arnd Bergmann:
 "The cleanups for v4.9 are a little larger that usual, but thankfully
  that is almost exclusively due to removing a significant number of
  files that have become obsolete after the still ongoing conversion of
  old board files to devicetree.

   - for mach-omap2, which is still the largest platform in arch/arm/,
     the conversion to DT is finally complete after the Nokia N900 is
     now fully supported there, along with the omap3 LDP, and we can
     remove those two board files. If no regressions are found, another
     large cleanup for the platform will happen as a follow-up, removing
     dead code and restructuring the platform based on being DT-only.

   - In mach-imx, similar work is ongoing, but has not come that far.
     This time, we remove the obsolete board file for the i.MX1
     generation, which like i.MX25, i.MX5, i.MX6, and i.MX7 is now
     DT-only. The remaining board files are for i.MX2 and i.MX3 machines
     based on old ARM926 or ARM1136 cores that should work with DT in
     principle.

   - realview has just been converted from board files to DT, and a lot
     of code gets removed in the process. This is the last
     ARM/Keil/Versatile derived platform that was still using board
     files, the other ones being integrator, versatile and vexpress. We
     can probably merge the remaining code into a single directory in
     the near future.

   - clps711x had completed the conversion in v4.8, but we accidentally
     left the files in place that should have been deleted then"

* tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
  ARM: select PCI_DOMAINS config from ARCH_MULTIPLATFORM
  ARM: stop *MIGHT_HAVE_PCI* config from being selected redundantly
  ARM: imx: (trivial) fix typo and grammar
  ARM: clps711x: remove extraneous files
  ARM: imx: use IS_ENABLED() instead of checking for built-in or module
  ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module
  ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module
  ARM: imx: remove platform-mxc_rnga
  ARM: realview: imply device tree boot
  ARM: realview: no need to select SMP_ON_UP explicitly
  ARM: realview: delete the RealView board files
  ARM: imx: no need to select SMP_ON_UP explicitly
  ARM: i.MX: Move SOC_IMX1 into 'Device tree only'
  ARM: i.MX: Remove i.MX1 non-DT support
  ARM: i.MX: Remove i.MX1 Synertronixx SCB9328 board support
  ARM: i.MX: Remove i.MX1 Armadeus APF9328 board support
  ARM: mxs: remove obsolete startup code for TX28
  ARM: i.MX31 iomux: remove duplicates with alternate name
  ARM: i.MX31 iomux: remove plain duplicates
  ARM: OMAP2+: Drop legacy board file for LDP
  ...
2016-10-07 21:16:16 -07:00
Linus Torvalds 6a497e9d58 This is the bulk of GPIO changes for the v4.9 series:
Subsystem improvements:
 
 - Do away with the last users of the obsolete Kconfig options
   ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB (the latter
   always sounded like an item on a wishlist to Santa Claus to
   me). We can now select GPIOLIB and be done with it, for all
   archs. After some struggle it even work on UM. Not that it has
   GPIO, but if it wants to, it can select the library.
 
 - Continued efforts to make drivers properly either tristate or
   bool.
 
 - Introduce a warning for drivers assigning default triggers to
   their irqchip lines when probed from device tree, so we find and
   fix these ambigous drivers. It is agreed that in the OF config
   path, the device tree defines trigger characteristics.
 
 - The same warning, mutatis mutandis, for ACPI-probed GPIO
   irqchips.
 
 - We introduce the ability to mark certain IRQ lines as "unusable"
   as they can be taken by BIOS/firmware, unrouted in silicon and
   generally nasty if you use them, and such things. This is
   put to good use in the STMPE driver and also in the Cherryview
   pin control driver.
 
 - A new "mockup" virtual GPIO device that can be used for testing.
   The plan is to add unit tests under tools/* for exercising this
   device and verify that the kernel code paths are working as they
   should.
 
 - Make memory-mapped I/O-drivers depend on HAS_IOMEM. This was
   implicit all the time, but when people started building UM
   with allyesconfig or allmodconfig it exploded in their face.
 
 - Move some stray bits of device tree and ACPI HW description
   callbacks down into their respective implementation silo. These
   were causing issues when compiling on !HAS_IOMEM as well, so
   now eventually UM compiles the GPIOLIB library if it wants to.
 
 New drivers:
 
 - New driver for the Aspeed GPIO front-end companion to the
   pin controller merged through the pin control tree.
 
 - New driver for the LP873x PMIC GPIO portions.
 
 - New driver for Technologic Systems' I2C FPGA GPIO such as
   TS4900, TS-7970, TS-7990 and TS-4100.
 
 - New driver for the Broadcom BCM63xx series including BCM6338
   and BCM6345.
 
 - New driver for the Intel WhiskeyCove PMIC GPIO.
 
 - New driver for the Allwinner AXP209 PMIC GPIO portions.
 
 - New driver for Diamond Systems 48 line GPIO-MM, another of
   these port-mapped I/O expansion cards.
 
 - Support the STMicroelectronics STMPE1600 variant in the STMPE
   driver.
 
 Driver improvements:
 
 - The STMPE driver now supports rising/falling edge detection
   properly for IRQs.
 
 - The PCA954x will now fetch and enable its VCC regulator properly.
 
 - Major rework of the PCA953x driver with the goal of eventually
   switching it over to use regmap and thus modernize it even more.
 
 - Switch the IOP driver to use the generic MMIO GPIO library.
 
 - Move the ages old HTC EGPIO (extended GPIO) GPIO expander driver
   over to this subsystem from MFD, achieveing some separation of
   concerns.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJX9OvDAAoJEEEQszewGV1zsPQP/3VLy1fNIpMF0DDyq5tA/GNv
 sinnaPgMtt+qBrM2sbJcTVwV9xtHrs12CC3+2lAhBCIEm4YfHbXvaUMNE+aKJzk4
 ZM7/rb8WMUxjQqzDKStdETsQGo6fxh0qU81OEQNbX9alir20jik9DvTufcs6xCgx
 sqh8KsNGO4Y6tiuKZ6mTZvIjVhMwiTm0NBSDKhdim0DdsOcuxyh6xVOj/0LB2Ei6
 g75X1w++wjh0ryY3bzaeWkQSlXDC6eEKeez7VaEkSUyrxH86buomy0+aP0fqs7vY
 LRZzn/TC97YLT6hslS/OhB7uXrDIY2POSwO/SvusJcveGP7WPGyGr5mDtA4ATRWI
 ios0DBWl629kHfhAMzg3kPJS8LfjCerapvtbdAgqvhH+Vb5IPFx45vypDkR2WtJ7
 bNAySIRMQSHZvJSCvYzjqh8AbWdE4i4k70tFXRMOpWeKIvRVI1cDvLD6cLn3hATM
 IPTytM6i2xqnzcq7mK7EJ18afcR0mv1jHgGAv4M0RMkyJ2IrURvFyZIvUB2MTyuL
 PEBh1ZvTs+MO50eeFwzltY91eagkzgWB0f6sm3l7I7bL2oxE2f/WVcVL9jWbgwpF
 otjFO27u0/6rIulfLUQzDo3gbOq7UaN0VTW4E9CYbOtFtNzCxjFIKTv0IJhTu4TT
 OSur7oFpzAMOGYlpYP8j
 =ABbi
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO updates from Linus Walleij:
 "This is the bulk of GPIO changes for the v4.9 series:

  Subsystem improvements:

   - do away with the last users of the obsolete Kconfig options
     ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB (the latter
     always sounded like an item on a wishlist to Santa Claus to me). We
     can now select GPIOLIB and be done with it, for all archs. After
     some struggle it even work on UM. Not that it has GPIO, but if it
     wants to, it can select the library.

   - continued efforts to make drivers properly either tristate or bool.

   - introduce a warning for drivers assigning default triggers to their
     irqchip lines when probed from device tree, so we find and fix
     these ambigous drivers. It is agreed that in the OF config path,
     the device tree defines trigger characteristics.

   - the same warning, mutatis mutandis, for ACPI-probed GPIO irqchips.

   - we introduce the ability to mark certain IRQ lines as "unusable" as
     they can be taken by BIOS/firmware, unrouted in silicon and
     generally nasty if you use them, and such things. This is put to
     good use in the STMPE driver and also in the Cherryview pin control
     driver.

   - a new "mockup" virtual GPIO device that can be used for testing.
     The plan is to add unit tests under tools/* for exercising this
     device and verify that the kernel code paths are working as they
     should.

   - make memory-mapped I/O-drivers depend on HAS_IOMEM. This was
     implicit all the time, but when people started building UM with
     allyesconfig or allmodconfig it exploded in their face.

   - move some stray bits of device tree and ACPI HW description
     callbacks down into their respective implementation silo. These
     were causing issues when compiling on !HAS_IOMEM as well, so now
     eventually UM compiles the GPIOLIB library if it wants to.

  New drivers:

   - new driver for the Aspeed GPIO front-end companion to the pin
     controller merged through the pin control tree.

   - new driver for the LP873x PMIC GPIO portions.

   - new driver for Technologic Systems' I2C FPGA GPIO such as TS4900,
     TS-7970, TS-7990 and TS-4100.

   - new driver for the Broadcom BCM63xx series including BCM6338 and
     BCM6345.

   - new driver for the Intel WhiskeyCove PMIC GPIO.

   - new driver for the Allwinner AXP209 PMIC GPIO portions.

   - new driver for Diamond Systems 48 line GPIO-MM, another of these
     port-mapped I/O expansion cards.

   - support the STMicroelectronics STMPE1600 variant in the STMPE
     driver.

  Driver improvements:

   - the STMPE driver now supports rising/falling edge detection
     properly for IRQs.

   - the PCA954x will now fetch and enable its VCC regulator properly.

   - major rework of the PCA953x driver with the goal of eventually
     switching it over to use regmap and thus modernize it even more.

   - switch the IOP driver to use the generic MMIO GPIO library.

   - move the ages old HTC EGPIO (extended GPIO) GPIO expander driver
     over to this subsystem from MFD, achieveing some separation of
     concerns"

* tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (81 commits)
  gpio: add missing static inline
  gpio: OF: localize some gpiochip init functions
  gpio: acpi: separation of concerns
  gpio: OF: separation of concerns
  gpio: make memory-mapped drivers depend on HAS_IOMEM
  gpio: stmpe: use BIT() macro
  gpio: stmpe: forbid unused lines to be mapped as IRQs
  mfd/gpio: Move HTC GPIO driver to GPIO subsystem
  gpio: MAINTAINERS: Add an entry for GPIO mockup driver
  gpio/mockup: add virtual gpio device
  gpio: Added zynq specific check for special pins on bank zero
  gpio: axp209: Implement get_direction
  gpio: aspeed: remove redundant return value check
  gpio: loongson1: remove redundant return value check
  ARM: omap2: fix missing include
  gpio: tc3589x: fix up complaints on unsigned
  gpio: tc3589x: add .get_direction() and small cleanup
  gpio: f7188x: use gpiochip_get_data instead of container_of
  gpio: tps65218: use devm_gpiochip_add_data() for gpio registration
  gpio: aspeed: fix return value check in aspeed_gpio_probe()
  ...
2016-10-05 11:49:09 -07:00
Linus Torvalds 597f03f9d1 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull CPU hotplug updates from Thomas Gleixner:
 "Yet another batch of cpu hotplug core updates and conversions:

   - Provide core infrastructure for multi instance drivers so the
     drivers do not have to keep custom lists.

   - Convert custom lists to the new infrastructure. The block-mq custom
     list conversion comes through the block tree and makes the diffstat
     tip over to more lines removed than added.

   - Handle unbalanced hotplug enable/disable calls more gracefully.

   - Remove the obsolete CPU_STARTING/DYING notifier support.

   - Convert another batch of notifier users.

   The relayfs changes which conflicted with the conversion have been
   shipped to me by Andrew.

   The remaining lot is targeted for 4.10 so that we finally can remove
   the rest of the notifiers"

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
  cpufreq: Fix up conversion to hotplug state machine
  blk/mq: Reserve hotplug states for block multiqueue
  x86/apic/uv: Convert to hotplug state machine
  s390/mm/pfault: Convert to hotplug state machine
  mips/loongson/smp: Convert to hotplug state machine
  mips/octeon/smp: Convert to hotplug state machine
  fault-injection/cpu: Convert to hotplug state machine
  padata: Convert to hotplug state machine
  cpufreq: Convert to hotplug state machine
  ACPI/processor: Convert to hotplug state machine
  virtio scsi: Convert to hotplug state machine
  oprofile/timer: Convert to hotplug state machine
  block/softirq: Convert to hotplug state machine
  lib/irq_poll: Convert to hotplug state machine
  x86/microcode: Convert to hotplug state machine
  sh/SH-X3 SMP: Convert to hotplug state machine
  ia64/mca: Convert to hotplug state machine
  ARM/OMAP/wakeupgen: Convert to hotplug state machine
  ARM/shmobile: Convert to hotplug state machine
  arm64/FP/SIMD: Convert to hotplug state machine
  ...
2016-10-03 19:43:08 -07:00
Linus Walleij 9132ce450b ARM: omap2: fix missing include
commit d47529b2e9
"gpio: don't include module.h in shared driver header"
removed <linux/module.h> from the <linux/gpio/driver.h> header.

It seems arch/arm/mach-omap2/board-rx51-peripherals.c
is using __initdata_or_module from <linux/module.h> through
<linux/gpio.h> to <linux/gpio/driver.h>, so break this dependency
so that we get a clean compile.

Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Tony Lindgren <tony@atomide.com>
Fixes: d47529b2e9 ("gpio: don't include module.h in shared driver header")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-23 14:41:55 +02:00
Sebastian Andrzej Siewior a4fa9cc220 ARM/OMAP/wakeupgen: Convert to hotplug state machine
Install the callbacks via the state machine.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: rt@linutronix.de
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20160906170457.32393-4-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-09-19 21:44:26 +02:00
Arnd Bergmann 260caadebd Two patches from Javier Martinez Canillas <javier@osg.samsung.com>
to update mach-omap1 and mach-oamp2 to use IS_ENABLED macro.
 -----BEGIN PGP SIGNATURE-----
 
 iQIuBAABCAAYBQJXyEdIERx0b255QGF0b21pZGUuY29tAAoJEBvUPslcq6VzR9YQ
 AMWWk7FwLXjhtBFQu3A7q4y2NHANyFTpW4qPWxpQ+mse3SQBPoB3UXF5DA99s55a
 /OdyVzccodTKX27Nwz8ccChPgUMLTY4kYALFmvmBkO7nP+SyH+vhw45WV5GLTO6O
 6gdQMoiw2COQBH3yFXzcSfgb7Skm7Y7C8cpButfPrudaPz8TDglrm/mi9vSZ/Q0N
 ys9QD9L200312snFOq3Woypc+G+fm8Y31qgXU1lK+0e+dnTlt1f5f+A+FGWMHMm/
 9S0b1O9CQqSB0aZ3G3wp1GqI8o6fTw2Ju63y6nDOJTmgOqP8TlUm/kMkr68F3YvU
 qikmNXNbfcCi1KmkE+jXjzaEy3QGvvqCSHEjKB67bzcic/jT0S16nxbZmQDq0/8o
 8yXfVMXKFk1pblIWQKRl7DXdFqFOBdorzmwlc4o9b4hxQ7+OFBnl1xV5VyGznKeG
 oTCugOuT0SorIwDoL7CpA+ib+1UtKdA/kvjhMu+kAhOmzT2iu/2nHgPbS1hn0YeT
 jFe7CJKgwFImhKEkMgEuh1KVntmjPMLtmBCZCUwtsJs7tkJ/b21XFv9fPcEnxvV0
 mHz0lEYVS/KdrpvJN0iKb4Um5h5aqnBOyAzMr+cJI3NQ2VZ60TP7bPU5BSi3c4TN
 qJK42hR2+JbuxSJ5dgwaqH5Jlhg6D7eQ5OkDmKyMMfn5
 =0xjC
 -----END PGP SIGNATURE-----

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

Merge "omap soc updates for v4.9 merge window" from Tony Lindgren:

Two patches from Javier Martinez Canillas <javier@osg.samsung.com>
to update mach-omap1 and mach-oamp2 to use IS_ENABLED macro.

* tag 'omap-for-v4.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module
  ARM: OMAP1: use IS_ENABLED() instead of checking for built-in or module
2016-09-02 18:33:47 +02:00
Arnd Bergmann 55d421b40c Remove the last two legacy board-*.c files for omap3 for legacy
booting for v4.8 to allow making mach-omap2 device tree only for
 v4.9.
 
 We've had Nokia N900 and omap3 LDP board-*.c files remaining
 while other omap3 devices have been device tree only for quite
 a while now. Also N900 and LDP have had device tree based booting
 working for years now, but few drivers for N900 were still only
 working in legacy only mode until recently. With the remaining
 issues out of the way, we discussed on the mailing lists that
 we're finally OK to remove the remaining board-*.c files.
 
 For the timing of this pull request, I wanted to wait until
 v4.8-rc1 is out to make sure the legacy booting still works fine
 after the merge window before doing it.
 
 And for v4.8, let's not touch any other platform data in case we
 still need to revert for some reason. This makes the revert just a
 question of adding back the legacy board-*.c files.
 
 Then if no issues, we can remove the unused remaining platform
 data later on for v4.9.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXsd9VAAoJEBvUPslcq6Vzz1wP/ipVqQsy18LkijLY/LtcNKc1
 b+efBX19u33cdbHjniLU2yrH+pIiG0d1Nxp8bxcl5DseiucFe9nZrgn0fCI/JuSj
 mjxvU9c2ytwk7Y+mFdf37gnIZASwcw5pBa4Mc9KzJMCfcMqdgtLWzTDpf+DtPZTf
 TTiz/7GUN+XKHvYlIX1tisycQ55XsW8OHlES6EeCPQP+etoGo4bSbcQ17dftYyh+
 vUICWqy2J1WFKOQKpIGiFaBU30wRSHS7ywx248zBHjW+21J+zn+hezbiXPrLS9JG
 VON4Hm/xGXjxBDzp2tkzleYEDWJZdH98x3fYlufaT7JSiY1DQpzQAtndjZnKZlRB
 +ILgv0tm5nqdcq6guucAzCbdQxBDgbzTGkviRSwixzq2R7qAyqY+Yk80bwXboy3v
 Yohbg4MjvUw3Q9A/qV3kh+kkE0tjIR80kv8Z1nsQKX545ZqySV4BEFZdfQPv3WPr
 9yzZkvKxcTieedVUQe+64n9rbde8dTDVSaELZF/niHEsHXa1nZrOkP11IcmVUs3h
 niPp4stJpwGQJDl81QsSpa/2LNeKwSPpuMl9pR6kVE+FX7iUBpGlddkSe8AoB2Xi
 quiTdbIOd7xFdYlntTYjnXsWSeg4TuzAaofBGBfBpSQpHsoV7GDQ/nU6kOa/jsc3
 73byNS3m5MDFaX7OnDEP
 =AUHa
 -----END PGP SIGNATURE-----

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

Merge "drop last omap3 board files for v4.8" from Tony Lindgren:

Remove the last two legacy board-*.c files for omap3 for legacy
booting for v4.8 to allow making mach-omap2 device tree only for
v4.9.

We've had Nokia N900 and omap3 LDP board-*.c files remaining
while other omap3 devices have been device tree only for quite
a while now. Also N900 and LDP have had device tree based booting
working for years now, but few drivers for N900 were still only
working in legacy only mode until recently. With the remaining
issues out of the way, we discussed on the mailing lists that
we're finally OK to remove the remaining board-*.c files.

For the timing of this pull request, I wanted to wait until
v4.8-rc1 is out to make sure the legacy booting still works fine
after the merge window before doing it.

And for v4.8, let's not touch any other platform data in case we
still need to revert for some reason. This makes the revert just a
question of adding back the legacy board-*.c files.

Then if no issues, we can remove the unused remaining platform
data later on for v4.9.

* tag 'omap-for-v4.8/legacy-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Drop legacy board file for LDP
  ARM: OMAP2+: Drop legacy board file for n900
2016-09-02 18:30:29 +02:00
Javier Martinez Canillas 502ad2a669 ARM: OMAP2+: use IS_ENABLED() instead of checking for built-in or module
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-08-26 08:42:35 -07:00
Tony Lindgren 5f3530a041 Merge branch 'omap-for-v4.8/soc' into omap-for-v4.8/fixes 2016-08-15 08:29:44 -07:00
Linus Torvalds f0936155f2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Fix several cases of missing of_node_put() calls in various
    networking drivers.  From Peter Chen.

 2) Don't try to remove unconfigured VLANs in qed driver, from Yuval
    Mintz.

 3) Unbalanced locking in TIPC error handling, from Wei Yongjun.

 4) Fix lockups in CPDMA driver, from Grygorii Strashko.

 5) More MACSEC refcount et al fixes, from Sabrina Dubroca.

 6) Fix MAC address setting in r8169 during runtime suspend, from
    Chun-Hao Lin.

 7) Various printf format specifier fixes, from Heinrich Schuchardt.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
  qed: Fail driver load in 100g MSI mode.
  ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle
  ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle
  ethernet: stmicro: stmmac: dwmac-socfpga: add missing of_node_put after calling of_parse_phandle
  ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle
  ethernet: renesas: ravb_main: add missing of_node_put after calling of_parse_phandle
  ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle
  ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle
  ethernet: marvell: mvneta: add missing of_node_put after calling of_parse_phandle
  ethernet: hisilicon: hns: hns_dsaf_main: add missing of_node_put after calling of_parse_phandle
  ethernet: hisilicon: hns: hns_dsaf_mac: add missing of_node_put after calling of_parse_phandle
  ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle
  ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle
  ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle
  ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle
  ethernet: altera: add missing of_node_put
  8139too: fix system hang when there is a tx timeout event.
  qed: Fix error return code in qed_resc_alloc()
  net: qlcnic: avoid superfluous assignement
  dsa: b53: remove redundant if
  ...
2016-08-03 07:26:11 -04:00
Linus Torvalds 43a0a98aa8 ARM: SoC driver updates for v4.8
Driver updates for ARM SoCs.
 
 A slew of changes this release cycle. The reset driver tree, that we merge
 through arm-soc for historical reasons, is also sizable this time around.
 
 Among the changes:
 
  - clps711x: Treewide changes to compatible strings, merged here for simplicity.
  - Qualcomm: SCM firmware driver cleanups, move to platform driver
  - ux500: Major cleanups, removal of old mach-specific infrastructure.
  - Atmel external bus memory driver
  - Move of brcmstb platform to the rest of bcm
  - PMC driver updates for tegra, various fixes and improvements
  - Samsung platform driver updates to support 64-bit Exynos platforms
  - Reset controller cleanups moving to devm_reset_controller_register() APIs
  - Reset controller driver for Amlogic Meson
  - Reset controller driver for Hisilicon hi6220
  - ARM SCPI power domain support
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXnm1XAAoJEIwa5zzehBx35lcP/ApuQarIXeZCQZtjlUBV9McW
 o3o7FhKFHePmEPeoYCvVeK5D8NykTkQv3WpnCknoxPJzxGJF7jbPWQJcVnXfKOXD
 kTcyIK15WL2HHtSE3lYyLfyUPz8AbJyRt0l0cxgcg6jvo+uzlWooNz1y78rLIYzg
 UwRssj7OiHv4dsyYRHZIsjnB8gMWw8rYMk154gP2xy6MnNXXzzOVVnOiVqxSZBm+
 EgIIcROMOqkkHuFlClMYKluIgrmgz1Ypjf+FuAg7dqXZd+TGRrmGXeI7SkGThfLu
 nyvY3N18NViNu7xOUkI9zg7+ifyYM8Si9ylalSICSJdIAxZfiwFqFaLJvVWKU1rY
 rBOBjKckQI0/X9WYusFNFHcijhIFV8/FgGAnVRRMPdvlCss7Zp03C9mR4AEhmKMX
 rLG49x81hU1C+LftC59ml3iB8dhZrrRkbxNHjLFHVGWNrKMrmJKa8JhXGRAoNM+u
 LRauiuJZatqvLfISNvpfcoW2EashVoU3f+uC8ymT3QCyME3wZm0t7T4tllxhMfBl
 sOgJqNkTKDmPLofwm/dASiLML7ZF1WePScrFyOACnj9K4mUD+OaCnowtWoQPu0eI
 aNmT84oosJ2S9F/iUDPtFHXdzQ+1QPPfSiQ9FXMoauciVq/2F+pqq68yYgqoxFOG
 vmkmG2YM4Wyq43u0BONR
 =O8+y
 -----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 Olof Johansson:
 "Driver updates for ARM SoCs.

  A slew of changes this release cycle.  The reset driver tree, that we
  merge through arm-soc for historical reasons, is also sizable this
  time around.

  Among the changes:

   - clps711x: Treewide changes to compatible strings, merged here for simplicity.
   - Qualcomm: SCM firmware driver cleanups, move to platform driver
   - ux500: Major cleanups, removal of old mach-specific infrastructure.
   - Atmel external bus memory driver
   - Move of brcmstb platform to the rest of bcm
   - PMC driver updates for tegra, various fixes and improvements
   - Samsung platform driver updates to support 64-bit Exynos platforms
   - Reset controller cleanups moving to devm_reset_controller_register() APIs
   - Reset controller driver for Amlogic Meson
   - Reset controller driver for Hisilicon hi6220
   - ARM SCPI power domain support"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (100 commits)
  ARM: ux500: consolidate base platform files
  ARM: ux500: move soc_id driver to drivers/soc
  ARM: ux500: call ux500_setup_id later
  ARM: ux500: consolidate soc_device code in id.c
  ARM: ux500: remove cpu_is_u* helpers
  ARM: ux500: use CLK_OF_DECLARE()
  ARM: ux500: move l2x0 init to .init_irq
  mfd: db8500 stop passing around platform data
  ASoC: ab8500-codec: remove platform data based probe
  ARM: ux500: move ab8500_regulator_plat_data into driver
  ARM: ux500: remove unused regulator data
  soc: raspberrypi-power: add CONFIG_OF dependency
  firmware: scpi: add CONFIG_OF dependency
  video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip
  input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip
  pwm: clps711x: Changing the compatibility string to match with the smallest supported chip
  serial: clps711x: Changing the compatibility string to match with the smallest supported chip
  irqchip: clps711x: Changing the compatibility string to match with the smallest supported chip
  clocksource: clps711x: Changing the compatibility string to match with the smallest supported chip
  clk: clps711x: Changing the compatibility string to match with the smallest supported chip
  ...
2016-08-01 18:36:01 -04:00
Linus Torvalds fbae5cbb43 ARM: SoC platform updates for v4.8
Improved and new platform support for various SoCs:
 
  - New SoC support:
    - Broadcom BCM23550
    - Freescale i.MX7Solo
    - Qualcomm MDM9615
    - Renesas r8a7792
  - Conversion of clps711x to multiplatform
  - debug uart improvements for Atmel platforms
  - Tango platform improvements: HOTPLUG_CPU, Suspend-to-ram
  - OMAP tweaks and improvements to hwmod
  - OMAP support for kexec on SMP
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXnaibAAoJEIwa5zzehBx3h6AP/0TBATiDuYXTcX3V8zZ/ia9y
 7dWbP7gVX7DN39b5qdjLTa+DUx3Y3msxW9qsuUQR8RWijbqjCH7b/fyPwGA0fmpP
 3uZpFpyzs+6/3TiMDN1yw1T+/2YbVyM+4rOeNsCwncdXjGSx0FaMJAqLBrppiWLH
 1S9HhD/314znibl8skOy8QIDWwlW011sS2mNUIN+JelvnS/VDjtCDfpphpNrAQF9
 MZB6LhT9itvf6mIEGIsaDq/Ii7fgIAnA9WCtwv9tJkAZHzbS0cWkiJzb7hF1GzFO
 Q5HBAyzn+CkeTQ3+9NQU0G0vhfa3Ea0g1gfw6qRmAw+z8Qdiamjh8SSve6zm1fE8
 GmIewsMAWWIUYykEIi9hbWCTYq06Pw/Nn6KWRAuQ/lpt++jzMQ82qk6cxELLW15e
 uAC1JjFOCIFNBZhkrdQDU0qx6Ew/AUH4wCYqu4Xh7pW0MHu0V9NgsmooeoTmCkpd
 WtgKp8Wh5dsK3SdsbTjdR/IeHSQkeSdgNY/6TBTjpRwCIlEMwHlKbvwvRExk1xzi
 nLQJsR49MsjeSdPflzO6WUzOjJhQfuw2jCtAQjlom15EgkEZ569MT4RsAQIgvNCI
 PeUWkvIW1uCtW7Y6ADPRBKMIrajPs8YW4E/xTItuhrqLHp8z6efvRmVNdpzqBTVj
 tT2t2bRXF0cGiUvOeU7U
 =Kh9P
 -----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 Olof Johansson:
 "Improved and new platform support for various SoCs:

  New SoC support:
   - Broadcom BCM23550
   - Freescale i.MX7Solo
   - Qualcomm MDM9615
   - Renesas r8a7792

  Improvements:
   - convert clps711x to multiplatform
   - debug uart improvements for Atmel platforms
   - Tango platform improvements: HOTPLUG_CPU, Suspend-to-ram
   - OMAP tweaks and improvements to hwmod
   - OMAP support for kexec on SMP"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (109 commits)
  ARM: davinci: fix build break because of undeclared dm365_evm_snd_data
  ARM: s3c64xx: smartq: Avoid sparse warnings
  ARM: sti: Implement dummy L2 cache's write_sec
  ARM: STi: Update machine _namestr to be more generic.
  arm: meson: explicitly select clk drivers
  ARM: tango: add Suspend-to-RAM support
  ARM: hisi: consolidate the hisilicon machine entries
  ARM: tango: fix CONFIG_HOTPLUG_CPU=n build
  MAINTAINERS: Update BCM281XX/BCM11XXX/BCM216XX entry
  MAINTAINERS: Update BCM63XX entry
  MAINTAINERS: Add NS2 entry
  MAINTAINERS: Fix nsp false-positives
  MAINTAINERS: Change L to M for Broadcom ARM/ARM64 SoC entries
  ARM: debug: Enable DEBUG_BCM_5301X for Northstar Plus SoCs
  ARM: clps711x: Switch to MULTIPLATFORM
  ARM: clps711x: Remove boards support
  ARM: clps711x: Add basic DT support
  ARM: clps711x: Reduce static map size
  ARM: SAMSUNG: Constify iomem address passed to s5p_init_cpu
  ARM: oxnas: Change OX810SE default driver config
  ...
2016-08-01 18:27:08 -04:00
Linus Torvalds 6f888fe31d ARM: SoC cleanups for v4.8
The cleanup branch keeps going down in size as we've completed a lot of
 the major legacy platform removals and conversions.
 
 A handful of changes this time around, some of the themes or larger sets are:
 
  - A bunch of i.MX cleanups around platform detection, init call cleanups
  - Misc fixes of missing/implicit includes
  - Removal of ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXnnwFAAoJEIwa5zzehBx3zXQP/2a/+XkiseeGkEoiX/6FOfhH
 XTzipye0OYdEe3kVWFL1sVVXRH6a5sbDJRNtfsQc+KdSG5i7LMHWARRJmIx9CTMB
 oQ9pEbYKSyBQDHBSOZYT6W+qYOI2SdTYqesjd3yn+FY4SIFBpQ/V3axHnMICIRm9
 PmHF1QUQEdtQ2Y9+E1vA1mHcPN9enjlesD3VdRbxVPX/PZw63kx9y8ICVq5I/PX9
 DfJRcA+PKIYQghhEZ0cx2bEoKozv7W088C7DD1Umw1NN18pMuvvNQGhid80xUqKY
 4bmLSGWqwmSzv1WZ/u1pUnBGGQE9YY1U2b8kZy8hSVg9rupxS8Ang0ztZRRE6nk2
 4t8GmWuLDH+7PxFv/skzi1AMAx+4KxSfp3N5qyKr8ddmnYrFWmBPj2AeBqrlziw6
 8Z41LQULmf/Gs6McikGUP7ryqd15gNtTJO1wlavqFrPe0fyzcHsgqpIy3YCqZiSE
 wQ4Hc036xqGknmg6GjHWp+W1rHZVGsnXmvnp1IVRoAGqwBqxNi4ItIXE7an8144H
 NnWFmPRSsGg26MfEJVsbtPQWNtEGqM2lgr6zn9xirC0cVbQ4ZDtWp2q0bJ1v/cLQ
 sW6Gu6jgVN8YUPp56lBaXJ5RxHE9V1Sqi4/+KghBKWW0X/BIo99b6PVr2bJRrkaq
 ZvpvsgzbCHdGqTptF9Dw
 =SfR/
 -----END PGP SIGNATURE-----

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

Pull ARM SoC cleanups from Olof Johansson:
 "The cleanup branch keeps going down in size as we've completed a lot
  of the major legacy platform removals and conversions.

  A handful of changes this time around, some of the themes or larger
  sets are:

   - A bunch of i.MX cleanups around platform detection, init call cleanups
   - Misc fixes of missing/implicit includes
   - Removal of ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB"

* tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits)
  ARM: mps2: fix typo
  ARM: s3c64xx: avoid warning about 'struct device_node'
  bus: mvebu-mbus: make mvebu_mbus_syscore_ops static
  bus: mvebu-mbus: fix __iomem on register pointers
  ARM: tegra: Remove board_init_funcs array
  ARM: iop: Fix indentation
  ARM: imx: remove cpu_is_mx*()
  ARM: imx: remove last call to cpu_is_mx5*
  ARM: imx: rework mx27_pm_init() call
  ARM: imx: deconstruct mx3_idle
  ARM: imx: deconstruct mxc_rnga initialization
  ARM: imx: remove cpu_is_mx1 check
  ARM: i.MX: Do not explicitly call l2x0_of_init()
  ARM: i.MX: system.c: Tweak prefetch settings for performance
  ARM: i.MX: system.c: Replace magic numbers
  ARM: i.MX: system.c: Remove redundant errata 752271 code
  ARM: i.MX: system.c: Convert goto to if statement
  ARM: Kirkwood: fix kirkwood_pm_init() declaration/type
  ARM: Kirkwood: make kirkwood_disable_mbus_error_propagation() static
  ARM: orion5x: make orion5x_legacy_handle_irq static
  ...
2016-08-01 18:21:13 -04:00
Grygorii Strashko 213fa10db2 ARM: OMAP2+: omap_device: fix crash on omap_device removal
Below call chain causes system crash when OMAP device is
removed by calling of_platform_depopulate()/device_del():

device_del()
- blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
 			     BUS_NOTIFY_DEL_DEVICE, dev);
  - _omap_device_notifier_call()
    - omap_device_delete()
      - od->pdev->archdata.od = NULL;
	kfree(od->hwmods);
	kfree(od);
  - bus_remove_device()
    - device_release_driver()
      - __device_release_driver()
	- pm_runtime_get_sync()
	   - _od_runtime_resume()
	     - omap_hwmod_enable() <- OOPS od's delted already

Backtrace:
Unable to handle kernel NULL pointer dereference at virtual address 0000000d
pgd = eb100000
[0000000d] *pgd=ad6e1831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
CPU: 1 PID: 1273 Comm: modprobe Not tainted 4.4.15-rt19-00115-ge4d3cd3-dirty #68
Hardware name: Generic DRA74X (Flattened Device Tree)
task: eb1ee800 ti: ec962000 task.ti: ec962000
PC is at omap_device_enable+0x10/0x90
LR is at _od_runtime_resume+0x10/0x24
[...]
[<c00299dc>] (omap_device_enable) from [<c0029a6c>] (_od_runtime_resume+0x10/0x24)
[<c0029a6c>] (_od_runtime_resume) from [<c04ad404>] (__rpm_callback+0x20/0x34)
[<c04ad404>] (__rpm_callback) from [<c04ad438>] (rpm_callback+0x20/0x80)
[<c04ad438>] (rpm_callback) from [<c04aee28>] (rpm_resume+0x48c/0x964)
[<c04aee28>] (rpm_resume) from [<c04af360>] (__pm_runtime_resume+0x60/0x88)
[<c04af360>] (__pm_runtime_resume) from [<c04a4974>] (__device_release_driver+0x30/0x100)
[<c04a4974>] (__device_release_driver) from [<c04a4a60>] (device_release_driver+0x1c/0x28)
[<c04a4a60>] (device_release_driver) from [<c04a38c0>] (bus_remove_device+0xec/0x144)
[<c04a38c0>] (bus_remove_device) from [<c04a0764>] (device_del+0x10c/0x210)
[<c04a0764>] (device_del) from [<c04a67b0>] (platform_device_del+0x18/0x84)
[<c04a67b0>] (platform_device_del) from [<c04a6828>] (platform_device_unregister+0xc/0x20)
[<c04a6828>] (platform_device_unregister) from [<c05adcfc>] (of_platform_device_destroy+0x8c/0x90)
[<c05adcfc>] (of_platform_device_destroy) from [<c04a02f0>] (device_for_each_child+0x4c/0x78)
[<c04a02f0>] (device_for_each_child) from [<c05adc5c>] (of_platform_depopulate+0x30/0x44)
[<c05adc5c>] (of_platform_depopulate) from [<bf123920>] (cpsw_remove+0x68/0xf4 [ti_cpsw])
[<bf123920>] (cpsw_remove [ti_cpsw]) from [<c04a68d8>] (platform_drv_remove+0x24/0x3c)
[<c04a68d8>] (platform_drv_remove) from [<c04a49c8>] (__device_release_driver+0x84/0x100)
[<c04a49c8>] (__device_release_driver) from [<c04a4b20>] (driver_detach+0xac/0xb0)
[<c04a4b20>] (driver_detach) from [<c04a3be8>] (bus_remove_driver+0x60/0xd4)
[<c04a3be8>] (bus_remove_driver) from [<c00d9870>] (SyS_delete_module+0x184/0x20c)
[<c00d9870>] (SyS_delete_module) from [<c0010540>] (ret_fast_syscall+0x0/0x1c)
Code: e3500000 e92d4070 1590630c 01a06000 (e5d6300d)

Hence, fix it by using BUS_NOTIFY_REMOVED_DEVICE event for OMAP device
deletion which is sent when DD has finished processing of device
deletion.

Cc: Tony Lindgren <tony@atomide.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-30 21:00:34 -07:00
Dave Gerlach e4e5328770 ARM: OMAP4+: CM: Remove redundant checks for clkctrl_offs of zero
Now that we have moved the check for valid clkctrl_offs to the caller of
am33xx_cm_wait_module_ready/idle and omap4_cminst_wait_module_ready/idle
let's remove the now redundant check for clkctrl_offs from these functions.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-22 23:10:57 -07:00
Dave Gerlach 428929c79c ARM: OMAP4+: Have _omap4_wait_target_* check for valid clkctrl_offs
Previously the low-level CM call internal to the
_omap4_wait_target_ready/disable calls was responsible for checking for
a valid clkctrl_offs. Now we must also consider the value of the
prcm.omap4.flags because if HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET is set in
the flags then clkctrl_offs of 0 is valid.

Let's add this check into the _omap4_wait_target_ready/disable where we
have access to both the clkctrl_offs and the flags values and simply
return 0 without calling the low level CM call at all, which would have
returned 0 anyway if the clktrl_offs was zero.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-22 23:10:15 -07:00
Dave Gerlach ddb0d99d53 ARM: OMAP2+: AM33XX: Add HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET flag to rtc hwmod
The RTC hwmod on AM335x family of SoCs is unique in that the
clkctrl_offs in the PRCM is 0. We rely on a clkctrl_offs of zero as
indicating no clkctrl is present so we must flag this hwmod with
HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET to indicate the 0 clkctrl_offs is in
fact valid in this case.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-22 23:09:42 -07:00
Dave Gerlach 60a5b87504 ARM: OMAP4+: hwmod: Add hwmod flag for HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET
Nearly all modules on OMAP4 and newer platforms have clkctrl offsets
that are non-zero except for the RTC on am335x. Because we rely on a
clkctrl_offset of zero to indicate no clkctrl_offset being present,
lets add a HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET flag to use to indicate
hwmods that have a valid clkctrl_offset of 0.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-22 23:08:58 -07:00
Sebastian Reichel b46211d6dc ARM: OMAP3: hwmod data: Add sysc information for DSI
Add missing sysconfig/sysstatus information
to OMAP3 hwmod. The information has been
checked against OMAP34xx and OMAP36xx TRM.

Without this change DSI block is not reset
during boot, which is required for working
Nokia N950 display.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-22 23:05:34 -07:00
Tony Lindgren e92fc4f04a ARM: OMAP2+: Drop legacy board file for LDP
Let's drop the last two remaining omap3 legacy boot board files.
Let's only use the device tree based booting known to work for
these two boards.

We still have two omap3 boards booting in legacy mode in addition
to device tree based booting. All the other ten or so omap2+ SoCs
have been booting using device tree mode only for years now. This
has allowed us to get rid of quite a bit of arch/arm/mach-omap2
related platform init code in favor of dts and driver changes.

Pretty much the only remaining known users for omap3 legacy boot
board files are Kevin's and Russell's boot test systems, and N900
kernel tree maintained by Pali and Ivaylo. And all of them are
also supporting the device tree based booting. The legacy booting
mode has been kept around mostly to verify against regressions.

As there is still a slim chance of possible other uses of the
mainline kernel for these boards, let's just drop the board
files for v4.8, and let's not touch the related platform init
code until around v4.9 time if no issues are found. This makes
it trivial for us to add back the board files with a simple revert.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-10 23:47:38 -07:00
Tony Lindgren 9b7141d01a ARM: OMAP2+: Drop legacy board file for n900
Let's drop the last two remaining omap3 legacy boot board files.
Let's only use the device tree based booting known to work for
these two boards.

We still have two omap3 boards booting in legacy mode in addition
to device tree based booting. All the other ten or so omap2+ SoCs
have been booting using device tree mode only for years now. This
has allowed us to get rid of quite a bit of arch/arm/mach-omap2
related platform init code in favor of dts and driver changes.

Pretty much the only remaining known users for omap3 legacy boot
board files are Kevin's and Russell's boot test systems, and N900
kernel tree maintained by Pali and Ivaylo. And all of them are
also supporting the device tree based booting. The legacy booting
mode has been kept around mostly to verify against regressions.

As there is still a slim chance of possible other uses of the
mainline kernel for these boards, let's just drop the board
files for v4.8, and let's not touch the related platform init
code until around v4.9 time if no issues are found. This makes
it trivial for us to add back the board files with a simple revert.

Acked-By: Sebastian Reichel <sre@kernel.org>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-10 23:47:24 -07:00
Tony Lindgren e15d11ea55 Merge remote-tracking branch 'peter/peter/for-4.8_omapdss_part1' into omap-for-v4.8/legacy 2016-07-10 23:47:12 -07:00
Arnd Bergmann 04b6d0a300 Few more omap SoC changes for v4.8 merge window:
- Fix a make randconfig build error for recent SMP kexec changes
 
 - A series of clock related fixes to prepare things for moving
   device clkctrl register handling to drivers/clk
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXe11sAAoJEBvUPslcq6Vz/XwQAItR9F4G/DibYl6CgIgvxdZF
 heCFfhg/TjNnAlOdqSszAmCDxrL0cSj9/Djm7PBmcZz6T0XQWp2xviTsW/08N9LI
 Hcugi179a10IjOan6EASQlITRDC6S9Elkq2arMDTxkRMH8jRBGCG3Wk7H3N4084O
 x7XCZH2zDGDsYJp12L1iZ6DZ+aYneSmcK3WmUmAiKQTZw1fK0AfMtc95fHh2iCTJ
 hK0+LCbg2gUL1+GKZTIa+caLDdU+48XDpxagAnnIDiWJH+TC1DOve14I0OqzZiCB
 YZC/W14ulIwkTMpUNHZufcG9ZVg0G3gtvnfKISxLI8gf/X/CrbcGsVnqRmsA3P2g
 r3rIVpdoZ4UbHfKZnE36jR6EggX71pQ+h8M3iazb9aoraWQKOL6NanqPbf3WZO3i
 PGXDOwrnXqK2mjfkMWr+ERLKcLFJSnYQaeZuZF84s1TqLIvzm7ouvGfD0fcbvW9N
 RA/imL/FqLeuu3X6PtE0mReS+aGJ+Ov2ZpmPpemdOryys3LotYHoC8fJyD9l5GKp
 M5sHHEVZicFHPesYaBnjThVbM5zVHYnmb1o+Yyjizwnh52kOKJO8SrJ9+qBvJ9Bo
 JitY8Y2+52IVDPtpeST2METORIP2HDZF4GnQdx8EakJBok4EPfVgXUzT7M1XB7Bw
 RnGWoAxSVQzrzr7kSMHS
 =qmem
 -----END PGP SIGNATURE-----

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

Merge "Few more omap SoC changes for v4.8 merge window" from Tony Lindgren:

- Fix a make randconfig build error for recent SMP kexec changes

- A series of clock related fixes to prepare things for moving
  device clkctrl register handling to drivers/clk

* tag 'omap-for-v4.8/soc-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: AM33xx: fix module_wait_ready without clkctrl register
  ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs
  ARM: OMAP2+: timer: change order of hwmod data handling
  ARM: OMAP2+: hwmod: fetch main_clk based on hwmod name
  ARM: OMAP2+: omap_device: create clock alias purely from DT data
  ARM: OMAP2+: Fix build with CONFIG_SMP and CONFIG_PM is not set
2016-07-07 14:34:43 +02:00
Arnd Bergmann 7c2d780ec0 Merge ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB changes into next/soc
* commit '5c34a4e89c743339f78cafb2f2a826a010f0746a':
  ARM: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB
  ARM: uniphier: drop code for old DT binding

These cause a harmless conflict with the clps711x multiplatform
support, and it's easy to resolve.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-07-06 18:00:32 +02:00
Tero Kristo 183e2077d0 ARM: AM33xx: fix module_wait_ready without clkctrl register
If the module has no clkctrl register defined, module_wait_ready should
not try to access this. This can potentially cause an illegal register
access, and result in bad idle reporting also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-04 07:15:47 -07:00
Tero Kristo 1d9a542565 ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs
The previous implementation was racy in many locations, where the current
status of the clockdomain was read out, some operations were executed,
and the previous status info was used afterwards to decide next state
for the clockdomain. Instead, fix the implementation of the allow_idle /
deny_idle APIs to properly have usecounting support. This allows clean
handling internally within the clockdomain core, and simplifies the
usage also within hwmod.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-04 07:15:38 -07:00
Tero Kristo e98580e880 ARM: OMAP2+: timer: change order of hwmod data handling
With the introduction of hwmod module clocks, the name of the hwmod
main clk may not be available before hwmod setup, as hwmod setup
may lookup the main clock dynamically based on the hwmod name.
Thus, change the order of hwmod setup and main clock handling for
the timer code, to make sure the main clock is going to be
available.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-04 07:15:28 -07:00
Tero Kristo 9fabc1a26e ARM: OMAP2+: hwmod: fetch main_clk based on hwmod name
With the transition to hwmod module clocks, all hwmods will have
their main clocks named <hwmod_name>_mod_ck. Use this info to
fetch main_clk, and use it if found.

Also, if a main_clk is found based on the hwmod name, disable
the direct PRCM modulemode access from hwmod.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-04 07:15:22 -07:00
Tero Kristo 59dcfc48eb ARM: OMAP2+: omap_device: create clock alias purely from DT data
This avoids the need to add most of the clock aliases under
drivers/clk/ti/clk-xyz.c files.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-03 23:42:53 -07:00
Tony Lindgren b3bf289c1c ARM: OMAP2+: Fix build with CONFIG_SMP and CONFIG_PM is not set
I found one more make randconfig build error with the recent
SMP kexec changes. We need the mpuss now always available early.

Fixes: 0573b957fc ("ARM: OMAP4+: Prevent CPU1 related hang
with kexec")
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-07-03 23:29:45 -07:00
Ivaylo Dimitrov 79cdad3635 ir-rx51: use hrtimer instead of dmtimer
Drop dmtimer usage for pulse timer in favor of hrtimer. That allows
removing PWM dmitimer platform data usage.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-29 21:54:35 -07:00
Ivaylo Dimitrov b540617698 ir-rx51: add DT support to driver
With the upcoming removal of legacy boot, lets add support to one of the
last N900 drivers remaining without it. As the driver still uses omap
dmtimer, add auxdata as well.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-29 21:54:23 -07:00
Ivaylo Dimitrov 3fdd1526e6 ir-rx51: use PWM framework instead of OMAP dmtimer
Convert driver to use PWM framework instead of calling dmtimer functions
directly for PWM timer. Remove paragraph about writing to the Free Software
Foundation's mailing address while at it.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-29 21:54:13 -07:00
Tony Lindgren 44e7475d40 ARM: OMAP2+: Fix build if CONFIG_SMP is not set
Looks like I only partially fixed up things if CONFIG_SMP
is not set for the recent kexec changes. We don't have
boot_secondary available without SMP as reported by Arnd.

Fixes: 0573b957fc ("ARM: OMAP4+: Prevent CPU1 related hang with kexec")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-27 23:30:02 -07:00
Tony Lindgren 3696203c47 ARM: OMAP4+: Allow kexec on SMP variants
Kexec needs omap4_cpu_kill, otherwise kexec will produce on SMP:

kexec_load failed: Invalid argument

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-22 22:57:02 -07:00
Tony Lindgren 3251885285 ARM: OMAP4+: Reset CPU1 properly for kexec
We need to reset CPU1 properly for kexec when booting different
kernel versions. Otherwise CPU1 will attempt to boot the the
previous kernel's start_secondary(). Note that the restctrl
register is different from the low-power mode wakeup register
CPU1_WAKEUP_NS_PA_ADDR. We need to configure both.

Let's fix the issue by defining SoC specific data to initialize
things in a more generic way. And let's also standardize omap-smp.c
to use soc_is instead of cpu_is while at it.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-22 22:55:53 -07:00
Tony Lindgren 0573b957fc ARM: OMAP4+: Prevent CPU1 related hang with kexec
Kexec booted kernels on omap4 will hang early during the boot if the
booted kernel is different version from the previous kernel.

This is because the previous kernel may have configured low-power mode
using CPU1_WAKEUP_NS_PA_ADDR. In that case it points to the previous
kernel's omap4_secondary_startup(), and CPU1 can be in low power mode
from the previous kernel. When the new kernel configures the CPU1
clockdomain, CPU1 can wake from low power state prematurely during
omap44xx_clockdomains_init() running random code.

Let's fix the issue by configuring CPU1_WAKEUP_NS_PA_ADDR before we
call omap44xx_clockdomains_init(). Note that this is very early during
the init, and we will do proper CPU1 reset during SMP init a bit later
on in omap4_smp_prepare_cpus(). And we need to do this when SMP is
not enabled as the previous kernel may have had it enabled.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-22 22:55:51 -07:00
Tony Lindgren f4b9f40ae9 ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec
Prepare things for making kexec work on SMP omap variants by initializing
SARM RAM base early. This allows us to configure CPU1 for kexec in case
the previous kernel has put CPU1 in low power mode.

Note that this should not prevent moving other SAR RAM code to live
under drivers. However for kexec, we will need this very early.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-22 22:55:47 -07:00
Tony Lindgren 99eb45f98c Merge commit 'c0053bd50af5' into omap-for-v4.8/soc 2016-06-22 22:55:18 -07:00
Keerthy 218092afa0 ARM: dts: am43xx: Remove wrongly defined RSTST offset for PER Domain
As per the TRM: http://www.ti.com/lit/ug/spruh73m/spruh73m.pdf
offset 0x4 is reserved for PRM_PER. Hence removing the wrongly
defined address offset.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-22 03:33:25 -07:00