linux-2.6-microblaze.git
3 years agoMerge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilma...
Olof Johansson [Sat, 3 Oct 2020 20:00:54 +0000 (13:00 -0700)]
Merge tag 'amlogic-drivers' of https://git./linux/kernel/git/khilman/linux-amlogic into arm/drivers

soc: amlogic: driver updates for v5.10
- misc. pm-domain updates

* tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  soc: amlogic: pm-domains: use always-on flag
  soc: amlogic: meson-ee-pwrc: add support for the Meson AXG SoCs
  dt-bindings: power: amlogic, meson-ee-pwrc: add Amlogic AXG power controller bindings

Link: https://lore.kernel.org/r/7hblhukjzx.fsf@baylibre.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'qcom-drivers-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sat, 3 Oct 2020 19:59:48 +0000 (12:59 -0700)]
Merge tag 'qcom-drivers-for-5.10' of https://git./linux/kernel/git/qcom/linux into arm/drivers

Qualcomm driver updates for v5.10

Replace the busy wait for free tcs slots in the RPMh driver with a
sleeping wait and use memory barriers when writing the command registers.

Add a bunch of SoC ids to the socinfo driver, fix an erro printin the
apr driver and migrate llcc to devm_platform_ioremap_resource_byname().

* tag 'qcom-drivers-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: llcc: use devm_platform_ioremap_resource_byname()
  soc: qcom: apr: Fixup the error displayed on lookup failure
  soc: qcom: socinfo: Add msm8992/4 and apq8094 SoC IDs
  soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free
  soc: qcom-geni-se: Don't use relaxed writes when writing commands
  soc: qcom: socinfo: add SC7180 entry to soc_id array
  soc: qcom: socinfo: add soc id for IPQ6018

Link: https://lore.kernel.org/r/20200924040504.179708-1-bjorn.andersson@linaro.org
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'soc-fsl-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo...
Olof Johansson [Sat, 3 Oct 2020 19:59:13 +0000 (12:59 -0700)]
Merge tag 'soc-fsl-next-v5.10' of git://git./linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.10

Fix various compile warnings and static analysis warnings for:
- QBMan driver
- DPIO driver
- QE driver

* tag 'soc-fsl-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk
  soc: fsl: qman: convert to use be32_add_cpu()
  soc: fsl: dpio: remove set but not used 'addr_cena'
  soc: fsl: qbman: Fix return value on success
  soc: fsl: qman: fix -Wpacked-not-aligned warnings

Link: https://lore.kernel.org/r/20200923224416.25788-1-leoyang.li@nxp.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawngu...
Olof Johansson [Sat, 3 Oct 2020 19:58:31 +0000 (12:58 -0700)]
Merge tag 'imx-drivers-5.10' of git://git./linux/kernel/git/shawnguo/linux into arm/drivers

i.MX drivers update for 5.10:

- Use dev_err_probe() to simplify error handling for i.MX GPCv2 driver.
- Add a check in i.MX SCU power domain driver to ignore the power
  domains that are not owned by the current partition.

* tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  firmware: imx: scu-pd: ignore power domain not owned
  soc: imx: gpcv2: Use dev_err_probe() to simplify error handling

Link: https://lore.kernel.org/r/20200923073009.23678-1-shawnguo@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'sunxi-drivers-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sat, 3 Oct 2020 19:58:15 +0000 (12:58 -0700)]
Merge tag 'sunxi-drivers-for-5.10-1' of https://git./linux/kernel/git/sunxi/linux into arm/drivers

One small style fix for the Allwinner SRAM driver

* tag 'sunxi-drivers-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  soc: sunxi: sram: remove unneeded semicolon

Link: https://lore.kernel.org/r/175d36ad-bc98-4d5d-b035-ce467e932248.lettre@localhost
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'drivers_soc_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sat, 26 Sep 2020 19:56:50 +0000 (12:56 -0700)]
Merge tag 'drivers_soc_for_5.10' of git://git./linux/kernel/git/ssantosh/linux-keystone into arm/drivers

ARM: soc: TI driver updates for v5.10

Consist of:
 - Add Ring accelerator support for AM65x
 - Add TI PRUSS platform driver and enable it on available platforms
 - Extend PRUSS driver for CORECLK_MUX/IEPCLK_MUX support
 - UDMA rx ring pair fix
 - Add socinfo entry for J7200

* tag 'drivers_soc_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  Add missing '#' to fix schema errors:
  soc: ti: Convert to DEFINE_SHOW_ATTRIBUTE
  dmaengine: ti: k3-udma-glue: Fix parameters for rx ring pair request
  soc: ti: k3-socinfo: Add entry for J7200
  soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX
  dt-bindings: soc: ti: Update TI PRUSS bindings regarding clock-muxes
  firmware: ti_sci: allow frequency change for disabled clocks by default
  soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one
  soc: ti: pruss: Enable support for ICSSG subsystems on K3 J721E SoCs
  soc: ti: pruss: Enable support for ICSSG subsystems on K3 AM65x SoCs
  soc: ti: pruss: Add support for PRU-ICSS subsystems on 66AK2G SoC
  soc: ti: pruss: Add support for PRU-ICSS subsystems on AM57xx SoCs
  soc: ti: pruss: Add support for PRU-ICSSs on AM437x SoCs
  soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs
  dt-bindings: soc: ti: Add TI PRUSS bindings
  bindings: soc: ti: soc: ringacc: remove ti,dma-ring-reset-quirk
  soc: ti: k3: ringacc: add am65x sr2.0 support

Link: https://lore.kernel.org/r/1600656828-29267-1-git-send-email-santosh.shilimkar@oracle.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'tegra-for-5.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sat, 26 Sep 2020 19:40:09 +0000 (12:40 -0700)]
Merge tag 'tegra-for-5.10-firmware' of git://git./linux/kernel/git/tegra/linux into arm/drivers

firmware: tegra: Changes for v5.10-rc1

This is a minor change that implements a BPMP workaround for pre-silicon
platforms and is needed to enable support for BPMP on Tegra234.

* tag 'tegra-for-5.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: Enable BPMP support on Tegra234

Link: https://lore.kernel.org/r/20200918150303.3938852-3-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'tegra-for-5.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Olof Johansson [Sat, 26 Sep 2020 19:39:35 +0000 (12:39 -0700)]
Merge tag 'tegra-for-5.10-soc' of git://git./linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v5.10-rc1

These changes contain a bit of cleanup and chip support for the upcoming
Tegra234 SoC.

* tag 'tegra-for-5.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Add Tegra234 support
  soc/tegra: pmc: Reorder reset sources/levels definitions
  soc/tegra: misc: Add Tegra234 support
  soc/tegra: fuse: Add Tegra234 support
  soc/tegra: fuse: Implement tegra_is_silicon()
  soc/tegra: fuse: Extract tegra_get_platform()

Link: https://lore.kernel.org/r/20200918150303.3938852-2-thierry.reding@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'tee-dev-cleanup-for-v5.10' of git://git.linaro.org:/people/jens.wiklander...
Olof Johansson [Sat, 26 Sep 2020 19:39:07 +0000 (12:39 -0700)]
Merge tag 'tee-dev-cleanup-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers

Simplify tee_device_register() and friends

Uses cdev_device_add() instead of the cdev_add() device_add()
combination.

Initializes dev->groups instead of direct calls to sysfs_create_group()
and friends.

* tag 'tee-dev-cleanup-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee:
  tee: avoid explicit sysfs_create/delete_group by initialising dev->groups
  tee: replace cdev_add + device_add with cdev_device_add

Link: https://lore.kernel.org/r/20200918144130.GB1219771@jade
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'renesas-drivers-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux...
Olof Johansson [Sat, 26 Sep 2020 19:38:33 +0000 (12:38 -0700)]
Merge tag 'renesas-drivers-for-v5.10-tag2' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.10 (take two)

  - Add core support for the R-Car V3U (R8A779A0) SoC, including System
    Controller (SYSC) and Reset (RST) support,
  - Various Kconfig cleanups.

* tag 'renesas-drivers-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: r8a779a0-sysc: Add r8a779a0 support
  soc: renesas: rcar-rst: Add support for R-Car V3U
  soc: renesas: Identify R-Car V3U
  soc: renesas: Sort driver description title
  soc: renesas: Use ARM32/ARM64 for menu description
  dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions
  dt-bindings: power: Add r8a779a0 SYSC power domain definitions

