From patchwork Thu Feb 19 17:51:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4466 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B7CB23F150 for ; Thu, 19 Feb 2026 18:51:59 +0100 (CET) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-48378df3469sf10911085e9.1 for ; Thu, 19 Feb 2026 09:51:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1771523519; cv=pass; d=google.com; s=arc-20240605; b=GS3VX5Dl1uJbWQy5Q0mh9bzi6fT8/UtzYFergH3ATn7POnn7yx9X+D/mi20TaWkw0i BaHSlmqJVOndqmtN4DLWMujHEI+eV7C2g+Zss3vhHah4MPzjweW88KkOXRlhOPyDzM10 ttGcOsMyu/0ma31XDKFgwcjRpix1bMboq8GR57iiGObEAqgtw4pCkSEu2IozWcnbbYv7 h1iwj6Q9ahcAJ7C2N+gd3hT56nmVJlE9ekQ2uMSALVfHwYnGNiC7j61wUEg4K+VCOtmu ntqbdu8j+zhYeidiFAFT6ELEOjXUIybV1rdhZTVBmQ7z/ojJWUQINljSU0teISoMYRlo jq6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=2iQAe6OlaSFwiielhfu4YIyzkXxvb61QlfNnSCtp5Uo=; fh=rMq/MXbcX5S1B2ZgZ2zFAARnr8qUoZIRpQTlyvwFSTY=; b=SvKJpRb+lOj44ahYn3DTQu+exyroz6wH02ES6U5+6+RCk0FmAmzFe4E1eqVlrehNgZ QBK9Mte3SZ/8s0kHqBpIUH9DVw66w2upk7/hqI56qw3vVuj1XHPO/uFo2NfrJdmywooH y8RyBlDSViai1dYmuOB1erFA/+vGftv80OclcUF1ts4MaH3RI050EuqJYF5jKm9hCs7A I06V9F7laUzTjBy1Scjj6HkTje7xlQn0pldUtcEtNQ5yX7IOlT8JmnxA1ihW6t4krUsW P0MdHSYFRCvjUNdNjPy+f9rOWwdM0aTj7KEB9RjVPZ7u5yi6lAJw9MagfZs2rMOrexDX /1rg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RTuBUCXb; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1771523519; x=1772128319; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2iQAe6OlaSFwiielhfu4YIyzkXxvb61QlfNnSCtp5Uo=; b=MMOEPYaL9h6gfLoox5PIOkCY5ZvXtGQZSLjk+PnSOlsyuwXgbftkIu3dd9+N/fwQIe TWoZMhgC8LScWe4THzwY4/UBwLdIGLGDUvmlaCnAkI2+tmApIDlWWRt+8vq4AaG23wQq 1FUtUR2LV/DDXY7R/026iohvy1+9bywzispoc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771523519; x=1772128319; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2iQAe6OlaSFwiielhfu4YIyzkXxvb61QlfNnSCtp5Uo=; b=UhSsYFrOOCLJJHXbUzqc0yyXu0luoElZfqpPYSvU5pOyM5wewuzBTXaQbXWH6vNEOk +EOqphF7HOitYexW969Bui2veZbBcSp9DTnN+lZv8eEDn4Dpgp5/fJ22L+4sx2Xbyzio ZuW4nQRzXHCiWceQXNRY6ZTa520sSPo2wwfy2+T3p3fFayuQOO2LuZL0oZCqHGZJM9xR vve9qkOO/ESNZShx2yc1pmILUlApUFJBq7HJ6CxvMzfgU1kG1SI5lpXVHukFCVwhFffX /gVq5W1ZLBXPoe9xQ+4U3ViJoW6Xc636llbw4ehU362RFFQIERKomSLeS7KzfetpZUbA sXcA== X-Forwarded-Encrypted: i=2; AJvYcCXdR9Tnfsmgj4HQDaTsQ1iqsiVMj+GVjxsUD2KtWC2KB4Rd7vR5ugOvbsXSgqWWYMv+HULZfV6bachTPwP4@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy98o2XITjPWjBzoqp4meAfUgIPtHcuUSbVjndbSMuM9q7d0po/ y25nQTEc7VdazxEoh0gFWXbaWAqPKerKvTH/nOugiqUGKxeqT35hN+SY3J/6y6zvR9ZxSw== X-Received: by 2002:a05:600c:1d0b:b0:483:7b99:131d with SMTP id 5b1f17b1804b1-483a009b770mr47114895e9.16.1771523519269; Thu, 19 Feb 2026 09:51:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com; h="AV1CL+G0YJjzOyqw8CkpbOE4mN34s0tr+smvP/qsjaWmq440ow==" Received: by 2002:a05:600c:3551:b0:47e:e26a:751f with SMTP id 5b1f17b1804b1-48397095bbfls10431045e9.1.-pod-prod-00-eu; Thu, 19 Feb 2026 09:51:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUT8igldrGfgQM2krIohyy1UXpZmuoelACh6clPJrgu5g63AmhczZ3889coEA0HDE0tPMPqiFuDlq3Grl6p@amarulasolutions.com X-Received: by 2002:a05:600d:6447:10b0:483:a352:b4e4 with SMTP id 5b1f17b1804b1-483a352b4f9mr13298545e9.6.1771523517038; Thu, 19 Feb 2026 09:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771523517; cv=none; d=google.com; s=arc-20240605; b=FsQzNt3VDViiH2ckxbdp9Cbu3t+krTIYoPiPtDh36S0oRE8xMbnGffyqARlVKTSgpT at55BVHtS2jW5V/BbLWl6Ahc+S+AmRIR6jYrJnAd5UJDkJ+iIoZ1g1dRUMmulso4P4sE aqbl1/ENiqv6IAgUu6DmTvf/JvVR5pqrfjwIBNMSxa2GAFHfESVX5MPfII9BwYJxkahc YQGMbhNth8HhRAPouPsnzq+FZh6OBAxz0snivFEHWAjk2bO6Z+I/47qj4ciiavWVIoOn RES3MOkELi5K+7i5+H4vx3vh0W0YM1wUppaeMawgONnXEAaIJ7EK5lySFa4KBKJbl1eE ss8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iqS8BMujc7huCljGLyRgy1F5r4IDy3eVdPIRG1EUWAw=; fh=uJirquQWJkspDCgXg9kYP83kgsoDkQOXngFM3m8JlTI=; b=ly3gFhc+I2wrwfA9bbD6vX5go99bedDsmfiGIi6KFw9GVEYTU2YyBI+4mF0thTMzoq H2K/vZi6hau883zk2j6rDyHgGxlaUXcO1NH7fYOyScBDm79luP1aXKGGgEW7T3O56Edo v7g9cy0iC/3zebZoj1jfQDUzqOyHChRJS5pGew004GLwZ+irPZ8cYgclAqAqmiBoaJdt EuX+IHYMQTADeqte2J9sXoNvStnHesf+Z6m0eBCfGXRDaz9+SX4ijmt7vY12TeUuygm1 2K69onpBA4KujaPuzw7tpXtpKr0rvwRirDDzZP9olFchRk85gxEoA88QnHvjFL/L3+AA NgOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RTuBUCXb; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-483a3199f61sor1602965e9.1.2026.02.19.09.51.57 for (Google Transport Security); Thu, 19 Feb 2026 09:51:57 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCUrnCRD27ZqyNa4MdBmOq587wQHzNRu8F0jsj23DXeE/5d7fysv+sgHS8SOk39GtLHmASnnFZek36npbck4@amarulasolutions.com X-Gm-Gg: AZuq6aJNxc0UNApdr/5K6F4cXjBrrAPvaIkRwygwJ8COHflKOTHnX6unfXZzwmZ8EFY bi4BRJi5qrCyFX8ko6qJ4aLyeSLH7aT+K9qyoibSGjr/0g99aOKEO01ksinzqBQ8OT8e0oXt/dq G2yakUNe1vFb2cLSWcm93zCgsLsvTrmT1HycZx+206GhU4VB+VMenkuB3JMW9Gme/JQoeGSlNYH vEc8tc/2vFlNIhyk4MRefGhj38gtecGiRh/A4Yk/n1vbVKO1LVxmWfhXQv4liyNzjulANNbHyuy hmOpwxnOVMD/5E82WzWqIlFS5qBUI4ilUvXMviVu78akhNvaCAJaRMm0RudjRYMlpRm5ppsU46Q E06cHt3SFfFaGGt+ZcRSTt+ygqEqkm5Udc67oDzCua/5WPfaiva91WYDN3hhVUXuv4BFt5r9239 7OOE9ATDQG3Y1d2nBAzbOKENN5BxsIq7WYRxBStPSE6eQcQKPPmahZD3Xm9p/Q3LRX8ctBOvRWT w/LY4E61MxkOycaMBQdwUARAemF9otdeHmgS9dafj6aO36AaZ4qtB1ruMQy4jWmu/BB4akL8qYP ZsV/lF0ZH1nmfPQnW/5Vr4sAAwHm/kxgi1o= X-Received: by 2002:a05:600d:6413:20b0:483:78e7:ce15 with SMTP id 5b1f17b1804b1-483a00aa4cdmr33790975e9.13.1771523516638; Thu, 19 Feb 2026 09:51:56 -0800 (PST) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-95-248-31-95.retail.telecomitalia.it. [95.248.31.95]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a31b0e63sm35485005e9.2.2026.02.19.09.51.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 09:51:56 -0800 (PST) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Patrice Chotard , linux-amarula@amarulasolutions.com, Patrick Delaunay , Dario Binacchi , Jagan Teki , Simon Glass , Tom Rini Subject: [PATCH 3/8] test: spi: add sandbox_spi_get_wordlen interface Date: Thu, 19 Feb 2026 18:51:14 +0100 Message-ID: <20260219175130.2839234-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260219175130.2839234-1-dario.binacchi@amarulasolutions.com> References: <20260219175130.2839234-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RTuBUCXb; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add the sandbox_spi_get_wordlen() public interface to retrieve the internal word length state of the sandbox SPI device. This is intended for use in sandbox SPI test cases to verify that the word length is correctly propagated from the SPI uclass to the driver. Signed-off-by: Dario Binacchi --- arch/sandbox/include/asm/test.h | 8 ++++++++ drivers/spi/sandbox_spi.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 0e8d19ce2325..0438790028b9 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -243,6 +243,14 @@ uint sandbox_spi_get_speed(struct udevice *dev); */ uint sandbox_spi_get_mode(struct udevice *dev); +/** + * sandbox_spi_get_wordlen() - Get current wordlen setting of a sandbox spi slave + * + * @dev: Device to check + * Return: current wordlen + */ +uint sandbox_spi_get_wordlen(struct udevice *dev); + /** * sandbox_get_pch_spi_protect() - Get the PCI SPI protection status * diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c index 8eed56140f6a..b035a60ef43a 100644 --- a/drivers/spi/sandbox_spi.c +++ b/drivers/spi/sandbox_spi.c @@ -63,6 +63,14 @@ uint sandbox_spi_get_mode(struct udevice *dev) return priv->mode; } +uint sandbox_spi_get_wordlen(struct udevice *slave) +{ + struct udevice *bus = slave->parent; + struct sandbox_spi_priv *priv = dev_get_priv(bus); + + return priv->wordlen; +} + static int sandbox_spi_set_wordlen(struct udevice *slave, unsigned int wordlen) { struct udevice *bus = slave->parent;