Commit Graph

9943 Commits

Author SHA1 Message Date
Marek Behún 86f6b55d47 refactor(drivers/marvell/comphy-3700): rename Idle Sync Enable register constants
According to the functional specification, the register at offset 0x48
is called Idle Sync Enable, not Unit Control or some such.

Rename the constants.

Only bit 12 of this register is defined, all other bits are reserved.
But for some reason the code needs the default value of the other bits,
so we also rename constant UNIT_CTRL_DEFAULT_VALUE to
IDLE_SYNC_EN_DEFAULT_VALUE.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ia4f80f945a8f31c190cd9a1875d50d892e72825f
2021-12-09 01:29:13 +01:00
Marek Behún 3f9a089297 refactor(drivers/marvell/comphy-3700): unify Generation Settings register values
Generation Settings registers have the same layout for different
generations and same setting (i.e. Generation 2 Settings 2 register has
the same layout as Generation 3 Settings 2).

So it does not make sense to prefix the constants for Settings 2 with
G3.

Instead change the prefixes to GSx_ for settings register x.

For Settings 2 of Gen 2 and Gen 3 we have some definitions in the first
and some in the second. Move them all to the first defined register (in
this case Gen 2, since the constant for Gen 1 is not defined because it
is not used).

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I15c337eb58aa37fd99fe388fd59373aa325a3a92
2021-12-09 01:29:13 +01:00
Marek Behún 30264e9788 refactor(drivers/marvell/comphy-3700): unify Generation Settings register names
Sometimes we call the constants GENx_SET_y, sometimes GENx_SETTINGS_y,
and sometimes GENx_SETTING_y.

Unify this into GENx_SETy.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I3810fb52b2897fe6730ef6e58d434c47cfef14a9
2021-12-09 01:29:13 +01:00
Marek Behún b7b0575d12 refactor(drivers/marvell/comphy-3700): drop _ADDR suffixes
COMPHY register addresses are defined twice
- once for indirect access, where the constants are of the form
  COMPHY_<register_name>
- once for direct access, with constants of the form
  <register_name>_ADDR

But sometimes the first case also has this _ADDR suffix (and other times
not).

Drop it from those places to unify how we define these registers.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ibf95be8ade231d0e42258f40614a5f0974d280bd
2021-12-09 01:29:13 +01:00
Marek Behún b3491336e0 refactor(drivers/marvell/comphy-3700): drop _REG prefixes and suffixes
Some register constants are defined with _REG suffix or REG_ prefix, but
others are not. Unify this by dropping these prefixes / suffixes.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I1ba331c0a4686093ee250bcaf3297349956ac9a8
2021-12-09 01:29:13 +01:00
Marek Behún 580742d003 refactor(drivers/marvell/comphy-3700): move and add comment for COMPHY_RESERVED_REG
The COMPHY_RESERVED_REG (offset 0x0E) is currently defined between
COMPHY_KVCO_CAL_CTRL (0x02) and COMPHY_DIG_LOOPBACK_EN (0x23).

But this register does not come from PHY lane register space. The
address 0x0E is not relative to PHY lane registers base address.

It only exists in the indirect register space, before PHY lane 2
registers (which start at address 0x200).

Move its definition in the header and add a comment.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ie726384b980ace83d8ea327df09d928db74c2ab7
2021-12-09 01:29:13 +01:00
Marek Behún 66f07bd018 refactor(drivers/marvell/comphy-3700): move Miscellaneous Control 0 register definition
Move the definitions for the Miscellaneous Control 0 register (offset 0x4F),
to leave the registers sorted according to their offsets.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I9864be5bd00181d21c9334219be4f89c4f032c8b
2021-12-09 01:29:13 +01:00
Marek Behún 669d3dc5ea refactor(drivers/marvell/comphy-3700): rename PHY_GEN_USB3_5G to PHY_GEN_MAX_USB3_5G
The register name for the value PHY_GEN_USB3_5G is PHY_GEN_MAX. We
already define the mask constant as PHY_GEN_MAX_MASK. Thus also the
value name should be prefixed with PHY_GEN_MAX_.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ibf72a66d2e65e240ed2cdbc3a301dbd793e2cb34
2021-12-09 01:29:13 +01:00
Marek Behún 4c995d2d1b refactor(drivers/marvell/comphy-3700): rename Digital Loopback Enable register constant
The register at offset 0x23 is called Digital Loopback Enable, but the
constant is COMPHY_LOOPBACK_REG0, as if there were some LOOPBACK_REG1
register or something, which there is not.

