]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agoMerge changes I3c0a402f,I9ce5b9df,I08719015,If541278f,I99f1a697 into integration
Madhukar Pappireddy [Fri, 15 Jan 2021 15:39:13 +0000 (15:39 +0000)]
Merge changes I3c0a402f,I9ce5b9df,I08719015,If541278f,I99f1a697 into integration

* changes:
  doc: renesas: Update code owner for Renesas platforms
  doc: renesas: Document platforms based on RZ/G2 SoC's
  renesas: rzg: Add PFC support for RZ/G2M
  renesas: rzg: Add QoS support for RZ/G2M
  renesas: rzg: Add support for DRAM initialization

3 years agoMerge changes from topic "certtool-memleak" into integration
Sandrine Bailleux [Fri, 15 Jan 2021 14:44:47 +0000 (14:44 +0000)]
Merge changes from topic "certtool-memleak" into integration

* changes:
  Use preallocated parts of the HASH struct
  Free arguments copied with strdup
  Free keys after use
  Free X509_EXTENSIONs

3 years agoMerge "tools: don't clean when building" into integration
Sandrine Bailleux [Fri, 15 Jan 2021 07:51:52 +0000 (07:51 +0000)]
Merge "tools: don't clean when building" into integration

3 years agoMerge changes I36e4d672,I47610cee into integration
Lauren Wehrmeister [Thu, 14 Jan 2021 22:45:20 +0000 (22:45 +0000)]
Merge changes I36e4d672,I47610cee into integration

* changes:
  Workaround for Cortex N1 erratum 1946160
  Workaround for Cortex A78 erratum 1951500

3 years agoMerge changes Ie8922309,I1001bea1,I66265e5e,I2cc0ceda,I04805d72, ... into integration
Madhukar Pappireddy [Thu, 14 Jan 2021 15:40:54 +0000 (15:40 +0000)]
Merge changes Ie8922309,I1001bea1,I66265e5e,I2cc0ceda,I04805d72, ... into integration

* changes:
  plat: renesas: common: Include ulcb_cpld.h conditionally
  plat: renesas: Move to common
  plat: renesas: aarch64: Move to common
  drivers: renesas: Move ddr/qos/qos header files
  drivers: renesas: rpc: Move to common
  drivers: renesas: avs: Move to common
  drivers: renesas: auth: Move to common
  drivers: renesas: dma: Move to common
  drivers: renesas: watchdog: Move to common
  drivers: renesas: rom: Move to common
  drivers: renesas: delay: Move to common
  drivers: renesas: console: Move to common
  drivers: renesas: pwrc: Move to common
  drivers: renesas: io: Move to common
  drivers: renesas: eMMC: Move to common

3 years agoMerge changes Id2b1822c,Ia9a563a1,I11f65d49,If9318a51,I46801b56, ... into integration
Madhukar Pappireddy [Thu, 14 Jan 2021 15:39:24 +0000 (15:39 +0000)]
Merge changes Id2b1822c,Ia9a563a1,I11f65d49,If9318a51,I46801b56, ... into integration

* changes:
  drivers: renesas: Move plat common sources
  plat: renesas: Move headers and assembly files to common folder
  plat: renesas: rcar: include: Code cleanup
  plat: renesas:rcar: Fix checkpatch warnings
  plat: renesas: rcar: Fix checkpatch warnings
  plat: renesas:rcar: Code cleanup
  plat: renesas: rcar: Fix coding style

3 years agoMerge "docs: update fvp version to be used for rdv1 platform" into integration
Madhukar Pappireddy [Thu, 14 Jan 2021 15:37:26 +0000 (15:37 +0000)]
Merge "docs: update fvp version to be used for rdv1 platform" into integration

3 years agoWorkaround for Cortex N1 erratum 1946160
johpow01 [Wed, 7 Oct 2020 19:33:15 +0000 (14:33 -0500)]
Workaround for Cortex N1 erratum 1946160

Cortex N1 erratum 1946160 is a Cat B erratum present in r0p0, r1p0,
r2p0, r3p0, r3p1, r4p0, and r4p1.  The workaround is to insert a DMB ST
before acquire atomic instructions without release semantics.  This
issue is present starting from r0p0 but this workaround applies to
revisions r3p0, r3p1, r4p0, and r4p1, for previous revisions there is no
workaround.

SDEN can be found here:
https://documentation-service.arm.com/static/5fa9304cd8dacc30eded464f

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I36e4d6728c275f1c2477dcee9b351077cf7c53e4

3 years agoWorkaround for Cortex A78 erratum 1951500
johpow01 [Wed, 7 Oct 2020 20:08:01 +0000 (15:08 -0500)]
Workaround for Cortex A78 erratum 1951500

Cortex A78 erratum 1951500 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r1p1.  The workaround is to insert a DMB ST before
acquire atomic instructions without release semantics.  This workaround
works on revisions r1p0 and r1p1, in r0p0 there is no workaround.

SDEN can be found here:
https://documentation-service.arm.com/static/5fb66157ca04df4095c1cc2e

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I47610cee75af6a127ea65edc4d5cffc7e6a2d0a3

3 years agodoc: renesas: Update code owner for Renesas platforms
Biju Das [Sat, 19 Dec 2020 09:03:44 +0000 (09:03 +0000)]
doc: renesas: Update code owner for Renesas platforms

Add Marek Vasut as the code owner for the common code shared by
both Renesas R-Car and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Change-Id: I3c0a402f4663ffcf4d2df408a3ccd4d1a8629b3a

3 years agodoc: renesas: Document platforms based on RZ/G2 SoC's
Biju Das [Mon, 7 Dec 2020 13:14:38 +0000 (13:14 +0000)]
doc: renesas: Document platforms based on RZ/G2 SoC's

Document the platforms based on RZ/G2 SoC's.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I9ce5b9df3573b1198c5c7be79b5471d54573609a

3 years agorenesas: rzg: Add PFC support for RZ/G2M
Biju Das [Mon, 9 Nov 2020 09:40:04 +0000 (09:40 +0000)]
renesas: rzg: Add PFC support for RZ/G2M

Add pin control support for RZ/G2M SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I08719015cab1ec59e2270523980a0a3e26e72c01

3 years agorenesas: rzg: Add QoS support for RZ/G2M
Biju Das [Mon, 9 Nov 2020 09:38:51 +0000 (09:38 +0000)]
renesas: rzg: Add QoS support for RZ/G2M

