From patchwork Thu Aug 27 09:25:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1352446 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=shmQZDAU; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Bccr66NHNz9sTj for ; Thu, 27 Aug 2020 19:29:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 652A38006D; Thu, 27 Aug 2020 11:29:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.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=microchip.com header.i=@microchip.com header.b="shmQZDAU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 174E581260; Thu, 27 Aug 2020 11:29:19 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa3.microchip.iphmx.com (esa3.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 134FF8004A for ; Thu, 27 Aug 2020 11:29:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1598520551; x=1630056551; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tgNZ4TurZu0NitZmt+8+rIdejAe6iF2oy0Dj5RJ4KPg=; b=shmQZDAUT861Pi/ukiarixzyzSjeuZ/J4H7EPQ9qn5ZHx1x1s7JDfZJk Lx8Dp4XsVIcUwC9UJwjIWzO9sb9rvQ4UNt7HAfSCE7PVFcvIm9xQ/ilx7 PCBfUBUE4M/37CKyvthul9L4Z6OIIDzA2HFO03VxMJbnztUOOCmngY31j gM1kXWuv+To2szsl01VBS+YPqlKo7Xfx8EAQP5OyLzdZjldia9XsPYDUd 7Z/fTVmbcTrn6Kq+845sFI3xzoiwPSaRKs+qKbYimXK3vDAukKF7X/x32 kM6m8Yh9ClUFAgsFjmwrHuFMrxJsaBRlnRLjdeRKywU+4shqLSam9rIkV A==; IronPort-SDR: 2x/Uny1jDZ5HtZeH6ZEcD2X924zGs6ciYEQmGOehGRa8dGRRI98ha9gT5NgnfQ8F0/YlA/PKdB s7im0WB5jYy38R35Vof+ZZiHARjJPftLh6BULW/5AE243graDSyL5tSSBoOXYIoEdac9QaIamG Phx6ec/QQKZfL/zz+pVmOe9/duEtdq4siVVfXvywrsrvyLO1HmQZIFj3k/k+fQc39f+jzVMqVE cIAgSV4MxY3xzHKWNqTKkmGoq2F8iPQZ9jA5GWpEB8NeTBBMctB2CucWCBKkVAT73HmoTkJReH NC4= X-IronPort-AV: E=Sophos;i="5.76,359,1592895600"; d="scan'208";a="89540919" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Aug 2020 02:29:08 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 27 Aug 2020 02:25:13 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 27 Aug 2020 02:26:02 -0700 From: Eugen Hristev To: , CC: , Eugen Hristev Subject: [PATCH v2 4/6] mmc: atmel-sdhci: do not check clk_set_rate return value Date: Thu, 27 Aug 2020 12:25:55 +0300 Message-ID: <20200827092557.269129-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 clk_set_rate will return rate in case of success and zero in case of error, however it can also return -ev, but it's an ulong function. To avoid any issues, disregard the return value of this call. In case this call actually fails, nothing much we can do anyway, but we can at least try with the previous values (or DT assigned-clocks) Signed-off-by: Eugen Hristev --- drivers/mmc/atmel_sdhci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index f03c0457e1..54b660c34a 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b/drivers/mmc/atmel_sdhci.c @@ -79,9 +79,7 @@ static int atmel_sdhci_probe(struct udevice *dev) if (ret) return ret; - ret = clk_set_rate(&clk, ATMEL_SDHC_GCK_RATE); - if (ret) - return ret; + clk_set_rate(&clk, ATMEL_SDHC_GCK_RATE); max_clk = clk_get_rate(&clk); if (!max_clk)