From 22b7a2298602cd05964d6c9739fe43c6a855467a Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Sat, 24 Oct 2020 01:28:54 +0000 Subject: [PATCH] ti: k3: drivers: ti_sci: Update ti_sci_msg_req_reboot to include domain The ti_sci_msg_req_reboot message payload has been extended to include a domain field, and this should be zero to reset the entire SoC with System Firmwares newer than v2020.04. Add the domain field to the ti_sci_msg_req_reboot message structure for completeness. Set it up to zero to fix the reboot issues with newer firmwares. This takes care of the specific ABI that changed and has an impact on ATF function. Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Change-Id: I4f8064b9d6555687822dc2b2b8ec97609286fa0b --- plat/ti/k3/common/drivers/ti_sci/ti_sci.c | 1 + plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plat/ti/k3/common/drivers/ti_sci/ti_sci.c b/plat/ti/k3/common/drivers/ti_sci/ti_sci.c index e390efee6..2c3313c43 100644 --- a/plat/ti/k3/common/drivers/ti_sci/ti_sci.c +++ b/plat/ti/k3/common/drivers/ti_sci/ti_sci.c @@ -1163,6 +1163,7 @@ int ti_sci_core_reboot(void) ERROR("Message alloc failed (%d)\n", ret); return ret; } + req.domain = TI_SCI_DOMAIN_FULL_SOC_RESET; ret = ti_sci_do_xfer(&xfer); if (ret) { diff --git a/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h b/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h index 2d23f9a9c..310bf459d 100644 --- a/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h +++ b/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h @@ -95,12 +95,15 @@ struct ti_sci_msg_resp_version { /** * struct ti_sci_msg_req_reboot - Reboot the SoC * @hdr: Generic Header + * @domain: Domain to be reset, 0 for full SoC reboot * * Request type is TI_SCI_MSG_SYS_RESET, responded with a generic * ACK/NACK message. */ struct ti_sci_msg_req_reboot { struct ti_sci_msg_hdr hdr; +#define TI_SCI_DOMAIN_FULL_SOC_RESET 0x0 + uint8_t domain; } __packed; /** -- 2.39.5