From patchwork Tue Jul 27 12:36:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Reddy Soma X-Patchwork-Id: 1510486 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; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-xilinx-onmicrosoft-com header.b=ONUnRaj6; 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 4GYxBn1xwVz9sXG for ; Tue, 27 Jul 2021 22:37:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FFBC83480; Tue, 27 Jul 2021 14:37:08 +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="ONUnRaj6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C70658347C; Tue, 27 Jul 2021 14:36:56 +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.1 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20603.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::603]) (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 2FB718343F for ; Tue, 27 Jul 2021 14:36:52 +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=IR/xhKPrs6+gKwxkdnfUfwf9eIQ11QrXg1WVRGzXt5GluE+sONE4ELNECUPiMNSoaHDHtUm7aRltY22m+HLX9K1ZgRRgBuuk/iIPO5e3a28rwFHYx0AmXYqJf+LrUhPG5e373LvvUR1fFj+cYjj8DKb1366LqQaf3R3Eev823tiqQGVdK5FvD1CcNMz6uzoOF/LN3gJ4d98B9M9qbf8tIR64QYnmK3HmdTFAy+lrftgVp5KT59Nnrl0VdJKLDUdUQQ34iBb0SohU+lWMVPURHtVO+WJxTJtTx1auAhUE7xm8z7d1shpyYZYhph6LyRMguZPnvFUiPYARWvipcEoWSg== 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=B/dTvhsQLBk+KDeeDeppoHj5QypTQpRD1Dk0SYiaF6s=; b=V8UpmHpKt0Phzpfq3azPUsVlXdvmub4vLFlSacGkYwCaCA+pWDvDkVUxLDVgHmTFDGxhSF/ZnQ5r0APMOd+DutDIeQg7hGOazSUL1aL0BNLZs5oZN2hPlarKvEEWrh0G3zoSOl8c6eNpPXBgHrVdY2rNcnFSKF6210obXV6PyjV4kXMPJZHdzoTx2Fkzsfg4Xl4JsSLyPKOJ6fJIGl1Sd1TfNPozcQ0HMnesnNVZBZOHSo//XSkmsaw8noV4q8562O6zJhORffWDlv8irBAFS847mLYi3tHri4RvCByoGWfbgEKauyZNI4BSEpEMap25JKd3/Io2aaq7GKoZoU9Kfw== 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=B/dTvhsQLBk+KDeeDeppoHj5QypTQpRD1Dk0SYiaF6s=; b=ONUnRaj6AJzKTfbSFzIy2QLSrKJbGYL7AA2LcrhjYk3tV4JnpUUiX5v14USLcH3j86RHOaBuT2N5t9UQSP+B/BCaq7g4L8dqfa2YipdgO1MvtNCcLHGwVe81SZLmeLJP6Dga8A9ofGnDSj/eEu1+agBzdaVd+WcWd2IqTtVcLCU= Received: from DS7PR03CA0142.namprd03.prod.outlook.com (2603:10b6:5:3b4::27) by BYAPR02MB4632.namprd02.prod.outlook.com (2603:10b6:a03:5e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Tue, 27 Jul 2021 12:36:48 +0000 Received: from DM3NAM02FT031.eop-nam02.prod.protection.outlook.com (2603:10b6:5:3b4:cafe::a8) by DS7PR03CA0142.outlook.office365.com (2603:10b6:5:3b4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.17 via Frontend Transport; Tue, 27 Jul 2021 12:36:48 +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-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT031.mail.protection.outlook.com (10.13.4.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4352.24 via Frontend Transport; Tue, 27 Jul 2021 12:36:48 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 27 Jul 2021 05:36:47 -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; Tue, 27 Jul 2021 05:36:47 -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=38274 helo=xhdashokred41.localdomain) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1m8MKD-0007Ax-L2; Tue, 27 Jul 2021 05:36:45 -0700 Received: by xhdashokred41.localdomain (Postfix, from userid 2896) id D43B110026D; Tue, 27 Jul 2021 06:36:44 -0600 (MDT) From: Ashok Reddy Soma To: CC: , , , , , , , , Ashok Reddy Soma Subject: [PATCH v2 0/8] Arasan sdhci driver updates Date: Tue, 27 Jul 2021 06:36:34 -0600 Message-ID: <20210727123642.2474-1-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8f2e7d45-6166-4e76-1d7d-08d950fb338e X-MS-TrafficTypeDiagnostic: BYAPR02MB4632: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CWVgPHAPA8ik52Pghkksng/lvr1f9vfFeZrtZ5aBH0ga1ym0Lq+9GTDqR71Rqx/J+fGltn3JdnIDYONFKmn9rBOsxoCax11Vs+SR0PzFcYs+/fOYhT6pYj760YF99YUGc+OXGUvw0kM/OEf2fuHu1KiVpElgMFpCi5BYugfeTvpV9tXV86NFiopaY/VoFfK8QZf+KgL2J0GP6WCBMS+xUMmLJAt8GQXDODRN4eE60VHlmoMS7OIQndhcBbKiOFIDKknLbHOmczVZf4VvhlW0/jd6kIEDQPfNx7iTtg/sDC0My5HH5NsSfeBrhuIva5/hHZc4nB2ck+quurvhzvB2GchhxmZnAhUmYlyRK8rWnV5JtvhGjYsSGNW2270Y56pNQ8MmHAQVaxMvf9a+R684nSH/KplRtL2MaKTgZdVz5UDaoHERIUH1pV+oa6uMyNcH7WKc+cMBTLlefNXDbjXIo+nrZpzFA8G5lvfwwaBrEJetVyvh+x8KI6MmjCKdfERTGpC6fjQiBxOKhwFqSO3ZgYXoeRfkxJTCLZlmDTbdcZkpyQfYr3QT3bj/Nk9JpYvP4BA3UcjlBqGdJAvGwzeuWPmApxCzFbfiFOepQ/cxhSmI8hDLiB9Kzxkz2I9+hlWE+ozS+pwVeeavxV3twlNzIY/vDRZ226/Wq6yiEEEGG4nyf8dPJK9t1QK8dv39zCPaZY5d3+TAw9ikST9SGdrp3Q== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(396003)(136003)(346002)(376002)(39860400002)(36840700001)(46966006)(36860700001)(26005)(82740400003)(103116003)(2616005)(83380400001)(107886003)(6666004)(356005)(7636003)(2906002)(5660300002)(1076003)(42186006)(4326008)(36906005)(6266002)(8936002)(316002)(54906003)(478600001)(8676002)(6916009)(15650500001)(82310400003)(186003)(336012)(70586007)(70206006)(36756003)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2021 12:36:48.0691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f2e7d45-6166-4e76-1d7d-08d950fb338e 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-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT031.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4632 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 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 (6): mmc: zynq_sdhci: Return errors from arasan_sdhci_set_tapdelay mmc: sdhci: Change prototype of set_delay to return errors mmc: zynq_sdhci: Use xilinx pm request instead of mmio_write mmc: zynq_sdhci: Move setting tapdelay code to driver mmc: zynq_sdhci: Change variable deviceid to node_id 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 | 155 +++++++++++++++++++++++-------- include/sdhci.h | 2 +- include/zynqmp_firmware.h | 127 +++++++++++++++++++++++++ include/zynqmp_tap_delay.h | 21 ----- 7 files changed, 251 insertions(+), 167 deletions(-) delete mode 100644 board/xilinx/zynqmp/tap_delays.c delete mode 100644 include/zynqmp_tap_delay.h