Commit Graph

5777 Commits

Author SHA1 Message Date
Chiaki Fujii fbee88fbb0 rcar_gen3: drivers: ddr_b: Update DDR setting for H3, M3, M3N
[IPL/DDR]
- Update H3, M3, M3N DDR setting rev.0.37.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I072c0f61cd896e74e4e1eee39d313f82cf2f7295
2019-08-29 13:02:30 +02:00
Yoshifumi Hosoya bf881832e8 rcar_gen3: drivers: qos: update QoS setting
[IPL/QoS]
- Update M3 Ver.3.0 QoS setting rev.0.04.

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I798401f417df6a352d94311ea07a1e96ba562f6a
2019-08-29 13:02:30 +02:00
Marek Vasut f3f5aba6e8 rcar_gen3: drivers: ddr_b: Fix checkpatch errors in headers
Clean up the DDR B header files and remove checkpatch errors.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I9648ef5511df299688fd5284513812d32a1f8064
2019-08-29 13:02:30 +02:00
Marek Vasut 4ca57bae27 rcar_gen3: drivers: ddr_b: Fix line-over-80s
Fix as many line-over-80s as possible. There are still a few remaining,
which would need further refactoring.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I7225d9fab658d05e3315d8c3fa3c9f3bbb1ab40d
2019-08-29 13:02:30 +02:00
Marek Vasut 087561475e rcar_gen3: drivers: ddr_b: Further checkpatch cleanups
Address more checkpatch CHECKs and ERRORs, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ife682288cef3afa860571b2aca647c9ffe936125
2019-08-29 13:02:30 +02:00
Marek Vasut fcd81d6f93 rcar_gen3: drivers: ddr_b: Clean up camel case
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ifda28578f326b1d4518560384d50ae98806db26e
2019-08-29 13:02:30 +02:00
Marek Vasut a8497fdb72 rcar_get3: drivers: ddr_b: Basic checkpatch fixes
Do basic automated checkpatch fixes on the ddr_b, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Ie401ec049a05d2c4c8044749994391adea171679
2019-08-29 13:02:30 +02:00
Marek Vasut f12039be95 rcar_get3: drivers: ddr: Partly unify register macros between DDR A and B
The ddr_a and ddr_b register macros are the same for the most part,
unify them into a single header.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I8f55d6d779837215339ac0010e8c8ab5f6748d75
2019-08-29 13:02:30 +02:00
Marek Vasut 40c711a360 rcar_get3: drivers: ddr: Clean up common code
Do minor coding style changes to the common DDR init code to make it
checkpatch compliant and move macros out into rcar_def.h.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I67eadf8099e4ff8702105c9e07b13f308d9dbe3d
2019-08-29 13:02:30 +02:00
Paul Beesley 3441952f61 Merge "intel: agilex: Clear PLL lostlock bypass mode" into integration 2019-08-28 13:05:51 +00:00
Sandrine Bailleux de58048830 Merge "tegra: add support for multi console interface" into integration 2019-08-27 22:50:42 +00:00
Paul Beesley 30560911dd Merge "AArch64: Disable Secure Cycle Counter" into integration 2019-08-23 11:26:57 +00:00
Alexei Fedorov e290a8fcbc AArch64: Disable Secure Cycle Counter
This patch fixes an issue when secure world timing information
can be leaked because Secure Cycle Counter is not disabled.
For ARMv8.5 the counter gets disabled by setting MDCR_El3.SCCD
bit on CPU cold/warm boot.
For the earlier architectures PMCR_EL0 register is saved/restored
on secure world entry/exit from/to Non-secure state, and cycle
counting gets disabled by setting PMCR_EL0.DP bit.
'include\aarch64\arch.h' header file was tided up and new
ARMv8.5-PMU related definitions were added.

