Commit Graph

192 Commits

Author SHA1 Message Date
Sandrine Bailleux 8f74c884a7 Merge "intel: Fix argument type for mailbox driver" into integration 2020-02-28 10:23:10 +00:00
Abdul Halim, Muhammad Hadi Asyrafi 960896eb89 intel: Update RSU driver return code
Modify RSU driver error code for backward-compatibility with
Linux RSU driver

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib9e38d4017efe35d3aceeee27dce451fbd429fb5
2020-02-27 20:25:58 +08:00
Andre Przywara 98964f0523 16550: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I5c2fe3b6a667acf80c808cfec4a64059a2c9c25f
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-02-25 09:34:38 +00:00
Abdul Halim, Muhammad Hadi Asyrafi ea9b962776 intel: Fix argument type for mailbox driver
This patch comes as fixes for 'intel: Fix Coverity Scan Defects' patch.
Revert changing argument type from uint32_t to uint64_t to fix
incompatible cast issue. Fix said bug by using intermediate uint32_t
array as a more appropriate solution.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I344cdabd432cf0a0389b225c934b35d12f4c631d
2020-02-25 16:41:47 +08:00
Tien Hock, Loh d603fd3033 intel: Enable EMAC PHY in Intel FPGA platform
This initializes the EMAC PHY in both Stratix 10 and Agilex,
without this, EMAC PHY wouldn't work correctly.

Change-Id: I7e6b9e88fd9ef472884fcf648e6001fcb7549ae6
Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2020-02-25 10:19:51 +08:00
Sandrine Bailleux eda880ff8e Merge "intel: Fix Coverity Scan Defects" into integration 2020-02-20 09:53:26 +00:00
Abdul Halim, Muhammad Hadi Asyrafi a62b47b87a intel: Fix Coverity Scan Defects
Fix mailbox driver incompatible cast bug and control flow issue that
was flagged by Coverity Scan.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I3f34e98d24e40139d31cf7d5b9b973cd2d981065
2020-02-20 13:56:35 +08:00
Sandrine Bailleux 78fcbd65be Merge "intel: Change boot source selection" into integration 2020-02-12 15:54:02 +00:00
Abdul Halim, Muhammad Hadi Asyrafi 1a87db5d11 intel: Include address range check for SiP Mailbox
This patch modify current address range checker in SiP driver to also
accept input size.
Also, include said checker for SiP mailbox send command to ensure
referenced argument is within expected address.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ie0c3cac4c3d1a6ea0194602d9aa3541f5d9a3367
2020-02-07 14:55:06 +08:00
Hadi Asyrafi 0c5d62ad7f intel: Introduce SMC support for mailbox command
This update allows normal world to send mailbox commands through SMC

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I587bea06422da90e5907d586495cd9e3bde900f6
2020-02-05 16:26:15 +08:00
Hadi Asyrafi e1f97d9c52 intel: Extend SiP service to support mailbox's RSU
Introduce support for RSU that can be initiated through SMC calls.

Added features as below:
- RSU status
- RSU update
- RSU HPS notify
- RSU get sub-partition

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I78d5a07688e43da99f03d77dfd45ffb4a78f2e4c
2020-02-05 16:26:14 +08:00
Manish Pandey d57a582a5b Merge "intel: agilex: Enable uboot BL31 loading" into integration 2020-02-04 13:42:36 +00:00
Hadi Asyrafi 77fc46971e intel: Change boot source selection
Platform handoff structure no longer includes boot source selection.
Hence, those settings can now be configured through socfpga_plat_def.h.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: If7ec6a03bb25156a6670ebf8f77105c370b553f6
2020-02-03 14:31:52 +08:00
Hadi Asyrafi 2a1e086677 intel: agilex: Enable uboot BL31 loading
This patch enables uboot's spl entrypoint to BL31 and also handles
secondary cpus state during cold boot.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib70ec91a3ad09a568cb66e7c1e23a2b3e460746c
2020-01-29 12:49:50 +08:00
Madhukar Pappireddy ca661a0092 Enable -Wredundant-decls warning check
This flag warns if anything is declared more than once in the same
scope, even in cases where multiple declaration is valid and changes
nothing.

Consequently, this patch also fixes the issues reported by this
flag. Consider the following two lines of code from two different source
files(bl_common.h and bl31_plat_setup.c):

