Anthony Zhou [Mon, 8 May 2017 12:17:08 +0000 (20:17 +0800)]
Tegra186: mce: fix trivial MISRA defects
This patch fixes MISRA defects for the MCE driver.
* Using logical NOT for bool type function
* Using MPIDR_AFFLVL_MASK << MPIDR_AFFINITY_BITS replace
MPIDR_CLUSTER_MASK
Change-Id: I97e96f172a3c1158646a15a184c273c53a103d63
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Anthony Zhou [Mon, 8 May 2017 12:34:11 +0000 (20:34 +0800)]
Tegra: topology: fix MISRA defects for Rule 4.6
This patch uses int32_t to replace ints, to fix Rule 4.6 of the
MISRA standard.
Change-Id: I20ac6185929eced684b43da3ef1f8cd5fbddc83d
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Anthony Zhou [Mon, 8 May 2017 12:29:33 +0000 (20:29 +0800)]
Tegra: fiq_glue: fix MISRA defects for Rule 2.7
This patch adds (void) for unused function parameters to
fix Rule 2.7 of the MISRA standard.
Change-Id: Ibc3f10b3bfe73363383b4c28413ab8d99fbc8c89
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Marvin Hsu [Tue, 11 Apr 2017 03:00:48 +0000 (11:00 +0800)]
Tegra210B01: SE1 and SE2/PKA1 context save (atomic)
This patch adds the implementation of the SE atomic context save
sequence. The atomic context-save consistently saves to the TZRAM
carveout; thus there is no need to declare context save buffer or
map MMU region in TZRAM for context save. The atomic context-save
routine is responsible to validate the context-save progress
counter, where CTX_SAVE_CNT=133(SE1)/646(SE2), and the SE error
status to ensure the context save procedure complete successfully.
Change-Id: Ic80843902af70e76415530266cb158f668976c42
Signed-off-by: Marvin Hsu <marvinh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Anthony Zhou [Wed, 1 Mar 2017 04:47:37 +0000 (12:47 +0800)]
Tegra: sip_calls: fix defects flagged by MISRA scan
Main fixes:
* Expressions resulting from the expansion of macro parameters
shall be enclosed in parentheses [Rule 20.7]
* Added explicit casts (e.g. 0U) to integers in order for them
to be compatible with whatever operation they're used in [Rule
10.1]
* Fix implicit widening of composite assignment [Rule 10.6]
Change-Id: Ia83c3ab6e4c8c03c19c950978a7936ebfc290590
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Harvey Hsieh [Wed, 23 Nov 2016 11:13:08 +0000 (19:13 +0800)]
Tegra: support to set the L2 ECC and Parity enable bit
This patch adds capability to read the boot flag to enable L2 ECC
and Parity Protection bit for the Cortex-A57 CPUs. The previous
bootloader sets this flag value for the platform.
* with some coverity fix:
MISRA C-2012 Directive 4.6
MISRA C-2012 Rule 2.5
MISRA C-2012 Rule 10.3
MISRA C-2012 Rule 10.4
Change-Id: Id7303bbbdc290b52919356c31625847b8904b073
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Harvey Hsieh [Mon, 10 Apr 2017 08:20:32 +0000 (16:20 +0800)]
Tegra: console clock settings for real/FPGA platforms
This patch sets up the clock for the UART console, for real Silicon
and FPGA platforms. FPGA platforms run the UART clock source at
13MHz, whereas the clock cource runs at 408MHz for real silicon.
Change-Id: Ibfd99df032ec473f29e636e597cfc95a0f580598
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Marvin Hsu [Wed, 12 Apr 2017 12:40:27 +0000 (20:40 +0800)]
Tegra: platform: helper functions to read chip ID
This patch adds helper functions to find out the chip ID of the
Tegra SoC.
Change-Id: Ia3901dc7cdf77d8c23884d1ed38a80dba6a8afde
Signed-off-by: Marvin Hsu <marvinh@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Varun Wadekar [Fri, 28 Apr 2017 15:43:33 +0000 (08:43 -0700)]
Tegra: retrieve power domain tree from the platforms
The platform code generates the power domain tree. The handler to
retrieve the tree should also reside in the platform code.
This patch moves the plat_get_power_domain_tree_desc() to the
individual platforms.
Change-Id: Iaafc83ed381d83129501111ef655e3c58a8a553f
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Anthony Zhou [Wed, 22 Mar 2017 06:37:04 +0000 (14:37 +0800)]
Tegra: platform: support simulation platforms and MISRA fixes
This patch adds support for simulation platforms as well as
fixes issues flagged by the MISRA scans.
Main MISRA fixes:
* Added explicit casts (e.g. 0U) to integers in order for them to be
compatible with whatever operation they're used in [Rule 10.1]
* Fix return type doesn't match the function type [Rule 10.3]
* Use single return point instead of multiple [Rule 15.5]
* Change return type for the tegra_platform_is_x handlers to bool
Change-Id: I871b7c37b22942f6c0c2049c14cc626d4a24d81c
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Soby Mathew [Wed, 16 Jan 2019 16:01:42 +0000 (16:01 +0000)]
Merge pull request #1738 from ardbiesheuvel/synquacer-spm
synquacer: add SPM support
Antonio Niño Díaz [Wed, 16 Jan 2019 10:45:41 +0000 (10:45 +0000)]
Merge pull request #1757 from antonio-nino-diaz-arm/an/includes
Move BL1 and BL2 private defines to bl_common.h
Antonio Niño Díaz [Wed, 16 Jan 2019 10:45:25 +0000 (10:45 +0000)]
Merge pull request #1755 from Anson-Huang/lpuart
make lpuart and imx uart work for debug mode
Antonio Niño Díaz [Wed, 16 Jan 2019 10:44:44 +0000 (10:44 +0000)]
Merge pull request #1758 from pbeesley-arm/pb/spelling
Correct typographical errors
Antonio Niño Díaz [Wed, 16 Jan 2019 10:43:18 +0000 (10:43 +0000)]
Merge pull request #1756 from antonio-nino-diaz-arm/an/header-deps
plat/arm: Fix header dependencies
Ard Biesheuvel [Sat, 29 Dec 2018 18:44:35 +0000 (19:44 +0100)]
plat/synquacer: enable SPM support
Enable the deprecated SPM framework for the SynQuacer platform.
It involves creating a memory layout in secure DRAM, and wiring
up the SPM infrastructure so that the secure partition payload
that is loaded into this region by the SCP firmware is dispatched
appropriately.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ard Biesheuvel [Sat, 29 Dec 2018 18:40:31 +0000 (19:40 +0100)]
plat/synquacer: enable OP-TEE logic only if SPD_opteed is set
The logic that initializes the BL32 entry point data structure
should only be executed if we are in fact loading OP-TEE, and
not if BL32_BASE is set for other reasons (i.e., when enabling
SPM)
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ard Biesheuvel [Sun, 6 Jan 2019 09:07:24 +0000 (10:07 +0100)]
spm: permit platform to override the VMA placement of the vector table
On some systems, it may be preferred to place the secure EL1/0 vector
table outside of the static placement of the BL31 image itself, for
instance when the latter is located in non-shareable SRAM which does
not tolerate inner shareable WBWA mappings (as is the case on SynQuacer)
So permit the platform to #define SPM_SHIM_EXCEPTIONS_VMA in its
supplementary linker script, in which case it will be used as the
VMA region for the vector table. Note that the LMA does not change,
and it is up to the platform to copy the contents to the right place
at init time.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ard Biesheuvel [Tue, 1 Jan 2019 10:03:08 +0000 (11:03 +0100)]
services/spm_deprecated: fix return code polarity of spm_init()
Registered init handlers return a boolean int, not a return code,
so convert the result from the SPM init call before returning it.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ard Biesheuvel [Thu, 3 Jan 2019 11:03:49 +0000 (12:03 +0100)]
services/spm_deprecated: disable alignment checking for S-EL0
Permit unaligned accesses while executing the secure partition
payload, so that we don't have to modify existing code that we
will host there. (The UEFI spec explicitly permits unaligned
accesses)
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Paul Beesley [Fri, 11 Jan 2019 18:26:51 +0000 (18:26 +0000)]
Correct typographical errors
Corrects typos in core code, documentation files, drivers, Arm
platforms and services.
None of the corrections affect code; changes are limited to comments
and other documentation.
Change-Id: I5c1027b06ef149864f315ccc0ea473e2a16bfd1d
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Antonio Nino Diaz [Tue, 15 Jan 2019 14:19:50 +0000 (14:19 +0000)]
plat/arm: Fix header dependencies
From now on, platform_def.h must include any header with definitions that
are platform-specific (like arm_def.h) and the included headers mustn't
include back platform_def.h, and shouldn't be used by other files. Only
platform_def.h should be included in other files. This will ensure that all
needed definitions are present, rather than needing to include all the
headers in all the definitions' headers just in case.
This also prevents problems like cyclic dependencies.
Change-Id: I9d3cf4d1de4b956fa035c79545222697acdaf5ca
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 18 Dec 2018 13:49:46 +0000 (13:49 +0000)]
Move BL1 and BL2 private defines to bl_common.h
The definitions in bl1/bl1_private.h and bl2/bl2_private.h are useful for
platforms that may need to access them.
Change-Id: Ifd1880f855ddafcb3bfcaf1ed4a4e0f121eda174
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Tue, 15 Jan 2019 09:55:38 +0000 (09:55 +0000)]
Merge pull request #1748 from antonio-nino-diaz-arm/an/build-flags
build: Support BL-specific build flags
Antonio Niño Díaz [Tue, 15 Jan 2019 09:55:30 +0000 (09:55 +0000)]
Merge pull request #1747 from antonio-nino-diaz-arm/an/cnp-dynamic
xlat v2: Dynamically detect need for CnP bit
Antonio Nino Diaz [Tue, 15 Jan 2019 09:53:09 +0000 (09:53 +0000)]
Merge pull request #1746 from JoelHutton/jh/hikey
Jh/hikey
Antonio Niño Díaz [Tue, 15 Jan 2019 09:50:40 +0000 (09:50 +0000)]
Merge pull request #1752 from JackyBai/master
maintainers: Add maintainter for NXP i.MX8M platform.
Antonio Niño Díaz [Tue, 15 Jan 2019 09:50:30 +0000 (09:50 +0000)]
Merge pull request #1750 from pbeesley-arm/pb/readme-updates
doc: Minor reword & reformatting in readme.rst
Anson Huang [Tue, 15 Jan 2019 06:27:10 +0000 (14:27 +0800)]
imx: make imx uart work for debug mode
With DEBUG_CONSOLE enabled, build will fail for imx8mq platform:
./build/imx8mq/release/bl31/imx8mq_bl31_setup.o:
In function `bl31_early_platform_setup2':
imx8mq_bl31_setup.c:(.text.bl31_early_platform_setup2+0x40):
undefined reference to `console_uart_register'
Makefile:741: recipe for target 'build/imx8mq/release/bl31/bl31.elf' failed
make: *** [build/imx8mq/release/bl31/bl31.elf] Error 1
Besides, the .console_flush callback needs to be added to avoid
panic when debug mode is enabled, since the console_flush() will
call it without checking whether the function callback is valid.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Anson Huang [Tue, 15 Jan 2019 05:53:03 +0000 (13:53 +0800)]
imx: add necessary lpuart console_flush callback for debug
Current lpuart driver does NOT implement .console_flush callback,
if debug console is enabled, the console_flush() will call the
undefined .console_flush callback(NULL) for lpuart and leak to
panic, this patch adds .console_flush callback to make lpuart work
for debug mode.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Jacky Bai [Mon, 14 Jan 2019 05:48:57 +0000 (13:48 +0800)]
maintainers: Add maintainter for NXP i.MX8M platform.
This patch adds me to various maintainer activities in
the ATF tree associated with the NXP i.MX8M platform.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Paul Beesley [Thu, 10 Jan 2019 16:14:04 +0000 (16:14 +0000)]
doc: Minor readme structure improvements
Improves wording and sentence structure of the readme, including:
- Using "TF-A" in place of "the TF-A" in a couple of places
- "Support for X" in place of "Support X"
- Explicitly naming the Secure Payload Dispatcher when introducing the
SPD acronym.
Change-Id: I4e7b7e7dc6748f631d07c02d97adcca10ae60ea4
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Paul Beesley [Thu, 10 Jan 2019 15:53:12 +0000 (15:53 +0000)]
doc: Fix NVIDIA name case in readme.rst
Change-Id: I7e0ba692277c1c120c86d47ab966dcd11682428a
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Paul Beesley [Thu, 10 Jan 2019 15:42:39 +0000 (15:42 +0000)]
doc: Add SCMI abbreviation to readme
Currently the examples of Arm interface standards all include
abbreviationsof the full names, except for SCMI.
Change-Id: I8417ada780d51ecf93426aa5d265c507c7dac08c
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Antonio Nino Diaz [Fri, 11 Jan 2019 11:20:10 +0000 (11:20 +0000)]
xlat v2: Dynamically detect need for CnP bit
ARMv8.2-TTCNP is mandatory from ARMv8.2 onwards, but it can be implemented
in CPUs that don't implement all mandatory 8.2 features (and so have to
claim to be a lower version).
This patch removes usage of the ARM_ARCH_AT_LEAST() macro and uses system
ID registers to detect whether it is needed to set the bit or not.
Change-Id: I7bcbf0c7c937590dfc2ca668cfd9267c50f7d52c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Joel Hutton [Thu, 27 Dec 2018 13:42:19 +0000 (13:42 +0000)]
hikey960:Corrected erroneous DDR_SIZE
Change-Id: I7194a9a5f0e41308eb3242d20c0d3434f72da591
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Joel Hutton [Wed, 28 Nov 2018 11:09:24 +0000 (11:09 +0000)]
hikey960: Increase max xlat tables
It is cleaner to use the same number of tables regardless of whether
OP-TEE is used or not. This doesn't result in a significant memory
usage increase.
Change-Id: I38bcaa3f2f197c0a352153117592749f189a265c
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Jeenu Viswambharan [Thu, 1 Nov 2018 10:55:55 +0000 (10:55 +0000)]
build: Support BL-specific build flags
With this patch, each BL image can have its own compiler flags.
Change-Id: Ic9075a20bc6f6dc8a277587b9bee5e062306c090
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Antonio Niño Díaz [Thu, 10 Jan 2019 11:18:51 +0000 (11:18 +0000)]
Merge pull request #1744 from jollysxilinx/integration
plat: xilinx: code restructure
Antonio Niño Díaz [Thu, 10 Jan 2019 09:23:42 +0000 (09:23 +0000)]
Merge pull request #1724 from jbech-linaro/emmc_enumeration
mmc: increase delay when initializing mmc
Jolly Shah [Wed, 9 Jan 2019 20:37:57 +0000 (12:37 -0800)]
xilinx: Move IPI functions to common file
pm_service ipi functions can be used by other xilinx
platforms. So move it to common directory. Also change
node_id member type in pm_proc structure so it can be
used for versal where device IDs are used instead of
node IDs.
To accommodate this change header files are re-organized.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Mon, 7 Jan 2019 20:53:32 +0000 (12:53 -0800)]
xilinx: pm_service: Rename macros to use generic macro names
ZynqMP pm_service ipi file uses platform specific macros names.
pm_service ipi functions can be used by other Xilinx platforms
also. Make rename macros to use generic names so that it can be
used by common file.
pm_service ipi functions will be moved to common file in next patch.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Mon, 7 Jan 2019 20:51:40 +0000 (12:51 -0800)]
xilinx: zynqmp: Rename pm_api members to use generic name
Use generic name for pm_api structure member, so that pm_api
structure can be used other Xilinx platforms.
Structure definition will be moved to common file in upcoming
patch.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:31:49 +0000 (11:31 -0800)]
Move generic ipi_mb functions to common files
ipi_mb functions can be used for other Xilinx platform.
Move it to common file from platform specific files.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:27:36 +0000 (11:27 -0800)]
xilinx: Remove platform specific dependency from IPI function
ipi_mb function uses platform specific ipi configuration table.
These ipi_mb functions can be used for other Xilinx platform.
So, instead of using direct data structure, initialize IPI
configuration data by passing platform specific ipi table.
Macros are updated accordingly for this ipi table change.
This change is done so that ipi_mb functions can be moved to
common file without major changes. All common functions now would
be moved to common file in next patch.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:25:28 +0000 (11:25 -0800)]
xilinx: Move ipi configuration structure definition to header file
Move ipi configuration structure definition to common header file
and rename it to common name, so it can be used for Xilinx specific
other platforms in upcoming changes.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:21:29 +0000 (11:21 -0800)]
xilinx: zynqmp: Move zynqmp_ipi.h to include directory
Move zynqmp_ipi.h to platform specific include directory.
Rename it to plat_ipi.h instead of platform name. So, it can
be used to common source files which needs platform specific
data.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:16:16 +0000 (11:16 -0800)]
plat: xilinx: zynqmp: Move zynqmp_def.h to include directory
Move zynqmp_def.h to platform specific include directory.
Also, update source file to include header file from updated
path of zynqmp_def.h
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Tue, 8 Jan 2019 19:10:47 +0000 (11:10 -0800)]
plat: xilinx: zynqmp: Move zynqmp_private.h to include directory
Move zynqmp_private.h to platform specific include directory.
Also, rename it to plat_private.h instead of having platform
name. So, it can be used to common source files which needs
platform specific data.
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Reviewed-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Antonio Niño Díaz [Wed, 9 Jan 2019 11:44:44 +0000 (11:44 +0000)]
Merge pull request #1743 from JoelHutton/jh/fixcssdriver
juno:Fix CSS_USE_SCMI_SDS_DRIVER=0 configuration
Joel Hutton [Tue, 8 Jan 2019 15:18:28 +0000 (15:18 +0000)]
juno:Fix CSS_USE_SCMI_SDS_DRIVER=0 configuration
A previous commit
89f2e589856f ("plat/arm: remove weak implemention of
'plat_arm_psci_override_pm_ops' function") introduced a problem with the
CSS_USE_SCMI_SDS_DRIVER configuration. In juno_pm.c the
css_scmi_override_pm_ops function was used regardless of whether the
flag was set. This patch ifdefs the function to restore the original
behaviour.
Change-Id: I508025ba70cf3a9250cc6270c1df209179c37ae7
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
Antonio Niño Díaz [Tue, 8 Jan 2019 15:46:29 +0000 (15:46 +0000)]
Merge pull request #1734 from marex/arm/master/update-rcar-2.0.0
Arm/master/update rcar 2.0.0
Ard Biesheuvel [Tue, 1 Jan 2019 10:01:41 +0000 (11:01 +0100)]
services/spm_deprecated: permit timer sysreg access at S-EL0
Expose the timer registers that are accessible at EL0 per the
architecture to the SPM payload running in secure EL0. Note
that this requires NS_TIMER_SWITCH to be enable for all users
of this code.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Ard Biesheuvel [Sat, 29 Dec 2018 18:43:21 +0000 (19:43 +0100)]
services/spm_deprecated: update ARM platform specific asserts
Update some asserts that refer to #defines that only occur in
ARM platforms, preventing this code to be used on other platforms.
Instead, use a platform agnostic name, and update all the existing
users.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Marek Vasut [Mon, 31 Dec 2018 13:51:14 +0000 (14:51 +0100)]
rcar_gen3: plat: update renesas version to 2.0.0
Update the reported Renesas version to 2.0.0, since the DDR/QoS/PFC
table versions match the ones from that release.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:15:33 +0000 (20:15 +0100)]
rcar_gen3: drivers: pwrc: Switch to common delay implementation
Replace the ad-hoc implementation of delay in PWRC driver
with common R-Car delay code.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 26 Dec 2018 14:57:08 +0000 (15:57 +0100)]
rcar_gen3: drivers: delay: Rewrite from assembler to C
Rewrite the delay code from assembler to C.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:12:13 +0000 (20:12 +0100)]
rcar_gen3: plat: Add generic timer init
Add code to determine the platform timer frequency and configure
the generic timer accordingly early in BL2.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Thu, 27 Dec 2018 19:31:22 +0000 (20:31 +0100)]
rcar_gen3: drivers: scif: Use TEND flag for transmission end detection
Use the SCIF SCFSR:TEND bit to check that all data were transmitted by
the SCIF and that there are no more valid data to transmit in the FIFO.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 12 Dec 2018 15:35:00 +0000 (16:35 +0100)]
rcar_gen3: drivers: qos: Synchronize tables
Synchronize the QoS tables with Renesas ATF release 2.0.0 .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 12 Dec 2018 16:40:10 +0000 (17:40 +0100)]
rcar_gen3: drivers: pfc: Synchronize tables
Synchronize the pin control tables with Renesas ATF release 2.0.0 .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 12 Dec 2018 17:06:39 +0000 (18:06 +0100)]
rcar_gen3: drivers: ddr-b: Synchronize tables
Synchronize the R-Car DDR-B driver, used on R-Car H3/M3W/M3N,
with Renesas ATF release 2.0.0 .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Sun, 16 Dec 2018 18:28:59 +0000 (19:28 +0100)]
rcar_gen3: drivers: ddr-a: Checkpatch cleanup
Run Linux kernel checkpatch on the DDR-A init code to clean it up:
$ checkpatch.pl --fix --fix-inplace -f drivers/staging/renesas/rcar/ddr/ddr_a/*
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 12 Dec 2018 17:06:39 +0000 (18:06 +0100)]
rcar_gen3: drivers: ddr-a: Synchronize tables
Synchronize the R-Car DDR-A driver, used on R-Car E3,
with Renesas ATF release 2.0.0 .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 10:26:03 +0000 (11:26 +0100)]
rcar_gen3: drivers: cpld: Move rcar_cpld_reset_cpu() into header
Move the rcar_cpld_reset_cpu() function into header file and zap the externs.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Thu, 27 Dec 2018 19:28:45 +0000 (20:28 +0100)]
rcar_gen3: drivers: swdt: Access SCR in EL3
The code runs in EL3, use EL3 accessors to manipulate the interrupt bit.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Thu, 27 Dec 2018 19:26:01 +0000 (20:26 +0100)]
rcar_gen3: drivers: auth-mod: Access SCTLR in EL3
The code runs in EL3, use EL3 accessors to manipulate the cache bits.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:23:36 +0000 (20:23 +0100)]
rcar_gen3: plat: Dump EL3 interrupt error registers
Since the interrupts are handled in EL3, dump the EL3 error registers
in case an error happens.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 14:57:11 +0000 (15:57 +0100)]
rcar_gen3: plat: Enable programmable CPU reset address
The reset address is programmable on the R-Car Gen3, enable it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 15:48:04 +0000 (16:48 +0100)]
rcar_gen3: plat: Disable IPMMU PV0 cache on E3
Disable the IPMMU PV0 cache on E3 rev. 1.x .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:11:38 +0000 (20:11 +0100)]
rcar_gen3: plat: Add E3 rev. 1.1 support
Add support for R-Car E3 silicon rev. 1.1
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:11:26 +0000 (20:11 +0100)]
rcar_gen3: plat: Add missing platform auto-detection name
Add missing TARGET_NAME for the case where RCAR_LSI is set to AUTO,
which is platform auto-detection.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 16:12:45 +0000 (17:12 +0100)]
rcar_gen3: plat: Clean up rcar_pwrc_code_copy_to_system_ram()
Call the function only from architecture setup and at the end of
suspend cycle instead of calling it all over the place.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 26 Dec 2018 14:57:08 +0000 (15:57 +0100)]
rcar_gen3: plat: Fix BL2 size check
Rename BL2_LIMIT to BL2_IMAGE_LIMIT and BL2_SYSRAM_LIMIT to BL2_LIMIT to
correctly set BL2_LIMIT value. Set correct DEVICE_SRAM_BASE to match the
hardware. Use BL2_END in rcar_configure_mmu_el3() to mark the cacheable
BL2 area.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Sun, 30 Dec 2018 16:19:03 +0000 (17:19 +0100)]
rcar_gen3: plat: Staticize memory maps
Staticize the platform memory map tables as they are only used within
the platform_common.c file.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 26 Dec 2018 14:57:08 +0000 (15:57 +0100)]
rcar_gen3: plat: Function cleanup
Replace foo_t with struct foo.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Sun, 30 Dec 2018 16:21:39 +0000 (17:21 +0100)]
rcar_gen3: plat: Fix cache line size
The CPU has cache line size of 64 Bytes, fix the cache line size.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:38:09 +0000 (20:38 +0100)]
rcar_gen3: plat: Disable SVE
Apply
3872fc2d1fc5 ("Do not enable SVE on pre-v8.2 platforms") to
R-Car Gen3 too.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 18:47:37 +0000 (19:47 +0100)]
rcar_gen3: plat: Add missing dependency to rcar_srecord
Add missing dependency on the bl2.elf and bl31.elf into the rcar_srecord
target, which uses those ELF files to generate the SRECs.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 8 Jan 2019 13:05:39 +0000 (14:05 +0100)]
rcar_gen3: plat: Rename H3 label
Rename the H3 label to avoid confusing clang, which generates an error
if the label is just H3. Rename it to RCARH3.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 8 Jan 2019 13:04:08 +0000 (14:04 +0100)]
rcar_gen3: plat: Drop ddr_regdef_len()
This function is unused and triggers clang error, drop it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Antonio Niño Díaz [Tue, 8 Jan 2019 11:28:44 +0000 (11:28 +0000)]
Merge pull request #1740 from soby-mathew/sm/restrict_pie_to_fvp
plat/arm: Restrict PIE support to FVP
Antonio Niño Díaz [Tue, 8 Jan 2019 11:28:24 +0000 (11:28 +0000)]
Merge pull request #1742 from sandrine-bailleux-arm/sb/fix-arm-mk
Fix a variable expansion in Arm platform makefiles
Antonio Niño Díaz [Tue, 8 Jan 2019 11:28:12 +0000 (11:28 +0000)]
Merge pull request #1741 from deepan02/deepan02-arm-uart-definations
plat/arm/n1sdp: define the uart constants for N1SDP
Antonio Niño Díaz [Tue, 8 Jan 2019 09:10:32 +0000 (09:10 +0000)]
Merge pull request #1739 from Yann-lms/includes
stm32mp1: do not include platform header files directly in drivers
Antonio Niño Díaz [Tue, 8 Jan 2019 09:10:22 +0000 (09:10 +0000)]
Merge pull request #1736 from antonio-nino-diaz-arm/an/maintainers
maintainers: Fix path of Marvell documentation
Antonio Niño Díaz [Tue, 8 Jan 2019 09:09:23 +0000 (09:09 +0000)]
Merge pull request #1732 from jollysxilinx/integration
plat: xilinx: Clock and PLL EEMI API Support
Deepak Pandey [Tue, 18 Dec 2018 11:40:24 +0000 (17:10 +0530)]
plat/arm/n1sdp: define the uart constants for N1SDP
This patch removes the dependency of the N1SDP on soc
css defines in order to let the N1SDP platform port
define the uart related constants.
Change-Id: If13796f278586a01512ee99615502b30e478189e
Signed-off-by: Deepak Pandey <Deepak.Pandey@arm.com>
Sandrine Bailleux [Mon, 7 Jan 2019 14:35:37 +0000 (15:35 +0100)]
Fix a variable expansion in Arm platform makefiles
The top level makefile defines the PLAT variable, not PLATFORM.
This mistake was causing an empty variable expansion and showing an
incomplete error message.
Change-Id: I5da1275c73c61a7c1823643a76300f255841719d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Soby Mathew [Mon, 7 Jan 2019 14:07:58 +0000 (14:07 +0000)]
plat/arm: Restrict PIE support to FVP
The patch SHA
55cf015c enabled PIE support when RESET_TO_BL31=1 for
all ARM platforms. But it seems n1sdp platform doesn't work with PIE
support yet. Hence restrict the ENABLE_PIE=1 to fvp platform.
Change-Id: If44e42528e4b0b57c69084503f346576fe0748bd
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Antonio Niño Díaz [Mon, 7 Jan 2019 11:06:19 +0000 (11:06 +0000)]
Merge pull request #1737 from antonio-nino-diaz-arm/an/asm-assert
Remove ASM_ASSERTION check in Makefile
Antonio Niño Díaz [Mon, 7 Jan 2019 11:06:09 +0000 (11:06 +0000)]
Merge pull request #1735 from antonio-nino-diaz-arm/an/load-image-v2
plat/arm: Remove comment that mentions LOAD_IMAGE_V2
Yann Gautier [Mon, 7 Jan 2019 10:17:24 +0000 (11:17 +0100)]
stm32mp1: do not include platform header files directly in drivers
Instead, only platform_def.h is included.
The required files to be included are added in stm32mp1_def.h.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Jolly Shah [Wed, 2 Jan 2019 21:53:33 +0000 (13:53 -0800)]
zynqmp: pm: Invalidate unused APLL_TO_LPD clock
This clock does not drive any clock in LPD so there is no need for
Linux to try to initialize it.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 20:03:44 +0000 (12:03 -0800)]
zynqmp: pm: Invalidate several clocks that Linux doesn't need to control
Linux has no reason to use these system and debug clocks and therefore
shouldn't access them. These clocks are marked as invalid in order to
prevent Linux from registering and querying them.
Note that despite clocks being marked as invalid a security issue
still remains in place as there is nothing that prevents the
non-secure world from gating these clocks and that way causing
damage to the system.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:48:19 +0000 (13:48 -0800)]
zynqmp: pm: Add ACPU_FULL and ACPU_HALF clocks in the invalid list
These clocks are marked as invalid in order to prevent Linux from
registering them.
Note that despite clocks being marked as invalid a security issue
still remains in place as there is nothing that prevents the
non-secure world from gating these clocks and that way halt
the whole APU subsystem.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:45:53 +0000 (13:45 -0800)]
zynqmp: pm: Fix model of ACPU clocks
In the existing model for ACPU clock the mux, divider, and gate were
represented as one clock and ACPU_HALF was modelled as child of
ACPU clock. This is not correct. ACPU clock model contains only
mux and the divider, and it has 2 children: ACPU_FULL and ACPU_HALF
clocks which have only gates. The models of ACPU and ACPU_HALF clocks
are fixed and ACPU_FULL clock is added.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:44:25 +0000 (13:44 -0800)]
zynqmp: pm: Reimplement clock get parent EEMI API
Clock get parent EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock set parent API to get pre_src, post_src, div2
and bypasss, in the implementation of pm_clock_get_parent() we need to
workaround this by distinguishing two cases:
1) if the given clock ID corresponds to a PLL-related clock ID (*_PRE_SRC,
*_POST_SRC, *_INT_MUX or *_PLL clock IDs); or
2) given clock ID is truly an on-chip clock.
For case 1) we'll map the call onto PLL-specific EEMI API with the
respective parameter ID. For case 2) the call is passed to the PMU.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:57:40 +0000 (11:57 -0800)]
zynqmp: pm: Reimplement clock set parent EEMI API
Clock set parent EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock set parent API to set pre_src, post_src, div2
and bypass, in the implementation of pm_clock_set_parent() we need to
workaround this by distinguishing two cases:
1) if the given clock ID corresponds to a PLL-related clock ID (*_PRE_SRC,
*_POST_SRC, *_INT_MUX or *PLL clock IDs); or 2) given clock ID is truly
an on-chip clock.
For case 1) we'll map the call onto PLL set parameter EEMI API with the
respective parameter ID. Since clock set parent interface to EL1/2 receives
parent index (mux select value), the value is just passed to PMU.
Functions that appear to be unused after this change is made are removed.
Setting the parent of *PLL clocks, that actually model bypass, is not
possible. This is already ensured by the existing clock model having the
CLK_SET_RATE_NO_REPARENT flag. The API also doesn't allow changing the
bypass parent. Bypass is controlled only by the PMU firmware.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:39:30 +0000 (13:39 -0800)]
zynqmp: pm: Cleanup for clock set/get rate EEMI API
Clock set/get rate are not implemented and will likely never be.
Remove empty function stubs.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>