Rename the constant to COMPHY_DIG_LOOPBACK_EN.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ie88bdd864e2c9ab7e8de70ed7f3a13ee8f08ff79
2021-12-09 01:29:13 +01:00
Marek Behún 95c26d6489 fix(drivers/marvell/comphy): change reg_set() / reg_set16() to update semantics
Currently reg_set() and reg_set16() are implemented via
mmio_clrsetbits_32(), meaning that first bits from mask are cleared,
then data bits are set.

But these function are used everywhere according to update semantics,
where only those bits that are in mask are allowed to be changed.

Example from phy-comphy-cp110.c
  mask = HPIPE_RST_CLK_CTRL_PIPE_RST_MASK;
  data = 0x1 << HPIPE_RST_CLK_CTRL_PIPE_RST_OFFSET;
  /* Set PHY datapath width mode for V0 */
  mask |= HPIPE_RST_CLK_CTRL_FIXED_PCLK_MASK;
  data |= 0x0 << HPIPE_RST_CLK_CTRL_FIXED_PCLK_OFFSET;
  /* Set Data bus width USB mode for V0 */
  mask |= HPIPE_RST_CLK_CTRL_PIPE_WIDTH_MASK;
  data |= 0x0 << HPIPE_RST_CLK_CTRL_PIPE_WIDTH_OFFSET;
  /* Set CORE_CLK output frequency for 250Mhz */
  mask |= HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_MASK;
  data |= 0x0 << HPIPE_RST_CLK_CTRL_CORE_FREQ_SEL_OFFSET;
  reg_set(hpipe_addr + HPIPE_RST_CLK_CTRL_REG, data, mask);

Change the implementation to update semantics by anding data with mask.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ic72a8f64916274e08baef0b3f4c44a4fa07c1a6c
2021-12-09 01:29:07 +01:00
Marek Behún 4d01bfe665 fix(drivers/marvell/comphy-3700): use reg_set() according to update semantics
Currently reg_set() and reg_set16() are almost everywhere (both in
phy-comphy-3700.c and phy-comphy-cp110.c) used as if the semantics were
that of register update function (only bits that are set in mask are
updated):
  reg_set(addr, data, mask) {
    *addr = (*addr & ~mask) | (data & mask);
  }

This comes both from names of arguments (data and mask), and from usage.

But both functions are in fact implemented via mmio_clrsetbits_32(), so
they actually first clear bits from mask and then set bits from data:
  reg_set(addr, data, mask) {
    *addr = (*addr & ~mask) | data;
  }

There are only two places where this is leveraged (where some bits are
put into data argument but they are not put into the mask argument).

Fix those two usages to allow to convert the implementation from
clrsetbits semantics to update semantics.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Ib29a1dd7edcdee7a39c4752dbc9dfcd600d8cb5c
2021-12-09 01:28:45 +01:00
Marek Behún 71183ef665 fix(drivers/marvell/comphy-3700): fix comments about selector register values
The comments about selector register values are wrong.

Bit 0 configures only lane 1, bit 4 only lane 0, and bit 8 lanes 0 and
2.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Iffe42374f92654ebe570557e0d462204439cfa31
2021-12-09 01:28:45 +01:00
Marek Behún 4bcfd8c02e fix(drivers/marvell/comphy-3700): fix comment about COMPHY status register
Fix comment about COMPHY status register. PCIe/GbE0 PHY is on lane 1,
while USB3/GbE1 on lane 0.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I24734a61727d56f6eab2ed1c366d7a1810dbe19d
2021-12-09 01:28:45 +01:00
Marek Behún 6ba97f83db fix(drivers/marvell/comphy-3700): fix reference clock selection value names
The current definitions of reference clock speed register values
  #define PCIE_REF_CLOCK_SPEED_25M       REF_CLOCK_SPEED_30M
  #define USB3_REF_CLOCK_SPEED_25M       REF_CLOCK_SPEED_30M