IMPORT_SYM(uintptr_t, __RO_START__, BL_CODE_BASE);
IMPORT_SYM(unsigned long, __RO_START__, BL2_RO_BASE);

The IMPORT_SYM macro which actually imports a linker symbol as a C expression.
The macro defines the __RO_START__ as an extern variable twice, one for each
instance. __RO_START__ symbol is defined by the linker script to mark the start
of the Read-Only area of the memory map.

Essentially, the platform code redefines the linker symbol with a different
(relevant) name rather than using the standard symbol. A simple solution to
fix this issue in the platform code for redundant declarations warning is
to remove the second IMPORT_SYM and replace it with following assignment

static const unsigned long BL2_RO_BASE = BL_CODE_BASE;

Change-Id: If4835d1ee462d52b75e5afd2a59b64828707c5aa
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-28 11:09:02 -06:00
Deepika Bhavnani dc2d366fac intel: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int
PLATFORM_CLUSTER_COUNT - Unsigned int
PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int
PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int

Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: Id3d3efc7e7711d19f0223da823713b8390ad2f47
2020-01-24 13:15:11 +00:00
Hadi Asyrafi f2decc7690 intel: Add function to check fpga readiness
Create a function to check for fpga readiness, and move the checking out
of bridge enable function.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I3f473ffeffa9ce181a48977560c8bda19c6123c0
2020-01-16 10:56:43 +08:00
Hadi Asyrafi 9c8f3af50a intel: Add bridge control for FPGA reconfig
This is to make sure that bridge access in disabled before doing full
FPGA reconfiguration and turn re-enable it once the configuration
succeed.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I1f42fbf04ac1625048bbdf21b8a0443464ed833d
2020-01-16 10:56:42 +08:00
Hadi Asyrafi dfdd38c2e1 intel: FPGA config_isdone() status query
SiP CONFIG_ISDONE now will query status for either CONFIG_STATUS or
RECONFIG_STATUS based on passed parameter

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Idb8a84af4e98654759843de09a289d31246c9a91
2020-01-16 10:56:42 +08:00
Hadi Asyrafi 20335ca8d5 intel: System Manager refactoring
Refactored system manager driver to be shared across both intel platform

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ic4d056c3d15c3152403dc11641c2452770a6162d
2020-01-16 10:53:26 +08:00
Hadi Asyrafi 391eeeef7f intel: Refactor reset manager driver
Refactor reset manager into intel common platform directory as it can be
shared by both Stratix 10 and Agilex. Register address and field is now
referred through macros.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Id6d50f2a2f5a6bd8d6746b84602ac17ec7f6c07a
2020-01-16 10:53:23 +08:00
Hadi Asyrafi 3dcb94dd84 intel: Enable bridge access in Intel platform
Add bridge enablement features for each platform.
The bridge access will be enabled automatically for FPGA 1st
configuration only.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I264757b257a209e1c3c4206660f21c5d67af0d2f
2020-01-16 10:53:21 +08:00
Hadi Asyrafi 222519a0ea intel: Modify non secure access function
Combine both peripheral and bridge non-secure access code
into a single callable function

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I38d335ed8d1e9f55d337b63cca121a473897ef70
2020-01-16 10:53:21 +08:00
Manish Pandey 5d3ee0764b Merge "plat: intel: Fix UEFI decompression issue" into integration 2020-01-15 16:11:56 +00:00
Tien Hock, Loh 389091a8d6 plat: intel: Fix UEFI decompression issue
UEFI decompression will fail if the payload size is too large and the load
address is too low. This patch moves the payload to a higher address to fix
the issue

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Change-Id: I36087fbd2237b62891c59dbe2d34336bddfaa396
2020-01-15 13:41:34 +00:00
Hadi Asyrafi e5ebe87b6d intel: Change all global sip function to static
All function in socfpga_sip_svc.c should only be called locally except
sip_smc_handler().

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib84ef9a2e521967baa4cfd32e6bc569dd3a5d2f5
2020-01-15 13:31:29 +00:00
Manish Pandey e9ed7fa73e Merge changes from topic "sip-svc" into integration
* changes:
  intel: Implement platform specific system reset 2
  intel: Enable SiP SMC secure register access