Link: https://lore.kernel.org/r/20200918124800.15555-4-geert+renesas@glider.be
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agosoc: amlogic: pm-domains: use always-on flag
Kevin Hilman [Mon, 21 Sep 2020 22:21:35 +0000 (15:21 -0700)]
soc: amlogic: pm-domains: use always-on flag

Rather than use a governor to keep these domains always-on, instead
use the flag GENPD_FLAG_ALWAYS_ON.  This has the same effect, but with
much lower overhead since the governor path is not used at all.

Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20200921222135.7145-1-khilman@baylibre.com
3 years agosoc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk
Wang Hai [Tue, 4 Aug 2020 13:56:44 +0000 (21:56 +0800)]
soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk

Fix smatch warning:

drivers/soc/fsl/qe/ucc.c:526
 ucc_set_tdm_rxtx_clk() warn: unsigned 'tdm_num' is never less than zero.

'tdm_num' is u32 type, never less than zero.

Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: qman: convert to use be32_add_cpu()
Liu Shixin [Mon, 14 Sep 2020 04:17:52 +0000 (12:17 +0800)]
soc: fsl: qman: convert to use be32_add_cpu()

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: dpio: remove set but not used 'addr_cena'
Jason Yan [Thu, 10 Sep 2020 14:04:15 +0000 (22:04 +0800)]
soc: fsl: dpio: remove set but not used 'addr_cena'

This addresses the following gcc warning with "make W=1":

drivers/soc/fsl/dpio/qbman-portal.c: In function
‘qbman_swp_enqueue_multiple_direct’:
drivers/soc/fsl/dpio/qbman-portal.c:650:11: warning: variable
‘addr_cena’ set but not used [-Wunused-but-set-variable]
  650 |  uint64_t addr_cena;
      |           ^~~~~~~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: qbman: Fix return value on success
Krzysztof Kozlowski [Sun, 20 Sep 2020 20:26:25 +0000 (22:26 +0200)]
soc: fsl: qbman: Fix return value on success

On error the function was meant to return -ERRNO.  This also fixes
compile warning:

  drivers/soc/fsl/qbman/bman.c:640:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]

Fixes: 0505d00c8dba ("soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agosoc: fsl: qman: fix -Wpacked-not-aligned warnings
Li Yang [Tue, 22 Sep 2020 22:38:21 +0000 (17:38 -0500)]
soc: fsl: qman: fix -Wpacked-not-aligned warnings

This fixes compile warnings from the -Wpacked-not-aligned option.

In file included from ../drivers/crypto/caam/qi.c:12:
../include/soc/fsl/qman.h:259:1: warning: alignment 1 of ‘struct qm_dqrr_entry’ is less than 8 [-Wpacked-not-aligned]
 } __packed;
 ^
../include/soc/fsl/qman.h:292:2: warning: alignment 1 of ‘struct <anonymous>’ is less than 8 [-Wpacked-not-aligned]
  } __packed ern;
  ^

Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
3 years agoAdd missing '#' to fix schema errors:
Krzysztof Kozlowski [Mon, 21 Sep 2020 02:32:38 +0000 (19:32 -0700)]
Add missing '#' to fix schema errors:

  $id: 'http://devicetree.org/schemas/soc/ti/ti,pruss.yaml' does not match
'http://devicetree.org/schemas/.*\\.yaml#'
  $schema: 'http://devicetree.org/meta-schemas/core.yaml' is not one of
['http://devicetree.org/meta-schemas/core.yaml#',
'http://devicetree.org/meta-schemas/base.yaml#']
  Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml: ignoring,
error in schema: $id

Fixes: bd691ce0ba9d ("dt-bindings: soc: ti: Add TI PRUSS bindings")
Acked-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: Convert to DEFINE_SHOW_ATTRIBUTE
Qinglang Miao [Mon, 21 Sep 2020 02:30:30 +0000 (19:30 -0700)]
soc: ti: Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: amlogic: meson-ee-pwrc: add support for the Meson AXG SoCs
Neil Armstrong [Thu, 17 Sep 2020 06:47:02 +0000 (08:47 +0200)]
soc: amlogic: meson-ee-pwrc: add support for the Meson AXG SoCs

The Power Controller in the Amlogic AXG SoCs is similar to the GXL one
but with less VPU memory domains to enable and a supplementary Audio
memory power domain.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200917064702.1459-3-narmstrong@baylibre.com
3 years agodt-bindings: power: amlogic, meson-ee-pwrc: add Amlogic AXG power controller bindings
Neil Armstrong [Thu, 17 Sep 2020 06:47:01 +0000 (08:47 +0200)]
dt-bindings: power: amlogic, meson-ee-pwrc: add Amlogic AXG power controller bindings

This add the bindings of the Power Controller found in the Amlogic AXG SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200917064702.1459-2-narmstrong@baylibre.com
3 years agofirmware: tegra: Enable BPMP support on Tegra234
Thierry Reding [Thu, 17 Sep 2020 10:07:51 +0000 (12:07 +0200)]
firmware: tegra: Enable BPMP support on Tegra234

Enable support for the BPMP on Tegra234 to avoid relying on Tegra194
being enabled to pull in the needed OF device ID table entry.

On simulation platforms the BPMP hasn't booted up yet by the time we
probe the BPMP driver and the BPMP hasn't had a chance to mark the
doorbell as ringable by the CCPLEX. This corresponding check in the
BPMP driver will therefore fail. Work around this by disabling the
check on simulation platforms.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agoMerge branch 'for-5.10/soc' into for-5.10/firmware
Thierry Reding [Fri, 18 Sep 2020 13:56:22 +0000 (15:56 +0200)]
Merge branch 'for-5.10/soc' into for-5.10/firmware

3 years agosoc/tegra: pmc: Add Tegra234 support
Thierry Reding [Thu, 17 Sep 2020 10:07:50 +0000 (12:07 +0200)]
soc/tegra: pmc: Add Tegra234 support

The PMC block is largely similar to that found on earlier chips, but
not completely compatible. Allow binding to the instantiation found on
Tegra234.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agosoc/tegra: pmc: Reorder reset sources/levels definitions
Thierry Reding [Thu, 17 Sep 2020 10:07:49 +0000 (12:07 +0200)]
soc/tegra: pmc: Reorder reset sources/levels definitions

Move the definitions of reset sources and levels into a more natural
location.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agosoc/tegra: misc: Add Tegra234 support
Thierry Reding [Thu, 17 Sep 2020 10:07:48 +0000 (12:07 +0200)]
soc/tegra: misc: Add Tegra234 support

The MISC block is largely similar to that found on earlier chips, but
not completely compatible. Allow binding to the instantiation found on
Tegra234.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agosoc/tegra: fuse: Add Tegra234 support
Thierry Reding [Thu, 17 Sep 2020 10:07:47 +0000 (12:07 +0200)]
soc/tegra: fuse: Add Tegra234 support

Add support for FUSE block found on the Tegra234 SoC, which is largely
similar to the IP found on previous generations.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agosoc/tegra: fuse: Implement tegra_is_silicon()
Thierry Reding [Thu, 17 Sep 2020 10:07:46 +0000 (12:07 +0200)]
soc/tegra: fuse: Implement tegra_is_silicon()

This function can be used by drivers to determine whether code is
running on silicon or on a simulation platform.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agosoc/tegra: fuse: Extract tegra_get_platform()
Thierry Reding [Thu, 17 Sep 2020 10:07:45 +0000 (12:07 +0200)]
soc/tegra: fuse: Extract tegra_get_platform()

This function extracts the PRE_SI_PLATFORM field from the HIDREV
register and can be used to determine which platform the kernel runs on
(silicon, simulation, ...). Note that while only Tegra194 and later
define this field, it should be safe to call this on prior generations
as well since this field should read as 0, indicating silicon.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
3 years agotee: avoid explicit sysfs_create/delete_group by initialising dev->groups
Sudeep Holla [Tue, 1 Sep 2020 10:33:35 +0000 (11:33 +0100)]
tee: avoid explicit sysfs_create/delete_group by initialising dev->groups

If the dev->groups is initialised, the sysfs group is created as part
of device_add call. There is no need to call sysfs_create/delete_group
explicitly.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
3 years agotee: replace cdev_add + device_add with cdev_device_add
Sudeep Holla [Tue, 1 Sep 2020 10:33:34 +0000 (11:33 +0100)]
tee: replace cdev_add + device_add with cdev_device_add

