From nobody Tue Feb 10 13:16:28 2026 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EF051D8E09 for ; Thu, 19 Dec 2024 20:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734638628; cv=none; b=iYDvd0t7yQ58pC9SoJ/SNOCC89UiSsZlHv1uBk200+A0pwcsqBuHRULxh3m0VDWK/15Bvx+dLFCOGKzoWI7v/eH00nBu2zk59oFqaJLDhSSLkzP6n1uLQeRTYjVSK680p+rFtRGaOSFNq6GNVDUEMjodr+95R+Byy3OKbfcmDeo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734638628; c=relaxed/simple; bh=r5ZUm8egrlEYPDoShASduxwkqRTGU1fuNRSx+4vY6C0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q/BrzgPc+IMU6XoCwywLiwenWrto+U6tWnUPkcdRCWMKsRpnM184swT0Q2qwcU1w8wDNOS4lq/yMlbfbnUw6GaplmZOWQPqyD4Jq2d+oWbVOpykL+DswQXejITBXwuZTVoXmlhTn/eEvhEqE8+4l3Ms6K8j7ncJWFSqaSTchc3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=nGat3Ra6; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="nGat3Ra6" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a9f1c590ecdso218669866b.1 for ; Thu, 19 Dec 2024 12:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1734638625; x=1735243425; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=P7TbOAl0J1+553i2D7Hvckux88gOuL0DZy0CmTdqsmc=; b=nGat3Ra6sX9drZ64x3kTYbq7yqu3+MCTrWOzKKXiShaXOCBGZyYTofRxMmFZ5lEC5m +xAuIeGj1a9S2vXy1ArIkDmU4Xih/fUUKOyFZpLxmHHc0MpeBi4t3k3s9yWi+i4pGlsV WJwpOS1z3IUBqAqqcqDCx8pRLe8YC5Jx+RF6laOoGKzm9me/HX3bRGc5ARfGLIJm3jn+ Upwrjam4uOGzTPGyvLWo+f8rpWh8pa4IkNEcRgMn+0K8y5Nog/I9MrDr7A9479fJpHXl fDB1/Y7u1wfRLhIFUJJo/KDmkRx0ARpSRqC+630ztuGtbHSLAYyk79NA4IIjBkWg3Wjm us5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734638625; x=1735243425; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P7TbOAl0J1+553i2D7Hvckux88gOuL0DZy0CmTdqsmc=; b=Ma7yOVwSp3J2dFHkF6+woq7rnLKtI1YJUMUnzfcjQGrBm1nr45V52a6DrbRkr4p0ma LQARR55BQ5eZcUpW3mbmjVa/30uTIhADQfWpu+Dt6ZP0yRQO3GfhL+B46qSY9IaDnqmM kBqAe84pxJl/2QAh11J6H4gFRGB38r3gOpYj2lrb1bfqgcOBfaSatawnDELyMKGBUlEW QeFxX5e2Zc+e0WoLo06/aMaXPY662X7DhW0+cAggV6G91YK/FkgcMrg6rNx2qnxkclDj hVtIo+xFrtLG9hC3/t33tjgDYCAkCvQplHTopkgJXBxttqm/8J6PyJ/9QIZhw9NhhpP0 1VUA== X-Forwarded-Encrypted: i=1; AJvYcCUw1+8zyM657l8CHKDVGcRJSJAOwcwI7I7WllgMAHYGvrP2Cxp1hQFfvXdv52bhVa6LOT7yy0wwZooZELU=@vger.kernel.org X-Gm-Message-State: AOJu0YzxciSYmr4dVbO//6+1O1NCckAgPsRrIibJwwfV5zbm68GKn5GT Ovmuv963FhDkoB22KFYSh2Xcx9Wd1s16RG8/a0/KOcT/okf5ToqQXdTXmn+M1V8= X-Gm-Gg: ASbGncvFTfTnPZLJRxiZuEAqmNWwKVDhgMYulMPGrLPYUG6v9QIOL+v2IEpNvVajdAQ adbppag+0eiIDxplJLLerv3c3bDkAF+Odh4JK20SxkccoDckxFUdDGmv1a5IvCJxU7nygh0xZ0E Lo+cqvbOK7PL2a4n+7A+KFz9FAFi4sbMIcuiUcyItTugrP+/dS7csQD3bi/XfYzSE0Xdqbf9iwX 7KHxgUHuseskbhaFFarNSEmd8Kl6WZ9s5AexhATcxYSEf4JZg== X-Google-Smtp-Source: AGHT+IGUjzXtWgTATIKd5bQdVHnA1/eo1JxNSwRoyL3yoIMsS7bxhfApz1VdWzX+tRETXv44jWlE+Q== X-Received: by 2002:a17:907:3e8c:b0:aa6:abe2:5cb8 with SMTP id a640c23a62f3a-aac3366f16emr5355966b.60.1734638624897; Thu, 19 Dec 2024 12:03:44 -0800 (PST) Received: from localhost ([2001:4090:a244:82f5:6854:cb:184:5d19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e8954adsm99935266b.64.2024.12.19.12.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 12:03:44 -0800 (PST) From: Markus Schneider-Pargmann Date: Thu, 19 Dec 2024 21:02:12 +0100 Subject: [PATCH v4 1/4] firmware: ti_sci: Support transfers without response Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241219-topic-am62-partialio-v6-12-b4-v4-1-1cb8eabd407e@baylibre.com> References: <20241219-topic-am62-partialio-v6-12-b4-v4-0-1cb8eabd407e@baylibre.com> In-Reply-To: <20241219-topic-am62-partialio-v6-12-b4-v4-0-1cb8eabd407e@baylibre.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Anand Gadiyar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Vishal Mahaveer , Kevin Hilman , Dhruva Gole , Markus Schneider-Pargmann X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1782; i=msp@baylibre.com; h=from:subject:message-id; bh=r5ZUm8egrlEYPDoShASduxwkqRTGU1fuNRSx+4vY6C0=; b=owGbwMvMwCGm0rPl0RXRdfaMp9WSGNJTarj39TIrHVuh58/m8JBRxrr1qJ5uREmCxJxbSsaiq ZwXu7Z0lLIwiHEwyIopstz9sPBdndz1BRHrHjnCzGFlAhnCwMUpABP5tJ6RYZPROX8WkaCDr54v ar7xNHraOY+HXUInGqX2H0xJm9e4Upfhn+otye2fkkWaw2PnSnS2aloe7Hv+uyqESeRU+tFuzap 8BgA= X-Developer-Key: i=msp@baylibre.com; a=openpgp; fpr=BADD88DB889FDC3E8A3D5FE612FA6A01E0A45B41 Check the header flags if an response is expected or not. If it is not expected skip the receive part of ti_sci_do_xfer(). This prepares the driver for one-way messages as prepare_sleep for Partial-IO. Signed-off-by: Markus Schneider-Pargmann --- drivers/firmware/ti_sci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 806a975fff22ae00ecb88587b2c47ba172120bc2..ec0c54935ac0d667323d98b86ac= 9d288b73be6aa 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -398,10 +398,13 @@ static void ti_sci_put_one_xfer(struct ti_sci_xfers_i= nfo *minfo, static inline int ti_sci_do_xfer(struct ti_sci_info *info, struct ti_sci_xfer *xfer) { + struct ti_sci_msg_hdr *hdr =3D (struct ti_sci_msg_hdr *)xfer->tx_message.= buf; int ret; int timeout; struct device *dev =3D info->dev; bool done_state =3D true; + bool response_expected =3D !!(hdr->flags & (TI_SCI_FLAG_REQ_ACK_ON_PROCES= SED | + TI_SCI_FLAG_REQ_ACK_ON_RECEIVED)); =20 ret =3D mbox_send_message(info->chan_tx, &xfer->tx_message); if (ret < 0) @@ -409,6 +412,9 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *in= fo, =20 ret =3D 0; =20 + if (!response_expected) + goto no_response; + if (system_state <=3D SYSTEM_RUNNING) { /* And we wait for the response. */ timeout =3D msecs_to_jiffies(info->desc->max_rx_timeout_ms); @@ -429,6 +435,7 @@ static inline int ti_sci_do_xfer(struct ti_sci_info *in= fo, dev_err(dev, "Mbox timedout in resp(caller: %pS)\n", (void *)_RET_IP_); =20 +no_response: /* * NOTE: we might prefer not to need the mailbox ticker to manage the * transfer queueing since the protocol layer queues things by itself. --=20 2.45.2