Add QoS support for RZ/G2M SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: If541278fd629761cc83398bba71e63f09d9dbee6

3 years agodocs: update fvp version to be used for rdv1 platform
Aditya Angadi [Wed, 13 Jan 2021 16:24:01 +0000 (21:54 +0530)]
docs: update fvp version to be used for rdv1 platform

Move RD-V1 platform to use version of FVP_RD_Daniel from 11.10 build 36
to 11.13 build 10

Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
Change-Id: I9622c03d342bb780234dec8ffe4ab11d8069acab

3 years agotools: don't clean when building
Ross Burton [Wed, 13 Jan 2021 12:47:25 +0000 (12:47 +0000)]
tools: don't clean when building

Don't depend on clean when building, as the user is capable of cleaning
if required and this introduces a race where "all" depends on both the
compile and the clean in parallel.  It's quite possible for some of the
compile to happen in parallel with the clean, which results in the link
failing as objects just built are missing.

Change-Id: I710711eea7483cafa13251c5d94ec693148bd001
Signed-off-by: Ross Burton <ross.burton@arm.com>
3 years agoplat: renesas: common: Include ulcb_cpld.h conditionally
Biju Das [Wed, 16 Dec 2020 11:37:27 +0000 (11:37 +0000)]
plat: renesas: common: Include ulcb_cpld.h conditionally

Include header ulcb_cpld.h in plat_pm.c only if RCAR_GEN3_ULCB
is enabled.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ie89223097c608265c50e32778e8df28feed82480

3 years agorenesas: rzg: Add support for DRAM initialization
Biju Das [Mon, 9 Nov 2020 09:36:46 +0000 (09:36 +0000)]
renesas: rzg: Add support for DRAM initialization

Add support for initializing DRAM on RZ/G2M SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I99f1a6971a061a44687af498d55306a93e4fc8f7

3 years agoplat: renesas: Move to common
Biju Das [Wed, 16 Dec 2020 11:28:07 +0000 (11:28 +0000)]
plat: renesas: Move to common

Move rcar plat code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I1001bea1a8a9232a03ddbf6931ca3c764ba1e181

3 years agoplat: renesas: aarch64: Move to common
Biju Das [Wed, 16 Dec 2020 11:21:33 +0000 (11:21 +0000)]
plat: renesas: aarch64: Move to common

Move plat aarch64 code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I66265e5e68bfcf5c3534965fb3549a145c782b47

3 years agodrivers: renesas: Move ddr/qos/qos header files
Biju Das [Wed, 16 Dec 2020 11:53:59 +0000 (11:53 +0000)]
drivers: renesas: Move ddr/qos/qos header files

Move DDR/QoS/PFC header files, so that the same code
can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I2cc0ceda8d05b6b8d95a69afdc233dc0d098e850

3 years agodrivers: renesas: rpc: Move to common
Biju Das [Wed, 16 Dec 2020 11:15:33 +0000 (11:15 +0000)]
drivers: renesas: rpc: Move to common

Move rpc driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I04805d720d95b8edcc14e652f897fadc7f432197

3 years agodrivers: renesas: avs: Move to common
Biju Das [Wed, 16 Dec 2020 11:13:06 +0000 (11:13 +0000)]
drivers: renesas: avs: Move to common

Move avs driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I85d9fa8b6abf158ce2521f1696478f7c5339fc42

3 years agodrivers: renesas: auth: Move to common
Biju Das [Wed, 16 Dec 2020 11:11:09 +0000 (11:11 +0000)]
drivers: renesas: auth: Move to common

Move authentication driver code to common directory, so that the
same code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I02592dfc714998bf89b9feaa78f685ae36be6f59

3 years agodrivers: renesas: dma: Move to common
Biju Das [Wed, 16 Dec 2020 11:02:59 +0000 (11:02 +0000)]
drivers: renesas: dma: Move to common

Move dma driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Idce2e2f4e098cfc17219f963373d20ebf74e5b7c

3 years agodrivers: renesas: watchdog: Move to common
Biju Das [Wed, 16 Dec 2020 11:00:21 +0000 (11:00 +0000)]
drivers: renesas: watchdog: Move to common

Move watch driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I235f2cde325a0feeadbfc4b7ee02e8b1186f7ea1

3 years agodrivers: renesas: Move plat common sources
Biju Das [Wed, 16 Dec 2020 09:43:41 +0000 (09:43 +0000)]
drivers: renesas: Move plat common sources

Move plat common sources to common directory, so that same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Id2b1822c97cc50e3febaffc2e5f42b4d53809a17

3 years agodrivers: renesas: rom: Move to common
Biju Das [Wed, 16 Dec 2020 10:56:03 +0000 (10:56 +0000)]
drivers: renesas: rom: Move to common

Move rom driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I399dfb5eff186db76d26fa9c54bea88bee66789c

3 years agoplat: renesas: Move headers and assembly files to common folder
Biju Das [Wed, 16 Dec 2020 08:57:59 +0000 (08:57 +0000)]
plat: renesas: Move headers and assembly files to common folder

Create a common directory and move the header and assembly files
so that the common code can be used by both Renesas R-Car Gen3 and
RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ia9a563a1c3c9f8c6f0d3cb82622deb2e155d7f6c

3 years agodrivers: renesas: delay: Move to common
Biju Das [Wed, 16 Dec 2020 10:46:36 +0000 (10:46 +0000)]
drivers: renesas: delay: Move to common

Move delay driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I5e806bd0e0a0a4b436048513b7089db90ff9805f

3 years agoplat: renesas: rcar: include: Code cleanup
Biju Das [Sun, 13 Dec 2020 20:49:27 +0000 (20:49 +0000)]
plat: renesas: rcar: include: Code cleanup

This patch fixes checkpatch warnings and replaces TAB with
space after #define macros.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I11f65d494997cbf612376fb120c27ef0166cdd3a

3 years agodrivers: renesas: console: Move to common
Biju Das [Wed, 16 Dec 2020 10:36:17 +0000 (10:36 +0000)]
drivers: renesas: console: Move to common

Move console/scif driver code to common directory, so that the
same code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I0b15e4f4ffaaa99e77bcee32b1dad648eeadcd9b

