From patchwork Mon May 27 17:17:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 799235 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp1979996wrw; Mon, 27 May 2024 10:18:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtVNBACvEzgp0GJjl/bJmS9fMNOd9Cv8eE6sbh9nAlt5rdmYzJvnsdsaiKC5ciEKg0fcTFug6DXUNYrSYRms00 X-Google-Smtp-Source: AGHT+IFR/ZXBZLQYDn2aA/yQzl7Ee4ApHhEYJiWijW2ycDJmUpmLoDWsQkbAhD+9jX9K9sW8llch X-Received: by 2002:a17:906:4a14:b0:a59:bf27:5f2e with SMTP id a640c23a62f3a-a623e8f7e02mr1111829566b.20.1716830296258; Mon, 27 May 2024 10:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716830296; cv=none; d=google.com; s=arc-20160816; b=vh/Q4CZtJrSrzNYf3yg0JGi4Z/Aen36fKcWOHc+nGBeDMkrlJatJHp3g3U0wA1Btkh GgX7I0E1GyFE7Q046E1aC9BCzy6mCzyIaHn4tlcZz5GdMim9mlT2mPjH+0Zxo7w5IbNB kb6zehLdQpXLK+x2wOvDxDzXI4a2zas5VzzBjl2YyHiyJmIeSZGPdrgi8/ePjNlQDG7J /MuQIrX8WGjiGrmVDzE2HZaFW6DwMsc8ySlwz0WrJNV14051h/yBQrcvnwZSoQfCjWA7 2Uifb47xsr4svdhMo8ak8cQp+S65N0cJl0JsOPNp30DpoSAV61VlZkHUEq2j4qXALmHG Udeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=TajqXz5uKy7T9xe3F+Q4vB1gyPUhstwuDhj/02ms4uk=; fh=3FoyR6RJRL+gi4WUIFeeeELfk3mRQvh4iZz002VMSRc=; b=WuFJjBccQDDYN97/s1yWLrtzBwIwZXy66Xn8y40sbinn27sCWzbTLkqyxkrw5nJENB ztQ4NikIRfc9Y/QVevyZLKOpA2/yClQZ26ALwwoYBLQt201OkeKo52H5jzjNp7IKUwkp NKCzDEjmZyHJWezYKBGiwxEYyPXJ6Rz8ImpJbKYqphjKgt6FBuvnLcGaz2FoSuAc07/H k02NAW6o+8FCLcC7CyvxAmWS1n3r24ExNJmOg2azp9kOBfEABjZ4aoKNeeyi/ZXGqbah 1n1gVnL1Kqmr+N8SEY4MiwHYs4/FhiStPB/5x2eh+tsvrxhs3bvXlfTwuE38yDXOfQNY YB2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LLEdjDdR; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd55bfsi397411466b.1050.2024.05.27.10.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:18:16 -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=LLEdjDdR; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 76104883A0; Mon, 27 May 2024 19:17:59 +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="LLEdjDdR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B93E087DAB; Mon, 27 May 2024 19:17:57 +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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) (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 8B70387DAB for ; Mon, 27 May 2024 19:17:55 +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=caleb.connolly@linaro.org Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a59a352bbd9so1332666b.1 for ; Mon, 27 May 2024 10:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716830275; x=1717435075; darn=lists.denx.de; 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=TajqXz5uKy7T9xe3F+Q4vB1gyPUhstwuDhj/02ms4uk=; b=LLEdjDdRt9X/+g5ptZYr3b3asdLj1T4qGPc19TcEzAQhXqb6uTJ1VFOQPCZpT18y+O 9A1c/W7yGwX4wlg2IhibayGZi9YanFXA7fpDe3Ag6urKF3TdsTKKL67AERZnO5bVkH71 gRWuTTfCDDALjQbWmk9OkRCTmqm/DGaT8UE+UZXMMrbFqUDCji5N0Ve40PM221XRZBuV J05E5OGJk/RCLkQcN4k06D0AbyyzN/m0EbGVpL3//nP4KjF09HcmX/jnHJ7G8PM87Kpc Ugl7qEIf2tQJ0Jjb7M8+2mTxYh/7O/2MMsTbJ+TCpOAGI+6kdoExNivoWUUV1Pm7+prx LQKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716830275; x=1717435075; 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=TajqXz5uKy7T9xe3F+Q4vB1gyPUhstwuDhj/02ms4uk=; b=xSukbXfEd+kmgy8ACBqjiOfnkTwa76CDzo/XnK+e8MF51htteCtTUhjj89JZBFRn2/ eXOWetZUinqEXwRuYIGW0uZvmQOH2n0tPN6OLoVUvKnyWlF4x5jw6jywlYOh/AS7G9RG gY0m4+GCXJt5iIAzwZb4jytd1lSvY0fiK1JscnkeJIxFbjIkzTt4XrblMKqMB8lGIZN/ QESOnsnLSKkkqzKZ+09RX8dctdeuba9B4Erxbv+UVbzga8+m1gWF9gKVUVpsMq8PDmlG TnGoobY93UcuU2hTeerW+XD0mnKMPFNHGRhSVmp6Qq58p/w9/ETS2CTsH4etpi3iiOAq F6fw== X-Forwarded-Encrypted: i=1; AJvYcCUcKHT85rJr7qz1EDt+BRfgfmm1PrtHC14LLURwNo3P8w8aUfpi5K1JrDOSl9NV1/7fy4178fWLxKbWBYLSpZFZDYgAnw== X-Gm-Message-State: AOJu0Yyq2Gd32nKlKzlZ1FqhhXy4TIF5GZrIXKriK73DA35rYZEE5Y/1 ZynRCLruyu415cO/R8TCAC84SnQHbrGSHeM9fgRwWdKWtA+c0pkPWuXLv4oxZAc= X-Received: by 2002:a17:906:714e:b0:a5a:6f71:7bd9 with SMTP id a640c23a62f3a-a623e8db7c7mr1149960066b.14.1716830274804; Mon, 27 May 2024 10:17:54 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::8bb3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc8b874sm509469266b.163.2024.05.27.10.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:17:54 -0700 (PDT) From: Caleb Connolly Date: Mon, 27 May 2024 19:17:51 +0200 Subject: [PATCH v2 3/8] mmc: msm_sdhci: work around a bug when writing MIME-Version: 1.0 Message-Id: <20240527-b4-qcom-capsule-updates-v2-3-47583d7ad428@linaro.org> References: <20240527-b4-qcom-capsule-updates-v2-0-47583d7ad428@linaro.org> In-Reply-To: <20240527-b4-qcom-capsule-updates-v2-0-47583d7ad428@linaro.org> To: Tom Rini , Simon Glass , Lukasz Majewski , Mattijs Korpershoek , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: Ilias Apalodimas , u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=986; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=bXkm5zNNG/TPVcsDJJEaNdVNsrhwM9K8G4lc11zkT1Y=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmVMA957au07gEifRJUA/QhE3wSSjcySafBXeke hiGrZ2uRMaJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZlTAPQAKCRAFgzErGV9k tmxcD/9YxnFKUOc349eb4knSU0a/XJB6KolIi+1KDpWa47eB4bxPs4cBNJSRKIqt/jIDacb71ZG 2SeDMhyxpefEW0XNMBdyDltue/jmG/0LV5eCa2rjr6VejsGfdtpxIo0jcPNfHEfTaWtvvZglLlM tcShUkSRxcD01F4esDyS+ITNVRSmIBTyC6kaXM5/NijuzcXY0R0JMRToe5tH/aXM0UjVKFBtSfq /z8OfFwRUIX250E99aKq97DiSiEk/dTpKLcc7KFLpaiAwlzAizPLgfebVOZ2f5TU5171NrGFooS Q8eKxqwd+o5rn/P1JUzIhovVnhv2e5KbL63E2eEdKlEuMMZ5e8wSKuJ7dc/TmXe59gj7RDTn8nq sjgU/CswB565SOMJXERMmnM9wwgiwsBEUew6j8orFultyBQ81QpJXZNXHgRX7jZL6Kk/O6uwg01 f6lrgG8dNHq34ZvlJQzBbanXa2J3warzkCp0bTf3s1iwttzKIYhHiX18UCkOGz2fsUIhQ7Bay6r TNMMfq9BmQ0NH3znXwk62ARmfyAD+uxr5cAK2/PDZ1NRVPkMVWs92a0BGtgj4ldvHfRK09E2o8w XefbKqbc7cGA6y/IfR+Y10ptTbZvZ86v4u3i9gd7c8qujLuyDqCCJ0l8/nqvepoEVw/2HLe1TW8 2hoKEOhcuzE5r1g== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean For some unknown reason, writes of larger than 1 block always fail with a checksum error on Qualcomm v5 controllers. Until this is resolved, work around the issue by setting b_max to 1 for these controllers. Signed-off-by: Caleb Connolly Reviewed-by: Neil Armstrong --- drivers/mmc/msm_sdhci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 4ce0de6c47d8..fc3e8d101b6e 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -195,8 +195,15 @@ static int msm_sdc_probe(struct udevice *dev) return ret; host->mmc->priv = &prv->host; upriv->mmc = host->mmc; + /* + * FIXME: v5 controllers have a bug in U-Boot that causes all writes + * greater than 1 block to fail. Work around this by setting b_max to 1. + */ + if (var_info->mci_removed) + plat->cfg.b_max = 1; + return sdhci_probe(dev); } static int msm_sdc_remove(struct udevice *dev)