From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE0B3C433EF for ; Fri, 11 Mar 2022 18:14:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB66483AE0; Fri, 11 Mar 2022 19:14:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sartura.hr 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=sartura-hr.20210112.gappssmtp.com header.i=@sartura-hr.20210112.gappssmtp.com header.b="5aG0cvfl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 78BBC83AF4; Fri, 11 Mar 2022 19:14:18 +0100 (CET) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 2D9BC80288 for ; Fri, 11 Mar 2022 19:14:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sartura.hr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=robert.marko@sartura.hr Received: by mail-ej1-x634.google.com with SMTP id bi12so20876932ejb.3 for ; Fri, 11 Mar 2022 10:14:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZYDH9RppeI7jASnDqSihat1UbFQKlZDk21yqADwIcQo=; b=5aG0cvflFwJhyZuzQqDaCr3tiuNFi8iiszrwxlo1g9ntdQVIjwNzkSHjtpxxfeso+U pTHJUwnqGoE5CLEe2+VStzMJDGI5VZE8W/KcjhWsJvg16hO+MBYfYVWKAbhfIP5BdkPf bVEIoTWL+nETwCzaGikeDFYL9DPUC1QwgOdJEwktFDJ/58D3yPTUQnQfaVc3m8KBaxK8 T4xO9cWLiMHvrjNjC3uoYe9bL8VgEUVYehEXumPQJNBIb9eeIVuJ2q6X+ea+4l7Qh4Jt Ovz+HvGQQ41KJWulndgBTCaA+dvIJcx2/zDH+CQTyLxMZ2GSXieN6jh1+KAh3rLzTyVV empQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZYDH9RppeI7jASnDqSihat1UbFQKlZDk21yqADwIcQo=; b=4RpOsSjfusXvxm4LfX9yfvlFHwE7a0/wp6+McB0TZnT+IHxv51qtEPkJt3N5BWBA1O 41ocIYMR0CaMigUSEt4XcCSZEevSPiNgrQsBJZddTozyh7GjR763Xd9r45fEF2G6FGjQ Sujd+s0NV7qB0QN5dWpDZMwojaz9+CCvoVPu06HJizEYCEM69jFa/ugTW/ZpHS86u1OR JDj7BaLMOWACJ+mdG5/1Ine1yOLNJCbpVcGOKOITPJzqAZvcSw5y6qVSoneuqvhLO0Hi 4iWcKvJgvNeCgffdvob6NF6MMZQhbwxYIGVvuUXLGAGFBkRXoRxjRD8ZvRy28mDXLGD8 qojw== X-Gm-Message-State: AOAM533BVbZti4JbEEr35JchxoZQC2NXoawVcMZ8u+i6cjmOcGjCCo8Y jf3SS3eSVAPHR+VhvJmlv1LNWA== X-Google-Smtp-Source: ABdhPJz1nv7+9WfAdkhA9G4ZBfwY8qlu0d3g1U9p8un1BGvqFUPuPkTKXsKujt9CUlI/FBc2tA2x6Q== X-Received: by 2002:a17:907:6e8c:b0:6da:7ac4:5346 with SMTP id sh12-20020a1709076e8c00b006da7ac45346mr9551057ejc.300.1647022453707; Fri, 11 Mar 2022 10:14:13 -0800 (PST) Received: from fedora.robimarko.hr (dh207-99-172.xnet.hr. [88.207.99.172]) by smtp.googlemail.com with ESMTPSA id o2-20020a50d802000000b00410d7f0c52csm3633431edj.8.2022.03.11.10.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 10:14:13 -0800 (PST) From: Robert Marko To: sr@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, stcarlso@linux.microsoft.com, u-boot@lists.denx.de, pali@kernel.org Cc: Robert Marko Subject: [PATCH] mmc: xenon_sdhci: remove wait_dat0 SDHCI OP Date: Fri, 11 Mar 2022 19:14:07 +0100 Message-Id: <20220311181407.1930327-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Generic SDHCI driver received support for checking the busy status by polling the DAT[0] level instead of waiting for the worst MMC switch time. Unfortunately, it appears that this does not work for Xenon controllers despite being a part of the standard SDHCI registers and the Armada 3720 datasheet itself telling that BIT(20) is useful for detecting the DAT[0] busy signal. I have tried increasing the timeout value, but I have newer managed to catch DAT_LEVEL bits change from 0 at all. This issue appears to hit most if not all SoC-s supported by Xenon driver, at least A3720, A8040 and CN9130 have non working eMMC currently. So, until a better solution is found drop the wait_dat0 OP for Xenon. I was able to only test it on A3720, but it should work for others as well. Fixes: 40e6f52454fc ("drivers: mmc: Add wait_dat0 support for sdhci driver") Signed-off-by: Robert Marko --- drivers/mmc/xenon_sdhci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c index e292f2903d..2f8805096c 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -439,6 +439,8 @@ static const struct sdhci_ops xenon_sdhci_ops = { .set_ios_post = xenon_sdhci_set_ios_post }; +static struct dm_mmc_ops xenon_mmc_ops; + static int xenon_sdhci_probe(struct udevice *dev) { struct xenon_sdhci_plat *plat = dev_get_plat(dev); @@ -452,6 +454,9 @@ static int xenon_sdhci_probe(struct udevice *dev) host->mmc->dev = dev; upriv->mmc = host->mmc; + xenon_mmc_ops = sdhci_ops; + xenon_mmc_ops.wait_dat0 = NULL; + /* Set quirks */ host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_32BIT_DMA_ADDR; @@ -568,7 +573,7 @@ U_BOOT_DRIVER(xenon_sdhci_drv) = { .id = UCLASS_MMC, .of_match = xenon_sdhci_ids, .of_to_plat = xenon_sdhci_of_to_plat, - .ops = &sdhci_ops, + .ops = &xenon_mmc_ops, .bind = xenon_sdhci_bind, .probe = xenon_sdhci_probe, .remove = xenon_sdhci_remove, -- 2.35.1