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=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 9E9D9C4338F for ; Fri, 30 Jul 2021 12:29:31 +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 1F9076103B for ; Fri, 30 Jul 2021 12:29:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1F9076103B 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 20E398327D; Fri, 30 Jul 2021 14:29:24 +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="j4Cvb3yu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DCA878331F; Fri, 30 Jul 2021 14:29:01 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::61f]) (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 E280B83310 for ; Fri, 30 Jul 2021 14:28:55 +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=bgks6ES4//CeHdvMmYDsWUlpO+rdVwg9WKwxTwx798XL5ZoqayNL6V+S6VAgS4Mm85ux58/cPCuHFuU33GNnFdnuEPjwnSv8h/lDnJUFjZAfSUrFAF9acJHBjUEnuNwd9DA1acuZ5SgmtguDGS9EgNH2ZX2wz+8AtHLrtuInmiSqKFBAwFY09WlaAkiEy/odvfEYA/ami3VssyAIxa0pO3TQExGuhWIPwPRSVdpT/OmR8k54KzlXC85jt7Jg07DUacJ907SmnvsmSrVvf/WhfH0ADz8GwwYbZdvgOP9zLUOSboZ84mXXz+8oIdXlp67hYT/RaAwe+AgfsN7XtBC6ag== 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=MxjCqHQo1d0+9uK4FIQ8jG8zX8F9NwGiQoomtwEQ3/o=; b=bRtKmvfO6BQJnoFWd/5Q6r0V6Vu/xh1nHwm5XX8+KQSPEAts0/wsWbkWoXsiphPl8FhGQD96A5a+nWFrdNyPe4UC4vKgqMWDcFBde8TrzkLVPyH2AS3sWewMA7TFTIXiOX2/7woa0ND2C4tNTlsuKAjB/SjA0jDwBTkk4RjXs/FuzHYf3BtXHd4rcKeKl2SBwCBSDPoSlApMKwIHqngzM259+6mPOd4UCx6AYbgc7XTH0QWT3wVigV2u0Sn0DC7/MWGiCCqGsg4nWI2H3LGb8wm8x/fEU2u0/4pAt4YvmkvpLh5/AIkhdeNWkyaE3P8r51ix586mXVK8pT7MzfwJQQ== 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=MxjCqHQo1d0+9uK4FIQ8jG8zX8F9NwGiQoomtwEQ3/o=; b=j4Cvb3yuJFqjjWqOOmyxIbTx1fXZV/v0QHMKLWXqGzGOvbkNKNbim3kU76h/C9t7adJB+hjWoAvfiUcb/7L7DfbbAEJ2sark336X1gSUrHEK9SxfZQ8SH1enlUnqjMInxSKohd0gbP3VzSLN7ZduJdu0eHRan8cUadAj/ww67l8= Received: from DM6PR13CA0006.namprd13.prod.outlook.com (2603:10b6:5:bc::19) by PH0PR02MB8764.namprd02.prod.outlook.com (2603:10b6:510:f1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Fri, 30 Jul 2021 12:28:53 +0000 Received: from DM3NAM02FT035.eop-nam02.prod.protection.outlook.com (2603:10b6:5:bc:cafe::14) by DM6PR13CA0006.outlook.office365.com (2603:10b6:5:bc::19) 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:53 +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.95) 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=41040 helo=xhdashokred41.localdomain) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1m9Rd9-0002o4-43; Fri, 30 Jul 2021 05:28:47 -0700 Received: by xhdashokred41.localdomain (Postfix, from userid 2896) id 5AB91FFD24; Fri, 30 Jul 2021 06:28:46 -0600 (MDT) From: Ashok Reddy Soma To: CC: , , , , , , , , Ashok Reddy Soma Subject: [PATCH v3 0/7] Arasan sdhci driver updates Date: Fri, 30 Jul 2021 06:28:35 -0600 Message-ID: <20210730122842.3264-1-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b1f26f0-dbdd-4279-198a-08d95355978e X-MS-TrafficTypeDiagnostic: PH0PR02MB8764: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6lca7hKuCoSr46rq/+7LqWpsd2yfO7K6P6UFxi7dTNZ6FpKx01sYuPfGXTC1ruUxHcUdyAonEQjk4+Ct3F5yJoUvdYzopbUp36YzwvTkmHYZVqZTq50zDIuG5IB25771A62Ww9lMmI/hrC4eL47/X3ZzISVaI7Kl3s4VMtcRiUqHB+kccgz2HR8c78DvLmAg0GAnzwywnqp9LdXBA1qAn/z7QLH/KV+EV3WDmYBJQ6Nn1FQqjagU76lihTBHoSFw9OiA35EaQPqqNmC0NS8Si1Y7Z9NO2AlijTEwUY5zNGGk2QdcboQDK0PCTRTjt79hrcyvz50HbIygA+QK76idFzYEj5pH80dwGH4yTLkR8Kla80Uy83ifANA5SPiScY6cp+fZs16Zf4JE1K1LQgKzAs502cR/noTvwNbyhXTNc7LyIC0JXEB3yoXRALLAkRH9eKjFVfV5CsfhN2wvONtWRJuHmLt91x20AiaT/u1AS9s4kw02SPnTHwZVjtnnW2Uo/z6mRpbossbgnJNGPL3LtvbvMcfLMTyWIUZodZhf9L2v3EZ8NvIeHyOkfoPpCdo0C1jn556ioodkhU6/5Kx1KtYuvz+X3rctvTksJUsAxN8PsmnS1AaKRTtIF423uqjY0MYwrRqLOXfxb2RkTdijaE3LlpT9JC+eWXZq88jGNiRFmBkQvbmlnVaNbNP+DL8TnEPoD0Fv76AxyzuXm+AxN+ufAuwCXGdD5E9X7PQNVMD+1CGkGNQzKf6TJdAyzRcr5UqbjFcLFanPCJRNAQQ6Og== 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)(136003)(396003)(346002)(39860400002)(376002)(46966006)(36840700001)(6666004)(478600001)(82740400003)(107886003)(4326008)(6266002)(70206006)(6916009)(2616005)(47076005)(70586007)(336012)(15650500001)(2906002)(186003)(1076003)(83380400001)(26005)(966005)(316002)(42186006)(36860700001)(5660300002)(36756003)(82310400003)(36906005)(8936002)(356005)(54906003)(7636003)(8676002)(103116003); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2021 12:28:52.8724 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b1f26f0-dbdd-4279-198a-08d95355978e 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: PH0PR02MB8764 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 This patch series updates/fixes below things: - Handle errors from tapdelay functions and return to set_delay() - Add ZynqMP firmware related enums which are used in sdhci driver - Replace mmio_write() with firmware call xilinx_pm_request() - Move tapdelay setting code from tap_delays.c to driver and remove tap_dealy.c and zynqmp_tap_delay.h - Change variable name from deviceid to node_id in couple of functions for consistancy - Add a workaround for sd card detect stable issue for Versal platforms - Use set_control_reg from sdhci.c These patches are based on below microblaze U-Boot 'next' branch. https://source.denx.de/u-boot/custodians/u-boot-microblaze/-/commits/next Changes in v3: - Added new line after return at two places - As we are seeing issues with SPL flow, keep zynqmp_mmio_write method to set tapdelay's and DLL resets. Add xilinx_pm_request on top of it for regular flow. - Changed the patch title to reflect these changes - Make the changes on top of patch 4/7 to move the code to zynq_sdhci.c Changes in v2: - Split patch 1/7 to two patches, one for zynq_sdhci and other one for sdhci - 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() - Added comment for why 1ms delay is needed between DLL assert and release - Remove mmc->dev->seq_ and use priv->deviceid instead - Changed return error from -EIO to -ETIMEDOUT in arasan_sdhci_probe() in card detect state stable workaround Ashok Reddy Soma (5): mmc: zynq_sdhci: Return errors from arasan_sdhci_set_tapdelay mmc: sdhci: Change prototype of set_delay to return errors mmc: zynq_sdhci: Add xilinx_pm_request() method to set tapdelays mmc: zynq_sdhci: Move setting tapdelay code to driver mmc: zynq_sdhci: Use set_control_reg from sdhci.c T Karthik Reddy (2): zynqmp_firmware: Add zynqmp firmware related enums mmc: zynq_sdhci: Wait till sd card detect state is stable board/xilinx/zynqmp/Makefile | 2 - board/xilinx/zynqmp/tap_delays.c | 101 ------------- drivers/mmc/sdhci.c | 10 +- drivers/mmc/zynq_sdhci.c | 242 ++++++++++++++++++++++++++----- include/sdhci.h | 2 +- include/zynqmp_firmware.h | 127 ++++++++++++++++ include/zynqmp_tap_delay.h | 21 --- 7 files changed, 338 insertions(+), 167 deletions(-) delete mode 100644 board/xilinx/zynqmp/tap_delays.c delete mode 100644 include/zynqmp_tap_delay.h -- 2.17.1