3 years agoplat: renesas:rcar: Fix checkpatch warnings
Biju Das [Sun, 13 Dec 2020 20:44:28 +0000 (20:44 +0000)]
plat: renesas:rcar: Fix checkpatch warnings

Fix checkpatch warnings.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: If9318a5113fbd6ae8b5c4bfb409da9e393673258

3 years agodrivers: renesas: pwrc: Move to common
Biju Das [Wed, 16 Dec 2020 10:27:45 +0000 (10:27 +0000)]
drivers: renesas: pwrc: Move to common

Move pwrc driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I75d91a44d872fe2296b15c700efacd5721385363

3 years agoplat: renesas: rcar: Fix checkpatch warnings
Biju Das [Sun, 13 Dec 2020 20:40:44 +0000 (20:40 +0000)]
plat: renesas: rcar: Fix checkpatch warnings

Fix checkpatch warnings.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I46801b563c887dc0a66e224ab4971e6503641529

3 years agodrivers: renesas: io: Move to common
Biju Das [Wed, 16 Dec 2020 10:05:41 +0000 (10:05 +0000)]
drivers: renesas: io: Move to common

Move io driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ic661e415c91a1fbfd5eee3bba86466037e51574b

3 years agoplat: renesas:rcar: Code cleanup
Biju Das [Sun, 13 Dec 2020 20:38:44 +0000 (20:38 +0000)]
plat: renesas:rcar: Code cleanup

Sort the header includes alphabetically, fix typos and drop unneeded TAB
and replace it with space

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ieff84434877f58ec26c8351611059ad4e11a4e28

3 years agodrivers: renesas: eMMC: Move to common
Biju Das [Wed, 16 Dec 2020 09:53:19 +0000 (09:53 +0000)]
drivers: renesas: eMMC: Move to common

Move eMMC driver code to common directory, so that the same
code can be re-used by both R-Car Gen3 and RZ/G2 platforms.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I7f3055709337327d1a1c9f563c14ad1626adb355

3 years agoplat: renesas: rcar: Fix coding style
Biju Das [Sun, 13 Dec 2020 20:36:30 +0000 (20:36 +0000)]
plat: renesas: rcar: Fix coding style

Sort the header includes alphabetically and fix checkpatch warnings.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I08fd0d12ee1d8d61391e8afc33f8c67fcf70c4e5

3 years agoMerge "qemu/qemu_sbsa: enable secure variable storage" into integration
Manish Pandey [Wed, 13 Jan 2021 10:52:26 +0000 (10:52 +0000)]
Merge "qemu/qemu_sbsa: enable secure variable storage" into integration

3 years agoqemu/qemu_sbsa: enable secure variable storage
Masahisa Kojima [Wed, 23 Sep 2020 07:52:59 +0000 (16:52 +0900)]
qemu/qemu_sbsa: enable secure variable storage

This implements support for UEFI secure variable storage
using standalone MM framework on qemu_sbsa platform.

Non-secure shared memory between UEFI and standalone MM
is allocated at the top of DRAM.
DRAM size of qemu_sbsa varies depends on the QEMU parameter,
so the non-secure shared memory is allocated by trusted firmware
and passed the base address and size to UEFI through device tree
"/reserved-memory" node.

Change-Id: I367191f408eb9850b7ec7761ee346b014c539767
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
3 years agoMerge "Workaround for Cortex A78 erratum 1941498" into integration
bipin.ravi [Tue, 12 Jan 2021 20:05:37 +0000 (20:05 +0000)]
Merge "Workaround for Cortex A78 erratum 1941498" into integration

3 years agoWorkaround for Cortex A78 erratum 1941498
johpow01 [Tue, 6 Oct 2020 22:55:25 +0000 (17:55 -0500)]
Workaround for Cortex A78 erratum 1941498

Cortex A78 erratum 1941498 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r1p1.  The workaround is to set bit 8 in the ECTLR_EL1
register, there is a small performance cost (<0.5%) for setting this bit.

SDEN can be found here:
https://documentation-service.arm.com/static/5fb66157ca04df4095c1cc2e

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I959cee8e3d46c1b84ff5e4409ce5945e459cc6a9

3 years agoMerge "zynqmp: pm: Add support for PS and system reset on WDT restart" into integration
Madhukar Pappireddy [Tue, 12 Jan 2021 17:07:45 +0000 (17:07 +0000)]
Merge "zynqmp: pm: Add support for PS and system reset on WDT restart" into integration

3 years agozynqmp: pm: Add support for PS and system reset on WDT restart
Will Wong [Mon, 23 Nov 2020 07:45:21 +0000 (23:45 -0800)]
zynqmp: pm: Add support for PS and system reset on WDT restart

Add ability to support PS and System reset after idling the APU,
by reading the restart scope from the PMU.

Signed-off-by: Will Wong <willw@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Change-Id: I23c01725d8ebb71ad34be02ab204411b93620702

3 years agoMerge "plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB...
Lauren Wehrmeister [Tue, 12 Jan 2021 16:52:18 +0000 (16:52 +0000)]
Merge "plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB" into integration

3 years agoMerge "zynqmp: pm: Update PM version and support PM version check" into integration
Manish Pandey [Tue, 12 Jan 2021 12:26:19 +0000 (12:26 +0000)]
Merge "zynqmp: pm: Update PM version and support PM version check" into integration

3 years agoMerge changes from topic "renaming_daniel" into integration
Manish Pandey [Tue, 12 Jan 2021 10:21:08 +0000 (10:21 +0000)]
Merge changes from topic "renaming_daniel" into integration

* changes:
  plat/arm: rename rddanielxlr to rdv1mc
  plat/arm: rename rddaniel to rdv1

3 years agozynqmp: pm: Update PM version and support PM version check
Rajan Vaja [Fri, 5 Oct 2018 11:42:57 +0000 (04:42 -0700)]
zynqmp: pm: Update PM version and support PM version check

ATF is not checking PM version. Add version check in such
a way that it is compatible with current and newer version
of PM.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Change-Id: Ia095d118121e6f75e8d320e87d5e2018068fa079

3 years agoMerge "plat: xilinx: Fix non-MISRA compliant code" into integration
Madhukar Pappireddy [Mon, 11 Jan 2021 22:53:53 +0000 (22:53 +0000)]
Merge "plat: xilinx: Fix non-MISRA compliant code" into integration