Commit 233ed09d7fda ("chardev: add helper function to register char devs
with a struct device") added a helper function 'cdev_device_add'.

Make use of cdev_device_add in tee_device_register to replace cdev_add
and device_add. Since cdev_device_add takes care of setting the
kobj->parent, drop explicit initialisation in tee_device_alloc.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
3 years agosoc: qcom: llcc: use devm_platform_ioremap_resource_byname()
Qilong Zhang [Wed, 16 Sep 2020 11:15:17 +0000 (19:15 +0800)]
soc: qcom: llcc: use devm_platform_ioremap_resource_byname()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20200916111517.99670-1-zhangqilong3@huawei.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: renesas: r8a779a0-sysc: Add r8a779a0 support
Yoshihiro Shimoda [Fri, 11 Sep 2020 07:43:52 +0000 (16:43 +0900)]
soc: renesas: r8a779a0-sysc: Add r8a779a0 support

Add support for R-Car V3U (R8A779A0) SoC power areas and register
access, because register specification differs from R-Car Gen2/3.

Inspired by patches in the BSP by Tho Vu.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1599810232-29035-5-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agosoc: qcom: apr: Fixup the error displayed on lookup failure
Sibi Sankar [Tue, 15 Sep 2020 15:42:32 +0000 (21:12 +0530)]
soc: qcom: apr: Fixup the error displayed on lookup failure

APR client incorrectly prints out "ret" variable on pdr_add_lookup failure,
it should be printing the error value returned by the lookup instead.

Fixes: 8347356626028 ("soc: qcom: apr: Add avs/audio tracking functionality")
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Link: https://lore.kernel.org/r/20200915154232.27523-1-sibis@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agoMerge tag 'scmi-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Olof Johansson [Tue, 15 Sep 2020 15:10:40 +0000 (08:10 -0700)]
Merge tag 'scmi-updates-5.10' of git://git./linux/kernel/git/sudeep.holla/linux into arm/drivers

ARM SCMI updates for v5.10

Couple of main additions: SCMI system protocol support and ability to
build SCMI driver as a single module which is needed by some transports
like virtio as they may not be ready early during the boot. This also
includes constification of scmi ops and related function pointers.

* tag 'scmi-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Enable building as a single module
  firmware: arm_scmi: Move scmi protocols registration into the driver
  firmware: arm_scmi: Move scmi bus init and exit calls into the driver
  firmware: smccc: Export both smccc functions
  firmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free
  firmware: arm_scmi: Add SCMI device for system power protocol
  firmware: arm_scmi: Add system power protocol support
  firmware: arm_scmi: Constify static scmi-ops
  firmware: arm_scmi: Constify ops pointers in scmi_handle
  cpufreq: arm_scmi: Constify scmi_perf_ops pointers

Link: https://lore.kernel.org/r/20200914075018.2rvytvghxyutcbk4@bogus
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agosoc: qcom: socinfo: Add msm8992/4 and apq8094 SoC IDs
Konrad Dybcio [Tue, 2 Jun 2020 20:12:29 +0000 (22:12 +0200)]
soc: qcom: socinfo: Add msm8992/4 and apq8094 SoC IDs

Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
Link: https://lore.kernel.org/r/20200602201229.322578-1-konradybcio@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agofirmware: arm_scmi: Enable building as a single module
Sudeep Holla [Mon, 7 Sep 2020 11:09:23 +0000 (12:09 +0100)]
firmware: arm_scmi: Enable building as a single module

Now, with all the plumbing in place to enable building scmi as a module
instead of built-in modules, let us enable the same.

Link: https://lore.kernel.org/r/20200907195046.56615-5-sudeep.holla@arm.com
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Move scmi protocols registration into the driver
Sudeep Holla [Mon, 7 Sep 2020 11:06:01 +0000 (12:06 +0100)]
firmware: arm_scmi: Move scmi protocols registration into the driver

In preparation to enable building SCMI as a single module, let us move
the SCMI protocol registration call into the driver. This enables us
to also add unregistration of the SCMI protocols.

The main reason for this is to keep it simple instead of maintaining
it as separate modules and dealing with all possible initcall races
and deferred probe handling. We can move it as separate modules if
needed in future.

Link: https://lore.kernel.org/r/20200907195046.56615-4-sudeep.holla@arm.com
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Move scmi bus init and exit calls into the driver
Sudeep Holla [Mon, 7 Sep 2020 11:00:04 +0000 (12:00 +0100)]
firmware: arm_scmi: Move scmi bus init and exit calls into the driver

In preparation to enable building scmi as a single module, let us move
the scmi bus {de-,}initialisation call into the driver.

The main reason for this is to keep it simple instead of maintaining
it as separate modules and dealing with all possible initcall races
and deferred probe handling. We can move it as separate modules if
needed in future.

Link: https://lore.kernel.org/r/20200907195046.56615-3-sudeep.holla@arm.com
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: smccc: Export both smccc functions
Sudeep Holla [Tue, 23 Jun 2020 14:33:57 +0000 (15:33 +0100)]
firmware: smccc: Export both smccc functions

We need to export both arm_smccc_1_1_get_conduit and arm_smccc_get_version
to allow several modules make use of them. Arm FFA, Arm SCMI and PTP
drivers are few drivers that are planning to use these functions.

Let us export them in preparation to add support for SCMI as module.

Link: https://lore.kernel.org/r/20200907195046.56615-2-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agoMerge tag 'arm-soc/for-5.10/drivers' of https://github.com/Broadcom/stblinux into...
Olof Johansson [Sun, 13 Sep 2020 18:40:17 +0000 (11:40 -0700)]
Merge tag 'arm-soc/for-5.10/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

This pull request contains Broadcom SoCs drivers changes for 5.10,
please pull the following:

- Alvaro adds support for the BCM63xx (DSL) SoCs power domain controller
  and adds support for the 6318, 6328, 6362, 63268.

- Florian adds support for tuning the Bus Interface Unit on 72164 and
  72165, enables the Brahma-B53 and Cortex-A72 read-ahead cache for the
  64-bit capable ARCH_BRCMSTB platforms, and finally updates the GISB
  driver to support breakpoint notifications.

* tag 'arm-soc/for-5.10/drivers' of https://github.com/Broadcom/stblinux:
  bus: brcmstb_gisb: Add support for breakpoint interrupts
  dt-bindings: bus: Document breakpoint interrupt for gisb-arb
  soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines
  soc: bcm: brcmstb: biuctrl: Change RAC prefetch distance from +/-1 to +/- 2
  soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72165
  soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72164
  MIPS: BMIPS: dts: add BCM63268 power domain support
  MIPS: BMIPS: dts: add BCM6362 power domain support
  MIPS: BMIPS: dts: add BCM6328 power domain support
  soc: bcm: add BCM63xx power domain driver
  MIPS: BMIPS: add BCM6318 power domain definitions
  MIPS: BMIPS: add BCM63268 power domain definitions
  MIPS: BMIPS: add BCM6362 power domain definitions
  MIPS: BMIPS: add BCM6328 power domain definitions
  dt-bindings: soc: brcm: add BCM63xx power domain binding
  soc: bcm: brcmstb: biuctrl: Enable Read-ahead cache
  bus: brcmstb_gisb: Shorten prints

Link: https://lore.kernel.org/r/20200912032153.1216354-3-f.fainelli@gmail.com
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'memory-controller-drv-5.10' of https://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sun, 13 Sep 2020 18:26:36 +0000 (11:26 -0700)]
Merge tag 'memory-controller-drv-5.10' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers

Memory controller drivers for v5.10

1. Fixes in several drivers for GCC warnings, including kerneldoc fixes
   and issues discovered while compile testing.
2. Enable compile testing of most of the drivers.
3. Use dev_err_probe() to simplify the code.
4. omap-gpmc: fix off by one errors, code cleanups and improvements.
5. tegra: remove the GPU from DRM IOMMU group so it would use its own;
   few minor fixes.
6. brcmstb_dpfe: fix memory leak and array index out of bounds.

* tag 'memory-controller-drv-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (26 commits)
  memory: fsl-corenet-cf: Fix handling of platform_get_irq() error
  memory: omap-gpmc: Fix -Wunused-function warnings
  memory: tegra: Remove GPU from DRM IOMMU group
  memory: tegra186-emc: Simplify with dev_err_probe()
  memory: brcmstb_dpfe: Simplify with dev_err_probe()
  memory: samsung: exynos5422-dmc: add missing and fix kerneldoc
  memory: samsung: exynos5422-dmc: remove unused exynos5_dmc members
  memory: samsung: exynos5422-dmc: rename timing register fields variables
  memory: emif: Remove bogus debugfs error handling
  memory: omap-gpmc: Fix build error without CONFIG_OF
  memory: omap-gpmc: Fix a couple off by ones
  memory: brcmstb_dpfe: fix array index out of bounds
  memory: brcmstb_dpfe: Fix memory leak
  memory: tegra: Correct shift value of apew
  memory: Enable compile testing for most of the drivers
  memory: brcmstb_dpfe: add separate entry for compile test
  memory: tegra: tegra210-emc: fix indentation
  memory: renesas-rpc-if: simplify with PTR_ERR_OR_ZERO
  memory: omap-gpmc: consistently use !res for NULL checks
  memory: omap-gpmc: use WARN() instead of BUG() on wrong free
  ...

Link: https://lore.kernel.org/r/20200907150611.11267-1-krzk@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'renesas-drivers-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux...
Olof Johansson [Sun, 13 Sep 2020 18:22:09 +0000 (11:22 -0700)]
Merge tag 'renesas-drivers-for-v5.10-tag1' of git://git./linux/kernel/git/geert/renesas-devel into arm/drivers

Renesas driver updates for v5.10

  - Improve visual Kconfig structure.

* tag 'renesas-drivers-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: Align driver description titles
  soc: renesas: Use menu for Renesas SoC

Link: https://lore.kernel.org/r/20200904114819.30254-4-geert+renesas@glider.be
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agoMerge tag 'optee-i2c-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander...
Olof Johansson [Sun, 13 Sep 2020 18:16:39 +0000 (11:16 -0700)]
Merge tag 'optee-i2c-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers

Make sure I2C functions used in OP-TEE are reachable with IS_REACHABLE()

* tag 'optee-i2c-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee:
  drivers: optee: fix i2c build issue

Link: https://lore.kernel.org/r/20200901101806.GA3286324@jade
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agofirmware: imx: scu-pd: ignore power domain not owned
Peng Fan [Tue, 8 Sep 2020 10:07:01 +0000 (18:07 +0800)]
firmware: imx: scu-pd: ignore power domain not owned

Should not register power domain that not owned by current
partition.

Alought power domains will not be registered when power on failure,
we have to let CPU waste more cycles.

Whether power on or owned check, both need communicate with SCU,
but with owned check, we no need to run more code path to save CPU
cycles.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
3 years agodmaengine: ti: k3-udma-glue: Fix parameters for rx ring pair request
Peter Ujfalusi [Sat, 12 Sep 2020 04:47:39 +0000 (21:47 -0700)]
dmaengine: ti: k3-udma-glue: Fix parameters for rx ring pair request

The original commit mixed up the forward and completion ring IDs for the
rx flow configuration.

Acked-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Fixes: 4927b1ab2047 ("dmaengine: ti: k3-udma: Switch to k3_ringacc_request_rings_pair")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: k3-socinfo: Add entry for J7200
Peter Ujfalusi [Sat, 12 Sep 2020 04:47:39 +0000 (21:47 -0700)]
soc: ti: k3-socinfo: Add entry for J7200

Update K3 chipinfo driver to support new TI J7200 SoC.
It's JTAG PARTNO is 0xBB6D.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX
Grzegorz Jaszczyk [Sat, 12 Sep 2020 04:47:10 +0000 (21:47 -0700)]
soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX

The IEPCLK_MUX is present on all SoCs whereas the CORECLK_MUX is present
only on AM65x SoCs and J721E. Add support for both these CLK muxes.

This allows the clock rates and clock parents for these to be controlled
through DT leveraging the clk infrastructure for configuring the default
parents and rates.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agodt-bindings: soc: ti: Update TI PRUSS bindings regarding clock-muxes
Grzegorz Jaszczyk [Sat, 12 Sep 2020 04:47:09 +0000 (21:47 -0700)]
dt-bindings: soc: ti: Update TI PRUSS bindings regarding clock-muxes

ICSS/ICSSG modules have an IEP clock mux that allow selection of
internal IEP clock from 2 clock sources.

ICSSG module has a CORE clock mux that allows selection of internal CORE
clock from 2 clock sources.

Add binding information for these 2 clock muxes.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agofirmware: ti_sci: allow frequency change for disabled clocks by default
Tero Kristo [Sat, 12 Sep 2020 04:47:08 +0000 (21:47 -0700)]
firmware: ti_sci: allow frequency change for disabled clocks by default

If a clock is disabled, its frequency should be allowed to change as
it is no longer in use. Add a flag towards this to the firmware clock
API handler routines.

Acked-by: Nishanth Menon <nm@ti.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one
Tero Kristo [Sat, 12 Sep 2020 04:47:08 +0000 (21:47 -0700)]
soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one

Current implementation of the genpd support over TI SCI uses a single
genpd across the whole SoC, and attaches multiple devices to this. This
solution has its drawbacks, like it is currently impossible to attach
more than one power domain to a device; the core genpd implementation
requires one genpd per power-domain entry in DT for a single device.
Also, some devices like USB apparently require their own genpd during
probe time, the current shared approach in use does not work at all.

Switch the implementation over to use a single genpd per power domain
entry in DT. The domains are registered with the onecell approach, but
we also add our own xlate service due to recent introduction of the
extended flag for TI SCI PM domains; genpd core xlate service requires
a single cell per powerdomain, but we are using two cells.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Enable support for ICSSG subsystems on K3 J721E SoCs
Suman Anna [Sat, 12 Sep 2020 04:43:37 +0000 (21:43 -0700)]
soc: ti: pruss: Enable support for ICSSG subsystems on K3 J721E SoCs

The K3 J721E family of SoCs have a revised version of the PRU-ICSS (ICSSG)
processor subsystem present on K3 AM65x SoCs. These SoCs contain typically
two ICSSG instances named ICSSG0 and ICSSG1. The two ICSSGs are identical
to each other for the most part with minor SoC integration differences and
capabilities. The ICSSG1 supports slightly enhanced features like SGMII
mode Ethernet, while the ICSSG0 instance is limited to MII mode only.

There is no change in the Interrupt Controller w.r.t AM65x. All other
integration aspects are very similar to the ICSSGs on AM65x SoCs.

The existing pruss platform driver has been updated to support these new
ICSSG instances through new J721E specific compatibles.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Enable support for ICSSG subsystems on K3 AM65x SoCs
Suman Anna [Sat, 12 Sep 2020 04:43:36 +0000 (21:43 -0700)]
soc: ti: pruss: Enable support for ICSSG subsystems on K3 AM65x SoCs

The K3 AM65x family of SoCs have the next generation of the PRU-ICSS
processor subsystem capable of supporting Gigabit Ethernet, and is
commonly referred to as ICSSG. These SoCs contain typically three
ICSSG instances named ICSSG0, ICSSG1 and ICSSG2. The three ICSSGs are
identical to each other for the most part with minor SoC integration
differences and capabilities. The ICSSG2 supports slightly enhanced
features like SGMII mode Ethernet, while the ICSS0 and ICSSG1 instances
are limited to MII mode only.

The ICSSGs on K3 AM65x SoCs are in general super-sets of the PRUSS on the
AM57xx/66AK2G SoCs. They include two additional auxiliary PRU cores called
RTUs and few other additional sub-modules. The interrupt integration is
also different on the K3 AM65x SoCs and are propagated through various
SoC-level Interrupt Router and Interrupt Aggregator blocks. Other IP level
differences include different constant tables, differences in system event
interrupt input sources etc. They also do not have a programmable module
reset line like those present on AM33xx/AM43xx SoCs. The modules are reset
just like any other IP with the SoC's global cold/warm resets.

The existing pruss platform driver has been updated to support these new
ICSSG instances through new AM65x specific compatibles. A build dependency
with ARCH_K3 is added to enable building all the existing PRUSS platform
drivers for this ARMv8 platform.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Add support for PRU-ICSS subsystems on 66AK2G SoC
Suman Anna [Sat, 12 Sep 2020 04:43:36 +0000 (21:43 -0700)]
soc: ti: pruss: Add support for PRU-ICSS subsystems on 66AK2G SoC

The 66AK2G SoC supports two PRU-ICSS instances, named PRUSS0 and PRUSS1,
each of which has two PRU processor cores. The two PRU-ICSS instances
are identical to each other with few minor SoC integration differences,
and are very similar to the PRU-ICSS1 of AM57xx/AM43xx. The Shared Data
RAM size is larger and the number of interrupts coming into MPU INTC
is like the instances on AM437x. There are also few other differences
attributing to integration in Keystone architecture (like no SYSCFG
register or PRCM handshake protocols). Other IP level differences
include different constant table, differences in system event interrupt
input sources etc. They also do not have a programmable module reset
line like those present on AM33xx/AM43xx SoCs. The modules are reset
just like any other IP with the SoC's global cold/warm resets.

The existing PRUSS platform driver has been enhanced to support these
66AK2G PRU-ICSS instances through new 66AK2G specific compatible for
properly probing and booting all the different PRU cores in each
PRU-ICSS processor subsystem. A build dependency with ARCH_KEYSTONE
is added to enable the driver to be built in K2G-only configuration.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Add support for PRU-ICSS subsystems on AM57xx SoCs
Suman Anna [Sat, 12 Sep 2020 04:43:35 +0000 (21:43 -0700)]
soc: ti: pruss: Add support for PRU-ICSS subsystems on AM57xx SoCs

The AM57xx family of SoCs supports two PRU-ICSS instances, each of
which has two PRU processor cores. The two PRU-ICSS instances are
identical to each other, and are very similar to the PRU-ICSS1 of
AM33xx/AM43xx except for a few minor differences like the RAM sizes
and the number of interrupts coming into the MPU INTC. They do
not have a programmable module reset line unlike those present on
AM33xx/AM43xx SoCs. The modules are reset just like any other IP
with the SoC's global cold/warm resets. Each PRU-ICSS's INTC is also
preceded by a Crossbar that enables multiple external events to be
routed to a specific number of input interrupt events. Any interrupt
event directed towards PRUSS needs this crossbar to be setup properly
on the firmware side.

The existing PRUSS platform driver has been enhanced to support
these AM57xx PRU-ICSS instances through new AM57xx specific
compatible for properly probing and booting all the different PRU
cores in each PRU-ICSS processor subsystem. A build dependency with
SOC_DRA7XX is also added to enable the driver to be built in
AM57xx-only configuration (there is no separate Kconfig option
for AM57xx vs DRA7xx).

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Add support for PRU-ICSSs on AM437x SoCs
Suman Anna [Sat, 12 Sep 2020 04:43:35 +0000 (21:43 -0700)]
soc: ti: pruss: Add support for PRU-ICSSs on AM437x SoCs

The AM437x SoCs have two different PRU-ICSS subsystems: PRU-ICSS1
and a smaller PRU-ICSS0. Enhance the PRUSS platform driver to support
both the PRU-ICSS sub-systems on these SoCs.

The PRU-ICSS1 on AM437x is very similar to the PRU-ICSS on AM33xx
except for few minor differences - increased Instruction RAM, increased
Shared Data RAM2, and 1 less interrupt (PRUSS host interrupt 7 which is
redirected to the other PRUSS) towards the MPU INTC. The PRU-ICSS0 is
a cut-down version of the IP, with less DRAM per PRU, no Shared DRAM etc.
It also does not have direct access to L3 bus regions, there is a single
interface to L3 for both PRUSS0 and PRUSS1, and it would have to go
through the PRUSS1's interface. The PRUSS_SYSCFG register is reserved on
PRUSS0, so any external access requires the programming the corresponding
PRUSS_SYSCFG register in PRUSS1. It does have its own dedicated I/O lines
though. Note that this instance does not support any PRU Ethernet related
use cases.

The adaptation uses SoC-specific compatibles in the driver and uses
a newly introduced pruss_match_private_data structure and the
pruss_get_private_data() function to retrieve a PRUSS instance specific
data using a device-name based lookup logic. The reset and the L3 external
access are managed by the parent interconnect ti-sysc bus driver so that
PRUSS1 and PRUSS0 can be independently supported.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: pruss: Add a platform driver for PRUSS in TI SoCs
Suman Anna [Sat, 12 Sep 2020 04:43:34 +0000 (21:43 -0700)]
soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs

The Programmable Real-Time Unit - Industrial Communication
Subsystem (PRU-ICSS) is present on various TI SoCs such as
AM335x or AM437x or the Keystone 66AK2G. Each SoC can have
one or more PRUSS instances that may or may not be identical.
For example, AM335x SoCs have a single PRUSS, while AM437x has
two PRUSS instances PRUSS1 and PRUSS0, with the PRUSS0 being
a cut-down version of the PRUSS1.

The PRUSS consists of dual 32-bit RISC cores called the
Programmable Real-Time Units (PRUs), some shared, data and
instruction memories, some internal peripheral modules, and
an interrupt controller. The programmable nature of the PRUs
provide flexibility to implement custom peripheral interfaces,
fast real-time responses, or specialized data handling.

The PRU-ICSS functionality is achieved through three different
platform drivers addressing a specific portion of the PRUSS.
Some sub-modules of the PRU-ICSS IP reuse some of the existing
drivers (like davinci mdio driver or the generic syscon driver).
This design provides flexibility in representing the different
modules of PRUSS accordingly, and at the same time allowing the
PRUSS driver to add some instance specific configuration within
an SoC.

The PRUSS platform driver deals with the overall PRUSS and is
used for managing the subsystem level resources like various
memories and the CFG module. It is responsible for the creation
and deletion of the platform devices for the child PRU devices
and other child devices (like Interrupt Controller, MDIO node
and some syscon nodes) so that they can be managed by specific
platform drivers. The PRUSS interrupt controller is managed by
an irqchip driver, while the individual PRU RISC cores are
managed by a PRU remoteproc driver.

The driver currently supports the AM335x SoC, and support for
other TI SoCs will be added in subsequent patches.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agodt-bindings: soc: ti: Add TI PRUSS bindings
Grzegorz Jaszczyk [Sat, 12 Sep 2020 04:41:17 +0000 (21:41 -0700)]
dt-bindings: soc: ti: Add TI PRUSS bindings

This patch adds the bindings for the Programmable Real-Time Unit
and Industrial Communication Subsystem (PRU-ICSS) present on various
TI SoCs. The IP is present on multiple TI SoC architecture families
including the OMAP architecture SoCs such as AM33xx, AM437x and
AM57xx; and on a Keystone 2 architecture based 66AK2G SoC. It is
also present on the Davinci based OMAPL138 SoCs and K3 architecture
based AM65x and J721E SoCs as well.

The IP has a number of sub-modules some of which are represented as
their own devices. This binding covers only the top-level sub-system
devices, and some sub-modules like MDIO, MII_RT (Ethernet MII_RT module
with MII ports) and IEP (Industrial Ethernet Peripheral). The remaining
sub-modules bindings shall be defined in the respective driver
subsystem bindings folders. Couple of full examples have also been
added demonstrating the devices on AM335x and AM437x SoCs.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agobindings: soc: ti: soc: ringacc: remove ti,dma-ring-reset-quirk
Grygorii Strashko [Sat, 12 Sep 2020 04:30:23 +0000 (21:30 -0700)]
bindings: soc: ti: soc: ringacc: remove ti,dma-ring-reset-quirk

Remove "ti,dma-ring-reset-quirk" DT property as proper w/a handling is
implemented now in Ringacc driver using SoC info.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: ti: k3: ringacc: add am65x sr2.0 support
Grygorii Strashko [Sat, 12 Sep 2020 04:29:56 +0000 (21:29 -0700)]
soc: ti: k3: ringacc: add am65x sr2.0 support

The AM65x SR2.0 Ringacc has fixed errata i2023 "RINGACC, UDMA: RINGACC and
UDMA Ring State Interoperability Issue after Channel Teardown". This errata
also fixed for J271E SoC.

Use SOC bus data for K3 SoC identification and enable i2023 errate w/a only
for the AM65x SR1.0. This also makes obsolete "ti,dma-ring-reset-quirk" DT
property.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
3 years agosoc: sunxi: sram: remove unneeded semicolon
Jason Yan [Thu, 10 Sep 2020 14:05:46 +0000 (22:05 +0800)]
soc: sunxi: sram: remove unneeded semicolon

Eliminate the following coccicheck warning:

drivers/soc/sunxi/sunxi_sram.c:197:2-3: Unneeded semicolon

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20200910140546.1191280-1-yanaijie@huawei.com
3 years agoMerge tag 'renesas-r8a779a0-dt-binding-defs-tag' into renesas-drivers-for-v5.10
Geert Uytterhoeven [Fri, 11 Sep 2020 08:39:39 +0000 (10:39 +0200)]
Merge tag 'renesas-r8a779a0-dt-binding-defs-tag' into renesas-drivers-for-v5.10

Renesas R-Car V3U DT Binding Definitions

Clock and Power Domain definitions for the Renesas R-Car V3U (R8A779A0)
SoC, shared by driver and DT source files.

3 years agosoc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free
Stephen Boyd [Fri, 24 Jul 2020 21:17:11 +0000 (14:17 -0700)]
soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free

The busy loop in rpmh_rsc_send_data() is written with the assumption
that the udelay will be preempted by the tcs_tx_done() irq handler when
the TCS slots are all full. This doesn't hold true when the calling
thread is an irqthread and the tcs_tx_done() irq is also an irqthread.
That's because kernel irqthreads are SCHED_FIFO and thus need to
voluntarily give up priority by calling into the scheduler so that other
threads can run.

I see RCU stalls when I boot with irqthreads on the kernel commandline
because the modem remoteproc driver is trying to send an rpmh async
message from an irqthread that needs to give up the CPU for the rpmh
irqthread to run and clear out tcs slots.

 rcu: INFO: rcu_preempt self-detected stall on CPU
 rcu:     0-....: (1 GPs behind) idle=402/1/0x4000000000000002 softirq=2108/2109 fqs=4920
  (t=21016 jiffies g=2933 q=590)
 Task dump for CPU 0:
 irq/11-smp2p    R  running task        0   148      2 0x00000028
 Call trace:
  dump_backtrace+0x0/0x154
  show_stack+0x20/0x2c
  sched_show_task+0xfc/0x108
  dump_cpu_task+0x44/0x50
  rcu_dump_cpu_stacks+0xa4/0xf8
  rcu_sched_clock_irq+0x7dc/0xaa8
  update_process_times+0x30/0x54
  tick_sched_handle+0x50/0x64
  tick_sched_timer+0x4c/0x8c
  __hrtimer_run_queues+0x21c/0x36c
  hrtimer_interrupt+0xf0/0x22c
  arch_timer_handler_phys+0x40/0x50
  handle_percpu_devid_irq+0x114/0x25c
  __handle_domain_irq+0x84/0xc4
  gic_handle_irq+0xd0/0x178
  el1_irq+0xbc/0x180
  save_return_addr+0x18/0x28
  return_address+0x54/0x88
  preempt_count_sub+0x40/0x88
  _raw_spin_unlock_irqrestore+0x4c/0x6c
  ___ratelimit+0xd0/0x128
  rpmh_rsc_send_data+0x24c/0x378
  __rpmh_write+0x1b0/0x208
  rpmh_write_async+0x90/0xbc
  rpmhpd_send_corner+0x60/0x8c
  rpmhpd_aggregate_corner+0x8c/0x124
  rpmhpd_set_performance_state+0x8c/0xbc
  _genpd_set_performance_state+0xdc/0x1b8
  dev_pm_genpd_set_performance_state+0xb8/0xf8
  q6v5_pds_disable+0x34/0x60 [qcom_q6v5_mss]
  qcom_msa_handover+0x38/0x44 [qcom_q6v5_mss]
  q6v5_handover_interrupt+0x24/0x3c [qcom_q6v5]
  handle_nested_irq+0xd0/0x138
  qcom_smp2p_intr+0x188/0x200
  irq_thread_fn+0x2c/0x70
  irq_thread+0xfc/0x14c
  kthread+0x11c/0x12c
  ret_from_fork+0x10/0x18

This busy loop naturally lends itself to using a wait queue so that each
thread that tries to send a message will sleep waiting on the waitqueue
and only be woken up when a free slot is available. This should make
things more predictable too because the scheduler will be able to sleep
tasks that are waiting on a free tcs instead of the busy loop we
currently have today.

Reviewed-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Maulik Shah <mkshah@codeaurora.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20200724211711.810009-1-sboyd@kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: qcom-geni-se: Don't use relaxed writes when writing commands
Douglas Anderson [Wed, 22 Jul 2020 22:01:20 +0000 (15:01 -0700)]
soc: qcom-geni-se: Don't use relaxed writes when writing commands

Writing the command is the final step in kicking off a transfer.
Let's use writel() to ensure that any other memory accesses are done
before the command kicks off.  It's expected that this is mostly
relevant if we're in DMA mode but since it doesn't appear to regress
performance in a measurable way [1] even in PIO mode and it's easier
to reason about then let's just always use it.

NOTE: this patch came about due to code inspection.  No actual
problems were observed that this patch fixes.

[1] Tested by timing "flashrom -p ec" on a Chromebook which stresses
GENI SPI a lot.

Reviewed-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
Reviewed-by: Akash Asthana <akashast@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200722150113.1.Ia50ab5cb8a6d3a73d302e6bdc25542d48ffd27f4@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: qcom: socinfo: add SC7180 entry to soc_id array
Douglas Anderson [Thu, 13 Aug 2020 15:03:52 +0000 (08:03 -0700)]
soc: qcom: socinfo: add SC7180 entry to soc_id array

Add an entry for SC7180 SoC.

Reviewed-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20200813080345.1.I85bb28f9ea3fa3bf797ecaf0a5218ced4cfaa6e2@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: qcom: socinfo: add soc id for IPQ6018
Kathiravan T [Mon, 17 Aug 2020 06:30:30 +0000 (12:00 +0530)]
soc: qcom: socinfo: add soc id for IPQ6018

Add the SoC ID for IPQ6018 variant.

Signed-off-by: Kathiravan T <kathirav@codeaurora.org>
Link: https://lore.kernel.org/r/1597645830-30409-1-git-send-email-kathirav@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
3 years agosoc: renesas: rcar-rst: Add support for R-Car V3U
Yoshihiro Shimoda [Mon, 7 Sep 2020 09:19:47 +0000 (18:19 +0900)]
soc: renesas: rcar-rst: Add support for R-Car V3U

Add support for R-Car V3U (R8A779A0) to the R-Car RST driver.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1599470390-29719-12-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agosoc: renesas: Identify R-Car V3U
Yoshihiro Shimoda [Mon, 7 Sep 2020 09:19:45 +0000 (18:19 +0900)]
soc: renesas: Identify R-Car V3U

Add support for identifying the R-Car V3U (R8A779A0) SoC.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1599470390-29719-10-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agosoc: renesas: Sort driver description title
Kuninori Morimoto [Sun, 6 Sep 2020 23:51:15 +0000 (08:51 +0900)]
soc: renesas: Sort driver description title

This patch sorts each driver by description title in alphabetical order.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6y2v54o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agosoc: renesas: Use ARM32/ARM64 for menu description
Kuninori Morimoto [Sun, 6 Sep 2020 23:51:10 +0000 (08:51 +0900)]
soc: renesas: Use ARM32/ARM64 for menu description

For easy understanding of architecture and alphabetical merging, this
patch uses ARM32/ARM64 for description.
This prepares for sorting the menu.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bliiv54u.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agodt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions
Yoshihiro Shimoda [Wed, 9 Sep 2020 13:13:28 +0000 (22:13 +0900)]
dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car
V3U (R8A779A0) SoC.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1599657211-17504-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agodt-bindings: power: Add r8a779a0 SYSC power domain definitions
Yoshihiro Shimoda [Mon, 7 Sep 2020 09:19:40 +0000 (18:19 +0900)]
dt-bindings: power: Add r8a779a0 SYSC power domain definitions

Add power domain indices for R-Car V3U (r8a779a0).

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1599470390-29719-5-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agofirmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free
Sudeep Holla [Tue, 8 Sep 2020 11:26:11 +0000 (12:26 +0100)]
firmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free

scmi_mailbox is obtained from cinfo->transport_info and the first
call to mailbox_chan_free frees the channel and sets cinfo->transport_info
to NULL. Care is taken to check for non NULL smbox->chan but smbox can
itself be NULL. Fix it by checking for it without which, kernel crashes
with below NULL pointer dereference and eventually kernel panic.

   Unable to handle kernel NULL pointer dereference at
    virtual address 0000000000000038
   Modules linked in: scmi_module(-)
   Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno
    Development Platform, BIOS EDK II Sep  2 2020
   pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--)
   pc : mailbox_chan_free+0x2c/0x70 [scmi_module]
   lr : idr_for_each+0x6c/0xf8
   Call trace:
    mailbox_chan_free+0x2c/0x70 [scmi_module]
    idr_for_each+0x6c/0xf8
    scmi_remove+0xa8/0xf0 [scmi_module]
    platform_drv_remove+0x34/0x58
    device_release_driver_internal+0x118/0x1f0
    driver_detach+0x58/0xe8
    bus_remove_driver+0x64/0xe0
    driver_unregister+0x38/0x68
    platform_driver_unregister+0x1c/0x28
    scmi_driver_exit+0x38/0x44 [scmi_module]
   ---[ end trace 17bde19f50436de9 ]---
   Kernel panic - not syncing: Fatal exception
   SMP: stopping secondary CPUs
   Kernel Offset: 0x1d0000 from 0xffff800010000000
   PHYS_OFFSET: 0x80000000
   CPU features: 0x0240022,25806004
   Memory Limit: none
   ---[ end Kernel panic - not syncing: Fatal exception ]---