Change-Id: I6f56db6bc77504634a352388990ad925a69ebbfa
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-08-21 15:43:24 +01:00
Paul Beesley 44e8d5ebc3 Merge "plat/arm: Introduce corstone700 platform." into integration 2019-08-20 14:47:56 +00:00
Paul Beesley 7cc287dea6 Merge "rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*" into integration 2019-08-20 14:14:03 +00:00
Manish Pandey 7bdc469895 plat/arm: Introduce corstone700 platform.
This patch adds support for Corstone-700 foundation IP, which integrates
both Cortex-M0+ and Cortex-A(Host) processors in one handy, flexible
subsystem.
This is an example implementation of Corstone-700 IP host firmware.

Cortex-M0+ will take care of boot stages 1 and 2(BL1/BL2) as well as
bringing Host out RESET. Host will start execution directly from BL32 and
then will jump to Linux.

It is an initial port and additional features are expected to be added
later.

Change-Id: I7b5c0278243d574284b777b2408375d007a7736e
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2019-08-20 15:14:01 +01:00
Paul Beesley 44f4bb24ff Merge "rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h" into integration 2019-08-20 14:12:40 +00:00
Paul Beesley bfc0c0795b Merge "intel: agilex: HMC driver calculate DDR size" into integration 2019-08-20 09:38:32 +00:00
Paul Beesley c3db45fb1d Merge "console: add a flag to prepend '\r' in the multi-console framework" into integration 2019-08-20 09:37:37 +00:00
Alexei Fedorov 75cfba10fc Merge "Fix for N1 1043202 Errata Workaround" into integration 2019-08-20 09:31:16 +00:00
Paul Beesley 64690e06ec Merge "Coverity fix: Remove GGC ignore -Warray-bounds" into integration 2019-08-20 09:25:00 +00:00
laurenw-arm a33ec1e75a Fix for N1 1043202 Errata Workaround
ISB instruction was removed from the N1 1043202 Errata Workaround [1], this
fix is adding the ISB instruction back in.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.pjdoc-466751330-10325/index.html

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I74eac7f6ad38991c36d423ad6aa44558033ad388
2019-08-19 11:06:18 -05:00
Hadi Asyrafi 24d16a2e40 intel: agilex: HMC driver calculate DDR size
Driver will calculate DDR size instead of using hardcoded value

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I642cf2180929965ef12bd5ae4393b2f3d0dcddde
2019-08-19 18:19:04 +08:00
Masahiro Yamada f51df47572 console: add a flag to prepend '\r' in the multi-console framework
Currently, console drivers prepend '\r' to '\n' by themselves. This is
common enough to be supported in the framework.

Add a new flag, CONSOLE_FLAG_TRANSLATE_CRLF. A driver can set this
flag to ask the framework to transform LF into CRLF instead of doing
it by itself.

Change-Id: I4f5c5887591bc0a8749a105abe62b6562eaf503b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-08-19 17:00:08 +09:00
Hadi Asyrafi 960a12b3fb intel: agilex: Clear PLL lostlock bypass mode
To provide glitchless clock to downstream logic even if clock toggles

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I728d64d0ba3b4492125bea5b0737fc83180356f1
2019-08-19 10:56:31 +08:00
Deepika Bhavnani 41af05154a Coverity fix: Remove GGC ignore -Warray-bounds
GCC diagnostics were added to ignore array boundaries, instead
of ignoring GCC warning current code will check for array boundaries
and perform and array update only for valid elements.

Resolves: `CID 246574` `CID 246710` `CID 246651`

Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: I7530ecf7a1707351c6ee87e90cc3d33574088f57
2019-08-16 19:22:13 +03:00
Paul Beesley 988cc82000 Merge "FVP: Add Delay Timer driver to BL1 and BL31" into integration 2019-08-16 14:48:32 +00:00
Paul Beesley f2b3ac63cb Merge "Reduce the number of memory leaks in cert_create" into integration 2019-08-16 13:44:26 +00:00
Alexei Fedorov 1b597c227e FVP: Add Delay Timer driver to BL1 and BL31
SMMUv3 driver functions which are called from BL1 and BL31
currently use counter-based poll method for testing status
bits. Adding Delay Timer driver to BL1 and BL31 is required
for timeout-based implementation using timer delay functions
for SMMU and other drivers.
This patch adds new function `fvp_timer_init()` which
initialises either System level generic or SP804 timer based on
FVP_USE_SP804_TIMER build flag.
In BL2U `bl2u_early_platform_setup()` function the call to
`arm_bl2u_early_platform_setup()` (which calls
`generic_delay_timer_init()` ignoring FVP_USE_SP804_TIMER flag),
is replaced with `arm_console_boot_init()` and `fvp_timer_init()`.