2020-01-14 22:24:30 +00:00
Manish Pandey bc3579b7fa Merge "intel: Fix memory calibration" into integration 2020-01-14 18:28:43 +00:00
Hadi Asyrafi f6c4b19ac8 intel: Remove un-needed checks for qspi driver r/w
This patch removes un-needed r/w parameter checks for qspi driver. The
driver can actually access any offset and size.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: If60b2c016aa91e2c24ddc57c6ad410c8dc5dcf53
2020-01-13 16:26:40 +08:00
Madhukar Pappireddy 7a05f06a84 Remove redundant declarations.
In further patches, we wish to enable -wredundant-decls check as
part of warning flags by default.

Change-Id: I43410d6dbf40361a503c16d94ccf0f4cf29615b7
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-08 18:00:25 -06:00
Hadi Asyrafi 3d9f726438 intel: Fix memory calibration
Increase calibration delay to cater for HPS 1st mode and
reduce clear emif delay which takes too long

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I1a50a5d8a6518ba085d853cb636efa07326552b4
2019-12-30 10:31:53 +08:00
Hadi Asyrafi 32cf34acac intel: Implement platform specific system reset 2
Add support for platform specific warm-reset through psci system reset 2.

- system_reset2 implementation that calls for l2 cache reset
- Check for magic number and request for warm reset in bl2
- Create a shared reset manager header file for Agilex and Stratix 10
- Clean up parameter info in plat_get_next_bl_params

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I3fdd9a2711c80d9bd3dc05b81527781d840bd726
2019-12-30 10:17:04 +08:00
Hadi Asyrafi 13d33d52ce intel: Enable SiP SMC secure register access
Enable access to secure registers by non-secure world through secure
monitor calls

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I80610e08c7cf31f17f47a7597c269131a8de2491
2019-12-30 10:17:04 +08:00
Manish Pandey aeb3d83ecc Merge changes from topic "mailbox-fixes" into integration
* changes:
  intel: Fix SMC SIP service
  intel: Introduce mailbox response length handling
  intel: Fix mailbox config return status
  intel: Mailbox driver logic fixes
  plat: intel: Fix FPGA manager on reconfiguration
  plat: intel: Fix mailbox send_cmd issue
  intel: Modify mailbox's get_config_status
