From patchwork Tue Aug 28 09:47:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10578141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0F6F174C for ; Tue, 28 Aug 2018 10:06:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAEB2289E0 for ; Tue, 28 Aug 2018 10:06:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E6CA29529; Tue, 28 Aug 2018 10:06:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 06404289E0 for ; Tue, 28 Aug 2018 10:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RuCoym4FVi+RE5Tbz9XAEvmji4k9RYpgad8fyZEfDEc=; b=r3YY9uG3DcUGKl RdZSNkarQOxYwDUkyeDgzX/2uZzHAOq/xmx7X24enmybGXPGZtrFDeeLLOKT+67nc6IBxnUjxn4Ad rjHmOztBjBI1XMORrswdAut1YMxLK4ejoZh0/oV0HPYm7k7GxwvTivC+G63abpnvVABN8kvd3cZcM i2TL9oGYr78G+EnD65l1o9ZHrR2eyk5iyo8o9ymyTB640akn6Ka7magH1h29qoY3a8IqcW5ajGBFw +rbsBu5GS9Ajx8LTcpQ4CdB1tkhogHciA+5Jh52IKBwSuKTg5zLZF+N5PH1j9Wf/0K8XIQ5Sq53dY iHTi861VmHnvDAzBUTzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuatP-0003h9-06; Tue, 28 Aug 2018 10:06:35 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuatM-0003Zt-76 for linux-arm-kernel@bombadil.infradead.org; Tue, 28 Aug 2018 10:06:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t34Jq3WRCfdlEWi8ntOQHsyGNkAU8Rm7d/6CzQM9b18=; b=np+pP3wcCy+Ir8oCR58bNJ7xqt izNVulcsMdu6AYGB6jdl9LHqwTBePFbKZ7yhEZKEK/vgE8ytsKhSlri6hE/FPVoI7fW8lH/EHdUZt j3GHVxXOy4/ofFmwbWpk1nGUfZz0c/uYIpc+i31l4skHQR/Pf4ps7SuqDsWx1YYcUhDi4fnbO+wMr wDgeiFrmE17EOvmrz2uP3rtI5IaGAhg9ii0O7LrAB/90rgv29Y2uT7TLPINZ4BscLJpIoPwCKxwYP B94KvAs1fxjaCzd1aV6n4z0HaeyaxXGmcFyfkXqE+BkYXKkn7gj3aQ/CjNwEpTObEFO2AYdyocmyb lSCmbheQ==; Received: from mail-eopbgr680077.outbound.protection.outlook.com ([40.107.68.77] helo=NAM04-BN3-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuae5-0001nr-6v for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2018 09:50:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t34Jq3WRCfdlEWi8ntOQHsyGNkAU8Rm7d/6CzQM9b18=; b=SLdvjRj33bu/GGe/ty3VplFAF8x8tlTp7GZgseUrXTjcaPfPNKFrNi5Jp1mLmhPsiMsJn0NvrNALR0OIGUfGTeQoga0Cvs+wr7S5eiwyW2BmDwZRtAD88FtJJVJaLAZ77ccumfgDQcs0ObKc5F7d3COi+RxksVsSMvH871LNZcI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1572.namprd03.prod.outlook.com (2a01:111:e400:52a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.15; Tue, 28 Aug 2018 09:50:24 +0000 Date: Tue, 28 Aug 2018 17:47:23 +0800 From: Jisheng Zhang To: Adrian Hunter , Ulf Hansson Subject: [PATCH v6 2/3] mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops Message-ID: <20180828174723.4e729a27@xhacker.debian> In-Reply-To: <20180828174534.00fb5e24@xhacker.debian> References: <20180828174534.00fb5e24@xhacker.debian> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: OSAPR01CA0147.jpnprd01.prod.outlook.com (2603:1096:604:d::15) To BLUPR0301MB1572.namprd03.prod.outlook.com (2a01:111:e400:52a9::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cce65cb5-1e2f-4171-b878-08d60ccbae20 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BLUPR0301MB1572; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1572; 3:4ORWQ+9LhsSpml9lMOeMFrM0AI7ieYeBtu+Cmoa0Z0MD8B/5Q/f9g65268yxyTW9RtBdKwRsqV6mrt93Zy9EE62BIf8EqL3e0MUqoTTFN66F7vpHVAvFbo1ikP7k56grQoW0qoyM3vpvJPfQlIRaBt6FN/FaNDUoHOBmD1wPdlEOcWD/MxwMYhyAbFDDGyhRb3IzFZM4SgPFrtISGsu25IAuoXi17gMbL0l0u+4EGRSLxmWZBUZQri6XfE9WX7Rj; 25:iNazw2zsgDmt9+B5IISoE/UGdAjO7zzinEgoPrnDxAe8MBkdbDCRwS42d0VkZnl2rw9N8ypSVFJ6GCqBO1ObXLiZ5f9Lt9NnP0spjEiHl10Lb7S1nKiHjZAYAso7uUEme1OjinltoPMK9KVWrTH3Jc4/YeAYUBOZIR6KuAz9mNjNzTBi3KkETnCz9zKVvwYPNn7xa6A0nwBSpnvmvqEDW/zMOjkgXiGctCWHXW4S56DLHXR7c6DrIp+PxfxXAFWFeUITNSfj8w7HCOJB2MewOZk+MRicG//sgHzv0+vgqDBAlaQRMbBW+SN9rLB/3SnViwXH7GcbhBM2t8RNy2hFLA==; 31:b9kn4Tjq6ERQB1i0EE9Em2g81dzL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6y6o42y5IyPVNUxOx640EuKVTWThq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:BLUPR0301MB1572; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB1572; X-Forefront-PRVS: 077884B8B5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(366004)(376002)(396003)(39860400002)(346002)(189003)(199004)(7696005)(54906003)(6506007)(478600001)(110136005)(26005)(72206003)(386003)(186003)(16526019)(14444005)(76176011)(5660300001)(33896004)(2906002)(52116002)(446003)(106356001)(105586002)(1076002)(53936002)(55016002)(11346002)(316002)(81166006)(486006)(23726003)(3846002)(9686003)(6116002)(305945005)(50226002)(7736002)(68736007)(8936002)(230700001)(81156014)(8676002)(86362001)(476003)(4326008)(97736004)(956004)(66066001)(50466002)(47776003)(25786009)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1572; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB1572; 23:9u08ubP2LBACsxQlIO0qTMw24KTE8ro3CvVoUy0?= nRvdOh1HVjsJSHuwpuucfJYM6OnPsDyzBBjTduQ0N85r5BA6ShBCAZLIwlckx2SB1DveNEFoIbG1iLNwQsWGd7tEzKfc3pv+R11pRD0S3Gz2oaJ/S8++ipntEUXJlWhZUyAnQeGKGNF9pbHAaDl6KAMIrMjHp4KDOj8G9TWB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zy6ZQIb6H3mSZSZ0YbThqonXv6RMquS6BZcL5loPiTYV1fYSc7uuLBwbWXM65xgp2sEokWzXybv3GIQBuMT5PM3b/JjrUIF89bOiu8qTbtuZSXgIpCE3eYS2fsKDZ5CWbtGsAELlDc57S35tQiEud5VRhpb5+IH8z1WvULrvqUzpMUh1yvPDTTRKEaRyHANKxPzlYE0iM6d2Ggg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2018 09:50:24.1642 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cce65cb5-1e2f-4171-b878-08d60ccbae20 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1572 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180828_105045_333895_AF2CE2E7 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add this hook so that it can be overridden with driver specific implementations. We also let the original sdhci_adma_write_desc() accept &desc so that the function can set its new value. Then export the function so that it could be reused by driver's specific implementations. Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci.c | 37 +++++++++++++++++++++++-------------- drivers/mmc/host/sdhci.h | 4 ++++ 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 52ccf4644384..eb21d2db7f05 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -554,10 +554,10 @@ static void sdhci_kunmap_atomic(void *buffer, unsigned long *flags) local_irq_restore(*flags); } -static void sdhci_adma_write_desc(struct sdhci_host *host, void *desc, - dma_addr_t addr, int len, unsigned cmd) +void sdhci_adma_write_desc(struct sdhci_host *host, void **desc, + dma_addr_t addr, int len, unsigned int cmd) { - struct sdhci_adma2_64_desc *dma_desc = desc; + struct sdhci_adma2_64_desc *dma_desc = *desc; /* 32-bit and 64-bit descriptors have these members in same position */ dma_desc->cmd = cpu_to_le16(cmd); @@ -566,6 +566,19 @@ static void sdhci_adma_write_desc(struct sdhci_host *host, void *desc, if (host->flags & SDHCI_USE_64_BIT_DMA) dma_desc->addr_hi = cpu_to_le32((u64)addr >> 32); + + *desc += host->desc_sz; +} +EXPORT_SYMBOL_GPL(sdhci_adma_write_desc); + +static inline void __sdhci_adma_write_desc(struct sdhci_host *host, + void **desc, dma_addr_t addr, + int len, unsigned int cmd) +{ + if (host->ops->adma_write_desc) + host->ops->adma_write_desc(host, desc, addr, len, cmd); + + sdhci_adma_write_desc(host, desc, addr, len, cmd); } static void sdhci_adma_mark_end(void *desc) @@ -618,28 +631,24 @@ static void sdhci_adma_table_pre(struct sdhci_host *host, } /* tran, valid */ - sdhci_adma_write_desc(host, desc, align_addr, offset, - ADMA2_TRAN_VALID); + __sdhci_adma_write_desc(host, &desc, align_addr, + offset, ADMA2_TRAN_VALID); BUG_ON(offset > 65536); align += SDHCI_ADMA2_ALIGN; align_addr += SDHCI_ADMA2_ALIGN; - desc += host->desc_sz; - addr += offset; len -= offset; } BUG_ON(len > 65536); - if (len) { - /* tran, valid */ - sdhci_adma_write_desc(host, desc, addr, len, - ADMA2_TRAN_VALID); - desc += host->desc_sz; - } + /* tran, valid */ + if (len) + __sdhci_adma_write_desc(host, &desc, addr, len, + ADMA2_TRAN_VALID); /* * If this triggers then we have a calculation bug @@ -656,7 +665,7 @@ static void sdhci_adma_table_pre(struct sdhci_host *host, } } else { /* Add a terminating entry - nop, end, valid */ - sdhci_adma_write_desc(host, desc, 0, 0, ADMA2_NOP_END_VALID); + __sdhci_adma_write_desc(host, &desc, 0, 0, ADMA2_NOP_END_VALID); } } diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 25bddd21de31..2115416f973a 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -606,6 +606,8 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*card_event)(struct sdhci_host *host); void (*voltage_switch)(struct sdhci_host *host); + void (*adma_write_desc)(struct sdhci_host *host, void **desc, + dma_addr_t addr, int len, unsigned int cmd); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS @@ -736,6 +738,8 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios); void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable); +void sdhci_adma_write_desc(struct sdhci_host *host, void **desc, + dma_addr_t addr, int len, unsigned int cmd); #ifdef CONFIG_PM int sdhci_suspend_host(struct sdhci_host *host);