is ambiguous. The name of the constant implies 25 MHz, but the value
implies 30 MHz, which may make the reader think that the setting has
something to do with both values.

In reality, the values have different tables for SerDes and PCIe/USB3
PHY mode. The value for 25 MHz for PCIe/USB3 mode (0x2) is the value
for 30 MHz for SerDes mode.

Instead of defining the PCIe/USB3 constants relative to SerDes
constants, define them with absolute values, thus making it a little bit
more obvious that different modes have different value tables.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I50c66c6bbe22b9a9bec4685600cb8560524a643c
2021-12-09 01:28:45 +01:00
Marek Behún 9fdecc72f0 fix(drivers/marvell/comphy-3700): drop MODE_REFDIV constant
The MODE_REFDIV constant is only used as mask of the MODE_REFDIV
register, but we already have MODE_REFDIV_MASK constant for that.

Drop MODE_REFDIV.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: Icabb32189a7ca1a857dcf86cf0846bd0335f75d0
2021-12-09 01:28:45 +01:00
Marek Behún bdcf44f1af fix(drivers/marvell/comphy-3700): fix SerDes frequency register value name
Constants SD_SPEED_1_25_G and SD_SPEED_2_5_G refer to SerDes frequency,
which is 1.25x that of data rate, since 1000base-x and 2500base-x use
the 8b/10b encoding:

  mode         frequency   data rate
  1000base-x   1.25  GHz    1   Gbps
  2500base-x   3.125 GHz    2.5 Gbps

But the first constant refers to the frequency, while the second to the
data rate, which does not make sense.

Since the values in the specification refer to frequency, change the
name of the constant SD_SPEED_2_5_G to SD_SPEED_3_125_G to also refer to
the frequency, as SD_SPEED_1_25_G does.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I7670b45fa685aff93b3cafd84cf30d93620d8da1
2021-12-09 01:28:45 +01:00
Marek Behún e5a2aac5bb fix(drivers/marvell/comphy-3700): fix Generation Setting registers names
According to Functional Specification, the common PHY register at offset
0x3f is actually Generation 3 Setting 2, while the register at offset
0x112 is Generation 2 Setting 3.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I4626672cbee2d08da1da7839a3cf3f90e78fa101
2021-12-09 01:28:45 +01:00
Marek Behún c9f138ebfe fix(drivers/marvell/comphy-3700): fix PIN_PU_IVREF register name
According to Functional Specification, the register at bit 1 of PHY
Configuration 1 is called PIN_PU_IVREF, not PIN_PU_IVEREF. Fix this.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Change-Id: I912fa4a1956bf0b1b35a24925db03e3dbbe1adf3
2021-12-09 01:28:36 +01:00
sah01 99477f051e fix(scmi): make msg_header variable volatile
When tf-a is built with the llvm toolchain, the compiler optimizes the
variable in some way which results in SCMI_MSG_GET_TOKEN assert failure
in multiple places. This patch makes the msg_header variable in
mailbox_mem struct volatile, which seems to fix the issue.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I1d28b30a6472fc23ed85adff9cf73dfb536e39cc
2021-12-08 21:00:45 +05:30
Manish V Badarkhe 43997d2257 docs(measured-boot): add a platform function for critical data
Added a platform function to measure the critical data and record its
measurement.
Also, corrected a return value of 'plat_mboot_measure_image' function
in the documentation.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I576676f654e517c2010ca1d5a87a1f7277d581c3
2021-12-08 13:09:30 +00:00
Manish V Badarkhe cf21064ec8 feat(fvp): measure critical data
Implemented a platform function 'plat_mboot_measure_critical_data' to
measure critical data and record its measurement using the Event Log
driver.
'bl2_plat_mboot_finish' function invokes this platform function
immediately after populating the critical data.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ia198295c6e07ab26d436eab1ff90df2cf28303af
2021-12-08 13:08:17 +00:00
Ross Burton 0a956f8180 fix(fiptool): respect OPENSSL_DIR
fiptool links to libcrypto, so as with the other tools it should respect
OPENSSL_DIR for include/library paths.