Change-Id: Ifd8dcebf4019e877b9bc5641551deef77a44c0d1
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-08-16 14:15:59 +01:00
Marek Vasut df51d8fe7e rcar_gen3: plat: Rename RCAR_PRODUCT_* to PRR_PRODUCT_*
Rename RCAR_PRODUCT_* to PRR_PRODUCT_* and drop the duplicate
RCAR_PRODUCT_* macro.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I6b2789790b85edb79c026f0860d70f323d113d96
2019-08-16 15:15:12 +02:00
Marek Vasut 7c103d608d rcar_gen3: plat: Factor out PRR_ macros into rcar_def.h
Pull out the PRR_* macros into rcar_def.h and remove multiple copies of
it. Now that there are still RCAR_* macros in rcar_def.h too and they
have the exact same meaning as the PRR_* macros, but that's for another
patch.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Icb7f61b971b1a23102bd1b9f58cda580660a55fc
2019-08-16 15:13:23 +02:00
Justin Chadwell 65ec13bce1 Reduce the number of memory leaks in cert_create
The valgrind checks for cert_create have not been run in a long while -
as such there are a few memory leaks present. This patch fixes a few of
the major ones reported by valgrind. However, a few do remain.

Change-Id: Iab002fb2b0090043287d43fb54a4d18928c2ed85
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-08-16 14:11:18 +01:00
Paul Beesley 04fb777f99 Merge "FVP_Base_AEMv8A platform: Fix cache maintenance operations" into integration 2019-08-16 12:41:45 +00:00
Alexei Fedorov ef430ff495 FVP_Base_AEMv8A platform: Fix cache maintenance operations
This patch fixes FVP_Base_AEMv8A model hang issue with
ARMv8.4+ with cache modelling enabled configuration.
Incorrect L1 cache flush operation to PoU, using CLIDR_EL1
LoUIS field, which is required by the architecture to be
zero for ARMv8.4-A with ARMv8.4-S2FWB feature is replaced
with L1 to L2 and L2 to L3 (if L3 is present) cache flushes.
FVP_Base_AEMv8A model can be configured with L3 enabled by
setting `cluster0.l3cache-size` and `cluster1.l3cache-size`
to non-zero values, and presence of L3 is checked in
`aem_generic_core_pwr_dwn` function by reading
CLIDR_EL1.Ctype3 field value.

Change-Id: If3de3d4eb5ed409e5b4ccdbc2fe6d5a01894a9af
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-08-16 11:30:37 +00:00
Paul Beesley 300df53b9a Merge changes from topic "lm/juno_dyn_cfg" into integration
* changes:
  Juno: Use shared mbedtls heap between bl1 and bl2
  Juno: add basic support for dynamic config
2019-08-16 10:24:53 +00:00
Ambroise Vincent 544c092b9c tegra: add support for multi console interface
This patch updates all Tegra platforms to use the new multi console API.

Change-Id: I27c0c7830a86e26491dea9991a689f0b01e4dbf0
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Julius Werner <jwerner@chromium.org>
2019-08-15 13:49:34 -07:00
Paul Beesley d1b6013d84 Merge "intel: agilex: Fix memory controller driver" into integration 2019-08-15 15:30:51 +00:00
Paul Beesley 99becbe3df Merge changes from topic "rockchip-uart-fixes" into integration
* changes:
  rockchip: rk3399: store actual debug uart information on suspend
  rockchip: move dt-coreboot uart distinction into param handling code
  rockchip: make uart baudrate configurable
  rockchip: px30: add uart5 as option for serial output