Link: https://lore.kernel.org/r/20200908112611.31515-1-sudeep.holla@arm.com
Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type")
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add SCMI device for system power protocol
Cristian Marussi [Mon, 7 Sep 2020 17:46:56 +0000 (18:46 +0100)]
firmware: arm_scmi: Add SCMI device for system power protocol

Add SCMI device for system power protocol by just adding the name "syspower"
to the list of supported core protocol devices.

Link: https://lore.kernel.org/r/20200907174657.32466-3-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Add system power protocol support
Cristian Marussi [Mon, 7 Sep 2020 17:46:55 +0000 (18:46 +0100)]
firmware: arm_scmi: Add system power protocol support

Add bare protocol support for SCMI system power protocol as needed by
an OSPM agent: basic initialization and SYSTEM_POWER_STATE_NOTIFIER
core notification support.

No event-handling logic is attached to such notification..

Link: https://lore.kernel.org/r/20200907174657.32466-2-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Constify static scmi-ops
Rikard Falkeborn [Sun, 6 Sep 2020 23:04:52 +0000 (01:04 +0200)]
firmware: arm_scmi: Constify static scmi-ops

These are never modified, so make them const to allow the compiler to
put them in read-only memory.

Link: https://lore.kernel.org/r/20200906230452.33410-4-rikard.falkeborn@gmail.com
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agofirmware: arm_scmi: Constify ops pointers in scmi_handle
Rikard Falkeborn [Sun, 6 Sep 2020 23:04:51 +0000 (01:04 +0200)]
firmware: arm_scmi: Constify ops pointers in scmi_handle

