From 3710b33012cec1ed4ddf9a666f1b14408ece8962 Mon Sep 17 00:00:00 2001 From: Vignesh Raghavendra Date: Thu, 15 Apr 2021 21:23:58 +0530 Subject: [PATCH] firmware: ti-sci: Use non secure host ID for RM requests in R5 SPL Post HSM Rearch, all messages sent via DM2TIFS channel would need to use a non secure host ID in hdr->host. Therefore switch to using non secure host ID of MCU R50 in R5 SPL. Fix DMA/ring related error seen during OSPI boot on J721e/J7200. Signed-off-by: Vignesh Raghavendra --- arch/arm/dts/k3-j7200-r5-common-proc-board.dts | 2 +- arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 2 +- drivers/firmware/ti_sci.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts index d452e94a7b..9e3ee42a6e 100644 --- a/arch/arm/dts/k3-j7200-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j7200-r5-common-proc-board.dts @@ -93,7 +93,7 @@ <&mcu_secproxy 23>, <&mcu_secproxy 21>; mbox-names = "tx", "rx", "notify", "dm-tx", "dm-rx"; ti,host-id = <4>; - ti,dm-host-id = <250>; + ti,dm-host-id = <3>; ti,secure-host; }; diff --git a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts index a0c7268cf9..37654c9b20 100644 --- a/arch/arm/dts/k3-j721e-r5-common-proc-board.dts +++ b/arch/arm/dts/k3-j721e-r5-common-proc-board.dts @@ -182,7 +182,7 @@ <&mcu_secproxy 23>, <&mcu_secproxy 21>; mbox-names = "tx", "rx", "notify", "dm-tx", "dm-rx"; ti,host-id = <4>; - ti,dm-host-id = <250>; + ti,dm-host-id = <3>; ti,secure-host; }; diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 1c29501309..55e2ebd83a 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -158,11 +158,13 @@ static struct ti_sci_xfer *ti_sci_setup_one_xfer(struct ti_sci_info *info, hdr = (struct ti_sci_msg_hdr *)buf; hdr->type = msg_type; - hdr->host = info->host_id; - if (use_dm_queue) + if (use_dm_queue) { hdr->seq = info->dm_seq; - else + hdr->host = info->dm_host_id; + } else { hdr->seq = info->seq; + hdr->host = info->host_id; + } hdr->flags = msg_flags; return xfer; -- 2.31.1