Change-Id: Icd8c15fa5097db1da9a3a9222d9e267548c4c7e2
Signed-off-by: Ross Burton <ross.burton@arm.com>
2021-12-08 12:01:58 +00:00
Manish V Badarkhe 14db963fd3 refactor(measured-boot): add generic macros for using Crypto library
It doesn't look correct to use mbed TLS defines directly in the Event
Log driver as this driver may use another Crypto library in future.
Hence mbed TLS Crypto dependency on Event Log driver is removed by
introducing generic Crypto defines and uses those in the Event Log
driver to call Crypto functions.
Also, updated mbed TLS glue layer to map these generic Crypto defines
to mbed TLS library defines.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ibc9c751f60cbce4d3f3cf049b7c53b3d05cc6735
2021-12-08 11:00:13 +00:00
Subhasish Ghosh b9fd2d3ce3 fix(rmmd): align RMI and GTSI FIDs with SMCCC
This patch allocates the RMI and GTSI FIDs from the reserved
range in Standard Secure Service call range of SMCCC.

Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I82e77778882194c2a78ca6340788d53bab7c3a50
2021-12-08 10:15:21 +00:00
Sandrine Bailleux 0628fe3fff Merge "refactor(measured boot): rename a macro INVALID_ID to EVLOG_INVALID_ID" into integration 2021-12-08 08:16:53 +01:00
Madhukar Pappireddy 1f3665c396 Merge "fix(docs): update the v2.6 change-log" into integration 2021-12-07 19:01:56 +01:00
Manish V Badarkhe 8b3e2cc7bc fix(docs): update the v2.6 change-log
Updated the v2.6 change-log for below:
1. Moved ETE/ETM related changes under separate scope
2. Added manually commit log for Demeter CPU

Change-Id: Ib5b5f994f603af6c82b1400256752581a7931268
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-12-07 18:12:55 +01:00
Masahisa Kojima e01acbe903 refactor(plat/synquacer): update PSCI system_off handling
SynQuacer SoC contains a Cortex-M3 System Control Processor(SCP)
which manages system power.
This commit modifies the PSCI system_off handling to call SCMI,
same as other PSCI calls. System power-off is done by turing off
the ATX power supply through GPIO, this operation is transferred
to SCP.

Note that this commit modifies only the SCMI case, obsolete SCPI
implementation is not updated.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Change-Id: I6c1009e67cccd1eb5d14c338c3df9103d63709dd
2021-12-07 17:33:29 +09:00
Masahisa Kojima 4d4911d77d fix(plat/socionext/synquacer): initialise CNTFRQ in Non Secure CNTBaseN
The GTimer implemented on SynQuacer has similar issue found on Juno
wherein CNTBaseN.CNTFRQ can be written but does not reflect the value
of the CNTFRQ register in CNTCTLBase frame. This doesn't follow ARM ARM
in that the value updated in CNTCTLBase.CNTFRQ is not reflected
in CNTBaseN.CNTFRQ.

Hence enable the workaround (applied to Juno) for SynQuacer that updates
the CNTFRQ register in the Non Secure CNTBaseN frame.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Change-Id: I5204fb57f28c0945812814f008c4905ef0882e2b
2021-12-07 17:29:27 +09:00
Madhukar Pappireddy 3210a434d4 Merge "fix(gicv3): fix iroute value wrong issue" into integration 2021-12-06 20:30:31 +01:00
Madhukar Pappireddy 7c62111381 Merge changes from topic "st_uart" into integration
* changes:
  feat(plat/st): add STM32MP_UART_PROGRAMMER target
  feat(plat/st): add STM32CubeProgrammer support on UART
  feat(drivers/st/uart): add uart driver for STM32MP1