These are never modified, so make them const to allow drivers to make
them const.

Link: https://lore.kernel.org/r/20200906230452.33410-3-rikard.falkeborn@gmail.com
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agocpufreq: arm_scmi: Constify scmi_perf_ops pointers
Rikard Falkeborn [Sun, 6 Sep 2020 23:04:50 +0000 (01:04 +0200)]
cpufreq: arm_scmi: Constify scmi_perf_ops pointers

The perf_ops are not modified through this pointer. Make them const to
indicate that. This is in preparation to make the scmi-ops pointers in
scmi_handle const.

Link: https://lore.kernel.org/r/20200906230452.33410-2-rikard.falkeborn@gmail.com
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
3 years agobus: brcmstb_gisb: Add support for breakpoint interrupts
Florian Fainelli [Sat, 18 Apr 2020 00:21:32 +0000 (17:21 -0700)]
bus: brcmstb_gisb: Add support for breakpoint interrupts

GISB breakpoint interrupts can be raised when a breakpoint has been
enabled to match a specific master and/or GISB register address. Being
able to print a message, similar to those done during target abort or
timeout greatly helps debug systems.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agodt-bindings: bus: Document breakpoint interrupt for gisb-arb
Florian Fainelli [Sat, 18 Apr 2020 00:11:46 +0000 (17:11 -0700)]
dt-bindings: bus: Document breakpoint interrupt for gisb-arb

