Anson Huang [Tue, 15 Jan 2019 02:34:04 +0000 (10:34 +0800)]
imx: add imx8qm/imx8qx SRTC SIP runtime service support
On i.MX8QM/i.MX8QX with system controller inside, the SRTC is
managed by SCFW(system controller firmware) and some functions
like setting SRTC's time etc. can ONLY be requested from secure
world, so SIP runtime service is needed for such kind of operations,
this patch adds SRTC SIP runtime service support for i.MX8QM and
i.MX8QX.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Anson Huang [Tue, 15 Jan 2019 02:22:06 +0000 (10:22 +0800)]
Support for NXP's i.MX8 SoCs timer IPC
NXP's i.MX8 SoCs have system controller (M4 core) which takes
control of timer management, including watchdog, srtc and system
counter etc., other clusters like Cortex-A35 can send out command
via MU (Message Unit) to system controller for timer operation.
This patch adds timer IPC(inter-processor communication) support.
Signed-off-by: Anson Huang <Anson.Huang@nxp.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>
Jolly Shah [Fri, 4 Jan 2019 19:53:37 +0000 (11:53 -0800)]
zynqmp: pm: Reimplement clock get divider EEMI API
Clock get divider EEMI API is reimplemented to use system-level clock
get divider EEMI API rather than direct MMIO read/write accesses to clock
control registers.
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:49:46 +0000 (11:49 -0800)]
zynqmp: pm: Reimplement clock set divider EEMI API
Clock set divider EEMI API is reimplemented to use system-level clock
set divider EEMI API rather than direct MMIO read/write accesses to clock
control registers.
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 20:55:41 +0000 (12:55 -0800)]
zynqmp: pm: Reimplement clock get state (status) EEMI API
Clock get state 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 is_enabled method for PLLs still uses clock get state API
get the PLL state, in the implementation of pm_clock_getstate() we need
to workaround this by distinguishing two cases: 1) if the given clock ID
corresponds to a PLL output clock ID; or 2) given clock ID is truly an
on-chip clock whose state of the gate should be returned.
For case 1) we'll call pm_api_clock_pll_getstate() implemented in
pm_api_clock.h/c. This function will query the PLL state from PMU using
the system-level PLL get mode EEMI API.
For case 2) we'll call the PMU to query the clock gate state using
system-level clock get status EEMI API.
Functions that appear to be unused after this change is made are removed.
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 20:54:40 +0000 (12:54 -0800)]
zynqmp: pm: Reimplement clock disable EEMI API
Clock disable 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 disable API to reset the PLL in the
implementation of pm_clock_disable() we need to workaround this by
distinguishing two cases: 1) if the given clock ID corresponds to a PLL
output clock ID; or 2) given clock ID is truly an on-chip clock that can
be gated.
For case 1) we'll call pm_api_clock_pll_disable() implemented in
pm_api_clock.h/c. This function will reset the PLL using the system-level
PLL set mode EEMI API with the reset mode argument.
For case 2) we'll call the PMU to configure the clock gate. This is done
using system-level clock disable EEMI API.
Functions that appear to be unused after this change is made are removed.
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:45:59 +0000 (11:45 -0800)]
zynqmp: pm: Reimplement clock enable EEMI API
Clock enable 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 enable API to trigger locking of the PLLs
in the pm_clock_enable() implementation we need to workaround this by
distinguishing two cases: 1) if the given clock ID corresponds to a PLL
output clock ID; or 2) given clock ID is truly an on-chip clock that can
be gated.
For case 1) we'll call pm_api_clock_pll_enable() implemented in
pm_api_clock.h/c. This function checks what is the buffered PLL mode and
calls the system-level PLL set mode EEMI API with the buffered mode value
specified as argument. Long term, if linux driver get fixed to use PLL
EEMI API to control PLLs, this case could be removed from ATF.
For case 2) we'll call the PMU to configure the clock gate. This is done
using system-level clock enable EEMI API.
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 20:49:21 +0000 (12:49 -0800)]
zynqmp: pm: Return the buffered PLL mode through IOCTL PLL get mode API
When linux calls pm_ioctl_get_pll_frac_mode() it doesn't expect the actual
mode to be read from hardware, but the value that it is intending to
program. Therefore, we return the buffered value to linux.
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 20:46:46 +0000 (12:46 -0800)]
zynqmp: pm: Buffer the PLL mode that is set using IOCTL API
When linux calls pm_ioctl_set_pll_frac_mode() it doesn't expect the
fractional mode to be changed in hardware. Furthermore, even before this
patch setting the mode which is done by writing into register takes
no effect until the PLL reset is deasserted, i.e. until linux "enables"
the PLL. To adjust the code to system-level PLL EEMI API and avoid
unnecessary IPIs that would otherwise be issued, we buffer the mode
value set via IOCTL until the PLL mode really needs to be set.
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 20:42:56 +0000 (12:42 -0800)]
zynqmp: pm: Set PLL fractional data using PLL set parameter EEMI API
Fractional data should be set using PLL set parameter EEMI API. This
stands for system-level communication (APU to PMU). Since linux
already uses a specific IOCTL function to do this and we need to
keep it that way, the pll clock ID given by linux has to be mapped
to the pll node ID that is communicated at the system-level (argument
of PLL set parameter API).
With this modification the function pm_api_clk_set_pll_frac_data is
removed from pm_api_clock.c/h because it became unused.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>