2019-08-15 15:30:13 +00:00
Paul Beesley 585df3b49b Merge "AArch64: Align crash reporting output" into integration 2019-08-15 15:18:25 +00:00
Alexei Fedorov 6c6a470fc1 AArch64: Align crash reporting output
This patch modifies crash reporting for AArch64 to provide
aligned output of register dump and GIC registers.

Change-Id: I8743bf1d2d6d56086e735df43785ef28051c5fc3
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-08-15 14:23:27 +00:00
Hadi Asyrafi b266d82148 intel: agilex: Fix memory controller driver
Increase calibration delay, fix ddrio control config & nonsecure region
limit

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ibca3c247a3ad5104176ca9057d29755599f13c9b
2019-08-15 09:28:06 +08:00
Paul Beesley 2102198ce8 Merge "intel: agilex: Fix reliance on hard coded clock information" into integration 2019-08-14 12:37:43 +00:00
Hadi Asyrafi 4e865bd290 intel: agilex: Fix reliance on hard coded clock information
Extract clock information for UART, MMC & Watchdog from the clock manager

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I42d3d4ceeaf45788d457472f6ddcd3fe099f0133
2019-08-14 19:06:35 +08:00
Paul Beesley a8ab58e9b2 Merge changes from topic "jc/coverity-fixes" into integration
* changes:
  Fix Coverity #261967, Infinite loop
  Fix Coverity #343017, Missing unlock
  Fix Coverity #343008, Side affect in assertion
  Fix Coverity #342970, Uninitialized scalar variable
2019-08-13 11:20:25 +00:00
Louis Mayencourt 9580f9bdc2 Juno: Use shared mbedtls heap between bl1 and bl2
Change-Id: Ia1ecad58ebf9de3f3a44b17ad1de57424b431125
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-08-13 11:51:22 +01:00
Louis Mayencourt 8075fc5910 Juno: add basic support for dynamic config
Add the disable_auth dynamic parameter, that allows to disable the
authentication when TBBR is enabled. This parameter is for development
only.

Change-Id: Ic24ad16738517f7e07c4f506dcf69a1ae8df7d2d
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-08-13 11:50:42 +01:00
Alexei Fedorov 3e516bef12 Merge "spd: opteed: enable NS_TIMER_SWITCH" into integration 2019-08-12 08:50:51 +00:00
Heiko Stuebner 0eb7fa91e1 rockchip: rk3399: store actual debug uart information on suspend
The rk3399 suspend code saves and restores the debug uart settings, but
right now always does this for the default uart. Right now this works
only by chance for the majority of rk3399 boards, which do not deviate
from that default.

But both Coreboot as well as U-Boot-based platforms can actually use
different uarts for their output, which can be configured from either
devicetree or Coreboot-variables.

To fix this, just use the stored uart-base information instead of the
default constant.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I1ea059d59a1126f6f8702315df7e620e632b686e
2019-08-09 09:40:19 +02:00
Heiko Stuebner dd4a0d1618 rockchip: move dt-coreboot uart distinction into param handling code
Rockchip platforms can be booted from either u-boot or coreboot.

So far the Coreboot-console was initizalized from a coreboot data struct
in the early_param2 callbacks and dt-based consoles with data from the
rockchip_get_uart_* functions.

But later code may also need this console information for example for
special suspend handling. To make this easy follow a suggestion from
Julius Werner and move the coreboot<->dt distinction into the
rockchip_get_uart_* functions, thus making correct data about the used
uart available to all Rockchip platform code at all times.

This includes a new rockchip_get_uart_clock as well, because while the
dt-platforms right now always just default the rate defined in a constant
Coreboot provides its own field for the clock rate and we don't want to
loose that information for the console init. Similarly the rk_uart_*
variables should move into the non-Coreboot code, to prevent them from
being marked as unused, which also requires the rk_get_uart_* functions
to move below the actual dt-parsing.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I278d595d2aa6c6864187fc8979a9fbff9814feac
2019-08-09 09:40:19 +02:00
Sandrine Bailleux 5119fa7b8d Merge changes from topic "intel-plat-refactor" into integration
* changes:
  intel: Platform common code refactor
  intel: Platform common code refactor
2019-08-07 14:20:01 +00:00