The GISB arbiter can have a third and optional interrupt to handle GISB
breakpoints.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agosoc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive...
Florian Fainelli [Fri, 25 Oct 2019 18:34:58 +0000 (11:34 -0700)]
soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines

Change the RACPREFDATA(x) setting to prefetch the next 256-byte line
after 4 consecutive lines have been used, instead of after 2 consecutive
lines. This does improve the synthetic memcpy benchmark by an additional
+0.5% on top of the previous change for Cortex-A72 CPUs.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agosoc: bcm: brcmstb: biuctrl: Change RAC prefetch distance from +/-1 to +/- 2
Florian Fainelli [Fri, 25 Oct 2019 18:18:06 +0000 (11:18 -0700)]
soc: bcm: brcmstb: biuctrl: Change RAC prefetch distance from +/-1 to +/- 2

Change the RAC prefetch distance from +/- 1 to +/- 2 for Cortex-A72 CPUs
since this provides an average of a 3.8% performance increase for
synthetic memcpy benchmarks.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agosoc: bcm: brcmstb: biuctrl: Tune MCP settings for 72165
Florian Fainelli [Fri, 28 Feb 2020 19:32:26 +0000 (11:32 -0800)]
soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72165

72165 uses a Brahma-B53 CPU and its Bus Interface Unit, tune it
according to the existing values we have.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agosoc: bcm: brcmstb: biuctrl: Tune MCP settings for 72164
Florian Fainelli [Wed, 19 Feb 2020 00:14:11 +0000 (16:14 -0800)]
soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72164