3 years agoplat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB
Marek Behún [Thu, 7 Jan 2021 20:52:44 +0000 (21:52 +0100)]
plat: marvell: armada: a3k: improve 4GB DRAM usage from 3.375 GB to 3.75 GB

The current configuration of CPU windows on Armada 37x0 with 4 GB DRAM
can only utilize 3.375 GB of memory. This is because there are only 5
configuration windows, configured as such (in hexadecimal, also showing
ranges not configurable by CPU windows):

         0 - 80000000 |   2 GB | DDR  | CPU window 0
  80000000 - C0000000 |   1 GB | DDR  | CPU window 1
  C0000000 - D0000000 | 256 MB | DDR  | CPU window 2
  D0000000 - D2000000 |  32 MB |      | Internal regs
      empty space     |        |      |
  D8000000 - D8010000 |  64 KB |      | CCI regs
      empty space     |        |      |
  E0000000 - E8000000 | 128 MB | DDR  | CPU window 3
  E8000000 - F0000000 | 128 MB | PCIe | CPU window 4
      empty space     |        |      |
  FFF00000 - end      |  64 KB |      | Boot ROM

This can be improved by taking into account that:
- CCI window can be moved (the base address is only hardcoded in TF-A;
  U-Boot and Linux will not break with changing of this address)
- PCIe window can be moved (upstream U-Boot can change device-tree
  ranges of PCIe if PCIe window is moved)

Change the layout after the Internal regs as such:

  D2000000 - F2000000 | 512 MB | DDR  | CPU window 3
  F2000000 - FA000000 | 128 MB | PCIe | CPU window 4
      empty space     |        |      |
  FE000000 - FE010000 |  64 KB |      | CCI regs
      empty space     |        |      |
  FFF00000 - end      |  64 KB |      | Boot ROM

(Note that CCI regs base address is moved from D8000000 to FE000000 in
 all cases, not only for the configuration with 4 GB of DRAM. This is
 because TF-A is built with this address as a constant, so we cannot
 change this address at runtime only on some boards.)

This yields 3.75 GB of usable RAM.

Moreover U-Boot can theoretically reconfigure the PCIe window to DDR if
it discovers that no PCIe card is connected. This can add another 128 MB
of DRAM (resulting only in 128 MB of DRAM not being used).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I4ca1999f852f90055fac8b2c4f7e80275a13ad7e

3 years agoMerge changes I46cd4d9b,Iba009587,I41d146e8,Ic66ceab3,Iff46838a, ... into integration
Manish Pandey [Mon, 11 Jan 2021 18:50:26 +0000 (18:50 +0000)]
Merge changes I46cd4d9b,Iba009587,I41d146e8,Ic66ceab3,Iff46838a, ... into integration

* changes:
  drivers: renesas: rcar: io: Code cleanup
  drivers: renesas: rcar: pwrc: Code cleanup
  drivers: renesas: rcar: common: Code cleanup
  drivers: renesas: rcar: watchdog: Fix typo
  drivers: renesas: rcar: scif: Fix coding style
  drivers: renesas: rcar: iic_dvfs: Fix coding style

3 years agoMerge "cadence: Change logic in uart driver" into integration
Madhukar Pappireddy [Mon, 11 Jan 2021 18:22:34 +0000 (18:22 +0000)]
Merge "cadence: Change logic in uart driver" into integration

3 years agoMerge changes I07c35829,Iec7dd019,Ic7406aa8,I4eac94f0 into integration
Manish Pandey [Mon, 11 Jan 2021 18:22:04 +0000 (18:22 +0000)]
Merge changes I07c35829,Iec7dd019,Ic7406aa8,I4eac94f0 into integration

* changes:
  drivers: renesas: rcar: dma: Fix coding style
  drivers: renesas: rcar: delay: Fix checkpatch warnings
  drivers: renesas: rcar: avs: Fix checkpatch warnings
  drivers: renesas: rcar: auth: Use space instead of TAB

3 years agocadence: Change logic in uart driver
Michal Simek [Fri, 6 Oct 2017 08:24:17 +0000 (10:24 +0200)]
cadence: Change logic in uart driver

Write char if fifo is empty. If this is done like this all chars are
printed. Because origin code just put that chars to fifo and in case of
reset messages were missing.

Before this change chars are put to fifo and only check before adding if
fifo is full. The patch is changing this logic that it is adding char only
when fifo is empty to make sure that in case of reset (by another SW for
example) all chars are printed. Maybe one char can be missed but for IP
itself it is much easier to send just one char compare to full fifo.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Change-Id: Ic24c2c1252bce24be2aed68ee29477ca4a549e5f

3 years agodrivers: renesas: rcar: io: Code cleanup
Biju Das [Sun, 13 Dec 2020 20:28:45 +0000 (20:28 +0000)]
drivers: renesas: rcar: io: Code cleanup

This patch fixes checkpatch warnings and arrange header
as per TF-A coding style.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I46cd4d9b2851202324fe714e776cf3ad2ee1d923

3 years agodrivers: renesas: rcar: dma: Fix coding style
Biju Das [Sun, 13 Dec 2020 20:02:24 +0000 (20:02 +0000)]
drivers: renesas: rcar: dma: Fix coding style

Sort the headers alphabetically and replace TAB with a space
after #define.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I07c358294b7c02cbfa360112bbbde0eb5f2b50f5

3 years agodrivers: renesas: rcar: pwrc: Code cleanup
Biju Das [Sun, 13 Dec 2020 20:24:19 +0000 (20:24 +0000)]
drivers: renesas: rcar: pwrc: Code cleanup

This patches fixes checkpatch warnings, replace TAB with space
after #define macros and arrange header as per TF-A coding style.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Iba009587e0b499b3ae58876be390602ae14175b2

3 years agodrivers: renesas: rcar: delay: Fix checkpatch warnings
Biju Das [Sun, 13 Dec 2020 19:59:26 +0000 (19:59 +0000)]
drivers: renesas: rcar: delay: Fix checkpatch warnings

Fix checkpatch warnings.

There are no functional changes.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Iec7dd019bd38e84eccd8cc17189745fdef1911bb

3 years agodrivers: renesas: rcar: common: Code cleanup
Biju Das [Sun, 13 Dec 2020 20:17:01 +0000 (20:17 +0000)]
drivers: renesas: rcar: common: Code cleanup

