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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B77C8C4338F for ; Fri, 30 Jul 2021 12:29:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E0136024A for ; Fri, 30 Jul 2021 12:29:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E0136024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A66183312; Fri, 30 Jul 2021 14:29:33 +0200 (CEST) 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=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="T/3iR1Pg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 993848331F; Fri, 30 Jul 2021 14:29:09 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20616.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::616]) (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 1444C83312 for ; Fri, 30 Jul 2021 14:28:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ashokred@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Srg/gY4putRCQB4pdDoyXCD6bdpbvohQThYWbN/w6vRsA3LtNVtZhG8ifN8q9ouCj64/oYFGxG0tQr0yp2HA5yjXHKyskIBISIzaz1FLurChHriB1OXXMLN0KQWDXX9NSQmqKMfFKV1ay8hsb9kumtdghMHyMaUa65UFrMd9Fv+PQ0ZV1PWPloupiYetLVcwzBRzfp+9qK/VROAp0YxOUKdHM5K1z0iNBm99Jb7XSbPXXDEj4NlV6xL+ox50xatmCWdt/ndjASMLSOLo4ToS85TMIgDNvd/1N/8N10UTZSzwHh2q9oOfhu8wNiXl+vjLMLz/mUrsgj9SXRYG2BnrEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOQr68O+dR/VzD6zk0Sp/3P1vzKv2XErjIOTi6qZmuw=; b=Th9yihtkdRCIRhVMJlzcc3T4E5QzpuwRjKS4Fn0AXL/G7AFZFJQio2W8jqQR9ZohBWr/DjfyH0Qqgu3ARlHJiVv7CF3KZ+/aiuCfzPofRhVUe2wwVy5QZZl36RmZz5wmM6UAYgJYJOcLxrllRUPNhD5I33zE1WheZyyr1qqLZfLrsMsm5mshtnsh/H4rlWSyWaKk1mDxjOqyJPOGZjWR261QN7L/O/uKVKcCZxXzjZURBFHEBa56ZMPxk+5j3DcBndiih/5Y5bJqc2J7/Wt2X4nRbzhoZsV5vp0xuAQLuvx1t05UIlATnWpZeUglSdCyMo1CYCthtM7VaXcNLEtebA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=chromium.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GOQr68O+dR/VzD6zk0Sp/3P1vzKv2XErjIOTi6qZmuw=; b=T/3iR1Pgrt6iOvcLWGBAmVl3avT6vCGwqaWdlTmZ0k2HANnIFHIACBP9bjxtiZibWWIzeqiG54UNrfn5gnUSoMaEnUbQp6RevGK3ejtZDVCv1tZGR8kYfm3m0LYquLBlQ9cNwiY7Ruw/Zpq7Gmv+IiPjJPW2OB6FKeWA0eWpf3g= Received: from DM6PR13CA0019.namprd13.prod.outlook.com (2603:10b6:5:bc::32) by BYAPR02MB5704.namprd02.prod.outlook.com (2603:10b6:a03:9c::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Fri, 30 Jul 2021 12:28:52 +0000 Received: from DM3NAM02FT035.eop-nam02.prod.protection.outlook.com (2603:10b6:5:bc:cafe::63) by DM6PR13CA0019.outlook.office365.com (2603:10b6:5:bc::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.9 via Frontend Transport; Fri, 30 Jul 2021 12:28:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; chromium.org; dkim=none (message not signed) header.d=none;chromium.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT035.mail.protection.outlook.com (10.13.4.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4373.18 via Frontend Transport; Fri, 30 Jul 2021 12:28:52 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 30 Jul 2021 05:28:48 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Fri, 30 Jul 2021 05:28:48 -0700 Envelope-to: git@xilinx.com, sjg@chromium.org, somaashokreddy@gmail.com, u-boot@lists.denx.de, monstr@monstr.eu, peng.fan@nxp.com, jh80.chung@samsung.com, faiz_abbas@ti.com, michael@walle.cc Received: from [10.140.6.65] (port=41044 helo=xhdashokred41.localdomain) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1m9Rd9-000BRz-4g; Fri, 30 Jul 2021 05:28:47 -0700 Received: by xhdashokred41.localdomain (Postfix, from userid 2896) id 6065510254C; Fri, 30 Jul 2021 06:28:46 -0600 (MDT) From: Ashok Reddy Soma To: CC: , , , , , , , , Ashok Reddy Soma Subject: [PATCH v3 2/7] mmc: sdhci: Change prototype of set_delay to return errors Date: Fri, 30 Jul 2021 06:28:37 -0600 Message-ID: <20210730122842.3264-3-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210730122842.3264-1-ashok.reddy.soma@xilinx.com> References: <20210730122842.3264-1-ashok.reddy.soma@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1731f190-9d01-4d8e-96a6-08d953559744 X-MS-TrafficTypeDiagnostic: BYAPR02MB5704: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: izrm3SwQAr2wDf7i6EzAjc0ZTJDGS2fHO3yB3u0ZOzaWMSN8TK93w2hzt85F15VJR7nb4m8MKNNy8959bqWnplYnJ31CrKpn1xu4WzbRQpIKOhjV/tznYsE5DJuOgWRF7DGxZ+ikbysH1/RxLNLYHJfFWI8Ip9u49ON6aqDHvFD0DXABgnYSVl5sufQErlaYQe5L195vbop7HWxao1tE/+ek5xVbc02jQVYhUe9H7aVfQzh/lUOebjS1wjlwQqQnYDak0IK6N2l9fBXg/Kacof5c2sr2nPvxLchMDQF04Cz93L16gv5o/veF5abuK2DppTeTr2d1CttmMNmjR2/dElsv7nfTm3Idxw78ymuINuSSYBoL+UUOA0EtGVMvXfZ6Qyg5zp6AC2iHXPA/PFOOS2ZUEd19Q7va+SdzfcX+3b3cnUCT028tezJBMR6vdrT2cJ7JcWciShcHmtvlOPiYGEVJjo5e3DlOz70YwT/KBnn3IdEW87n5H8rs8eNddTOKKUVyMcTYgpuz0Cxxg8VaT5g7LMme+QwlyxAubvOPqPIS0QaD/LGE2izPfH8TEN4mn3+Tp2Eqql9DWeO+uGWJNglB0B7n/czChitXtsxb9Rg1r9qH73VcoDCIfHLmcUF8x25zU2Aln3sjXg8Z0qeIZy4HNIq8Tmk5y2BEOhijm3OEJpMFoMNpI2ANkb5b7oGuSh0KMGqjuT51YF/1rg60jw== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(396003)(39860400002)(36840700001)(46966006)(478600001)(47076005)(2906002)(83380400001)(26005)(8676002)(186003)(36860700001)(70206006)(103116003)(356005)(107886003)(54906003)(70586007)(36906005)(6916009)(36756003)(336012)(4326008)(1076003)(8936002)(6266002)(82310400003)(82740400003)(5660300002)(2616005)(42186006)(6666004)(7636003)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2021 12:28:52.3906 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1731f190-9d01-4d8e-96a6-08d953559744 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT035.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB5704 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.103.2 at phobos.denx.de X-Virus-Status: Clean set_delay() has return type as void. If there are any errors while setting tapdelay's it won't be able to return them. Change the prototype of set_delay() in sdhci_ops structure and return the errors from wherever it is called. Signed-off-by: Ashok Reddy Soma --- (no changes since v2) Changes in v2: - This is the second patch that has been split from 1/7 - This covers changes for sdhci driver separately - Added a debug print in case of error from set_delay() drivers/mmc/sdhci.c | 10 ++++++++-- include/sdhci.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index d9ab6a0a83..a99014236a 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -366,6 +366,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock) { struct sdhci_host *host = mmc->priv; unsigned int div, clk = 0, timeout; + int ret; /* Wait max 20 ms */ timeout = 200; @@ -386,8 +387,13 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock) if (clock == 0) return 0; - if (host->ops && host->ops->set_delay) - host->ops->set_delay(host); + if (host->ops && host->ops->set_delay) { + ret = host->ops->set_delay(host); + if (ret) { + printf("%s: Error while setting tap delay\n", __func__); + return ret; + } + } if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { /* diff --git a/include/sdhci.h b/include/sdhci.h index 0ae9471ad7..44a0d84e5a 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -268,7 +268,7 @@ struct sdhci_ops { int (*set_ios_post)(struct sdhci_host *host); void (*set_clock)(struct sdhci_host *host, u32 div); int (*platform_execute_tuning)(struct mmc *host, u8 opcode); - void (*set_delay)(struct sdhci_host *host); + int (*set_delay)(struct sdhci_host *host); int (*deferred_probe)(struct sdhci_host *host); }; -- 2.17.1