2021-12-06 19:03:26 +01:00
Madhukar Pappireddy 8b0c6612f1 Merge "fix(xlat): fix bug on VERBOSE trace" into integration 2021-12-06 19:00:38 +01:00
Manish Pandey cb406f5bf6 Merge "docs: mark STM32MP_USE_STM32IMAGE as deprecated" into integration 2021-12-06 17:41:00 +01:00
Yann Gautier 53863c845d docs: mark STM32MP_USE_STM32IMAGE as deprecated
This macro was used for the legacy boot mode on SPM32MP platforms.
The recommended boot method is now FIP.
The code under this macro will be removed after tag v2.7.

Change-Id: Id3b7baea2d3e6ea8b36a4cd0b107cb92591a172b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2021-12-06 17:40:23 +01:00
Ming Huang 65bc2d224b fix(gicv3): fix iroute value wrong issue
As mpidr is unsigned long long, U should be ULL. We use macro to
fix this issue.

Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
Change-Id: I7dfd51a63f27f471794bcbf72ffff0c1a0598b46
2021-12-06 17:38:39 +01:00
Manish Pandey 73193689c0 Merge changes I7c9f8490,Ia92c6d19 into integration
* changes:
  feat(plat/mediatek/mt8195): add EMI MPU surppot for SCP and DSP
  feat(plat/mediatek/mt8195): dump EMI MPU configurations
2021-12-06 16:47:33 +01:00
Tinghan Shen 690cb1265e feat(plat/mediatek/mt8195): add EMI MPU surppot for SCP and DSP
1. Enable domain D0 and D3 (SCP) access 0x50000000~0x51400000.
2. Enable domain D4 (DSP & AFE) access 0x60000000~0x610FFFFF.

BUG=b:204347737
TEST=build pass

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Change-Id: I7c9f8490b8898008ba6844c34c9e80caa6066cbc
2021-12-06 15:29:08 +08:00
Tinghan Shen 20ef588e86 feat(plat/mediatek/mt8195): dump EMI MPU configurations
Add dump_emi_mpu_regions() to dump EMI MPU configurations.

BUG=b:204347737
TEST=build pass

Change-Id: Ia92c6d19b96d429682dff1680d5f5b2dc2bc1b8f
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
2021-12-06 15:29:06 +08:00
Manish Pandey 8a63739b31 Merge "fix(plat/arm/sgi): disable SVE for NS to support SPM_MM builds" into integration 2021-12-03 15:12:21 +01:00
Javier Almansa Sobrino 956d76f69d fix(xlat): fix bug on VERBOSE trace
When log level is set to VERBOSE, a build error
happens due a incorrect format stringon a printf
call.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I8f869e078a3c179470977dadc063521c1ae30dbb
2021-12-03 10:31:17 +00:00
Patrick Delaunay 9083fa11ea feat(plat/st): add STM32MP_UART_PROGRAMMER target
Handle boot from UART with STM32CubeProgammer based on mmap io
for STM32MP15.

Depends-On: Iba84e8dfd67b9f30416efb0f6778e48ba1f75dad
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: Ibd719dd46a11da78633728675ef6639635b6cf67
2021-12-03 09:26:11 +01:00
Patrick Delaunay fb3e7985c9 feat(plat/st): add STM32CubeProgrammer support on UART
Add a file to support the STMicroelectronics tool STM32CubeProgrammer
over UART in BL2 for STM32MP15x platform.