72164 uses a Brahma-B53 CPU and its Bus Interface Unit, tune it
according to the existing values we have.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
3 years agomemory: fsl-corenet-cf: Fix handling of platform_get_irq() error
Krzysztof Kozlowski [Thu, 27 Aug 2020 07:33:15 +0000 (09:33 +0200)]
memory: fsl-corenet-cf: Fix handling of platform_get_irq() error

platform_get_irq() returns -ERRNO on error.  In such case comparison
to 0 would pass the check.

Fixes: 54afbec0d57f ("memory: Freescale CoreNet Coherency Fabric error reporting driver")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200827073315.29351-1-krzk@kernel.org
3 years agomemory: omap-gpmc: Fix -Wunused-function warnings
YueHaibing [Tue, 1 Sep 2020 11:28:32 +0000 (19:28 +0800)]
memory: omap-gpmc: Fix -Wunused-function warnings

If CONFIG_OF is not set, make W=1 warns:

  drivers/memory/omap-gpmc.c:987:12: warning: ‘gpmc_cs_remap’ defined but not used [-Wunused-function]
  drivers/memory/omap-gpmc.c:926:20: warning: ‘gpmc_cs_get_name’ defined but not used [-Wunused-function]
  drivers/memory/omap-gpmc.c:919:13: warning: ‘gpmc_cs_set_name’ defined but not used [-Wunused-function]

Move them to #ifdef CONFIG_OF block to fix this.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200901112832.3084-1-yuehaibing%40huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra: Remove GPU from DRM IOMMU group
Thierry Reding [Tue, 1 Sep 2020 15:32:48 +0000 (17:32 +0200)]
memory: tegra: Remove GPU from DRM IOMMU group

Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU
group") added the GPU to the DRM IOMMU group, which doesn't make any
sense. This causes problems when Nouveau tries to attach to the SMMU
and causes it to fall back to using the DMA API.

Remove the GPU from the DRM groups to restore the old behaviour. The
GPU should always have its own IOMMU domain to make sure it can map
buffers into contiguous chunks (for big page support) without getting
in the way of mappings from the DRM group.

Cc: <stable@vger.kernel.org>
Fixes: 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group")
Reported-by: Matias Zuniga <matias.nicolas.zc@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200901153248.1831263-1-thierry.reding@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: tegra186-emc: Simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 28 Aug 2020 15:37:47 +0000 (17:37 +0200)]
memory: tegra186-emc: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200828153747.22358-2-krzk@kernel.org
3 years agomemory: brcmstb_dpfe: Simplify with dev_err_probe()
Krzysztof Kozlowski [Fri, 28 Aug 2020 15:37:46 +0000 (17:37 +0200)]
memory: brcmstb_dpfe: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Markus Mayer <mmayer@broadcom.com>
Link: https://lore.kernel.org/r/20200828153747.22358-1-krzk@kernel.org
3 years agomemory: samsung: exynos5422-dmc: add missing and fix kerneldoc
Krzysztof Kozlowski [Sat, 22 Aug 2020 16:32:18 +0000 (18:32 +0200)]
memory: samsung: exynos5422-dmc: add missing and fix kerneldoc