This patch fixes the below checkpatch warnings
 Line 13: WARNING: please, no spaces at the start of a line
 Line 15: WARNING: please, no spaces at the start of a line
 Line 18: WARNING: Missing a blank line after declarations
 Line 24: WARNING: please, no spaces at the start of a line
 Line 26: WARNING: please, no spaces at the start of a line
 Line 29: WARNING: Missing a blank line after declarations

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I41d146e86889640d11e88c0717039353ddceff0d

3 years agodrivers: renesas: rcar: avs: Fix checkpatch warnings
Biju Das [Sun, 13 Dec 2020 19:53:15 +0000 (19:53 +0000)]
drivers: renesas: rcar: avs: Fix checkpatch warnings

Fix checkpatch warnings.

There are no functional changes.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ic7406aa88e121914270a8d192f170c9c4244578a

3 years agodrivers: renesas: rcar: watchdog: Fix typo
Biju Das [Sun, 13 Dec 2020 20:13:42 +0000 (20:13 +0000)]
drivers: renesas: rcar: watchdog: Fix typo

Fix the typo "occured" -> "occurred"

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Ic66ceab364f7dc926dc6a6db641ca173601cd031

3 years agodrivers: renesas: rcar: auth: Use space instead of TAB
Biju Das [Sun, 13 Dec 2020 19:49:36 +0000 (19:49 +0000)]
drivers: renesas: rcar: auth: Use space instead of TAB

Use space instead of TAB after #define's. Also updated
header files as per TF-A coding style.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I4eac94f0bc79f24b8ac7165ec48f1e1de95d7205

3 years agodrivers: renesas: rcar: scif: Fix coding style
Biju Das [Sun, 13 Dec 2020 20:10:32 +0000 (20:10 +0000)]
drivers: renesas: rcar: scif: Fix coding style

Replace TAB with space after #define macros and update comments as per
TF-A coding style.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: Iff46838a41f991f7dd9dc6fb043e9e482ea0b11d

3 years agodrivers: renesas: rcar: iic_dvfs: Fix coding style
Biju Das [Sun, 13 Dec 2020 20:05:24 +0000 (20:05 +0000)]
drivers: renesas: rcar: iic_dvfs: Fix coding style

Sort the header includes alphabetically, fix typos and drop unneeded TAB
and replace it with space

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change-Id: I62e2658b0309c0985dd32ff023b8b16bd7f2be8e

3 years agoplat/arm: rename rddanielxlr to rdv1mc
Aditya Angadi [Tue, 15 Dec 2020 11:58:08 +0000 (17:28 +0530)]
plat/arm: rename rddanielxlr to rdv1mc

Reference Design platform RD-Daniel-ConfigXLR has been renamed to
RD-V1-MC. Correspondingly, remove all uses of 'rddanielxlr' and replace
it with 'rdv1mc' where appropriate.

Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
Change-Id: I5d91c69738397b19ced43949b4080c74678e604c

3 years agoplat/arm: rename rddaniel to rdv1
Aditya Angadi [Tue, 15 Dec 2020 11:40:50 +0000 (17:10 +0530)]
plat/arm: rename rddaniel to rdv1

Reference Design platform RD-Daniel has been renamed to RD-V1.
Correspondingly, remove all uses of 'rddaniel' and replace it with
'rdv1' where appropriate.

Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
Change-Id: I1702bab39c501f8c0a09df131cb2394d54c83bcf

3 years agoplat: xilinx: Fix non-MISRA compliant code
Venkatesh Yadav Abbarapu [Mon, 11 Jan 2021 03:40:16 +0000 (20:40 -0700)]
plat: xilinx: Fix non-MISRA compliant code

This patch fixes the non compliant code like missing braces for
conditional single statement bodies.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I95b410ae5950f85dc913c4448fcd0a97e0fd490c

3 years agoMerge "AArch64: Fix assertions in processing dynamic relocations" into integration
Olivier Deprez [Thu, 7 Jan 2021 07:13:35 +0000 (07:13 +0000)]
Merge "AArch64: Fix assertions in processing dynamic relocations" into integration

3 years agoMerge "drivers: renesas: rcar: eMMC driver code clean up" into integration
Manish Pandey [Wed, 6 Jan 2021 18:25:16 +0000 (18:25 +0000)]
Merge "drivers: renesas: rcar: eMMC driver code clean up" into integration

3 years agoMerge "plat: marvell: armada: a3k: support doing system reset via CM3 secure coproces...
Manish Pandey [Wed, 6 Jan 2021 18:24:22 +0000 (18:24 +0000)]
Merge "plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor" into integration

3 years agoMerge changes from topic "xilinx-sd-tap-delay" into integration
Manish Pandey [Wed, 6 Jan 2021 12:23:10 +0000 (12:23 +0000)]
Merge changes from topic "xilinx-sd-tap-delay" into integration

* changes:
  plat: zynqmp: Disable ITAPDLYENA bit for zero ITAP delay
  plat: zynqmp: Check for DLL status before doing reset

3 years agoAArch64: Fix assertions in processing dynamic relocations
Alexei Fedorov [Fri, 25 Dec 2020 10:52:56 +0000 (10:52 +0000)]
AArch64: Fix assertions in processing dynamic relocations

This patch provides the following changes in fixup_gdt_reloc()
function:
- Fixes assertions in processing dynamic relocations, when
relocation entries not matching R_AARCH64_RELATIVE type are found.
Linker might generate entries of relocation type R_AARCH64_NONE
(code 0), which should be ignored to make the code boot. Similar
issue was fixed in OP-TEE (see optee_os/ldelf/ta_elf_rel.c
commit 7a4dc765c133125428136a496a7644c6fec9b3c2)
- Fixes bug when "b.ge" (signed greater than or equal) condition
codes were used instead of "b.hs" (greater than or equal) for
comparison of absolute addresses.
- Adds optimisation which skips fixing Global Object Table (GOT)
entries when offset value is 0.

Change-Id: I35e34e055b7476843903859be947b883a1feb1b5
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
3 years agoplat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor
Marek Behún [Tue, 5 Jan 2021 13:01:05 +0000 (14:01 +0100)]
plat: marvell: armada: a3k: support doing system reset via CM3 secure coprocessor

Introduce a new build option CM3_SYSTEM_RESET for A3700 platform, which,
when enabled, adds code to the PSCI reset handler to try to do system
reset by the WTMI firmware running on the Cortex-M3 secure coprocessor.
(This function is exposed via the mailbox interface.)

