From patchwork Wed Feb 23 14:13:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1596720 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=bmO0N88d; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3dLm6HzXz9sGf for ; Thu, 24 Feb 2022 01:13:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 242F283B58; Wed, 23 Feb 2022 15:13:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="bmO0N88d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9284883B6D; Wed, 23 Feb 2022 15:13:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 EA62283A9D for ; Wed, 23 Feb 2022 15:13:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x530.google.com with SMTP id h15so27392011edv.7 for ; Wed, 23 Feb 2022 06:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RN6L6vcbNMJTIgDi/DXzX3+UV8S+/8O00tXfypPHyDg=; b=bmO0N88dwRe5hpXobclpkuz/WLVXJpkYab4kzHJVBWMV8rYCPlrXavj3pwZZSrKSY6 JzgXfxCgNhh0vcHqPrUoWS3kyN4eAdBvTCIxbgzQIQ5RMat6LfzZGZL6WIZ22cSg21nN u4/0Qigbph/CgdAUvMyDMZqXtpIDZha6pF9yRTq9zWFbfIKp/3S3CpZOy5+3ah0bFxwN qk+EWmdFMpH4CE5u9qdPR68ilkxVQzZFIRi2Y3To2RyDBqWZB6Sw1adeAj9pdVIWw4Rm YPDuSFMmSV1W1xzinPv80MFetZUwPEVd7bwP4N/XIz3OwNZUzB3tYNxL7iNBCJMk6n3V fT+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RN6L6vcbNMJTIgDi/DXzX3+UV8S+/8O00tXfypPHyDg=; b=B7n5T0XejzHH6KAM9TTobj5oJOXLEtrEFdhMJGlTAOsPxj4392/Cumml38O4PZVeCb lTlq0uvc8/ct+exCo1D7kEsGtjLeh8ArllePC2NuNoJ7MmhKeaenbLryMzgLA5WtktAw KJ8wWnvJEMVBiJE1VaWCeDrSqU37riWeeNPOFM2bJ44cGwAsfLQXaQE1l6M3ozxPS9Jq 0yuSS+7YQpEjVLVmPRVetdod/FHHxJH1GS2XhcneXyyD6Od5VQXZzHlwwlIo1+QB+Jkl Ef3l+vgjb5oxdV6w/WAQPYIeJrKvOzGaLktLv4NLeqb25T04Ch7ecJJrnvzk8j+vNFxJ LW/A== X-Gm-Message-State: AOAM531WIPcsQZnyWjhUNcLfGfs1+h30ZLJg/ZuIveNvx1OKsOfY8p1H 6m8yQbVU//j0kOloqAW0/AgwkFugccVoag== X-Google-Smtp-Source: ABdhPJyATgioH765+tthFIUMf1pNMCWA0dRh/K0QfyUBnlFVQ1FiunQr28MPVBP+2x+5bJnfutUSng== X-Received: by 2002:aa7:d6c3:0:b0:40f:405a:fbf8 with SMTP id x3-20020aa7d6c3000000b0040f405afbf8mr31086308edr.447.1645625615027; Wed, 23 Feb 2022 06:13:35 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id j18sm3067970ejm.102.2022.02.23.06.13.34 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Feb 2022 06:13:34 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma , Jaehoon Chung , Peng Fan Subject: [PATCH 1/3] mmc: zynq_sdhci: Fix timeout issue Date: Wed, 23 Feb 2022 15:13:30 +0100 Message-Id: <61fc1160ada0dd622cd29e381a74af7bf3d9a200.1645625609.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma In the workaround added with 'commit b6f44082d5cd ("mmc: zynq_sdhci: Wait till sd card detect state is stable")' the timeout variable has post decrement. Whenever timeout happens, this post decrement is making timeout=0xffffffff, so timeout error print and return statement are never reached. Fix it by decrementing it inside the while loop. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- drivers/mmc/zynq_sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 5cea4c695e8d..f4d69a2f7098 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -773,8 +773,9 @@ static int arasan_sdhci_probe(struct udevice *dev) u32 timeout = 1000; while (((sdhci_readl(host, SDHCI_PRESENT_STATE) & - SDHCI_CARD_STATE_STABLE) == 0) && timeout--) { + SDHCI_CARD_STATE_STABLE) == 0) && timeout) { mdelay(1); + timeout--; } if (!timeout) { dev_err(dev, "Sdhci card detect state not stable\n"); From patchwork Wed Feb 23 14:13:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1596721 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=KBAA0Hy7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3dLy6Cjmz9sGf for ; Thu, 24 Feb 2022 01:14:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 640AB83CB1; Wed, 23 Feb 2022 15:13:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="KBAA0Hy7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 496AF80F68; Wed, 23 Feb 2022 15:13:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 4E98B80F68 for ; Wed, 23 Feb 2022 15:13:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x62e.google.com with SMTP id lw4so52735238ejb.12 for ; Wed, 23 Feb 2022 06:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kK5W+zXTCDEpDxQ2A/CTl2uZ9BJv07o9H+E+Bqr+dN0=; b=KBAA0Hy7n5CKYHdpJ1o9C7r1E8eDtlmF9qFq296J9NzJaIeqtCNiErWnYoySEwun+S AeXFpU/tyuOvgVVTemTWBO4khiR06qiz6SEu+CJIAWuuHX7MCVaTLGeOrsmcdnB4emAu Aoug0PpFnAmhgSyMH0OF8OwdIX5rwQoHYXZ5P2VzN3NrfalroLNrufh/XxXPkPLRWbop bhzb6d2sP10S3Z0q+EnwfMwdzRN0p6OhBcp4p05PD/kjzw7H8rMWyrhdFdcDC3FNtJ8H QYvY4Cp4GbdV4hHKoD7h5MuLqoniszW6LcTowu5topwhPGhSE1hVR+PF6GFKW6uTWhdi YqHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kK5W+zXTCDEpDxQ2A/CTl2uZ9BJv07o9H+E+Bqr+dN0=; b=ZIV8QgmTCv+6JTtCbWa/hz5CSinvFR3n7Hc0872g31Ia3gkU6aFG2CdLsxhgSA75I6 N+cLauPIVSJsO7DwLQjmo5oa59GVSfaHtD8UMzYjtqqgxuNE2iEqJjKQbyc0vWKSOxkL OW2Si8N9MK9MJnFT/t/DZLipXUyNOWih7p/cYfl6gWoVxbqpHOCti3XGGjeTK/Rl+XhF +YMnjw9x+YAqj2inuNRXUIj57lRFTIIfuWrZ1+23P31kNHkp606R4shTUb+KYkdwWJmw vPkdnS1RxvZCKGxYA6DE9q0voXTC9El8A+8O5qCCTZ6QHFe3eeftESsry+gALKbCQCDn pTZA== X-Gm-Message-State: AOAM533gvxvvidqgZcCfoehHE5YYwM+0UKgVgoNJlHx9I7dqx9iXcVmw QEit9X0YA/eu9+e0mfVi2n9bAmojUjdNag== X-Google-Smtp-Source: ABdhPJySnMzf0hI3bMmUdUj+HKmqZAuVyphE3SmdkelBD91UWeBcMkATp/OdCNhrF65E63lUzoDJLQ== X-Received: by 2002:a17:906:a20c:b0:6ce:a87e:5013 with SMTP id r12-20020a170906a20c00b006cea87e5013mr22194246ejy.379.1645625616711; Wed, 23 Feb 2022 06:13:36 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id vl24sm7482314ejb.141.2022.02.23.06.13.36 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Feb 2022 06:13:36 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma , Jaehoon Chung , Peng Fan Subject: [PATCH 2/3] mmc: zynq_sdhci: Change granularity of timeout to 1us Date: Wed, 23 Feb 2022 15:13:31 +0100 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma The timeout used in 'commit b6f44082d5cd ("mmc: zynq_sdhci: Wait till sd card detect state is stable")' workaround is 1000ms at a granularity of 1msec. Change it to 1usec, to not waste time incase the cd is stable. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- drivers/mmc/zynq_sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index f4d69a2f7098..7d62d05eda71 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -770,11 +770,11 @@ static int arasan_sdhci_probe(struct udevice *dev) * 1000msec till the card detect state gets stable. */ if (IS_ENABLED(CONFIG_ARCH_VERSAL)) { - u32 timeout = 1000; + u32 timeout = 1000000; while (((sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_STATE_STABLE) == 0) && timeout) { - mdelay(1); + udelay(1); timeout--; } if (!timeout) { From patchwork Wed Feb 23 14:13:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1596722 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=WuGEc7nU; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K3dM90hlFz9sGf for ; Thu, 24 Feb 2022 01:14:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 948E083CB0; Wed, 23 Feb 2022 15:13:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="WuGEc7nU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 929DD83CA5; Wed, 23 Feb 2022 15:13:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 E4DB483A9D for ; Wed, 23 Feb 2022 15:13:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x52e.google.com with SMTP id m3so38418000eda.10 for ; Wed, 23 Feb 2022 06:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VU6q6iv7KTZ78u/BEPWU0Gk4WIysfAn5T4nlk2pmisI=; b=WuGEc7nUdPw5TdE1NsGsLQn/qUqqCohQgYY/hWjzIUzWnUl+OdmN0v+JxlKKNYnIZO OPmASWiqFKq1w++lNf2vTgLTK2ZgWZAuxFlEpxCZ0qlApDEbJTGgkE7isdoNZMV0S6wK z+VmcP6nkC28zeHzes3ZQcIhfrISB025uXBevO4guFR1N6tqBdSrLnnU47/LkyaSEPI/ fb5ThdBOvPPJdpxDcKuu4zsPE1lihliZMxxahedD9hjJfw0RGqQHafnAAQjSfWCCPvbq Q5kt8PUlUMRCHHbv2WZCPtoXJNHMCYbpNvo2Pit9oaeP0QhrmCq8EcUgYAFy5A7Yzp0Y AsnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VU6q6iv7KTZ78u/BEPWU0Gk4WIysfAn5T4nlk2pmisI=; b=csYi4oPN5nCIt51P9pUfkSAqSiQOfcrDvmsPARLnOZTZsFmwxnH3eQVclxX7W8OQZ7 V5KAXSxHQM9tZG0h/Zl7FRXc5HOYbeZAs+PknqkaYSSgBsCy0v7cSvHyeOM4ReDLYXVr /44cnEI0aFCVlLLfyNJJ0WmoO6g+wk2Bzvh4LrU1tm3hS7HXWtbuS9U8zWfTOSePRe3z luFupcofSme6z0Mp5Xz9iJ0ObLehkc/EwFG2U4MymcVJ1MKuha4HNSDyALTZecr8Ygfp py8aC+zY71TqpBcNI+9d5Ko2aUOAo7oiLlz8Yydtarrkz2XrL0JeOWEr+907DHvc53vS hNMQ== X-Gm-Message-State: AOAM531hBw3HyOuf+ce40PzxvrjKYtRJKwFjeqNCqZyAwed8bgQhZ4U5 rtWsLv4eJ2B4E0dZDPuqd6tZrm55+jhbtg== X-Google-Smtp-Source: ABdhPJxusL2Y7huaFkLwAYgfZvASsNOFRRKeXA7/4OQHNH+V89lbk65tT7RzWiEoI0+eQNdI3ZUDkA== X-Received: by 2002:aa7:c446:0:b0:410:9a8e:9b85 with SMTP id n6-20020aa7c446000000b004109a8e9b85mr31038218edr.319.1645625618255; Wed, 23 Feb 2022 06:13:38 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id m2sm833007edl.106.2022.02.23.06.13.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Feb 2022 06:13:37 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ashok Reddy Soma , Jaehoon Chung , Peng Fan Subject: [PATCH 3/3] mmc: zynq_sdhci: Enable card detect workaround for ZynqMP Date: Wed, 23 Feb 2022 15:13:32 +0100 Message-Id: <0bf6154c79f24227d786efc5e2c1f506185b2bce.1645625609.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean From: Ashok Reddy Soma Card detect state stable issue is observed on few ZynqMP boards(SOM), so enable the workaround 'commit b6f44082d5cd ("mmc: zynq_sdhci: Wait till sd card detect state is stable")' for ZynqMP platforms also. Signed-off-by: Ashok Reddy Soma Signed-off-by: Michal Simek --- drivers/mmc/zynq_sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 7d62d05eda71..33d00b06c777 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -769,7 +769,7 @@ static int arasan_sdhci_probe(struct udevice *dev) * causing sd card timeout error. Workaround this by adding a wait for * 1000msec till the card detect state gets stable. */ - if (IS_ENABLED(CONFIG_ARCH_VERSAL)) { + if (IS_ENABLED(CONFIG_ARCH_ZYNQMP) || IS_ENABLED(CONFIG_ARCH_VERSAL)) { u32 timeout = 1000000; while (((sdhci_readl(host, SDHCI_PRESENT_STATE) &