2019-12-19 17:33:03 +00:00
Manish Pandey 98ee29c6c4 Merge "intel: Create SiP service header file" into integration 2019-12-18 17:38:08 +00:00
Hadi Asyrafi 7c58fd4ee3 intel: Fix SMC SIP service
Fix FPGA reconfiguration driver logic

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I0299c1a71f3456e9b441340314662494b8d3e4a0
2019-12-17 19:45:30 +08:00
Hadi Asyrafi 96612fcac4 intel: Introduce mailbox response length handling
Mailbox driver now handles variable response length

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ic96854fdaadaf48379c5de688392df974e1c99c3
2019-12-17 19:45:29 +08:00
Hadi Asyrafi b68ba6cc79 intel: Fix mailbox config return status
Modify mailbox config return code to improve debugging.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I0a223291f4c5296203b3295a679a5857a446c692
2019-12-17 19:45:28 +08:00
Hadi Asyrafi 8014a53ae0 intel: Mailbox driver logic fixes
Fix mailbox driver urgent command handling, doorbell routine,
and logic optimization.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: If536a383f449ca2a68d60274303ec24f92411505
2019-12-17 19:45:26 +08:00
Tien Hock, Loh cefb37eb39 plat: intel: Fix FPGA manager on reconfiguration
Fixes the SiP Service driver that is responsible for FPGA
reconfiguration. Also change the base address of FPGA reconfiguration
to 0x400000.

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Change-Id: I2b84c12c85cd5fc235247131fec4916ed2fb56c8
2019-12-17 19:45:24 +08:00
Tien Hock, Loh 68dd5e15eb plat: intel: Fix mailbox send_cmd issue
There are a few issues in mailbox that needs to be fixed.
- Send doorbell after an indirect cmd
- Do not ring doorbell when polling mailbox response as it should've been
sent by send_cmd
- remove unneeded cmd_free_offset check
- Fix mailbox initialization
- Fix get_config_status returning a wrong status when the status is busy
- Add command length in mailbox command header

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Change-Id: If613e2ca889a540a616c62d69ad0086a7cd46536
2019-12-17 19:44:06 +08:00
Hadi Asyrafi 23f31d39bf intel: stratix10: Modify BL31 parameter handling
Add-in support for handling BL31 parameter from non-BL2 image, ie. SPL

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I16118d791399f652b6d1093c10092935a3449c32
2019-12-17 12:54:34 +08:00
Hadi Asyrafi cf82aff098 intel: Modify BL31 address mapping
Load BL31 to DDR instead of On-Chip RAM for scalability. Also, make use
of On-Chip RAM for BL31 specific variables filling down from handoff
offset to reduce fragmentation

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib64f48bd14f71e5fca2d406f4ede3386f2881099
2019-12-17 12:54:34 +08:00
Hadi Asyrafi 2db1e7663d intel: stratix10: Enable uboot entrypoint support
This patch will provide an entrypoint for uboot's spl into BL31.
BL31 will also handle secondary cpu state during uboot's cold boot

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I661bdb782c2d793d5fc3c7f78dd7ff746e33b7a3
2019-12-17 12:54:29 +08:00
Hadi Asyrafi ec7d0055c9 intel: Modify mailbox's get_config_status
Move the get_config_status out of sip_svc driver.
Modify the function so that it can return either
CONFIG_STATUS or RECONFIG_STATUS

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I642d5900339e67f98be61380edc2b838e0dd47af
2019-12-17 10:17:48 +08:00
Hadi Asyrafi d25041bf1e intel: Create SiP service header file
Separate SiP related definition from mailbox header file

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I45ba540f29d9261007f7ec23469358747cf140b4
2019-12-17 10:17:47 +08:00
Hadi Asyrafi 0d1b704ad8 intel: s10: Remove unused source code
remove plat_sip_svc.c and plat_psci.c in stratix 10 platform directory
as both has been refactored to common directory for sharing with agilex
platform

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I395fed66408f536e8fefd637681e742c63621818
2019-12-12 10:46:15 +08:00
Hadi Asyrafi 1520b5d688 intel: Refactor common platform code [5/5]
Removes unused source code for BL2 and BL31 in platform.mk.
Clean-up unused header files, syntax fixes, and alphabetical
sorting post-refactoring

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ie5ea9b4d3abdb0187cddeb04d2fcfb51fbe5c4dd
2019-11-28 12:47:58 +08:00
Hadi Asyrafi c76d423989 intel: Refactor common platform code [4/5]
Pull out SiP & PSCI service driver into socfpga common directory.
Remove deassert_peripheral_reset from cold reset procedure as it is not
needed.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I1a0390fca6db4c89919a2a038de2a9d96c3ae4fd
2019-11-28 12:47:58 +08:00
Hadi Asyrafi d09adcbaf2 intel: Refactor common platform code [3/5]
Pull out mailbox driver into common area as they can be shared between
intel's socfpga platform

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4064de1ec668931d77abcb7804f6952b70d33716
2019-11-28 12:47:58 +08:00
Hadi Asyrafi e9b5e360de intel: Refactor common platform code [2/5]
Share socfpga private definitions and storage driver between Agilex and
Stratix 10 platform.

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I6da147f4d2df4a97c505d4bbcffadf63bc3bf4a5
2019-11-28 12:47:58 +08:00
Hadi Asyrafi 328718f254 intel: Refactor common platform code [1/5]
Pull out handoff driver to intel/soc/ common directory as they can be
shared by both Agilex and Stratix10 platform.

