Arnd Bergmann [Tue, 2 Oct 2018 08:11:05 +0000 (10:11 +0200)]
Merge tag 'qcom-drivers-for-4.20' of git://git./linux/kernel/git/agross/linux into next/drivers
Qualcomm ARM Based Driver Updates for v4.20
* Refactor of SCM compatibles and clock requirements
* SMEM cleanup
* Add LLCC EDAC driver
* Fixes for GENI clocks and macros
* Fix includes for llcc-slice and smem
* String overflow fixes for APR and wcnss_ctrl
* Fixup for COMPILE_TEST of qcom driver Kconfigs
* Cleanup of Kconfig depends of rpmh, smd_rpm, smsm, and smp2p
* Add SCM dependencies to SPM and rmtfs-mem
* tag 'qcom-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: (38 commits)
soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples
soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
soc: qcom: geni: Make version macros simpler
dt-bindings: firmware: scm: Add MSM8998 and SDM845
firmware: qcom: scm: Refactor clock handling
dt-bindings: firmware: scm: Refactor compatibles and clocks
soc: qcom: smem: a few last cleanups
soc: qcom: smem: verify partition host ids match
soc: qcom: smem: small change in global entry loop
soc: qcom: smem: verify partition offset_free_uncached
soc: qcom: smem: verify partition header size
soc: qcom: smem: introduce qcom_smem_partition_header()
soc: qcom: smem: require order of host ids to match
soc: qcom: smem: verify both host ids in partition header
soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions()
soc: qcom: smem: always ignore partitions with 0 offset or size
soc: qcom: smem: initialize region struct only when successful
soc: qcom: smem: rename variable in qcom_smem_get_global()
drivers: qcom: rpmh-rsc: clear wait_for_compl after use
soc: qcom: rmtfs-mem: Validate that scm is available
...
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 2 Oct 2018 08:02:33 +0000 (10:02 +0200)]
Merge tag 'actions-drivers+s900-sps-for-4.20' of git://git./linux/kernel/git/afaerber/linux-actions into next/drivers
Actions Semi SoC drivers for v4.20 #2
The SPS power domain driver is extended for S900 SoC.
This required merging a topic branch for the new bindings header.
* tag 'actions-drivers+s900-sps-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
soc: actions: sps: Add S900 power domains
dt-bindings: power: Add Actions Semi S900 SPS
soc: actions: Update SPS help text for S700
soc: actions: Convert to SPDX license identifiers
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 2 Oct 2018 08:00:42 +0000 (10:00 +0200)]
Merge tag 'v4.19-next-soc' of git://git./linux/kernel/git/matthias.bgg/linux into next/drivers
PMIC wrapper:
- sort SoCs and PMICs ascending
- add capabilities
- add support for mt8183 SoC + mt6358 PMIC
- return false instead of 0
- add support for mt6765 SoC + mt6357 PMIC
* tag 'v4.19-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
soc: mediatek: pwrap: add mt6357 driver for mt6765 SoCs
soc: mediatek: pwrap: add pwrap driver for mt6765 SoCs
dt-bindings: pwrap: mediatek: add pwrap support for MT6765
soc: mediatek: pwrap: use true and false for boolean values
soc: mediatek: add mt8183 pwrap support
soc: mediatek: pwrap: use group of bits for pwrap capability
soc: mediatek: pwrap: order SoCs and PMICs ascending
dt-bindings: mediatek: add compatible for mt8183 pwrap
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Tue, 2 Oct 2018 07:59:03 +0000 (09:59 +0200)]
Merge tag 'sunxi-drivers-for-4.20' of git://git./linux/kernel/git/sunxi/linux into next/drivers
Allwinner drivers changes for 4.20
The H6 is now supported in our SRAM driver bindings, and we have a small
Makefile change for the SRAM driver to build it without building the
ARCH_SUNXI architecture, especially relevant for the COMPILE_TEST case.
* tag 'sunxi-drivers-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C
drivers: soc: Allow building the sunxi driver without ARCH_SUNXI
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Andy Gross [Sun, 30 Sep 2018 17:44:33 +0000 (12:44 -0500)]
Merge branch 'drivers-for-4.20' into drivers-for-4.20-final
Andy Gross [Sun, 30 Sep 2018 17:44:18 +0000 (12:44 -0500)]
Merge tag 'qcom-geni-immutable-for-mark-brown' into drivers-for-4.20-final
Immutable branch for QCOM Geni patches
Manivannan Sadhasivam [Wed, 11 Apr 2018 16:40:35 +0000 (22:10 +0530)]
soc: actions: sps: Add S900 power domains
Add power domains for Actions Semi S900 SoC.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[AF: Update Kconfig help text]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Andreas Färber [Sun, 30 Sep 2018 14:42:04 +0000 (16:42 +0200)]
Merge branch 'v4.20/s900-sps-bindings' into v4.20/drivers+s900-sps
This merges the DT binding header for S900 SPS driver.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Manivannan Sadhasivam [Wed, 11 Apr 2018 16:40:33 +0000 (22:10 +0530)]
dt-bindings: power: Add Actions Semi S900 SPS
Define power domains for Actions Semi S900 SoC Smart Power System (SPS).
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Arnd Bergmann [Fri, 28 Sep 2018 20:16:47 +0000 (22:16 +0200)]
Merge tag 'renesas-drivers-for-v4.20' of git://git./linux/kernel/git/horms/renesas into next/drivers
Renesas ARM Based SoC Drivers Updates for v4.20
* Convert to SPDX identifiers
* R-Car V3M (r8a77970) and V3H (r8a77980): Document Timer Unit (TMU) bindings
* RZ/G1N (r8a7744) and RZ/G1C (r8a77470) SoCs:
- Document APMU and SMP enable method
* RZ/G2M (r8a74a1), RZ/G1N (r8a7744) and RZ/G2E (r8a774c0) SoCs:
- Add reset support
- Add sysc support
* RZ/G2M (r8a774a1), RZ/G2E (r8a774c0) and RZ/A2M (r7s9210) SoCs:
- Add support for identifying SoC
* RZ/A2M (r7s9210) SoC:
- Add basic SoC setup support
* tag 'renesas-drivers-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (21 commits)
dt-bindings: apmu: Document r8a7744 support
dt-bindings: timer: renesas: tmu: document R8A779{7|8}0 bindings
dt-bindings: apmu: Document r8a77470 support
soc: renesas: rcar-rst: Add support for RZ/G1N
dt-bindings: reset: rcar-rst: Document r8a7744 reset module
soc: renesas: rcar-sysc: Add r8a7744 support
dt-bindings: power: rcar-sysc: Add r8a7744 power domain index macros
dt-bindings: power: rcar-sysc: Document r8a7744 SYSC binding
soc: renesas: rcar-rst: Add support for RZ/G2E
dt-bindings: reset: rcar-rst: Document r8a774c0 rst
soc: renesas: rcar-sysc: Add r8a774c0 support
dt-bindings: power: rcar-sysc: Document r8a774c0 sysc
dt-bindings: power: Add r8a774c0 SYSC power domain definitions
soc: renesas: Identify RZ/G2E
soc: renesas: convert to SPDX identifiers
soc: renesas: rcar-rst: Add support for RZ/G2M
soc: renesas: rcar-sysc: Add r8a774a1 support
dt-bindings: power: Add r8a774a1 SYSC power domain definitions
soc: renesas: identify RZ/A2
ARM: shmobile: Add basic RZ/A2 SoC support
...
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Fri, 28 Sep 2018 19:54:36 +0000 (21:54 +0200)]
Merge tag 'tegra-for-4.20-soc' of git://git./linux/kernel/git/tegra/linux into next/drivers
soc/tegra: Changes for v4.20-rc1
This contains a pinctrl implementation for the pad configuration that
can be controlled from the PMC.
* tag 'tegra-for-4.20-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
soc/tegra: pmc: Implement pad configuration via pinctrl
soc/tegra: pmc: Remove public pad voltage APIs
soc/tegra: pmc: Use X macro to generate IO pad tables
soc/tegra: pmc: Implement tegra_io_pad_is_powered()
soc/tegra: pmc: Factor out DPD register bit calculation
soc/tegra: pmc: Fix pad voltage configuration for Tegra186
soc/tegra: pmc: Fix child-node lookup
dt-bindings: Add Tegra PMC pad configuration bindings
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann [Wed, 26 Sep 2018 15:18:42 +0000 (17:18 +0200)]
Merge tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx into next/drivers
arm64: zynqmp: SoC changes for v4.20
- Adding firmware API for SoC with debugfs interface
Firmware driver communicates to Platform Management Unit (PMU) by using
SMC instructions routed to Arm Trusted Firmware (ATF). Initial version
adds support for base firmware driver with query and clock APIs.
EEMI spec is available here:
https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf
* tag 'zynqmp-soc-for-v4.20-v2' of https://github.com/Xilinx/linux-xlnx:
firmware: xilinx: Add debugfs for query data API
firmware: xilinx: Add debugfs interface
firmware: xilinx: Add clock APIs
firmware: xilinx: Add query data API
firmware: xilinx: Add Zynqmp firmware driver
dt-bindings: firmware: Add bindings for ZynqMP firmware
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Rajan Vaja [Wed, 12 Sep 2018 19:38:40 +0000 (12:38 -0700)]
firmware: xilinx: Add debugfs for query data API
Add debugfs file to query platform specific data from firmware
using debugfs interface.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Wed, 12 Sep 2018 19:38:39 +0000 (12:38 -0700)]
firmware: xilinx: Add debugfs interface
Firmware-debug provides debugfs interface to all APIs.
Debugfs can be used to call firmware APIs with required
parameters.
Usage:
* Calling firmware API through debugfs:
# echo "<api-name> <arg1> .. <argn>" > /sys/.../zynqmp-firmware/pm
* Read output of last called firmware API:
# cat /sys/.../zynqmp-firmware/pm
Refer ug1200 for more information on these APIs:
* https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf
Add basic debugfs file to get API version.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Wed, 12 Sep 2018 19:38:38 +0000 (12:38 -0700)]
firmware: xilinx: Add clock APIs
Add clock APIs to control clocks through firmware
interface.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Wed, 12 Sep 2018 19:38:37 +0000 (12:38 -0700)]
firmware: xilinx: Add query data API
Add ZynqMP firmware query data API to query platform
specific information(clocks, pins) from firmware.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Wed, 12 Sep 2018 19:38:36 +0000 (12:38 -0700)]
firmware: xilinx: Add Zynqmp firmware driver
This patch is adding communication layer with firmware.
Firmware driver provides an interface to firmware APIs.
Interface APIs can be used by any driver to communicate to
PMUFW(Platform Management Unit). All requests go through ATF.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Wed, 12 Sep 2018 19:38:35 +0000 (12:38 -0700)]
dt-bindings: firmware: Add bindings for ZynqMP firmware
Add documentation to describe Xilinx ZynqMP firmware driver
bindings. Firmware driver provides an interface to firmware
APIs. Interface APIs can be used by any driver to communicate
to PMUFW (Platform Management Unit).
Signed-off-by: Rajan Vaja <rajanv@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Olof Johansson [Tue, 25 Sep 2018 20:19:52 +0000 (13:19 -0700)]
Merge tag 'at91-4.20-drivers' of git://git./linux/kernel/git/at91/linux into next/drivers
AT91 drivers for 4.20
- use struct_size in atmel-ebi
* tag 'at91-4.20-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
memory: atmel-ebi: Use struct_size() in devm_kzalloc()
Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson [Tue, 25 Sep 2018 19:48:47 +0000 (12:48 -0700)]
Merge tag 'soc-fsl-next-v4.20' of git://git./linux/kernel/git/leo/linux into next/drivers
NXP/FSL SoC driver updates for v4.20
- Use of_get_child_by_name helper for QE driver
- Remove redundant pointer 'priv' for dpio driver
* tag 'soc-fsl-next-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
soc: fsl: dpio: remove redundant pointer 'priv'
soc: fsl/qe: Use of_get_child_by_name helper
Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson [Tue, 25 Sep 2018 19:26:52 +0000 (12:26 -0700)]
Merge tag 'drivers_soc_for_4.20' of git://git./linux/kernel/git/ssantosh/linux-keystone into next/drivers
soc: driver soc update for v4.20
- Enable host-id as an optional dt property
- Fix minor typo in knav driver
* tag 'drivers_soc_for_4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
soc: ti: fix spelling mistake "instace" -> "instance"
firmware: ti_sci: Provide host-id as an optional dt parameter
Documentation: dt: keystone: ti-sci: Add optional host-id parameter
Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson [Tue, 25 Sep 2018 18:31:00 +0000 (11:31 -0700)]
Merge tag 'scmi-updates-4.20' of git://git./linux/kernel/git/sudeep.holla/linux into next/drivers
SCMI updates for v4.20
1. Addition of interface to fetch estimated power from the firmware
corresponding to each OPP of a device
2. Cleanup using strlcpy to ensure NULL-terminated strings for name
strings instead of relying on the firmware to do the same
* tag 'scmi-updates-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
firmware: arm_scmi: add a getter for power of performance states
firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings
Signed-off-by: Olof Johansson <olof@lixom.net>
Olof Johansson [Tue, 25 Sep 2018 18:30:47 +0000 (11:30 -0700)]
Merge tag 'v4.19-rc3' into next/drivers
Linux 4.19-rc3
Olof Johansson [Tue, 25 Sep 2018 18:16:12 +0000 (11:16 -0700)]
Merge tag 'amlogic-drivers' of https://git./linux/kernel/git/khilman/linux-amlogic into next/drivers
Amlogic ARM64 driver updates for v4.20
- add meson-canvas driver and bindings
- firmware: Add serial number sysfs entry
* tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
soc: amlogic: add meson-canvas driver
dt-bindings: soc: amlogic: add meson-canvas documentation
firmware: meson_sm: Add serial number sysfs entry
Signed-off-by: Olof Johansson <olof@lixom.net>
Argus Lin [Tue, 4 Sep 2018 12:31:54 +0000 (20:31 +0800)]
soc: mediatek: pwrap: add mt6357 driver for mt6765 SoCs
MT6357 is a new power management IC and it is used for mt6765 SoCs.
To define mt6357_regs for pmic register mapping and pmic_mt6357
for accessing register.
Signed-off-by: Argus Lin <argus.lin@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Argus Lin [Tue, 4 Sep 2018 12:31:53 +0000 (20:31 +0800)]
soc: mediatek: pwrap: add pwrap driver for mt6765 SoCs
mt6765 is a highly integrated SoCs, it uses mt6357 for power management.
This patch adds pwrap driver to access mt6357. Pwrap of mt6765 support
dynamic priority meichanism, sequence monitor and starvation mechanism
to make transaction more reliable.
Signed-off-by: Argus Lin <argus.lin@mediatek.com>
[mb: change has_bridge to capabilities]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Argus Lin [Tue, 4 Sep 2018 12:31:52 +0000 (20:31 +0800)]
dt-bindings: pwrap: mediatek: add pwrap support for MT6765
Add binding document of pwrap for MT6765 SoCs.
Signed-off-by: Argus Lin <argus.lin@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Gustavo A. R. Silva [Sun, 5 Aug 2018 01:02:01 +0000 (20:02 -0500)]
soc: mediatek: pwrap: use true and false for boolean values
Return statements in functions returning bool should use true or false
instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Hsin-Hsiung Wang [Wed, 19 Sep 2018 07:26:00 +0000 (15:26 +0800)]
soc: mediatek: add mt8183 pwrap support
MT6358 is a new power management IC and it is used for
mt8183 SoCs. To define mt6358_regs for pmic register
mapping and pmic_mt6358 for accessing register.
Adding one more interrupt and wdt source.
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Hsin-Hsiung Wang [Tue, 25 Sep 2018 13:48:39 +0000 (15:48 +0200)]
soc: mediatek: pwrap: use group of bits for pwrap capability
Use group of bits for pwrap capability instead of
elements of structure.
This patch is preparing for adding mt8183 pwrap support.
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Matthias Brugger [Tue, 25 Sep 2018 13:46:59 +0000 (15:46 +0200)]
soc: mediatek: pwrap: order SoCs and PMICs ascending
Order SoC and PMIC numbers ascending to make the code more
readable.
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Hsin-Hsiung Wang [Wed, 19 Sep 2018 07:25:58 +0000 (15:25 +0800)]
dt-bindings: mediatek: add compatible for mt8183 pwrap
This adds dt-binding documentation of pwrap for Mediatek MT8183 SoC
Platform.
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Colin King [Mon, 24 Sep 2018 19:43:21 +0000 (12:43 -0700)]
soc: ti: fix spelling mistake "instace" -> "instance"
Trivial fix to spelling mistake in dev_err messages and comments
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Biju Das [Fri, 21 Sep 2018 15:52:58 +0000 (16:52 +0100)]
dt-bindings: apmu: Document r8a7744 support
Document APMU and SMP enable method for RZ/G1N (R8A7744) SoC.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Douglas Anderson [Thu, 6 Sep 2018 22:49:06 +0000 (15:49 -0700)]
soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples
The geni_se_clk_freq_match() has some strange semantics. Specifically
it is defined with two modes:
1. It can find a clock that's an exact multiple of the requested rate
2. It can find a non-exact match but it can't handle multiples then
...but callers should always be able to handle a clock that is a
multiple of the requested clock so mode #2 doesn't really make sense.
Let's change the semantics so that the non-exact match can also accept
multiples and then change the code to handle that.
The only caller of this code is the unlanded SPI driver [1] which
currently passes "exact = True", thus it should be safe to change the
semantics in this way. ...and, in fact, the SPI driver should likely
be modified to pass "exact = False" (with the new semantics) since
that will allow it to work with SPI devices that request a clock rate
that doesn't exactly match a rate we can make.
[1] https://lkml.kernel.org/r/
1535107336-2214-1-git-send-email-dkota@codeaurora.org
Fixes:
eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Douglas Anderson [Thu, 6 Sep 2018 22:49:05 +0000 (15:49 -0700)]
soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
The function clk_round_rate() is defined to return a "long", not an
"unsigned long". That's because it might return a negative error
code. Change the call in geni_se_clk_tbl_get() to check for errors.
While we're at it, get rid of a useless init of "freq".
NOTE: overall the idea that we should iterate over clk_round_rate() to
try to reconstruct a table already present in the clock driver is
questionable. Specifically:
- This method relies on "clk_round_rate()" rounding up.
- This method only works if the table is sorted and has no duplicates.
...this patch doesn't try to fix those problems, it just makes the
error handling more correct.
Fixes:
eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Stephen Boyd [Fri, 18 May 2018 22:47:50 +0000 (15:47 -0700)]
soc: qcom: geni: Make version macros simpler
This macro doesn't work, because it hides a local variable inside of the
macro to hold the version and that variable name is called 'ver' and
'version' sometimes.
Let's change this to be more explicit. Introduce three macros for the
major, minor, and step of the version, and require callers to pass the
version in to get the part of the version out. This way we don't hide
local variables inside macros and things are less evil overall.
Cc: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Cc: Sagar Dharia <sdharia@codeaurora.org>
Cc: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Andreas Färber [Sun, 24 Jun 2018 13:46:30 +0000 (15:46 +0200)]
soc: actions: Update SPS help text for S700
Commit
3ad85b08f7789d51e6aad0f535296d1c31e319b9 (soc: actions: sps: Add S700)
added S700 support to the SPS driver but forget to update Kconfig help.
Add missing S700 mention, in preparation for further SoCs.
Fixes:
3ad85b08f778 ("soc: actions: sps: Add S700")
Reported-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Andreas Färber [Sun, 21 Jan 2018 16:50:33 +0000 (17:50 +0100)]
soc: actions: Convert to SPDX license identifiers
Replace textual license notices with SPDX-License-Identifier lines.
Add an SPDX-License-Identifier for the Makefile.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Sergei Shtylyov [Fri, 7 Sep 2018 20:02:53 +0000 (23:02 +0300)]
dt-bindings: timer: renesas: tmu: document R8A779{7|8}0 bindings
Document the R-Car V3{M|H} (R8A779{7|8}0) SoC in the Renesas TMU bindings;
the TMU hardware in those is the Renesas standard 3-channel timer unit.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 17 Sep 2018 08:44:09 +0000 (09:44 +0100)]
dt-bindings: apmu: Document r8a77470 support
Document APMU and SMP enable method for RZ/G1C (also known as
r8a77470) SoC.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Tue, 11 Sep 2018 10:12:46 +0000 (11:12 +0100)]
soc: renesas: rcar-rst: Add support for RZ/G1N
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Tue, 11 Sep 2018 10:12:45 +0000 (11:12 +0100)]
dt-bindings: reset: rcar-rst: Document r8a7744 reset module
Document bindings for the RZ/G1N (R8A7744) reset module.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Tue, 11 Sep 2018 10:12:44 +0000 (11:12 +0100)]
soc: renesas: rcar-sysc: Add r8a7744 support
Add support for RZ/G1N (R8A7744) SoC power areas to the R-Car SYSC driver.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Tue, 11 Sep 2018 10:12:43 +0000 (11:12 +0100)]
dt-bindings: power: rcar-sysc: Add r8a7744 power domain index macros
Add power domain indices for RZ/G1N (R8A7744) SoC.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Tue, 11 Sep 2018 10:12:42 +0000 (11:12 +0100)]
dt-bindings: power: rcar-sysc: Document r8a7744 SYSC binding
Add binding documentation for the RZ/G1N (R8A7744) SYSC block.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 10 Sep 2018 15:09:41 +0000 (16:09 +0100)]
soc: renesas: rcar-rst: Add support for RZ/G2E
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 10 Sep 2018 15:09:40 +0000 (16:09 +0100)]
dt-bindings: reset: rcar-rst: Document r8a774c0 rst
Document bindings for the RZ/G2E (a.k.a. R8A774C0) reset
module.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 10 Sep 2018 14:41:27 +0000 (15:41 +0100)]
soc: renesas: rcar-sysc: Add r8a774c0 support
Add support for the RZ/G2E (R8A774C0) SoC power areas to the
R-Car SYSC driver.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 10 Sep 2018 14:41:28 +0000 (15:41 +0100)]
dt-bindings: power: rcar-sysc: Document r8a774c0 sysc
Document bindings for the RZ/G2E (a.k.a. R8A774C0) system
controller.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Fabrizio Castro [Mon, 10 Sep 2018 14:41:26 +0000 (15:41 +0100)]
dt-bindings: power: Add r8a774c0 SYSC power domain definitions
This patch adds power domain indices for RZ/G2E.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Bjorn Andersson [Wed, 29 Aug 2018 23:15:05 +0000 (16:15 -0700)]
dt-bindings: firmware: scm: Add MSM8998 and SDM845
Now that the compatible/clock handling is reworked add compatibles for
MSM8998 and SDM845 to the SCM binding.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Bjorn Andersson [Wed, 29 Aug 2018 23:15:04 +0000 (16:15 -0700)]
firmware: qcom: scm: Refactor clock handling
At one point in time all "future" platforms required three clocks, so
the binding and driver was written to treat this as the default case.
But new platforms has no clock requirements, which currently makes them
all a special case, causing the need for a patch in the binding and
driver for each new platform added.
This patch reworks the driver logic so that it will attempt to acquire
all three clocks and fail based on the given compatible. This allow us
to drop the clock requirement from "qcom,scm", in a way that will remain
backwards compatible with existing DT files.
Specific compatibles are added for apq8084, msm8916 and msm8974 to match
the updated binding and although equivalent to qcom,scm both ipq4019 and
msm8996 are kept as these have been used without fallback to qcom,scm.
The result of this patch is that new platforms, that require no clocks,
can be use the fallback compatible of "qcom,scm".
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Bjorn Andersson [Wed, 29 Aug 2018 23:15:03 +0000 (16:15 -0700)]
dt-bindings: firmware: scm: Refactor compatibles and clocks
When the binding was written all "future" platforms required three
clocks, so the default compatible (qcom,scm) was defined to require
this. But as history shows all "future" platforms actually lack required
clocks. Given how the binding is written these compatibles have to be
added as an exception to the default.
Refactor the description of compatible to define that a platform
compatible should be given, followed by the fallback of qcom,scm. Also
refactor the description of the clocks in a way that this does not need
to be updated as new platform specific compatibles are added.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:56 +0000 (19:58 -0500)]
soc: qcom: smem: a few last cleanups
This patch contains several small cleanups:
- In qcom_smem_enumerate_partitions(), change the "local_host"
argument to have 16 bit unsigned type
- Also in qcom_smem_enumerate_partitions(), change the type of
the "host0" and "host1" local variables to be u16
- Fix error messages reporting host ids to use the right format
specifier
- Shorten the error messages as well, to fit on one line
- Add a compile-time check to ensure the local host value passed
to qcom_smem_enumerate_partitions() is in range
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:55 +0000 (19:58 -0500)]
soc: qcom: smem: verify partition host ids match
Add verification in qcom_smem_partition_header() that the host ids
found in a partition's header structure match those in its partition
table entry.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:54 +0000 (19:58 -0500)]
soc: qcom: smem: small change in global entry loop
Change the logic in the loop that finds that global host entry in
the partition table not require the host0 and host1 local variables.
The next patch will remove them.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:53 +0000 (19:58 -0500)]
soc: qcom: smem: verify partition offset_free_uncached
Add verification in qcom_smem_partition_header() that the
offset_free_uncached field in a partition's header structure does
not exceed the partition's size.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:52 +0000 (19:58 -0500)]
soc: qcom: smem: verify partition header size
Add verification in qcom_smem_partition_header() that the size in a
partition's header structure matches the size in its partition table
entry.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:51 +0000 (19:58 -0500)]
soc: qcom: smem: introduce qcom_smem_partition_header()
Create a new function qcom_smem_partition_header() to encapsulate
validating locating a partition header and validating information
found within it. This will be built up over a few commits to make
it more obvious how the common function is replacing duplicated code
elsewhere. Initially it just verifies the header has the right
magic number.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:50 +0000 (19:58 -0500)]
soc: qcom: smem: require order of host ids to match
In qcom_smem_enumerate_partitions(), we find all partitions that
have a given local host id in either its host0 or its host1 field
in the partition table entry. We then verify that the header
structure at the start of each partition also contains the same two
host ids as is found in the table of contents.
There is no requirement that the order of the two host ids be the
same in the table of contents and in the partition header.
This patch changes that, requiring host0 to in the partition table
entry to equal host0 in the partition header structure (and similar
for the host1 values).
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:49 +0000 (19:58 -0500)]
soc: qcom: smem: verify both host ids in partition header
The global partition is indicated by having both host values in its
table of contents entry equal SMEM_GLOBAL_HOST=0xfffe.
In qcom_smem_set_global_partition(), we check whether the header
structure at the beginning of the partition contains that host
value, but the check only verifies *one* of them. Change the check
so the partition header must have SMEM_GLOBAL_HOST for *both* its
host fields.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:48 +0000 (19:58 -0500)]
soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions()
Combine the code that checks whether a partition table entry is
associated with the local host with the assignment of the remote
host id value.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:47 +0000 (19:58 -0500)]
soc: qcom: smem: always ignore partitions with 0 offset or size
In qcom_smem_enumerate_partitions(), any partition table entry
having a zero offset or size field is ignored. Move those checks
earlier in the loop, because there's no sense in examining the
host fields for those entries.
Add the same checks in qcom_smem_set_global_partition(), so the
scan for the global partition skips over these invalid entries.
This allows a later check for zero size or offset once the global
entry is found to be eliminated.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:46 +0000 (19:58 -0500)]
soc: qcom: smem: initialize region struct only when successful
Hold off initializing anything for the array entry representing a
memory region in qcom_smem_map_memory() until we know we've
successfully mapped it.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Alex Elder [Tue, 26 Jun 2018 00:58:45 +0000 (19:58 -0500)]
soc: qcom: smem: rename variable in qcom_smem_get_global()
Rename the variable "area" to be "region" in qcom_smem_get_global(),
so its name better matches its type.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Lina Iyer [Wed, 5 Sep 2018 20:14:38 +0000 (14:14 -0600)]
drivers: qcom: rpmh-rsc: clear wait_for_compl after use
The wait_for_compl register ensures the request sequence is maintained
when sending requests from the TCS. Clear the register after sending
active request and during invalidate of the sleep and wake TCS.
Reported-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Bjorn Andersson [Tue, 28 Aug 2018 05:05:48 +0000 (22:05 -0700)]
soc: qcom: rmtfs-mem: Validate that scm is available
The scm device must be present in order for the rmtfs driver to
configure memory permissions for the rmtfs memory region, so check that
it is probed before continuing.
Cc: stable@vger.kernel.org
Fixes:
fa65f8045137 ("soc: qcom: rmtfs-mem: Add support for assigning memory to remote")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Felix Fietkau [Mon, 23 Jul 2018 14:17:35 +0000 (16:17 +0200)]
soc: qcom: spm: add SCM probe dependency
Check for SCM availability before attempting to use SPM. SPM probe will
fail otherwise.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:23 +0000 (09:57 +0200)]
soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs
Since commit
cab673583d96 ("soc: Unconditionally include qcom Makefile"),
we unconditionally include the soc/qcom/Makefile.
This opens up the possibility to compile test the code even when building
for other architectures.
Allow COMPILE_TEST for all qcom SoC Kconfigs, except for two Kconfigs
that depend on QCOM_SCM, since that triggers lots of build errors in
qcom_scm.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:22 +0000 (09:57 +0200)]
soc: qcom: apr: Avoid string overflow
'adev->name' is used as a NUL-terminated string, but using strncpy() with the
length equal to the buffer size may result in lack of the termination:
In function 'apr_add_device',
inlined from 'of_register_apr_devices' at drivers//soc/qcom/apr.c:264:7,
inlined from 'apr_probe' at drivers//soc/qcom/apr.c:290:2:
drivers//soc/qcom/apr.c:222:3: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(adev->name, np->name, APR_NAME_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes it to use the safer strscpy() instead.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:21 +0000 (09:57 +0200)]
soc: qcom: wcnss_ctrl: Avoid string overflow
'chinfo.name' is used as a NUL-terminated string, but using strncpy() with
the length equal to the buffer size may result in lack of the termination:
drivers//soc/qcom/wcnss_ctrl.c: In function 'qcom_wcnss_open_channel':
drivers//soc/qcom/wcnss_ctrl.c:284:2: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
strncpy(chinfo.name, name, sizeof(chinfo.name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This changes it to use the safer strscpy() instead.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:20 +0000 (09:57 +0200)]
soc: qcom: Remove depends on OF from QCOM_RPMH
QCOM_RPHM already selects ARM64, which always selects OF.
Additionally, the rpmh driver only uses linux/of.h, which has dummy
definitions for all functions, in order for code to to be able to
build without CONFIG_OF set.
Remove the superfluous depends on OF.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:19 +0000 (09:57 +0200)]
soc: qcom: Remove bogus depends on OF from QCOM_SMD_RPM
QCOM_SMD_RPM builds perfectly fine without CONFIG_OF set.
Remove the bogus depends on OF.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:18 +0000 (09:57 +0200)]
soc: qcom: smsm: Add select IRQ_DOMAIN
Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN.
This is needed in order to be able to remove the depends on ARCH_QCOM.
drivers/soc/qcom/smsm.c: In function ‘smsm_inbound_entry’:
drivers/soc/qcom/smsm.c:411:18: error: implicit declaration of function
‘irq_domain_add_linear’
entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry);
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:17 +0000 (09:57 +0200)]
soc: qcom: smp2p: Add select IRQ_DOMAIN
Since we are using irq_domain_add_linear(), add a select on IRQ_DOMAIN.
This is needed in order to be able to remove the depends on ARCH_QCOM.
drivers/soc/qcom/smp2p.c: In function ‘qcom_smp2p_inbound_entry’:
drivers/soc/qcom/smp2p.c:317:18: error: implicit declaration of function
‘irq_domain_add_linear’
entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry);
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:16 +0000 (09:57 +0200)]
soc: qcom: llcc-slice: Add missing include of sizes.h
Add missing include of sizes.h.
drivers/soc/qcom/llcc-slice.c: In function ‘llcc_update_act_ctrl’:
drivers/soc/qcom/llcc-slice.c:41:44: error: ‘SZ_4K’ undeclared
#define LLCC_TRP_ACT_CTRLn(n) (n * SZ_4K)
^~~~~
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Niklas Cassel [Wed, 29 Aug 2018 07:57:15 +0000 (09:57 +0200)]
soc: qcom: smem: Add missing include of sizes.h
Add missing include of sizes.h.
drivers/soc/qcom/smem.c: In function ‘qcom_smem_get_ptable’:
drivers/soc/qcom/smem.c:666:64: error: ‘SZ_4K’ undeclared
ptable = smem->regions[0].virt_base + smem->regions[0].size - SZ_4K;
^~~~~
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Colin Ian King [Mon, 11 Jun 2018 08:38:38 +0000 (09:38 +0100)]
soc: qcom: apr: fix spelling mistake: "paket" -> "packet"
Trivial fix to spelling mistake in dev_err message text
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Douglas Anderson [Thu, 6 Sep 2018 22:49:06 +0000 (15:49 -0700)]
soc: qcom: geni: geni_se_clk_freq_match() should always accept multiples
The geni_se_clk_freq_match() has some strange semantics. Specifically
it is defined with two modes:
1. It can find a clock that's an exact multiple of the requested rate
2. It can find a non-exact match but it can't handle multiples then
...but callers should always be able to handle a clock that is a
multiple of the requested clock so mode #2 doesn't really make sense.
Let's change the semantics so that the non-exact match can also accept
multiples and then change the code to handle that.
The only caller of this code is the unlanded SPI driver [1] which
currently passes "exact = True", thus it should be safe to change the
semantics in this way. ...and, in fact, the SPI driver should likely
be modified to pass "exact = False" (with the new semantics) since
that will allow it to work with SPI devices that request a clock rate
that doesn't exactly match a rate we can make.
[1] https://lkml.kernel.org/r/
1535107336-2214-1-git-send-email-dkota@codeaurora.org
Fixes:
eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Douglas Anderson [Thu, 6 Sep 2018 22:49:05 +0000 (15:49 -0700)]
soc: qcom: geni: Don't ignore clk_round_rate() errors in geni_se_clk_tbl_get()
The function clk_round_rate() is defined to return a "long", not an
"unsigned long". That's because it might return a negative error
code. Change the call in geni_se_clk_tbl_get() to check for errors.
While we're at it, get rid of a useless init of "freq".
NOTE: overall the idea that we should iterate over clk_round_rate() to
try to reconstruct a table already present in the clock driver is
questionable. Specifically:
- This method relies on "clk_round_rate()" rounding up.
- This method only works if the table is sorted and has no duplicates.
...this patch doesn't try to fix those problems, it just makes the
error handling more correct.
Fixes:
eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Stephen Boyd [Fri, 18 May 2018 22:47:50 +0000 (15:47 -0700)]
soc: qcom: geni: Make version macros simpler
This macro doesn't work, because it hides a local variable inside of the
macro to hold the version and that variable name is called 'ver' and
'version' sometimes.
Let's change this to be more explicit. Introduce three macros for the
major, minor, and step of the version, and require callers to pass the
version in to get the part of the version out. This way we don't hide
local variables inside macros and things are less evil overall.
Cc: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Cc: Sagar Dharia <sdharia@codeaurora.org>
Cc: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Venkata Narendra Kumar Gutta [Wed, 12 Sep 2018 18:06:35 +0000 (11:06 -0700)]
dt-bindings: msm: Update documentation of qcom,llcc
Add reg-names and interrupts for LLCC documentation and the usage
examples. llcc broadcast base is added in addition to llcc base,
which is used for llcc broadcast writes.
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Channagoud Kadabi [Wed, 12 Sep 2018 18:06:34 +0000 (11:06 -0700)]
drivers: edac: Add EDAC driver support for QCOM SoCs
Add error reporting driver for Single Bit Errors (SBEs) and Double Bit
Errors (DBEs). As of now, this driver supports error reporting for
Last Level Cache Controller (LLCC) of Tag RAM and Data RAM. Interrupts
are triggered when the errors happen in the cache, the driver handles
those interrupts and dumps the syndrome registers.
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Co-developed-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Venkata Narendra Kumar Gutta [Wed, 12 Sep 2018 18:06:33 +0000 (11:06 -0700)]
soc: qcom: Add support to register LLCC EDAC driver
Cache error reporting controller detects and reports single and
double bit errors on Last Level Cache Controller (LLCC) cache.
Add required support to register LLCC EDAC driver as platform driver,
from LLCC driver.
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Venkata Narendra Kumar Gutta [Wed, 12 Sep 2018 18:06:32 +0000 (11:06 -0700)]
soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC)
Currently, broadcast base is set to end of the LLCC banks, which may
not be correct always. As the number of banks may vary for each chipset
and the broadcast base could be at a different address as well. This info
depends on the chipset, so get the broadcast base info from the device
tree (DT). Add broadcast base in LLCC driver and use this for broadcast
writes.
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Maxime Jourdan [Thu, 23 Aug 2018 11:49:53 +0000 (13:49 +0200)]
soc: amlogic: add meson-canvas driver
Amlogic SoCs have a repository of 256 canvas which they use to
describe pixel buffers.
They contain metadata like width, height, block mode, endianness [..]
Many IPs within those SoCs like vdec/vpu rely on those canvas to read/write
pixels.
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Maxime Jourdan [Thu, 23 Aug 2018 11:49:52 +0000 (13:49 +0200)]
dt-bindings: soc: amlogic: add meson-canvas documentation
DT bindings doc for amlogic,meson-canvas
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Neil Armstrong [Thu, 26 Jul 2018 13:59:16 +0000 (15:59 +0200)]
firmware: meson_sm: Add serial number sysfs entry
The Amlogic Meson SoC Secure Monitor implements a call to retrieve an unique
SoC ID starting from the GX Family and all new families.
The serial number is simply exposed as a sysfs entry under the firmware
sysfs directory.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Icenowy Zheng [Sun, 2 Sep 2018 07:26:17 +0000 (09:26 +0200)]
dt-bindings: sunxi-sram: add binding for Allwinner H6 SRAM C
The Allwinner H6 SoC's DE3 needs the SRAM C section being claimed in the
system controller to work, like A64 DE2.
As H6 and A64 system controller are quite similar, code is reused now,
and the A64 fallback compatible string is added after the H6 compatible
string.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
[fixed typo in compatible string]
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Paul Kocialkowski [Sun, 9 Sep 2018 19:04:39 +0000 (21:04 +0200)]
drivers: soc: Allow building the sunxi driver without ARCH_SUNXI
This makes it possible to build the sunxi SRAM driver without building
for the sunxi architecture. This allows selecting the driver when
building the kernel in testing environments.
In particular, this is necessary for testing of the Cedrus driver, that
selects the sunxi SRAM driver.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Fabrizio Castro [Mon, 10 Sep 2018 11:53:50 +0000 (12:53 +0100)]
soc: renesas: Identify RZ/G2E
Add support for identifying the RZ/G2E (r8a774c0) SoC.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Kuninori Morimoto [Fri, 7 Sep 2018 02:04:19 +0000 (02:04 +0000)]
soc: renesas: convert to SPDX identifiers
This patch updates license to use SPDX-License-Identifier
instead of verbose license text.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Thu, 2 Aug 2018 14:55:04 +0000 (15:55 +0100)]
soc: renesas: rcar-rst: Add support for RZ/G2M
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Thu, 2 Aug 2018 14:53:19 +0000 (15:53 +0100)]
soc: renesas: rcar-sysc: Add r8a774a1 support
Add support for RZ/G2M (R8A774A1) SoC power areas to the R-Car SYSC
driver.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Biju Das [Thu, 2 Aug 2018 14:48:18 +0000 (15:48 +0100)]
dt-bindings: power: Add r8a774a1 SYSC power domain definitions
This patch adds power domain indices for RZ/G2M.
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Chris Paterson <chris.paterson2@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Quentin Perret [Mon, 10 Sep 2018 16:28:10 +0000 (17:28 +0100)]
firmware: arm_scmi: add a getter for power of performance states
The SCMI protocol can be used to get power estimates from firmware
corresponding to each performance state of a device. Although these power
costs are already managed by the SCMI firmware driver, they are not
exposed to any external subsystem yet.
Fix this by adding a new get_power() interface to the exisiting perf_ops
defined for the SCMI protocol.
Signed-off-by: Quentin Perret <quentin.perret@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Sudeep Holla [Fri, 7 Sep 2018 16:03:25 +0000 (17:03 +0100)]
firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings
Replace all the memcpy() for copying name strings from the firmware with
strlcpy() to make sure we are bounded by the source buffer size and we
also always have NULL-terminated strings.
This is needed to avoid out of bounds accesses if the firmware returns
a non-terminated string.
Reported-by: Olof Johansson <olof@lixom.net>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Linus Torvalds [Mon, 10 Sep 2018 00:26:43 +0000 (17:26 -0700)]
Linux 4.19-rc3
Linus Torvalds [Sun, 9 Sep 2018 14:05:15 +0000 (07:05 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"A set of fixes for x86:
- Prevent multiplication result truncation on 32bit. Introduced with
the early timestamp reworrk.
- Ensure microcode revision storage to be consistent under all
circumstances
- Prevent write tearing of PTEs
- Prevent confusion of user and kernel reegisters when dumping fatal
signals verbosely
- Make an error return value in a failure path of the vector
allocation negative. Returning EINVAL might the caller assume
success and causes further wreckage.
- A trivial kernel doc warning fix"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Use WRITE_ONCE() when setting PTEs
x86/apic/vector: Make error return value negative
x86/process: Don't mix user/kernel regs in 64bit __show_regs()
x86/tsc: Prevent result truncation on 32bit
x86: Fix kernel-doc atomic.h warnings
x86/microcode: Update the new microcode revision unconditionally
x86/microcode: Make sure boot_cpu_data.microcode is up-to-date