From patchwork Tue May 7 17:25:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Dannenberg X-Patchwork-Id: 1096447 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="C0SMoo4N"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44z67N1Dbdz9s00 for ; Wed, 8 May 2019 03:30:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D5192C21E2F; Tue, 7 May 2019 17:27:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D7936C21E30; Tue, 7 May 2019 17:26:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A8E16C21C27; Tue, 7 May 2019 17:26:16 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lists.denx.de (Postfix) with ESMTPS id B5555C21D56 for ; Tue, 7 May 2019 17:26:15 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x47HQBot065501; Tue, 7 May 2019 12:26:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1557249971; bh=HF9t1GQPI+m+gsfIh+cziXpRM0VpfLwpaoajBMufvcE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=C0SMoo4NVW2onlpNVKrFf2+lUgxuz7ZStCw2sA8TBzVyRRJ+j2Vlk3mE9uprvZNks LM8TICoFIJinRhZrmKpZ+T7EcWp39tcWO3lZNgF+wCc2wurjWua64BFH9Oy7joRGhW 8q/n1F/mjkPw9fkEWzH/XMYTxBE/EwVPEYJZ+Png= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x47HQBHT058249 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 May 2019 12:26:11 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 7 May 2019 12:26:11 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 7 May 2019 12:26:11 -0500 Received: from jiji.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x47HQBag023247; Tue, 7 May 2019 12:26:11 -0500 From: Andreas Dannenberg To: Tom Rini , Simon Glass Date: Tue, 7 May 2019 12:25:30 -0500 Message-ID: <20190507172542.31359-2-dannenberg@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190507172542.31359-1-dannenberg@ti.com> References: <20190507172542.31359-1-dannenberg@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: U-Boot Mailing List , Tien Fong Chee Subject: [U-Boot] [PATCH 01/13] mmc: k3_arasan: Allow driver to probe without PDs specified X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" We would like to use the driver even without power domains being specified for cases such as during early boot when the required power domains have already gotten enabled by the SoC's boot ROM and such explicit initialization is not needed and possible. Signed-off-by: Andreas Dannenberg Reviewed-by: Tom Rini --- drivers/mmc/k3_arsan_sdhci.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/k3_arsan_sdhci.c b/drivers/mmc/k3_arsan_sdhci.c index d5f2857382..785ba135c7 100644 --- a/drivers/mmc/k3_arsan_sdhci.c +++ b/drivers/mmc/k3_arsan_sdhci.c @@ -31,14 +31,14 @@ static int k3_arasan_sdhci_probe(struct udevice *dev) int ret; ret = power_domain_get_by_index(dev, &sdhci_pwrdmn, 0); - if (ret) { - dev_err(dev, "failed to get power domain\n"); - return ret; - } - - ret = power_domain_on(&sdhci_pwrdmn); - if (ret) { - dev_err(dev, "Power domain on failed\n"); + if (!ret) { + ret = power_domain_on(&sdhci_pwrdmn); + if (ret) { + dev_err(dev, "Power domain on failed\n"); + return ret; + } + } else if (ret != -ENOENT && ret != -ENODEV && ret != -ENOSYS) { + dev_err(dev, "power_domain_get() failed: %d\n", ret); return ret; }