This tools is based on protocol defined in AN5275,
"USB DFU/USART protocols used in STM32MP1 Series bootloaders"
based on STM32 MCU protocols (AN3155, "USART protocol used
in the STM32 bootloader").

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I956c95d8de0a94d1eb8e61f043651dae7b838170
2021-12-03 09:26:11 +01:00
Nicolas Le Bayon 165ad5561e feat(drivers/st/uart): add uart driver for STM32MP1
Add a UART/USART driver for STM32 with complete a hardware support;
it used for STM32CubeProgrammer support with even parity.

This driver is not used for console, which is already handle
by a simple driver (drivers/st/uart/aarch32/stm32_console.S).

Change-Id: Ia9266e5d177fe7fd09c8a15b81da1a05b1bc8b2d
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
2021-12-03 09:26:11 +01:00
Patrick Delaunay bf1af154db feat(stm32mp1): preserve the PLL4 settings for USB boot
The PLL4 can be used by ROM code as the source clock of USB PHYC and,
in this case, the PLL4 configuration must be preserved
with pll4_preserve to avoid USB disturbance.

This patch also adds an error when the clock tree PLL4 configuration
is not the PLL4 configuration used by ROM code; this error allows to
detect a invalid clock tree.

This commit corrects the coverity issue 343023.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Change-Id: I4bae9312a2db8dd342a38e649513d689b13976bb
2021-12-03 09:19:53 +01:00
Madhukar Pappireddy 1777ac11a5 Merge changes I8990bce2,Iacef5e67,I2976c0a4,I8551a802 into integration
* changes:
  fix(plat/marvell/a3720/uart): do external reset during initialization
  feat(plat/marvell/a3k): add north and south bridge reset registers
  fix(plat/marvell/a3720/uart): configure UART after TX FIFO reset
  feat(plat/marvell/a3720/uart): preserve x1/x2 regs in console_a3700_core_init()
2021-12-02 20:54:27 +01:00
Pali Rohár 0ee80f35a2 fix(plat/marvell/a3720/uart): do external reset during initialization
Sometimes when changing UART clock from TBG to XTAL, UART HW enters into
some broken state. It does not transit characters from TX FIFO anymore
and TX FIFO stays always empty. TX FIFO reset does not recover UART HW
from this broken state.

Experiments show that external reset can fix UART HW from this broken
state.

TF-A fatal error handler calls console_a3700_core_init() function to
initialize UART HW. This handler may be called anytime during CPU
runtime, also when kernel is running.

U-Boot or Linux kernel may change UART clock to TBG to achieve higher
baudrates. During initialization, console_a3700_core_init() resets UART
configuration to default settings, which means that it also changes
UART clock from TBG to XTAL.

Do an external reset of UART via North Bridge Peripheral reset register
to prevent this UART hangup.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I8990bce24d1a6fd8ccc47a2cd0a5ff932fcfcf14
2021-12-02 17:38:02 +01:00
Pali Rohár a4d35ff381 feat(plat/marvell/a3k): add north and south bridge reset registers
These registers make it is possible to do external resets of A3700
peripherals. Most peripherals are reset by clearing a particular bit,
but some need setting the bit. Reflect this via "_N" suffix in macro
names.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Iacef5e671746b831b5beea9e4fdcc59d8de84edc
2021-12-02 17:37:58 +01:00
Pali Rohár 15546dbf40 fix(plat/marvell/a3720/uart): configure UART after TX FIFO reset
If TX FIFO is not empty, do not touch UART settings and let UART HW
transmit remaining bytes from TX FIFO. New UART settings are then set
only after TX FIFO is reset.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I2976c0a4fbb841d3a79d42ef67c06e70174afc3b
2021-12-02 17:37:54 +01:00
Pali Rohár 7c85a75729 feat(plat/marvell/a3720/uart): preserve x1/x2 regs in console_a3700_core_init()
Followup changes will need function arguments in registers x0, x1 and
x2. Do not modify x1 and x2 registers and instead use scratch x3 and x4
registers for storing local variables.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I8551a802995f39128d2f4a8f8076b5bf463d0db0
2021-12-02 17:37:49 +01:00
Vijayenthiran Subramaniam 78d7e81979 fix(plat/arm/sgi): disable SVE for NS to support SPM_MM builds
Commit 4333f95 ("fix(spm_mm): do not compile if SVE/SME is enabled")
introduced a comiple time check to verify if ENABLE_SVE_FOR_NS is set to
0 when SPM_MM build is enabled. To support SPM_MM builds on SGI/RD
platforms set ENABLE_SVE_FOR_NS to 0.

Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: If78ed7567f6d988795b2bc7f772a883783246964
2021-12-02 08:27:51 +01:00