Share platform_def header between both Agilex and Stratix10 and store
platform specific definitions in socfpga_plat_def.h

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I8eff1afd7ee71704a36a54fad732ede4f557878d
2019-11-28 12:47:57 +08:00
Hadi Asyrafi b90f207a1d Invalidate dcache build option for bl2 entry at EL3
Some of the platform (ie. Agilex) make use of CCU IPs which will only be
initialized during bl2_el3_early_platform_setup. Any operation to the
cache beforehand will crash the platform. Hence, this will provide an
option to skip the data cache invalidation upon bl2 entry at EL3

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I2c924ed0589a72d0034714c31be8fe57237d1f06
2019-09-12 12:36:31 +00:00
Hadi Asyrafi afac9681ff intel: agilex: Fix psci power domain off
Disable gic cpu interface for powered down cpu. This patch also removes
core reset during power off as core reset will be done during power on

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I2ca96d876b6e71e56d24a9a7e184b6d6226b8673
2019-09-12 15:20:04 +08:00
Sandrine Bailleux 5dbdf8e4ea Merge "intel: stratix10: Fix reliance on hard coded clock information" into integration 2019-09-05 09:11:31 +00:00
Paul Beesley 3441952f61 Merge "intel: agilex: Clear PLL lostlock bypass mode" into integration 2019-08-28 13:05:51 +00: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
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
Paul Beesley d1b6013d84 Merge "intel: agilex: Fix memory controller driver" into integration 2019-08-15 15:30:51 +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
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
Hadi Asyrafi fea24b88e4 intel: stratix10: Fix reliance on hard coded clock information
Extract clock information for UART, MMC & Watchdog from the platform
rather than hard code it

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I2582bd34a6da97bd75d5ccba5f93840e65f26b03
2019-08-13 18:20:53 +08: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
Hadi Asyrafi 3f7b1490dc intel: Platform common code refactor
Pull out common code from aarch64 and include

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I4d0f5e1bb01bcdacbedf8e6c359de594239b645f
2019-08-07 12:19:11 +00:00
Alexei Fedorov 35c28cc9c9 Merge "intel: stratix10: Fix BL31 memory mapping" into integration 2019-08-02 12:50:31 +00:00
Hadi Asyrafi 600db4e338 intel: stratix10: Fix BL31 memory mapping
Previous config blocks ATF runtime service communications with SDM mailbox

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ia857facd0bd0790056df94ed1e016bcf619a161e
2019-08-02 20:16:32 +08:00
Hadi Asyrafi d8820789ca intel: Platform common code refactor
Pull out common code from agilex and stratix10

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Iddc0a9e6eccb30823d7b15615d5ce9c6bedb2abc
2019-08-01 16:39:27 +08:00
Hadi Asyrafi 94eef29058 intel: agilex: Fix BL31 memory mapping
Previous config blocks ATF runtime service communications with SDM mailbox

Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ic97aa381d3ceb96395595ec192132859d626b8d1
2019-07-30 10:56:38 +08:00
Ambroise Vincent 3bd24e7242 intel: agilex: Fix build error
"result of '1 << 31' requires 33 bits to represent, but 'int' only has
32 bits [-Werror=shift-overflow=]"