Add missing kerneldoc to struct exynos5_dmc and correct the existing
kerneldoc in other places to fix W=1 warnings like:

    drivers/memory/samsung/exynos5422-dmc.c:107: warning: Function parameter or member 'freq_hz' not described in 'dmc_opp_table'
    drivers/memory/samsung/exynos5422-dmc.c:154: warning: Function parameter or member 'dev' not described in 'exynos5_dmc'
    drivers/memory/samsung/exynos5422-dmc.c:357: warning: Excess function parameter 'param' description in 'exynos5_set_bypass_dram_timings'
    drivers/memory/samsung/exynos5422-dmc.c:630: warning: Function parameter or member 'flags' not described in 'exynos5_dmc_get_volt_freq'
    drivers/memory/samsung/exynos5422-dmc.c:962: warning: cannot understand function prototype: 'struct devfreq_dev_profile exynos5_dmc_df_profile = '
    drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Function parameter or member 'reg_timing_row' not described in 'create_timings_aligned'
    drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Excess function parameter 'idx' description in 'create_timings_aligned'
    drivers/memory/samsung/exynos5422-dmc.c:1345: warning: Excess function parameter 'set' description in 'exynos5_dmc_set_pause_on_switching'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20200822163218.21857-3-krzk@kernel.org
3 years agomemory: samsung: exynos5422-dmc: remove unused exynos5_dmc members
Krzysztof Kozlowski [Sat, 22 Aug 2020 16:32:17 +0000 (18:32 +0200)]
memory: samsung: exynos5422-dmc: remove unused exynos5_dmc members

The struct exynos5_dmc members bypass_rate, mx_mspll_ccore_phy,
mout_mx_mspll_ccore_phy and opp_bypass are not actually used.

Apparently there was a plan to store the OPP for the bypass mode in
opp_bypass member, but driver fails to do it and instead always sets
target voltage during bypass mode.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200822163218.21857-2-krzk@kernel.org
3 years agomemory: samsung: exynos5422-dmc: rename timing register fields variables
Krzysztof Kozlowski [Sat, 22 Aug 2020 16:32:16 +0000 (18:32 +0200)]
memory: samsung: exynos5422-dmc: rename timing register fields variables

The driver has file-scope arrays defining fields of timing registers
(e.g. struct timing_reg timing_row) and actual values for these
registers per each OPP in state container (struct
exynos5_dmc.timing_row).  The meanings of these are different so use
different names to avoid confusion.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20200822163218.21857-1-krzk@kernel.org
3 years agodrivers: optee: fix i2c build issue
Jorge Ramirez-Ortiz [Mon, 31 Aug 2020 16:11:02 +0000 (18:11 +0200)]
drivers: optee: fix i2c build issue

When the optee driver is compiled into the kernel while the i2c core
is configured as a module, the i2c symbols are not available.

This commit addresses the situation by disabling the i2c support for
this use case while allowing it in all other scenarios:

 i2c=y, optee=y
 i2c=m, optee=m
 i2c=y, optee=m
 i2c=m, optee=y (not supported)

Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the i2c bus")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
3 years agosoc: renesas: Align driver description titles
Kuninori Morimoto [Mon, 24 Aug 2020 02:22:06 +0000 (11:22 +0900)]
soc: renesas: Align driver description titles

Now, Renesas SoC drivers are under menu, but current descriptions are
not aligned.
This patch aligns them.

    - Emma Mobile EV2
    - RZ/A1H (R7S72100)
      ...
    - R-Car H2 (R8A77900)
      ...
    - Renesas R-Car H3 ES1.x SoC Platform
      ...
    - R-Car H2 System Controller support
    - R-Car M2-W/N System Controller support
    - R-Car V2H System Controller support
    - R-Car E2 System Controller support
    - R-Car H3 System Controller support
    - R-Car M3-W System Controller support
    - R-Car M3-W+ System Controller support
    - R-Car M3-N System Controller support

    + SoC Platform support for Emma Mobile EV2
    + SoC Platform support for RZ/A1H+
      ...
    + SoC Platform support for R-Car H2
      ...
    + SoC Platform support for R-Car H3 ES1.x
      ...
    + System Controller support for R-Car H2
    + System Controller support for R-Car M2-W/N
    + System Controller support for R-Car V2H
    + System Controller support for R-Car E2
    + System Controller support for R-Car H3
    + System Controller support for R-Car M3-W
    + System Controller support for R-Car M3-W+
    + System Controller support for R-Car M3-N

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zh6kyedc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agomemory: emif: Remove bogus debugfs error handling
Dan Carpenter [Wed, 26 Aug 2020 11:37:59 +0000 (14:37 +0300)]
memory: emif: Remove bogus debugfs error handling

Callers are generally not supposed to check the return values from
debugfs functions.  Debugfs functions never return NULL so this error
handling will never trigger.  (Historically debugfs functions used to
return a mix of NULL and error pointers but it was eventually deemed too
complicated for something which wasn't intended to be used in normal
situations).

Delete all the error handling.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Link: https://lore.kernel.org/r/20200826113759.GF393664@mwanda
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agomemory: omap-gpmc: Fix build error without CONFIG_OF
YueHaibing [Thu, 27 Aug 2020 12:53:16 +0000 (20:53 +0800)]
memory: omap-gpmc: Fix build error without CONFIG_OF

If CONFIG_OF is n, gcc fails:

drivers/memory/omap-gpmc.o: In function `gpmc_omap_onenand_set_timings':
    omap-gpmc.c:(.text+0x2a88): undefined reference to `gpmc_read_settings_dt'

Add gpmc_read_settings_dt() helper function, which zero the gpmc_settings
so the caller doesn't proceed with random/invalid settings.

Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200827125316.20780-1-yuehaibing@huawei.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agoMerge tag 'tee-pin-user-pages-for-5.10' of git://git.linaro.org/people/jens.wiklander...
Olof Johansson [Thu, 27 Aug 2020 09:04:31 +0000 (02:04 -0700)]
Merge tag 'tee-pin-user-pages-for-5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

Converts tee subsystem to use pin_user_pages() instead of get_user_pages()

* tag 'tee-pin-user-pages-for-5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: convert get_user_pages() --> pin_user_pages()

Link: https://lore.kernel.org/r/20200825090715.GA2370775@jade
Signed-off-by: Olof Johansson <olof@lixom.net>
3 years agomemory: omap-gpmc: Fix a couple off by ones
Dan Carpenter [Tue, 25 Aug 2020 10:47:07 +0000 (13:47 +0300)]
memory: omap-gpmc: Fix a couple off by ones

These comparisons should be >= instead of > to prevent reading one
element beyond the end of the gpmc_cs[] array.

Fixes: cdd6928c589a ("ARM: OMAP2+: Add device-tree support for NOR flash")
Fixes: f37e4580c409 ("ARM: OMAP2: Dynamic allocator for GPMC memory space")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20200825104707.GB278587@mwanda
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
3 years agosoc: renesas: Use menu for Renesas SoC
Kuninori Morimoto [Mon, 17 Aug 2020 04:50:55 +0000 (13:50 +0900)]
soc: renesas: Use menu for Renesas SoC

Renesas related SoC settings are located on TOP level menu,
thus it is very verbose.
This patch groups Renesas related settings into
"Renesas SoC driver support" menu.

And it aligns config menu names.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0xxho7t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
3 years agotee: convert get_user_pages() --> pin_user_pages()
John Hubbard [Mon, 24 Aug 2020 21:11:25 +0000 (14:11 -0700)]
tee: convert get_user_pages() --> pin_user_pages()

This code was using get_user_pages*(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.

Factor out a new, small release_registered_pages() function, in
order to consolidate the logic for discerning between
TEE_SHM_USER_MAPPED and TEE_SHM_KERNEL_MAPPED pages. This also
absorbs the kfree() call that is also required there.

There is some helpful background in [2]: basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.

[1] Documentation/core-api/pin_user_pages.rst

[2] "Explicit pinning of user-space pages":
    https://lwn.net/Articles/807108/

Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: tee-dev@lists.linaro.org
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
3 years agomemory: brcmstb_dpfe: fix array index out of bounds
Markus Mayer [Sat, 22 Aug 2020 20:50:00 +0000 (13:50 -0700)]
memory: brcmstb_dpfe: fix array index out of bounds

We would overrun the error_text array if we hit a TIMEOUT condition,
because we were using the error code "ETIMEDOUT" (which is 110) as an
array index.

We fix the problem by correcting the array index and by providing a
function to retrieve error messages rather than accessing the array
directly. The function includes a bounds check that prevents the array
from being overrun.

Link: https://lore.kernel.org/linux-arm-kernel/38d00022-730c-948a-917c-d86382df8cb9@canonical.com/
Link: https://lore.kernel.org/r/20200822205000.15841-1-mmayer@broadcom.com
Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>