From patchwork Wed Feb 27 03:36:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 10831023 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 96E001880 for ; Wed, 27 Feb 2019 03:46:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8413A28E7B for ; Wed, 27 Feb 2019 03:46:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7838C2C7C6; Wed, 27 Feb 2019 03:46:04 +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=-6.4 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2659C2C765 for ; Wed, 27 Feb 2019 03:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729435AbfB0DqD (ORCPT ); Tue, 26 Feb 2019 22:46:03 -0500 Received: from lucky1.263xmail.com ([211.157.147.130]:53792 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729310AbfB0DqC (ORCPT ); Tue, 26 Feb 2019 22:46:02 -0500 X-Greylist: delayed 471 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 Feb 2019 22:46:02 EST Received: from shawn.lin?rock-chips.com (unknown [192.168.167.110]) by lucky1.263xmail.com (Postfix) with ESMTP id 1A0724EC8; Wed, 27 Feb 2019 11:38:07 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P24029T140137178584832S1551238684445785_; Wed, 27 Feb 2019 11:38:05 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <1cac9fb47a31af4efa36148cef5e19aa> X-RL-SENDER: shawn.lin@rock-chips.com X-SENDER: lintao@rock-chips.com X-LOGIN-NAME: shawn.lin@rock-chips.com X-FST-TO: jh80.chung@samsung.com X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Shawn Lin To: Jaehoon Chung , Ulf Hansson Cc: Heiko Stuebner , linux-mmc@vger.kernel.org, linux-rockchip@lists.infradead.org, Ziyuan Xu , Douglas Anderson , Shawn Lin Subject: [PATCH 0/3] Add hardware unbusy interrupt support for dw_mmc Date: Wed, 27 Feb 2019 11:36:40 +0800 Message-Id: <1551238603-82412-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DesignWare MMC controler lacks proper hardware wait busy support, so the software must check the busy state if the following tranfser need use data line. And dw_mci_wait_while_busy() now use busy check mostly with host's lock hold, and we can't relinguish CPU at this moment, which makes it rather painful when used in low-end platform. To solve this, Rockchip invent a new hardware unbusy interrupt module, which could generate interrupt if the state machine runs from busy state into idle state. Shawn Lin (3): mmc: dw_mmc: Check busy state in dw_mci_request() mmc: dw_mmc: Add hardware unbusy interrupt support mmc: dw_mmc-rockchip: Enable hardware unbusy interrupt support drivers/mmc/host/dw_mmc-rockchip.c | 30 +++++++++++++++++++ drivers/mmc/host/dw_mmc.c | 60 +++++++++++++++++++++++++++++++++++++- drivers/mmc/host/dw_mmc.h | 6 ++++ 3 files changed, 95 insertions(+), 1 deletion(-) Tested-by: Ziyuan Xu