The reason is that the Turris MOX board has a HW bug which causes reset
to hang unpredictably. This issue can be solved by putting the board in
a specific state before reset.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I3f60b9f244f334adcd33d6db6a361fbc8b8d209f

3 years agoMerge "Plat AXG: Fix PLAT_MAX_PWR_LVL value" into integration
Joanna Farley [Tue, 5 Jan 2021 07:57:15 +0000 (07:57 +0000)]
Merge "Plat AXG: Fix PLAT_MAX_PWR_LVL value" into integration

3 years agoMerge changes from topic "zynqmp-new-apis" into integration
Manish Pandey [Mon, 4 Jan 2021 13:20:33 +0000 (13:20 +0000)]
Merge changes from topic "zynqmp-new-apis" into integration

* changes:
  xilinx: zynqmp: Add support for Error Management
  zynqmp:pm: Adds new zynqmp-pm api SMC call for efuse
  zynqmp : pm : Adds new zynqmp-pm api SMC call for register access

3 years agoxilinx: zynqmp: Add support for Error Management
Venkatesh Yadav Abbarapu [Mon, 23 Nov 2020 12:26:54 +0000 (04:26 -0800)]
xilinx: zynqmp: Add support for Error Management

Adding the EM specific smc handler for the EM-related requests.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Change-Id: I98122d49604a01a2f6bd1e509a5896ee68069dd0

3 years agozynqmp:pm: Adds new zynqmp-pm api SMC call for efuse
VNSL Durga [Mon, 23 Nov 2020 12:46:04 +0000 (04:46 -0800)]
zynqmp:pm: Adds new zynqmp-pm api SMC call for efuse

This patch adds new api to access zynqmp efuse memory

Signed-off-by: VNSL Durga <vnsl.durga.challa@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Change-Id: I0971ab6549552a6f96412431388d19b822db00ab

3 years agozynqmp : pm : Adds new zynqmp-pm api SMC call for register access
Kalyani Akula [Mon, 23 Nov 2020 06:42:10 +0000 (22:42 -0800)]
zynqmp : pm : Adds new zynqmp-pm api SMC call for register access

This patch adds new zynqmp-pm api to provide read/write access to
CSU or PMU global registers.

Signed-off-by: Kalyani Akula <kalyania@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Change-Id: I4fd52eb732fc3e6a8bccd96cad7dc090b2161042

3 years agoMerge "marvell: uart: a3720: Implement console_a3700_core_flush" into integration
Madhukar Pappireddy [Thu, 31 Dec 2020 23:19:56 +0000 (23:19 +0000)]
Merge "marvell: uart: a3720: Implement console_a3700_core_flush" into integration

3 years agoPlat AXG: Fix PLAT_MAX_PWR_LVL value
Alexei Fedorov [Tue, 29 Dec 2020 13:52:11 +0000 (13:52 +0000)]
Plat AXG: Fix PLAT_MAX_PWR_LVL value

This patch fixes AXG platform build error:
plat/amlogic/axg/axg_pm.c: In function 'axg_pwr_domain_off':
plat/amlogic/axg/axg_pm.c:124:43: error: array subscript 2
 is above array bounds of 'const plat_local_state_t[2]'
 {aka 'const unsigned char[2]'}
by changing PLAT_MAX_PWR_LVL from MPIDR_AFFLVL1 to MPIDR_AFFLVL2
in plat\amlogic\axg\include\platform_def.h.

Change-Id: I9a701e8f26231e62f844920aec5830664f3fb324
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
3 years agoMerge changes I8cd2c1c9,I697711ee,I4a0ec150,I4f8064b9,Ie22cb2a3, ... into integration
Madhukar Pappireddy [Wed, 23 Dec 2020 19:17:18 +0000 (19:17 +0000)]
Merge changes I8cd2c1c9,I697711ee,I4a0ec150,I4f8064b9,Ie22cb2a3, ... into integration

* changes:
  ti: k3: Introduce lite device board support
  ti: k3: common: sec_proxy: Introduce sec_proxy_lite definition
  ti: k3: Move USE_COHERENT_MEM only for the generic board
  ti: k3: drivers: ti_sci: Update ti_sci_msg_req_reboot to include domain
  ti: k3: common: sec_proxy: Fill non-message data fields with 0x0
  ti: k3: common: Make plat_get_syscnt_freq2 check CNT_FID0 GTC reg
  ti: k3: common: Enable A72 erratum 1319367
  ti: k3: common: Enable A53 erratum 1530924
  maintainers: Update maintainers for TI port

3 years agomarvell: uart: a3720: Implement console_a3700_core_flush
Pali Rohár [Wed, 23 Dec 2020 18:23:26 +0000 (19:23 +0100)]
marvell: uart: a3720: Implement console_a3700_core_flush

Implementation is simple, just wait for the TX FIFO to be empty.

Without this patch TF-A on A3720 truncate the last line:

  NOTICE:  BL31: Built : 16:1

With this patch TF-A on A3720 print correctly also the last line:

  NOTICE:  BL31: Built : 19:03:31, Dec 23 2020

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I2f2ea42beab66ba132afdb400ca7898c5419db09

3 years agoti: k3: Introduce lite device board support
Andrew F. Davis [Wed, 9 Dec 2020 23:52:50 +0000 (17:52 -0600)]
ti: k3: Introduce lite device board support

Add device support for the 'lite' K3 devices. These will use modified
device addresses and allow for fewer cores to save memory.

Note: This family of devices are characterized by a single cluster
of ARMv8 processor upto a max of 4 processors and lack of a level 3
cache.

The first generation of this family is introduced with AM642.

See AM64X Technical Reference Manual (SPRUIM2, Nov 2020)
for further details: https://www.ti.com/lit/pdf/spruim2

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I8cd2c1c9a9434646d0c72fca3162dd5bc9bd692a

3 years agoti: k3: common: sec_proxy: Introduce sec_proxy_lite definition
Nishanth Menon [Fri, 11 Dec 2020 00:39:41 +0000 (18:39 -0600)]
ti: k3: common: sec_proxy: Introduce sec_proxy_lite definition

There are two communication scheme that have been enabled to communicate
with Secure Proxy in TI.
a) A full fledged prioritized communication scheme, which involves upto
   5 threads from the perspective of the host software
