From patchwork Wed Jul 25 09:42:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10543769 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 17E69112E for ; Wed, 25 Jul 2018 09:45:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0610128421 for ; Wed, 25 Jul 2018 09:45:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED6D4298E4; Wed, 25 Jul 2018 09:45:36 +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 autolearn=ham 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 789D328421 for ; Wed, 25 Jul 2018 09:45:36 +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: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:In-Reply-To:References: List-Owner; bh=pL3wQd+Qz75HS+yk7BrXwlx0MvBh5H2Kv/WhmQ9O/1o=; b=F5vX7vzLX0sPzp itgISOFrGXdKf/gTCs/3gVyZyRovAdZoVoFreVoD3T3ZDn3y6ODmjRLy/wyFbYqqtE2sOv0HhusMY nO86rP02VNCqg6pPtGd5eLGCVRIl13QZGNGnzEczPnyCOqAHQ7CqdEKmxK+EzWnP2vVit7F7W1QRP hiigyYHTE89HNjB7K3im23mtQGvv7gUBHs20YBxuvt4mlwqG8yFQOXpmhexnMXesTHU7BhK2/2dh5 F4GzaHsHFzU7Kg/I33LgKuuLPix7sKXqIxVvefb+uW/fYWz6gFKBu7tE2xg99375ep8wuTmWJaiXP 0mGQWeA5VknznXYWgSCA==; 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 1fiGMP-0001bo-Em; Wed, 25 Jul 2018 09:45:33 +0000 Received: from mail-sn1nam04on0609.outbound.protection.outlook.com ([2a01:111:f400:fe4c::609] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fiGMM-0001av-Gv for linux-arm-kernel@lists.infradead.org; Wed, 25 Jul 2018 09:45:31 +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=Ry8h/GJ+rMeKOMWsB0K/i3uIZ10SHpHo7S7nSaytG8Y=; b=q9rqJP9qcPuSEZQJtCg2iCyGPhUOxD4nbZFhgeJ7K1ro1BMOG1BowJILSoGv+U8SmgIHulv4DNtGVeWXbxdh7ZzNoFxZfPH1tTbLUSbYP+UpoP8GyO7y22guc3YXuzMpBgmPAms9ZMe/l79hx0LvZQmjlOntoed32aUgjPOhSU4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Wed, 25 Jul 2018 09:45:16 +0000 Date: Wed, 25 Jul 2018 17:42:57 +0800 From: Jisheng Zhang To: Adrian Hunter , Ulf Hansson Subject: [PATCH mmc-next 0/3] solve SDHCI DWC MSHC 128MB DMA boundary limitation Message-ID: <20180725174235.1ca764cf@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TY2PR01CA0018.jpnprd01.prod.outlook.com (2603:1096:404:a::30) To CY1PR0301MB1577.namprd03.prod.outlook.com (2a01:111:e400:529c::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6022ade-eba3-430b-ce12-08d5f2135448 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(2017052603328)(7153060)(7193020); SRVR:CY1PR0301MB1577; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1577; 3:j7Ss4gHffd66sveXWCXdOYHu/c75WshoZlNom3a5ZNv7HPxaUaqDcoRQ7nrp01Tvw8gjbk04Eh8Bj1Lvy0o6JGY65zBvm4xjESG5utiPa4QCzP3AT+LCJ1A5KQzvGkb66XB5KxMz0MCNK/ks/7UXTelVZl48pf/S6buUNKrYzq5xZ52/KDdmBkTpMPuXCk2zWu69MYGJiNMk3EhZvSND+dTPUqgXJDatmkkm8P0bAxhkRO0Cs7/ApdV8Kv9Efh9Y; 25:1u3Tqj4sc6QT2VJJ/p6G70isMlwPAc6K5svN02zJChIbnCM2HkBdZR4vNFVw7C8zW08SjWnEWghIAJuo5FbzwBy4oMRJxqsro41hr9GcOC6S7s+6/7/gEx111p4+vjsSx7PHlRHohQ8OJlfEKHRr5LmppC9ELJreJ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OufkyelcX4SYeXzMeoiKl/mD/FgiL7lTgWhv4b7Yht3yDZZGxENmoXiAPG3OtJJdF3zXgxkXJugonuz35UvDovKFcF4/cmZrrgb5J0hUuVVbg41Cfbf/Wo4fi1mxjfSy4K30y0A78g4QM7GROd7EdGihvVVxcjc2xcErQD3xqCO4DmywBg9j3+Ni0+kuTA9El2Y3J7/BHep4K6zjlxWLzDvaA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:CY1PR0301MB1577; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1577; X-Forefront-PRVS: 0744CFB5E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(136003)(346002)(376002)(39860400002)(189003)(199004)(52116002)(8676002)(478600001)(316002)(81156014)(8936002)(7696005)(6116002)(1076002)(230700001)(5660300001)(3846002)(217873002)(6666003)(23726003)(305945005)(81166006)(110136005)(14444005)(47776003)(53936002)(16526019)(66066001)(186003)(68736007)(97736004)(476003)(50226002)(50466002)(4326008)(106356001)(956004)(55016002)(9686003)(2906002)(26005)(25786009)(105586002)(86362001)(7736002)(33896004)(386003)(486006)(6506007)(72206003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1577; 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; CY1PR0301MB1577; 23:4a8zvRh0key63CEo8vVdnNy4n237dzeDZ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iSc1AsFwID/za1JfT5fV96SqYzoI6cOhkewIJZBkt6nGdes5yK6mq7XFli9XiIKRFpcT80Ek6hWudWgR+ocGMMcyHwSY=; 7:/T5EcGjGOL6Zfmbg8dZMy90m3BI2QSiPsedFSYFn+YYxmNvUwuYfDPpRFln5hbnwFl1v9Gg3Mj+igP7TP4yEvW9DyalgeGMo/FYHkcuB23qDZNMSl0m4mgrcanxj8Dt5najkXiXp5FyrzH9vm8He59ddtn7Ht85RMA7VnqocMuXZNVzOU2yYAiAeuel6zu4V+pD9oSMNObQ1V1YZ1w9uXFcuZC1baVQL1wvFR01dbNsAU/I14DadQeoXlpe8/+rW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 09:45:16.0618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6022ade-eba3-430b-ce12-08d5f2135448 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1577 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180725_024530_758023_31B7EC66 X-CRM114-Status: UNSURE ( 5.73 ) X-CRM114-Notice: Please train this message. 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 When using DMA, if the DMA addr spans 128MB boundary, we have to split the DMA transfer into two so that each one doesn't exceed the boundary. patch1 adds adma_table_num to struct sdhci_host so that driver can control the ADMA table number. patch2 introduces adma_write_desc() hook to struct sdhci_ops so that driver can override it. patch3 finally solves the 128MB boundary limitation. Jisheng Zhang (3): mmc: sdhci: add adma_table_num member to struct sdhci_host mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation drivers/mmc/host/sdhci-of-dwcmshc.c | 41 ++++++++++++++++++++++++ drivers/mmc/host/sdhci.c | 48 +++++++++++++++++++---------- drivers/mmc/host/sdhci.h | 8 +++++ 3 files changed, 81 insertions(+), 16 deletions(-)