This is treated as an error since commit 93c690eba8 ("Enable
-Wshift-overflow=2 to check for undefined shift behavior")

Change-Id: I141827a6711ab7759bfd6357e4ed9c1176da7c7b
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-07-24 11:53:52 +01:00
Soby Mathew b514ee86c4 Merge "intel: Adds support for Agilex platform" into integration 2019-07-19 09:09:12 +00:00
Hadi Asyrafi 2f11d548f2 intel: Adds support for Agilex platform
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib2ad2068abdf0b204c5cb021ea919581adaca4ef
2019-07-17 19:06:49 +08:00
Soby Mathew d0d0f17164 Merge changes from topic "jc/shift-overflow" into integration
* changes:
  Enable -Wshift-overflow=2 to check for undefined shift behavior
  Update base code to not rely on undefined overflow behaviour
  Update hisilicon drivers to not rely on undefined overflow behaviour
  Update synopsys drivers to not rely on undefined overflow behaviour
  Update imx platform to not rely on undefined overflow behaviour
  Update mediatek platform to not rely on undefined overflow behaviour
  Update layerscape platform to not rely on undefined overflow behaviour
  Update intel platform to not rely on undefined overflow behaviour
  Update rockchip platform to not rely on undefined overflow behaviour
  Update renesas platform to not rely on undefined overflow behaviour
  Update meson platform to not rely on undefined overflow behaviour
  Update marvell platform to not rely on undefined overflow behaviour
2019-07-16 10:11:27 +00:00
Justin Chadwell 36cfbf3ca2 Update intel platform to not rely on undefined overflow behaviour
This consists of ensuring that the left operand of each shift is
unsigned when the operation might overflow into the sign bit.

Change-Id: I4c7a315cb18b3bbe623e7a7a998d2dac869638a7
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-07-11 12:10:58 +01:00
Tien Hock, Loh 0943ea379f plat/intel: Fix SMPLSEL for MMC
MMC sample select needs to be set properly so that DWMMC clock can be
driven to 50Mhz

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
Change-Id: I4a1dde4f6a1e78a36940c57a7a5b162be0bd443a
2019-07-10 11:39:03 +08:00
Paul Beesley 39c92b6271 Merge changes from topic "av/console-port" into integration
* changes:
  qemu: use new console interface in aarch32
  warp7: remove old console from makefile
  Remove MULTI_CONSOLE_API flag and references to it
  Console: removed legacy console API
2019-06-28 11:04:02 +00:00
Ambroise Vincent 5b6ebeec9c Remove MULTI_CONSOLE_API flag and references to it
The new API becomes the default one.

Change-Id: Ic1d602da3dff4f4ebbcc158b885295c902a24fec
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-06-28 10:52:48 +01:00
Hadi Asyrafi 8a88a2271f intel: Add ncore ccu driver
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I0544315986ee28b23157fdfec3fe5aebae6b860f
2019-06-26 18:45:16 +08:00
Hadi Asyrafi 19e3644528 intel: Fix watchdog driver structure
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I0ffccca7ea83bff35c9f149d7054cd610a59ec01
2019-06-26 18:45:16 +08:00
Hadi Asyrafi 2a16502339 intel: Fix qspi driver write config
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I5241ed97697b0280b590b47b9173d102d23f305a
2019-06-26 18:45:16 +08:00
Hadi Asyrafi bf719f66a7 intel: Pull out common drivers into platform common
Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: Ib79e2c6fe6e66dec5004701133ad6a5f4c78f2fa
2019-06-26 18:45:01 +08:00
Muhammad Hadi Asyrafi Abdul Halim 10e70f87e0 intel: Enable watchdog timer on Intel S10 platform
Watchdog driver support & enablement during platform setup

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-21 10:35:24 +08:00
Soby Mathew c61a807a4f
Merge pull request #1874 from hadi-asyrafi/qspi_boot
intel: QSPI boot enablement
2019-03-13 15:31:33 +00:00
Muhammad Hadi Asyrafi Abdul Halim f5ba408c34 intel: QSPI boot enablement
Manages QSPI initialization, configuration and IO handling as boot device

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-13 10:17:14 +08:00
Muhammad Hadi Asyrafi Abdul Halim 150f1bc2ee intel: Add driver for QSPI
To support the enablement of QSPI booting

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-13 10:08:24 +08:00
Dimitris Papastamos 3c652a2d1c
Merge pull request #1863 from thloh85-intel/mmc_fixes
drivers: mmc: Fix some issues with MMC stack
2019-03-08 09:41:22 +00:00
Tien Hock, Loh dd8c03b6bf plat: intel: Add MMC OCR voltage information for initialization
MMC stack needs OCR voltage information for the platform to initialize
MMC controller correctly.

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-08 09:26:24 +08:00
Dimitris Papastamos a6561a28d6
Merge pull request #1864 from hadi-asyrafi/mailbox_fix
intel: Mailbox service un-accessible
2019-03-07 13:58:12 +00:00
Muhammad Hadi Asyrafi Abdul Halim 5bd1b445a9 intel: Mailbox service un-accessible
Change map region for device 2 from non-secure to secure

Signed-off-by: Muhammad Hadi Asyrafi Abdul Halim <muhammad.hadi.asyrafi.abdul.halim@intel.com>
2019-03-07 13:17:25 +08:00
Tien Hock, Loh bf8b8fb657 plat: intel: Improve ECC scrubbing performance
We should be using zeromem to scrub memory instead of memset. This would
improve the performance by 200x

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
2019-03-07 11:28:05 +08:00
Tien Hock, Loh 1cf55aba49 plat: intel: Add BL31 support to Intel Stratix10 SoCFPGA platform
This adds BL31 support to Intel Stratix10 SoCFPGA platform. BL31 in TF-A
supports:
- PSCI calls to enable 4 CPU cores
- PSCI mailbox calls for FPGA reconfiguration

Signed-off-by: Loh Tien Hock <tien.hock.loh@intel.com>
2019-02-26 09:25:14 +08:00
Loh Tien Hock 51f366ac85 plat: intel: Fix faulty DDR calibration value
A DDR calibration value is missing write mask, causing ECC DDR calibration
to fail. This patch addresses the issue. ECC should also be scrubbed before
MMU initializes, thus the scrubbing is moved to ddr intialization phase.

Signed-off-by: Loh Tien Hock <tien.hock.loh@intel.com>
2019-02-13 14:39:31 +08:00
Loh Tien Hock 9d82ef26c6 plat: intel: Add BL2 support for Stratix 10 SoC
This adds BL2 support for Intel Stratix 10 SoC FPGA.
Functionality includes:
- Release and setup peripherals from reset
- Calibrate DDR
- ECC DDR Scrubbing
- Load FIP (bl31 and bl33)

Signed-off-by: Loh Tien Hock <tien.hock.loh@intel.com>
2019-02-04 16:17:24 +08:00