b) A much simpler "lite" version which is just a two thread scheme
   involving just a transmit and receive thread scheme.

The (a) system is specifically useful when the SoC is massive
involving multiple processor systems and where the potential for
priority inversion is clearly a system usecase killer. However, this
comes with the baggage of significant die area for larger number of
instances of secure proxy, ring accelerator and backing memories
for queued messages. Example SoCs using this scheme would be:
AM654[1], J721E[2], J7200[3]  etc.

The (b) scheme(aka the lite scheme) is introduced on smaller SoCs
where memory and area concerns are paramount. The tradeoff of
priority loss is acceptable given the reduced number of processors
communicating with the central system controller. This brings about
a very significant area and memory usage savings while the loss of
communication priority has no demonstrable impact. Example SoC using
this scheme would be: AM642[4]

While we can detect using JTAG ID and conceptually handle things
dynamically, adding such a scheme involves a lot of unused data (cost
of ATF memory footprint), pointer lookups (performance cost) and still
due to follow on patches, does'nt negate the need for a different
build configuration. However, (a) and (b) family of SoCs share the
same scheme and addresses etc, this helps minimize our churn quite a
bit

Instead of introducing a complex data structure lookup scheme, lets
keep things simple by first introducing the pieces necessary for an
alternate communication scheme, then introduce a second platform
representing the "lite" family of K3 processors.

NOTE: This is only possible since ATF uses just two (secure) threads
for actual communication with the central system controller. This is
sufficient for the function that ATF uses.

The (a) scheme and the (b) scheme also varies w.r.t the base addresses
used, even though the memory window assigned for them have remained
consistent. We introduce the delta as part of this change as well.
This is expected to remain consistent as a standard in TI SoCs.

References:
[1] See AM65x Technical Reference Manual (SPRUID7, April 2018)
for further details: https://www.ti.com/lit/pdf/spruid7

[2] See J721E Technical Reference Manual (SPRUIL1, May 2019)
for further details: https://www.ti.com/lit/pdf/spruil1

[3] See J7200 Technical Reference Manual (SPRUIU1, June 2020)
for further details: https://www.ti.com/lit/pdf/spruiu1

[4] See AM64X Technical Reference Manual (SPRUIM2, Nov 2020)
for further details: https://www.ti.com/lit/pdf/spruim2

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I697711ee0e6601965015ddf950fdfdec8e759bfc

3 years agoti: k3: Move USE_COHERENT_MEM only for the generic board
Nishanth Menon [Fri, 11 Dec 2020 04:17:58 +0000 (22:17 -0600)]
ti: k3: Move USE_COHERENT_MEM only for the generic board

commit 65f7b81728d0 ("ti: k3: common: Use coherent memory for shared data")
introduced WARMBOOT_ENABLE_DCACHE_EARLY and USE_COHERENT_MEM to handle
multiple clusters across L3 cache systems. This is represented by
"generic" board in k3 platform.

On "lite" platforms, however, system level coherency is lacking since
we don't have a global monitor or an L3 cache controller. Though, at
a cluster level, ARM CPU level coherency is very much possible since
the max number of clusters permitted in lite platform configuration is
"1".

However, we need to be able to disable USE_COHERENT_MEM for the lite
configuration due to the lack of system level coherency.

See docs/getting_started/build-options.rst for further information.

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I4a0ec150b3f9ea12369254aef834a6cbe82d6be6

3 years agoti: k3: drivers: ti_sci: Update ti_sci_msg_req_reboot to include domain
Suman Anna [Sat, 24 Oct 2020 01:28:54 +0000 (01:28 +0000)]
ti: k3: drivers: ti_sci: Update ti_sci_msg_req_reboot to include domain

The ti_sci_msg_req_reboot message payload has been extended to include
a domain field, and this should be zero to reset the entire SoC with
System Firmwares newer than v2020.04. Add the domain field to the
ti_sci_msg_req_reboot message structure for completeness. Set it up
to zero to fix the reboot issues with newer firmwares.

This takes care of the specific ABI that changed and has an impact on
ATF function.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I4f8064b9d6555687822dc2b2b8ec97609286fa0b

3 years agoti: k3: common: sec_proxy: Fill non-message data fields with 0x0
Nishanth Menon [Thu, 10 Dec 2020 23:37:04 +0000 (17:37 -0600)]
ti: k3: common: sec_proxy: Fill non-message data fields with 0x0

Sec proxy data buffer is 60 bytes with the last of the registers
indicating transmission completion. This however poses a bit
of a challenge.

The backing memory for sec_proxy is regular memory, and all sec proxy
does is to trigger a burst of all 60 bytes of data over to the target
thread backing ring accelerator. It doesn't do a memory scrub when
it moves data out in the burst. When we transmit multiple messages,
remnants of previous message is also transmitted which results in
some random data being set in TISCI fields of messages that have been
expanded forward.

The entire concept of backward compatibility hinges on the fact that
the unused message fields remain 0x0 allowing for 0x0 value to be
specially considered when backward compatibility of message extension
is done.

So, instead of just writing the completion register, we continue
to fill the message buffer up with 0x0 (note: for partial message
involving completion, we already do this).

This allows us to scale and introduce ABI changes back into TF-A only
as needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: Ie22cb2a319f4aa80aef23ffc7e059207e5d4c640

3 years agoti: k3: common: Make plat_get_syscnt_freq2 check CNT_FID0 GTC reg
Nishanth Menon [Fri, 11 Dec 2020 02:51:51 +0000 (20:51 -0600)]
ti: k3: common: Make plat_get_syscnt_freq2 check CNT_FID0 GTC reg

ARM's generic timer[1] picks up it's graycode from GTC. However, the
frequency of the GTC is supposed to be programmed in CNTFID0[2]
register.

In K3, architecture, GTC provides a central time to many parts of the
SoC including graycode to the generic timer in the ARMv8 subsystem.
However, due to the central nature and the need to enable the counter
early in the boot process, the R5 based bootloader enables GTC and
programs it's frequency based on central needs of the system. This
may not be a constant 200MHz based on the system. The bootloader is
supposed to program the FID0 register with the correct frequency it
has sourced for GTC from the central system controller, and TF-A is
supposed to use that as the frequency for it's local timer.

A mismatch in programmed frequency and what we program for generic
timer will, as we can imagine, all kind of weird mayhem.

