Message ID | 20241001-uboot-topic-dfu-sf-dt-v2-0-67f7acfa3ff5@linaro.org |
---|---|
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:43d2:0:b0:367:895a:4699 with SMTP id v18csp366007wrr; Tue, 1 Oct 2024 09:06:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUdU4XO0BO4e7h8RGDUR9EODfFWavyU72TaLWIhmMlyI4JFXY53Tz72kc+g2VXSyI3GnDDpAw==@linaro.org X-Google-Smtp-Source: AGHT+IGJbwWBlI+lpKHIM4pnuVCC5PVlT3vF78A2Mum/+lctB+YCnmFm9WCQJ2urA9X+6BxPg5iQ X-Received: by 2002:a05:6e02:17ce:b0:3a0:9d2b:2420 with SMTP id e9e14a558f8ab-3a3452d1fa0mr124886295ab.25.1727798782144; Tue, 01 Oct 2024 09:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727798782; cv=none; d=google.com; s=arc-20240605; b=a/yjnsCyiOqTUYgr5DtX1dlrnx5L6nU8VkL2OUqbwv3EGP/ZJVfkdP/6K6gzeUhm6D DhcCtUw1xDEw1/n8NTAcFO62VjTqNjBtzAbAikLp+E3hH2SOejL4/8w478FQB4+FkkHY nFs7qLf3rWvj9GGcL+cKa8eey6A+mhltP3isupToASr1vc80no1KdBUw8slGIthTu4/Z Z1pFyDCgGD2Qz2+O8WYshve+TNMgzN/Ja+5e2BeLc7DagSnBgrDJV2yvDMr5z3WxWhhf DakXfXapnFyRo8wMFbflHUN8uY1zdxi/OVmYqPJpj7TJSa2dMbf0AKFDMqPioXSv7rn3 9iZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:content-transfer-encoding :mime-version:message-id:date:subject:from:dkim-signature; bh=9G2l7+To5OlgTCvgraK4cWfefDy9bhL/BPt0Ejv7RX8=; fh=gVvPckQTdIFP8in3wfAgEkE0Tgsxc0zPfKfhRZP7np0=; b=eAlchF52kr3OE6QwmQzEJ9W19OKsXm4w4jKP+hBQ+UBkgzNx8n/SQa1B1/r3LR4EMj mE3PUEpenVpSbfH6ycB37QyvHlMFgJeFbsxN9qgoNUiOByqmo5dk0SQStNaDD6hP018l zyhBABbfLCfnJ72/Ly5+Jr/4kuWXfVeHAmbxr1bqMZJHmR4jkSVceIybJum38CVXBwbQ 5xPkbQhRvZg83jMxlQBmPcebHCuUxd3RUS6PF0o7hgB+XMWhNX8sJhugg0ZByxSWvoxb ea983s6HFpjZLwSxilbdF/vZuWgKVQIkWZTdZqRQz5pGL/m2zAy3GylPF8VZk1BzL4U+ Pt5Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YrAk8JKl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a344dfcdd5si48738835ab.198.2024.10.01.09.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:06:22 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YrAk8JKl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 01E218920B; Tue, 1 Oct 2024 18:06:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YrAk8JKl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95D1389249; Tue, 1 Oct 2024 18:06:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5C7FD88D35 for <u-boot@lists.denx.de>; Tue, 1 Oct 2024 18:06:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42e7b7bef42so46943495e9.3 for <u-boot@lists.denx.de>; Tue, 01 Oct 2024 09:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727798776; x=1728403576; darn=lists.denx.de; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=9G2l7+To5OlgTCvgraK4cWfefDy9bhL/BPt0Ejv7RX8=; b=YrAk8JKlp7XPqMyPB25asopQauFX7MhxVjFPhyyYfmRu4GdCFQWJUW5iD4lFi9vuqp hTmuaMviqzdqyeR5iZB+0tMvlv5mBqaUq3dRmxsGjP3/1d2bQlMc9d1c2SSsFefwTHIA b6Bv2nejUbporo9bqfEV43nvkeIsIwOjKgx5OC3zrFsUM9CEw2f3p2vZBBeiyobOXXcV w74404XehecE08zbwUlVlG+BdU/g00DqXfl6FYyjtBqIJITT4ByAyFooMChKz7iVHIjy PLcf6ymQGqf3/pNDxSv6NdjVq9zLOFqHpu4jMFU8Gdz+IbJfCnBl4lu+FvMxguishpjn Rmjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727798776; x=1728403576; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9G2l7+To5OlgTCvgraK4cWfefDy9bhL/BPt0Ejv7RX8=; b=iNCxbiu9eSx3dQkOB+0rVjUmMVbbW+7ayMT0GyhUS/P3Y6o1iQvMgyCebDnc7aPAJg CdAuVpOgDCO5lJNWfUKA9ItC3qLC6IgvZXu0wQOoejY+FsMAQu/P9PJQJES/Geo0ViG5 X1ZlBm04vNOsmVY9Sm46XWCe67/tziW/41iAtE/VdQKq7ABWNH8p6IOwdEE+vS+rH+Tx 5EKQ2r0swNP74NEE2BeS72SGmSwuF5F3y1ab+ZrOPjDgQdiw/kgj2NcSKpoim6sJV2K4 xrtwIz/qle86JqSNpev8W8KfZTB3MrXfLYVkSVYDvD38eVAuzvNZYWQhgHEJmpGxzf3k TT1w== X-Gm-Message-State: AOJu0YzhyWY9BpAl/2lFpvZAOhE7KpXrwPqITWrmW/Gjb3aQfaqvAMOl ghZwgf04G6uGOMEjRi6JVT/MxMNcikszOjXT+RKRTvdQEuXBMpuzhLaOOQUOw+o= X-Received: by 2002:a7b:ce8d:0:b0:42c:a8cb:6a96 with SMTP id 5b1f17b1804b1-42f5849939fmr132073055e9.31.1727798775793; Tue, 01 Oct 2024 09:06:15 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd574282esm12031460f8f.104.2024.10.01.09.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:06:15 -0700 (PDT) From: Neil Armstrong <neil.armstrong@linaro.org> Subject: [PATCH v2 0/2] dfu: sf: fix flash probe when DM_SPI_FLASH is enabled Date: Tue, 01 Oct 2024 18:06:10 +0200 Message-Id: <20241001-uboot-topic-dfu-sf-dt-v2-0-67f7acfa3ff5@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPId/GYC/4WNQQ6CMBBFr0Jm7RhaQcCV9zAsajuFSQxD2kI0h LtbuYDL95L//gaRAlOEW7FBoJUjy5RBnwqwo5kGQnaZQZe6KjvV4PIUSZhkZovOLxg9uoStoau m2jau6SBv50Ce30f30WceOSYJn+NmVT/7r7gqVNhaf2mrWhGZ6v7iyQQ5Sxig3/f9C/M9ImK7A AAA To: Lukasz Majewski <lukma@denx.de>, Mattijs Korpershoek <mkorpershoek@baylibre.com>, Tom Rini <trini@konsulko.com>, Jagan Teki <jagan@amarulasolutions.com>, Vignesh R <vigneshr@ti.com> Cc: u-boot@lists.denx.de, Neil Armstrong <neil.armstrong@linaro.org> X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1048; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=Z+LbyU88Zt4+2fXgeshE7++1CDqdcV2FKtCUj+PSCSY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm/B31iDSU0c1ETQYvsx6+foo1X8GcxygS1GTx5OUD 8lDmO0CJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZvwd9QAKCRB33NvayMhJ0U5FD/ 94Nphumf1a9RbvUNWWFygwDwa5gdgK1rMm6ZvVW4hVoCxv06aGKCx4ao8xvZxsQnv9pEDmj7IpSpZ7 AstyOUGbj4M7gt2/5PqYZ7WyhqWuS4je89M4dStNXL0LbmdrM29573MuYLPZsvf+c3mdiwiHBVuD44 qQISSnioN8gQaG8jARbU24dRr4LShhdQ81Bj6L20HpPzp1BqTxYWG0aqKuemthNqZrYyUsNee6YR73 ectao1Gps/vrm9B7RFr9jnhPjSUQqOrkNV0RJRTrMWNQa2f/XyzZcKJEnx7SSLf/XvPKs7uZmelizx 8pvwRWImDvM2Pyj54BI9Hw2OoaCYJGgZVabIKGl7Vn/IQNXA9e2yudgkoYVOVEJy2rogWLizg85uvt p+s2F94/D6tjFk2n3Oea36P+7FrnD5DbH/DrEPXEtqOexLAdLCQEvCdpoLlRxclUYT6Y3riPpSVLHv 6su5f/7KW+2+XC+2oU19b0GuJVFEJBx1qDonqFFKH7LDkzlq0xHEWgLiriXcx79Iic+kySkELPwJGI DMs+EVItqX5F1tcKGlSbJ7IcU0Kk21UOSvClkhoA8o2nZqHoUNYsZaQ4DZ50rRGgnDdKSoSR64c4mZ dr4YD+L1ezVLMD1mjhLtjwoQKmooG9zknu6y2g9obwPndU82ukbBRsEVPepw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
dfu: sf: fix flash probe when DM_SPI_FLASH is enabled
|
expand
|
Hi, On Tue, 01 Oct 2024 18:06:10 +0200, Neil Armstrong wrote: > With DM_SPI_FLASH is enabled, the code uses the legacy > SPI FLASH code leading to probable errors since it doesn't > use speed and mode provided by DT. > > This adds the DM functions as dummy inline functions > to add both legacy and DM support in DFU sf code avoiding > using #if/#else conditionals. > > [...] Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu) [1/2] spi: add DM_SPI_FLASH compatibility inline functions https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/0872ac098a400632f02ae442dde65d77cc7eb1cb [2/2] dfu: sf: rely on DT for spi speed and mode https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/97c29f868dd4e6d8f38d1cfdd964fb6b2b40267c -- Mattijs
With DM_SPI_FLASH is enabled, the code uses the legacy SPI FLASH code leading to probable errors since it doesn't use speed and mode provided by DT. This adds the DM functions as dummy inline functions to add both legacy and DM support in DFU sf code avoiding using #if/#else conditionals. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> --- Changes in v2: - switch to if(IS_ENABLED()) - add SPI FLASH DM functions as dummy inline functions - Link to v1: https://lore.kernel.org/r/20240917-uboot-topic-dfu-sf-dt-v1-1-8cf38451eea4@linaro.org --- Neil Armstrong (2): spi: add DM_SPI_FLASH compatibility inline functions dfu: sf: rely on DT for spi speed and mode drivers/dfu/dfu_sf.c | 16 +++++++++++++++- include/spi_flash.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) --- base-commit: 19dbc09405d3503ce3efef3c2e4b4f0f1a03372d change-id: 20240917-uboot-topic-dfu-sf-dt-8ae62e5c7d79 Best regards,