From patchwork Thu Jul 16 09:07:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 235636 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp610001ilg; Thu, 16 Jul 2020 02:07:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsbPvyKsq35pzEJGl8cOWNLBvFStXkJj0y7GOh+FVAWchGvliEDfdbCm0MBSRKQEz9O8W3 X-Received: by 2002:a17:906:7a46:: with SMTP id i6mr2634395ejo.475.1594890467468; Thu, 16 Jul 2020 02:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594890467; cv=none; d=google.com; s=arc-20160816; b=vtPMRnASZIWr4nyaMOaaXat6MP1D3O4Na6FjrutpIm1XvlsQLMLvvQiH4zhkxoslgs 8kloBMdUDbmwgQARnbMEBxPQxp9fw7tJn0ys1+Yl0UBXHDvUlC0uk0rJOjm3qpz2nq9u NLfUchZZvOxZe9oynSSHwEKjI6p0hb3CKJl2vdfvImBrQ2ubJCxvtuXRnim26Wy8fcX0 k3xPZUgzdEXlRLIohhMgln8klvVegqpCYdw3sCllDosuntmnYPsz3re83N3IT3xyocJl WsHUk+RpFZ3yUcaE2u/KY7hESpn5ctycBu9qzeWh3A+gNU5uEPi04TW0/S585EV4hO00 X5hA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=seaGs81dm1ThKcV1/+NXHYtvy5SKZvzGJ1uNs6bjRvw=; b=YphewvvweYjaiR5t8hv5ULqFbZ1p7WOwFIlIVXNwzBpFzjez5hlsKsng/pQCrKRZum DJgnVeXfxEa5LLpTVZxZYudwObSOBlbr/9I1XDRu8LzPkEbPKlO/GgnrpmA4ct5cE2Uq a2JZvo/FkXVTeG9YC84B4JxcZkhKhmLui2JN8AoDtPoTnZ27zdQ5tnHKSLV/jikNlEB2 nFew1AMDMmJ5xndyuIEQtuUf/1dJn7ws2/o2gARH0b+Oc8K7BOjdQnGlq06jhPfhdLvl kk9IA1djtcDShAn6KQkvkDf9ZD1+xhnBSANPOkxxlLJNwfELfaC00e9hHbNedUZCFklB UCig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oyD/BzWe"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id lc19si2590000ejb.584.2020.07.16.02.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 02:07:47 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oyD/BzWe"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 D87E981BC0; Thu, 16 Jul 2020 11:07:43 +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="oyD/BzWe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C94B81B7D; Thu, 16 Jul 2020 11:07:42 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (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 2325981B7D for ; Thu, 16 Jul 2020 11:07:39 +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=manivannan.sadhasivam@linaro.org Received: by mail-pl1-x643.google.com with SMTP id k4so3577380pld.12 for ; Thu, 16 Jul 2020 02:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=seaGs81dm1ThKcV1/+NXHYtvy5SKZvzGJ1uNs6bjRvw=; b=oyD/BzWeINLsmq5mkETxpTcb3V6kQc2YWwwODCPpJYhPQwDHAMjte+tvbEwl3DnpLH eIKxwmqBY/LzIgFFhOqqQLCh1kxeHugdNOMwiF84C7yYo5lKP6MsibxzGnd4JGRVimPe U4RNmlwRqUoBYRjXU+ggq5PkFWjgu17t4JAAEt4yYjq+XNF4zLs9bAVQITjGliEkYoQW j5qJtOmjuwLYdnwh/Wam6g5HuFtDUgaqcYGIatLH+hjWSlU3YX9jNTjHCn/zpBzLKhuQ HM48qAXiCD9of1NN6Uzo71aBKJmFpCktH5YyN1dEKqJGVzQ9Dw9/guqRwsx9vB+14kys a7Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=seaGs81dm1ThKcV1/+NXHYtvy5SKZvzGJ1uNs6bjRvw=; b=jlW4h+YI2BIDGF4M0EH+pQTa8UzJ810YyzOVN1tsD5vo2BvelEBVluGjxEZIbjXtul EWtyjcvusg3VC0ViX9OicYyrzZvCv5DCgbN0p02zwAQBne06+5P/2DJsDKo/HZ6dgGur kBVI9batawDvT5NZ0EoBzXXyj9WedGSiJ3y2q9E4gG40y0DHRlyvJGWX9879mptgSNZr V2OLhVGuFIXFOEGc4b0uKSCqwRmNX1g/ipfALa6PRmSWKoVcAM3ffwl71EZz5QAC7FR1 Q35vKc8e3gita2S9PgU3lZXD0U+xX11UCyErxWQaoiAaIUwCPnL9sRf5BeA2SGCZRAkC PZ6A== X-Gm-Message-State: AOAM5335cz396e/BaTfKnxQEev8Hx4lcmqo/EM4PrxakArteBTTp7euC B1ZhTdtnFhnSPrZF0TRCVnRMMRznrw== X-Received: by 2002:a17:90a:24ed:: with SMTP id i100mr4139067pje.22.1594890457016; Thu, 16 Jul 2020 02:07:37 -0700 (PDT) Received: from Mani-XPS-13-9360.localdomain ([2409:4072:6d89:fed1:9157:c271:c363:4849]) by smtp.gmail.com with ESMTPSA id b11sm4337685pfr.179.2020.07.16.02.07.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 02:07:36 -0700 (PDT) From: Manivannan Sadhasivam To: u-boot@lists.denx.de, rfried.dev@gmail.com, trini@konsulko.com Cc: anibal.limon@linaro.org, bjorn.andersson@linaro.org, Manivannan Sadhasivam Subject: [PATCH] mmc: msm_sdhci: Use mmc_of_parse for setting host_caps Date: Thu, 16 Jul 2020 14:37:26 +0530 Message-Id: <20200716090726.13343-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Since the introduction of 'get_cd' callback in sdhci core, dragonboard410c's MMC interface is broken. It turns out that 'get_cd' callback checks for the host_caps for validating the chip select. And since the msm_sdhci driver is not parsing the host_caps from DT, not all of the cababilities are parsed properly. This results in the MMC interfaces to be broken. Hence, fix this by adding a call to 'mmc_of_parse' during driver probe. Signed-off-by: Manivannan Sadhasivam --- drivers/mmc/msm_sdhci.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 Tested-by: Aníbal Limón Reviewed-By: Ramon Fried Reviewed-by: Jaehoon Chung diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index da3ae2ec35..23e2e0fbc3 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -142,6 +142,10 @@ static int msm_sdc_probe(struct udevice *dev) writel(caps, host->ioaddr + SDHCI_VENDOR_SPEC_CAPABILITIES0); } + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + host->mmc = &plat->mmc; host->mmc->dev = dev; ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);