So, check the CNTFID0 register, if it is 0, warn and use the default
frequency to continue the boot process.

While at it, we can also check CNTCR register to provide some basic
diagnostics to make sure that we don't have OS folks scratch their
heads. Even though this is used during cpu online operations, the cost
of this additional check is minimal enough for us not to use #ifdeffery
with DEBUG flags.

[1] https://developer.arm.com/documentation/100095/0002/generic-timer/generic-timer-register-summary/aarch64-generic-timer-register-summary
[2] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntfid0
[3] https://developer.arm.com/docs/ddi0595/h/external-system-registers/cntcr

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: Ib03e06788580f3540dcb1a11677d0d6d398b2c9f

3 years agoti: k3: common: Enable A72 erratum 1319367
Nishanth Menon [Thu, 10 Dec 2020 22:57:35 +0000 (16:57 -0600)]
ti: k3: common: Enable A72 erratum 1319367

The CatB erratum ARM_ERRATA_A72_1319367 applies to all TI A72
platforms as well.

See the following for further information:
https://developer.arm.com/documentation/epm012079/11/

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I80c6262b9cdadcb12f6dfd5a21272989ba257719

3 years agoti: k3: common: Enable A53 erratum 1530924
Nishanth Menon [Thu, 10 Dec 2020 22:49:42 +0000 (16:49 -0600)]
ti: k3: common: Enable A53 erratum 1530924

The CatB erratum ARM_ERRATA_A53_1530924 applies to all TI A53
platforms as well.

See the following for further information:
https://developer.arm.com/documentation/epm048406/2100

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: Ic095424ce510139e060b38cfb84509d2cc573cad

3 years agomaintainers: Update maintainers for TI port
Nishanth Menon [Thu, 10 Dec 2020 20:41:10 +0000 (14:41 -0600)]
maintainers: Update maintainers for TI port

Andrew is no longer with TI unfortunately, so stepping up to provide
maintainer for supported TI platforms.

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: Ia1be294631421913bcbc3d346947195cb442d437

3 years agoMerge changes from topic "zynqmp-update-pinctrl-api" into integration
Madhukar Pappireddy [Tue, 22 Dec 2020 17:54:47 +0000 (17:54 +0000)]
Merge changes from topic "zynqmp-update-pinctrl-api" into integration

* changes:
  zynqmp: pm: Reimplement pinctrl get/set config parameter EEMI API calls
  zynqmp: pm: Reimplement pinctrl set/get function EEMI API
  zynqmp: pm: Implement pinctrl request/release EEMI API
  zynqmp: pm: Update return type in query functions

3 years agoMerge "PSCI: fix limit of 256 CPUs caused by cast to unsigned char" into integration
Madhukar Pappireddy [Tue, 22 Dec 2020 17:20:42 +0000 (17:20 +0000)]
Merge "PSCI: fix limit of 256 CPUs caused by cast to unsigned char" into integration

3 years agoMerge changes I65450c63,I71d0aa82,Ia395eb32,I4aaed371 into integration
Madhukar Pappireddy [Tue, 22 Dec 2020 16:50:27 +0000 (16:50 +0000)]
Merge changes I65450c63,I71d0aa82,Ia395eb32,I4aaed371 into integration

* changes:
  mediatek: mt8192: add rtc power off sequence
  mediatek: mt8192: Fix non-MISRA compliant code
  mediatek: mt8192: Fix non-MISRA compliant code
  mediatek: mt8192: Add MPU support

3 years agoMerge changes I3703868b,Ie77476db into integration
André Przywara [Tue, 22 Dec 2020 15:51:24 +0000 (15:51 +0000)]
Merge changes I3703868b,Ie77476db into integration

* changes:
  allwinner: Add SPC security setup for H6
  allwinner: Add R_PRCM security setup for H6

3 years agoMerge "allwinner: Fix non-default PRELOADED_BL33_BASE" into integration
André Przywara [Tue, 22 Dec 2020 15:51:01 +0000 (15:51 +0000)]
Merge "allwinner: Fix non-default PRELOADED_BL33_BASE" into integration

3 years agoMerge "allwinner: Enable workaround for Cortex-A53 erratum 1530924" into integration
André Przywara [Tue, 22 Dec 2020 15:50:47 +0000 (15:50 +0000)]
Merge "allwinner: Enable workaround for Cortex-A53 erratum 1530924" into integration

3 years agoMerge changes I0c5f32e8,Id49c124c,Idcfe933d into integration
André Przywara [Tue, 22 Dec 2020 15:50:26 +0000 (15:50 +0000)]
Merge changes I0c5f32e8,Id49c124c,Idcfe933d into integration

* changes:
  allwinner: Use RSB for the PMIC connection on H6
  allwinner: Return the PMIC to I2C mode after use
  allwinner: Always use a 3MHz RSB bus clock

3 years agoPSCI: fix limit of 256 CPUs caused by cast to unsigned char
Graeme Gregory [Wed, 2 Dec 2020 16:24:32 +0000 (16:24 +0000)]
PSCI: fix limit of 256 CPUs caused by cast to unsigned char

In psci_setup.c psci_init_pwr_domain_node() takes an unsigned
char as node_idx which limits it to initialising only the first
256 CPUs. As the calling function does not check for a limit of
256 I think this is a bug so change the unsigned char to
uint16_t and change the cast from the calling site in
populate_power_domain_tree().

Also update the non_cpu_pwr_domain_node structure lock_index
to uint16_t and update the function signature for psci_lock_init()
appropriately.

Finally add a define PSCI_MAX_CPUS_INDEX to psci_private.h and add
a CASSERT to psci_setup.c to make sure PLATFORM_CORE_COUNT cannot
exceed the index value.

Signed-off-by: Graeme Gregory <graeme@nuviainc.com>
Change-Id: I9e26842277db7483fd698b46bbac62aa86e71b45

3 years agoMerge changes from topic "tc0_optee_sp" into integration
Madhukar Pappireddy [Mon, 21 Dec 2020 19:42:05 +0000 (19:42 +0000)]
Merge changes from topic "tc0_optee_sp" into integration

* changes:
  fdts: tc0: Add reserved-memory node for OP-TEE
  plat: tc0: OP-TEE as S-EL1 SP with SPMC at S-EL2
  docs: arm: Add OPTEE_SP_FW_CONFIG
  plat: tc0: enable opteed support
  plat: arm: Increase SP max size