Commit graph

151 commits

Author SHA1 Message Date
Madhav Bhatt
b3d25dca86 fix(xilinx): avoid unexpected variable update
The commit 50ab13577f ("fix(xilinx): typecast expression to match
data type") introduced a change where the isenabler1 variable is
modified within the loop iterating over GICD_ISENABLER registers.
Instead of computing the offset from the base address for each
register, the offset is accumulated incorrectly, leading to an
incorrect register read.

As a result, some GIC enablers, including the RTC device were missed,
so pm_set_wakeup_source was not called for them and the
suspend-resume use case was failed because of that.

Fix the logic to ensure the correct offset calculation for each
iteration, preserving the intended behavior.

Fixes: 50ab13577f fix(xilinx): typecast expression to match data type
Change-Id: Iec5bafcbde21078545a37259b2cf0353585ef1fa
Signed-off-by: Madhav Bhatt <madhav.bhatt@amd.com>
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2025-03-06 20:20:41 -08:00
Senthil Nathan Thangaraj
414cf08b76 feat(versal2): add support for platform management
Add support for PM functionality through EEMI interface for
Versal Gen 2. Add support of PM APIs in PSCI ops. Add
TFA_NO_PM flag to disable PM functionality. Enable wakeup for
new peripherals

Change-Id: I1bf67dc46af91ee113c627d32ae6ecc1dad386c2
Signed-off-by: Naman Trivedi <naman.trivedimanojbhai@amd.com>
Signed-off-by: Senthil Nathan Thangaraj <senthilnathan.thangaraj@amd.com>
2025-02-20 22:23:12 -08:00
Maheedhar Bollapalli
0791be8813 fix(xilinx): runtime console to handle dt failure
If the Device Tree is missing or parsing fails in the runtime
console, the console still gets registered with zeroed DT values,
leading to a panic due to the absence of a console type.
Added fallback option and check for zero base address.

Change-Id: I5f5e0222685ba015ab7db2ecbd46d906f5ab9116
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Maheedhar Bollapalli
4c5cf47f98 refactor(xilinx): refactor console to support transfer list
Refactor console to support DTB console in case of transfer list.
Simplify logic where SOC specific macros are moved to platform headers
or makefile where XLNX_DT_CFG macro describe if system is DT driven or not.

Change-Id: Id45c03a950b62e83e91a50e0485eacdb233ba745
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Maheedhar Bollapalli
c5c108b1aa chore(xilinx): propagate error code
Propagate error instead of making own error code.

Change-Id: I9300ad342e98ca0e730b091510d9d62747b81a5f
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Maheedhar Bollapalli
ea453871ef feat(versal2): retrieve DT address from transfer list
On versal2 platform, unlike current static DT address passing
mechanism, DT address is retrieved from transfer list dynamically.

Change-Id: I44b9a0753809652f26bc1b7e061f5364229ba352
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Maheedhar Bollapalli
c41edd807d chore(versal2): move xfer-list file paths
Only Versal Gen 2 platform supports transfer list.
Move transfer list files to versal2 common path.

Change-Id: I2795270a77e2af5e012c82c7b5916fa1f90f0497
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-02-17 06:11:10 +00:00
Michal Simek
1c12cd10fc fix(xilinx): remove unused write_icc_asgi1r_el1()
The commit 427e46ddea ("fix(xilinx): fix sending sgi to linux")
removed code which called write_icc_asgi1r_el1() but function itself
wasn't removed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I95a1424b0546f3f4a5e4611de34441b96e70b7d3
2025-01-29 10:52:59 +01:00
Yann Gautier
fffde230ba Merge changes from topic "xlnx_fix_plat_single_ret" into integration
* changes:
  fix(versal2): modify function to have single return
  fix(versal-net): modify function to have single return
  fix(versal): modify function to have single return
  fix(xilinx): modify function to have single return
  fix(zynqmp): modify function to have single return
  fix(versal-net): add unsigned suffix to match data type
  fix(versal): add unsigned suffix to match data type
  fix(versal2): add missing curly braces
  fix(versal-net): add missing curly braces
  fix(zynqmp): add missing curly braces
2025-01-23 11:22:47 +01:00
Nithin G
906d589277 fix(xilinx): modify function to have single return
This corrects the MISRA violation C2012-15.5:
A function should have a single point of exit at the end.
Introduced a temporary variable to store the return value to
ensure single return for the function.

Change-Id: Ice3eb939664ffc62c1f586b641e37481f10ffff6
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2025-01-22 04:07:30 +00:00
Boyan Karatotev
3b8021058a perf(psci): pass my_core_pos around instead of calling it repeatedly
On some platforms plat_my_core_pos is a nontrivial function that takes a
bit of time and the compiler really doesn't like to inline. In the PSCI
library, at least, we have no need to keep repeatedly calling it and we
can instead pass it around as an argument. This saves on a lot of
redundant calls, speeding the library up a bit.

Change-Id: I137f69bea80d7cac90d7a20ffe98e1ba8d77246f
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-01-14 10:02:00 +00:00
Nithin G
e4a0c44f69 fix(zynqmp): add missing curly braces
This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement.
Enclosed statement body within the curly braces.

Change-Id: I8941f3c713586c36396e1f3731b99ffadc28c6e8
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-23 09:04:23 +00:00
Maheedhar Bollapalli
3a1a2dae10 fix(xilinx): typecast operands to match data type
This corrects the MISRA violation C2012-10.3:
The value of an expression shall not be assigned to an object with a
narrower essential type or of a different essential type category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: I1606422aadfd64b283fd9948b6dadcddecdf61e0
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:01:37 +00:00
Maheedhar Bollapalli
7d15b94ba3 fix(xilinx): typecast operands to match data type
This corrects the MISRA violation C2012-10.1:
Operands shall not be of an inappropriate essential type.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: I675f1b2ac408b70a9ca307fb5161ebb8e597897c
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:01:18 +00:00
Maheedhar Bollapalli
83bcef3f50 fix(xilinx): typecast expressions to match data type
This corrects the MISRA violation C2012-10.4:
Both operands of an operator in which the usual arithmetic conversions
are performed shall have the same essential type category.
The condition is explicitly checked against 0U, appending 'U' and
typecasting for unsigned comparison.

Change-Id: I9110ea86f5ee49af0b21be78fd0890742ef95ddf
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:00:53 +00:00
Maheedhar Bollapalli
50ab13577f fix(xilinx): typecast expression to match data type
This corrects the MISRA violation C2012-10.6:
The value of a composite expression shall not be assigned to an
object with wider essential type.
Explicitly type casted to match the data type of composite
expression.

Change-Id: I0fd845496b4d6ac702027eb2075a23b15849f7d6
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-12-20 11:00:35 +00:00
Maheedhar Bollapalli
16c611f8a6 fix(versal): add external declaration
This corrects the MISRA violation C2012-8.4:
A compatible declaration shall be visible when an object or
function with external linkage is defined.

Change-Id: I91817596c5de84b259a5dffcc01a7b1106a5b7a4
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-11-05 08:10:17 +00:00
Maheedhar Bollapalli
b21e2874f8 fix(xilinx): avoid altering function parameters
This corrects the MISRA violation C2012-17.8:
A function parameter should not be modified.
Local variable is declared and used to process the value
from the argument.

Change-Id: I96b4381c3e05f7065d824592e7b5e5929f6b3627
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-30 12:48:43 +05:30
Maheedhar Bollapalli
e223037525 fix(xilinx): modify conditions to have boolean type
This corrects the MISRA violation C2012-14.4:
The controlling expression of an if statement and the controlling
expression of an iteration-statement shall have essentially
boolean type.
Updated controlling expression to explicitly compare with zero.

Change-Id: I12eb4f4c615131d5ee63425b2ccb4f77f3dffa2e
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-30 07:05:39 +00:00
Joanna Farley
a539dce9d0 Merge changes from topic "xlnx_fix_plat_const_preced" into integration
* changes:
  fix(versal2): explicitly check operators precedence
  fix(versal-net): explicitly check operators precedence
  fix(versal): explicitly check operators precedence
  fix(xilinx): explicitly check operators precedence
  fix(zynqmp): explicitly check operators precedence
  fix(versal2): add const qualifier
  fix(versal): add const qualifier
  fix(zynqmp): add const qualifier
2024-10-29 12:11:25 +01:00
Nithin G
8e9a5a5150 fix(xilinx): explicitly check operators precedence
This corrects the MISRA violation C2012-12.1:
The precedence of operators within expressions should be
made explicit.
Enclosed the subexpression in parentheses to maintain
the precedence.

Change-Id: I7d68bcd0daec1c5fe448ce889bb5a74dc8a5cc91
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-25 09:00:23 +00:00
Amit Nagal
1fbe81febd feat(amd): populate handoff from TL
Handoff structures are populated by executable entry point
information tag based bl32/bl33 entries present in transfer list.

The upstream code is having problem with the last TL entry
particularly when the tags for two entries are same.
While tlc tool dumps all entries correctly, transfer_list_dump() in
upstream code does not provide information about the last entry in TL.

Enabling TRANSFER_LIST also enables BL1_SOURCES and BL2_SOURCES in
transfer_list.mk thereby enabling bl1/bl2 builds.
bl1/bl2 builds are disabled by turning off NEED_BL1/NEED_BL2
build flags.

Change-Id: I55ddccc1ab266cc5a609423d304a5e5c282e17f6
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
2024-10-22 11:05:14 +05:30
Maheedhar Bollapalli
0f9f5575cc fix(versal): add const qualifier
This correct the MISRA violation C2012-8.13:
A pointer should point to a const-qualified type whenever possible.
Added const qualifier to pointer variables and function arguments.

Change-Id: I33cc594816809a118bff369d98d5689a96f6867f
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-21 09:45:49 +00:00
Joanna Farley
f1feb9a5cf Merge changes from topic "xlnx_fix_eval_bool" into integration
* changes:
  fix(versal_net): evaluate condition for boolean
  fix(versal): evaluate condition for boolean
  fix(zynqmp): evaluate condition for boolean
  fix(xilinx): rename variable to avoid conflict
2024-10-18 11:35:04 +02:00
Joanna Farley
8ee6534417 Merge changes from topic "xlnx_fix_plat_console_changes" into integration
* changes:
  feat(xilinx): add none console
  feat(versal2): add dtb & runtime console
  feat(versal-net): add DTB console to platform.mk
  feat(versal-net): dedicate console for boot and runtime
  feat(versal): add DTB console to platform.mk
  feat(versal): dedicate console for boot and runtime
  refactor(xilinx): register runtime console directly
  refactor(xilinx): console registration through console holder structure
  feat(zynqmp): add DTB console to platform.mk
  feat(zynqmp): dedicate console for boot and runtime
  fix(xilinx): dcc to support runtime console scope
  refactor(xilinx): create generic function for DT console
  refactor(xilinx): rename setup_runtime_console to generic
  chore(xilinx): rename console variables
  chore(xilinx): rename runtime console to DT console
2024-10-16 15:23:28 +02:00
Michal Simek
6d41398382 feat(xilinx): add none console
None console does not register boot and runtime console.
User will not observe any console logs.

Change-Id: I39877c900f399ae7cffc1bb599b30c7a23888fc8
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:39:15 +00:00
Michal Simek
cca2b86597 refactor(xilinx): register runtime console directly
Initialize runtime console early instead of deferred init.

Change-Id: Iae2f69ba4da27b62b69d640e3ccdc1303f549617
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Maheedhar Bollapalli
d2e00eea05 refactor(xilinx): console registration through console holder structure
Refactored register_console using console holder structure as
input. Structure holds console scope and console type as additional
members. These modifications enhance code readability and
maintainability, contributing to a clearer and more sustainable
codebase for future development.

Change-Id: I7fcc1accfdecdacc205d427a80031536c456638e
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Prasad Kummari
09a02ce0bd feat(zynqmp): add DTB console to platform.mk
In the platform.mk file, new console types named dtb are to be created
a macro, ZYNQMP_CONSOLE_ID_dtb, will be introduced to check DT console.
Users will have the option to select ZYNQMP_CONSOLE to dtb, which will
run from the DDR address. The address XILINX_OF_BOARD_DTB_ADDR needs
to be provided. This configuration will register the DT console in TF-A.
Flags for the ZynqMP platform and other AMD-Xilinx platforms will be
updated to utilize common code.

Change-Id: If74da4a80196575335c9d5562e6d8cd12d99561c
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Prasad Kummari
4557ab69fe feat(zynqmp): dedicate console for boot and runtime
Introduce a build-time parameter (CONSOLE_RUNTIME) to select
separate runtime console options. For boot-time console, remove
the runtime flag and add a boot/crash flag. Additionally,
introduce an RT_CONSOLE_IS macro to check different UART types.

Implement a common function, console_runtime_init(), to initialize
the runtime console. Ensure that all platforms have access to
this feature.

The current implementation utilizes a single console for boot,
crash, and runtime. Make sure that the dedicated console integrates
into runtime and crash scenarios.

Change-Id: I32913dede3d87109e54d179e7d99f45c33b9097b
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:35:54 +00:00
Maheedhar Bollapalli
238eb542bb fix(xilinx): dcc to support runtime console scope
DCC driver to support boot and runtime console scope
switch for dedicated boot and runtime consoles.

Change-Id: I7769dc44860a5fda99ca42ce17a3a6009288d7e7
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-14 08:34:26 +00:00
Maheedhar Bollapalli
aba5bf901d fix(xilinx): rename variable to avoid conflict
This corrects the MISRA violation C2012-5.3:
An identifier declared in an inner scope shall not hide an
identifier declared in an outer scope.
Renamed variable to prevent the conflict with static inline
function with same identifier name declared in the outer scope.

Change-Id: Ic07a4d25ed43fdb7fcf9fba462787d6951079b5c
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
2024-10-08 09:15:06 +05:30
Prasad Kummari
d989229b54 refactor(xilinx): create generic function for DT console
The code in dt_console_init() has been refactored into multiple
functions to establish a more generic approach for retrieving UART
information from DT. These modifications enhance code readability
and maintainability, contributing to a clearer and more sustainable
codebase for future development.

Change-Id: I877b7ae484bbf2f5919f3c79e5ae650bb93e3037
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-03 04:21:26 +00:00
Prasad Kummari
f84a4c5cd7 refactor(xilinx): rename setup_runtime_console to generic
The setup_runtime_console() function is renamed to register_console()
for the purpose of reusing it in the registration of the console.

Change-Id: I6b340423169aa6794d07502dadab65c3f0209339
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2024-10-03 04:21:26 +00:00
Prasad Kummari
a542b9c1de chore(xilinx): rename console variables
Updates variable names to follow a more consistent
and descriptive naming.

These changes improve code readability and maintainability, making
the codebase more understandable and maintainable for future
development.

Change-Id: I3fff8fe371f9d4d3489ffe62cbf721381403fef5
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2024-10-03 04:21:26 +00:00
Prasad Kummari
00a68427e9 chore(xilinx): rename runtime console to DT console
Renames the runtime_console_init() function to dt_console_init()
for better naming clarity.

Change-Id: I7f6d80ce23307d57e09c613be48482d49d6ad45b
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2024-10-03 04:21:23 +00:00
Maheedhar Bollapalli
d3bb350c40 fix(xilinx): declare unused parameters as void
This corrects the MISRA violation C2012-2.7:
There should be no unused parameters in functions.
Declared unused function parameters as void.

Change-Id: I1d369d977e0f2749024736d53fbb5c7d5555f6cb
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-10-01 13:54:06 +05:30
Maheedhar Bollapalli
729477fd86 fix(xilinx): warn if reserved memory pre-exists in DT
Memory reservation for tf-a does not happen in
runtime if memory reservation node pre-exists in DT.
Presence of reserved area is checked and user is
warned if it pre-exists.

Change-Id: I50e18be942777747e9074bb9d8e0305a29c28178
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-09-17 14:24:28 +05:30
Jay Buddhabhatti
02943d0d8d fix(xilinx): optimize logic to read IPI response
Optimize logic to read IPI response from firmware and avoid using
temporary buffer. Also, use pointer instead of array as per standard
format to pass by reference in function.

Change-Id: I45ebaeacc932a11bbfd4b7d9b9c43b4ee8ee7df2
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
2024-09-02 02:37:00 -07:00
Jay Buddhabhatti
e27b9491f3 fix(xilinx): fix OVERRUN coverity violation
This change fixes below MISRA violation:
CID 441243:  Memory - corruptions  (OVERRUN)
Overrunning callee's array of size 7 by passing argument "7UL" in call to
"pm_ipi_send_sync".

Change-Id: Ie7fd9ccad058e97eb4b36c4f0e77be8bfb3e6006
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
2024-08-20 04:57:13 -07:00
Joanna Farley
a71f11ba77 Merge "fix(versal2): add ufs specific features support" into integration 2024-08-12 11:50:20 +02:00
Amit Nagal
b9c20e5d14 fix(versal2): add ufs specific features support
Following IOCTL IDs are required for UFS specific functionalities.

IOCTL ID - 40(IOCTL_UFS_TXRX_CFGRDY_GET)
This gives the Tx_Rx_config_rdy_signal_mon(0xF1061054) register value
which contains the Tx and Rx lanes configuration ready signal information.

IOCTL ID - 41(IOCTL_UFS_SRAM_CSR_SEL)
Select - 0(IOCTL_UFS_SRAM_CSR_SET)
This will allow to set sram control and status register (0xF106104C)
with the value provided by driver.

Select - 1(IOCTL_UFS_SRAM_CSR_GET)
This should return the sram control and status register (0xF106104C) value
to the driver.

UFS Host reset assert/de-assert(using SCMI) support is added.
register address : 0xF1260340

UFS PHY reset assert/de-assert(using SCMI) support is added.
register address : 0xF1061050

Change-Id: I5368cc7251350946bd5ddb3a4c817b75e1d4a43e
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
2024-08-09 14:58:58 +05:30
Jay Buddhabhatti
9a0f5d128a feat(xilinx): add feature check function for TF-A specific APIs
Currently, there is common feature check function for firmware APIs
and TF-A specific APIs. This should be separate from firmware APIs.
So add new TF-A API for feature check of TF-A specific APIs.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I5585d17fb6aa1e98989d935117cca10bdb85133e
2024-07-31 02:44:43 -07:00
Jay Buddhabhatti
4661c8f508 feat(xilinx): update TF-A to passthrough all PLM commands
Currently, the IDs used in PLM CMD header are mixed with SMC IDs in
TF-A which is restricting the range of IDs that can be used by PLM.
Also, the SMC call from firmware driver is passing all 7 32-bit
words in request but TF-A is not passing all of them to firmware and
TF-A passes only 4 32-bit words from firmware to Linux in response.

So, update TF-A to passthrough all PLM commands by having a single
fixed SMC ID for all PLM commands and keep the PLM header in subsequent
SMC arguments. Also, enhance size of payload argument count to support
maximum payloads in request and response buffers to transmit all the
IPI command properly.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I2601caba849bce3f294177b63baa1ad688e3c5bb
2024-07-31 02:44:43 -07:00
Jay Buddhabhatti
03fa6f4250 fix(xilinx): fix logic to read ipi response
Currently, PLM IPI command supports total 8 32-bit payloads. But existing
logic to read IPI response in TF-A is trying to read 9 32-bit payloads
(ret status + 8 ret payloads) in case of IPI_CRC_CHECK enabled which is
incorrect.

So, fix logic to read only 8 32-bit payloads (ret status + 6 ret payloads + CRC)
in case when IPI_CRC_CHECK is enabled and read 7 32-bit payloads
(ret status + 5 ret payloads + CRC) in case when IPI_CRC_CHECK is disabled.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I0abca2f787cc7a66fdd5522e6bd15a9771029071
2024-07-31 02:44:43 -07:00
Jay Buddhabhatti
c3ffa4c5ba fix(xilinx): handle power down event if SGI not registered
Currently, if SGI is not registered by Linux and power down event from
firmware is received then it's not getting handled in TF-A and core power
down is not happening. Because of that subsystem restart or force power
down without Linux boot is not happening. So, handle power down event in
TF-A if Linux not registered SGI.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I0c23792daba6ae47004ae99e232c77e17230bcfb
2024-06-07 02:41:00 -07:00
Jay Buddhabhatti
a3b0a3422c fix(xilinx): register for idle callback
Currently, only Linux registering for getting idle callback during
subsystem restart or force power down. Because of that if Linux boot
hang or someone wants to do subsystem restart before Linux boot then
it's not working. So, register for idle callback in TF-A to get idle
callback during subsystem restart or force power down to do ARM
specific steps for proper power down of core.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: If7c01f79be6958678243be844bcfdc50d59b0fb8
2024-06-07 02:38:11 -07:00
Ronak Jain
924f8ce2e9 feat(xilinx): remove PM_IOCTL and PM_QUERY_DATA APIs
Today, the PM_IOCTL and PM_QUERY_DATA APIs are there to maintain
backward compatibility. Now, the usage of these APIs on the Linux
side and the firmware side is updated. Hence remove the deprecated
PM_IOCTL and PM_QUERY_DATA EEMI API from the TF-A to make TF-A pass
through.

Note: Only use the newer kernel to access the deprecated features in
this patch. Otherwise, the system may not function correctly.

Change-Id: I23effb7ff62e7f83563c2b422ea64a0289fd880f
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-06-06 01:47:16 -07:00
Ronak Jain
b03ba4801d feat(zynqmp): remove unused pm_get_proc_by_node()
The pm_get_proc_by_node() is not used anywhere. Hence remove the
same.

Change-Id: Ifd68dd524cae0a9f1684d943019563027859ccea
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-05-02 09:21:45 +02:00
Tanmay Shah
9a7f892e29 feat(xilinx): send SGI to mailbox driver
Generate SGI to mailbox driver if IPI FIQ occurs due to agents
other than PMC.

Change-Id: Ieefb9f0db4009fe0179b18d30da153ce3f9e134c
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
2024-03-27 15:53:07 +01:00