Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1690548ybz; Thu, 16 Apr 2020 13:46:25 -0700 (PDT) X-Google-Smtp-Source: APiQypK/UmmESpWCeTLwH2rbMOx7EtJW+U4UqJ8O6qjdDJAw3new86tpnV/00FonHaBDoWK13P+9 X-Received: by 2002:a17:906:2b93:: with SMTP id m19mr11035729ejg.98.1587069985354; Thu, 16 Apr 2020 13:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069985; cv=none; d=google.com; s=arc-20160816; b=MHQ2e70PAgFopjr1f0sexdzi3o/xhglBqXb3q6IU7HR2xPi4PUr+nznXq8UT0qi8fh FfYBVp9uD3Hj47exV+wfKSX6cBtEPRL8wq3Z/nCwrXlKjtmenGdvomqSbzI4F3AD3QHF ZhobU3RBpXVuaazuGNvQCuOGK4c8W1ZRRv1rZJRfZmRBD7SQXpVqCXY/cEpla9+JGe9q Urpd6HYPlRJty+6AIrczEp2kEBd/IbYAOyR5P0LgA5O8eByTPLJXq5YGQKuBe8FSd1wK WMMvW5kImxCCKBBlQF0T6V5bUlq+3r1ZLpvMjVM9WG5SBxrA4oDA35VGWfwo7uzaBFvS zw2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C1S/+OwOPtKiEhvj9DA7M//jhqBwvQtvgsSI6UOLquM=; b=l6ijubNCVZNqOlxtbre7Oxhy3VWj3F/o6JJ9E/W6VsmRVv+RR7uuy9h/AMKxJDa3Sr 6DNHdtIQ2iPtJ/rgcg7qau37cJN3BtBpPYjVW1iD1MwepFc/PrXRpfYhzqE2lURWvv20 EkXiDB6JFoFIXDI2YH+iAV2fdTl0g8cSbr6XDvhqdTGPiqXbDjAUhqa3v5wAcd7E0N2i bpMGhzcwXisLxWp8RgZ9U9BilNNuK9QlO2rcnzO/bCsWBzD/p3zxbBUb0g2mjtctDXis 7QTCfVQqv1DRSe81GprCrUPZdWwelx7Dho2sGf6HVGdAZKH+b6skSOBWlCPoa7MGlbaL l5kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="CQHi/uns"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si12082513ejg.67.2020.04.16.13.46.02; Thu, 16 Apr 2020 13:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="CQHi/uns"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731187AbgDPShf (ORCPT + 99 others); Thu, 16 Apr 2020 14:37:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728117AbgDPSh0 (ORCPT ); Thu, 16 Apr 2020 14:37:26 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 005F7C061A10; Thu, 16 Apr 2020 11:37:25 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id t14so5995187wrw.12; Thu, 16 Apr 2020 11:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C1S/+OwOPtKiEhvj9DA7M//jhqBwvQtvgsSI6UOLquM=; b=CQHi/unsUcvoUVzVaipedhpVjjLOdaIJ3t70EcTJiXiU3W6QWnpO4BzU9qC5wzdMS7 NI3dBKWOPwn9LymU0i6VlQP4CQ2Q0k65AXXqCNRRR+lqoOhB8CXOAxt/4T3rvSFhruBZ JkMYrl8tbZBbfv+kb7tRnlMvmSMKmuNYVAgyMbLd2DvER+TvRsPJYIum1xuMZEvsc6Iq JX+6bTEPpwn/TWF2kB0OYFjqxnNESTZPJ+Ir5MOPavHDjVGSaYCl+VAvunsF2YdstMQJ 65GYJyvoYhmYlSJ6jMMrWr4b4NB8guNA0rJatuQAVt2clPvB5BVvHxBCJzsWBm0cDd9F PLcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C1S/+OwOPtKiEhvj9DA7M//jhqBwvQtvgsSI6UOLquM=; b=r6HqzGkynBt0EBUZpdXtnxfNUeQUogXHp7W+lFPVrew/nVHP2lP43CX2gD1lE1ncQx CmOFbSkAUbXEt4Por05JaoycQP2GpAgwsjbDZWd430RWuzTOAdYEIe/4YHScG0lKeG3O oRBisFRZZrY8PTSBfanShFEkixgr4S9gmfeA7noyGBp31e6gVmewfHE4YNLUiaqPUF/q Hzeiq0PrJxssFfJ2BmNqNADHZRYMOqucKm+0f9dPbSufy97r0Pm04P43A0LDp5M72oaz 0NP8alW/QCItEwH5Wsg3RbmD5yFASr1fmgu/Tm5+cuk5geFDS7DG3L/ytICDgoQhloIB hRDQ== X-Gm-Message-State: AGi0Pub2NsEYnGfX8um1XxYUUzssvPJLnzAj7NHmXUAqVhq1bUAIVYzF CrIkU4B/xQhsvBJ+JK2TK6w= X-Received: by 2002:a5d:4485:: with SMTP id j5mr11941530wrq.427.1587062244619; Thu, 16 Apr 2020 11:37:24 -0700 (PDT) Received: from localhost.localdomain (p200300F137142E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3714:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id v131sm4626434wmb.19.2020.04.16.11.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 11:37:24 -0700 (PDT) From: Martin Blumenstingl To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH v2 2/2] mmc: meson-mx-sdio: remove the broken ->card_busy() op Date: Thu, 16 Apr 2020 20:35:13 +0200 Message-Id: <20200416183513.993763-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416183513.993763-1-martin.blumenstingl@googlemail.com> References: <20200416183513.993763-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The recent commit 0d84c3e6a5b2 ("mmc: core: Convert to mmc_poll_for_busy() for erase/trim/discard") makes use of the ->card_busy() op for SD cards. This uncovered that the ->card_busy() op in the Meson SDIO driver was never working right: while polling the busy status with ->card_busy() meson_mx_mmc_card_busy() reads only one of the two MESON_MX_SDIO_IRQC register values 0x1f001f10 or 0x1f003f10. This translates to "three out of four DAT lines are HIGH" and "all four DAT lines are HIGH", which is interpreted as "the card is busy". It turns out that no situation can be observed where all four DAT lines are LOW, meaning the card is not busy anymore. Upon further research the 3.10 vendor driver for this controller does not implement the ->card_busy() op. Remove the ->card_busy() op from the meson-mx-sdio driver since it is not working. At the time of writing this patch it is not clear what's needed to make the ->card_busy() implementation work with this specific controller hardware. For all use-cases which have previously worked the MMC_CAP_WAIT_WHILE_BUSY flag is now taking over, even if we don't have a ->card_busy() op anymore. Fixes: ed80a13bb4c4c9 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") Signed-off-by: Martin Blumenstingl --- drivers/mmc/host/meson-mx-sdio.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index fe02130237a8..2e58743d83bb 100644 --- a/drivers/mmc/host/meson-mx-sdio.c +++ b/drivers/mmc/host/meson-mx-sdio.c @@ -357,14 +357,6 @@ static void meson_mx_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) meson_mx_mmc_start_cmd(mmc, mrq->cmd); } -static int meson_mx_mmc_card_busy(struct mmc_host *mmc) -{ - struct meson_mx_mmc_host *host = mmc_priv(mmc); - u32 irqc = readl(host->base + MESON_MX_SDIO_IRQC); - - return !!(irqc & MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK); -} - static void meson_mx_mmc_read_response(struct mmc_host *mmc, struct mmc_command *cmd) { @@ -506,7 +498,6 @@ static void meson_mx_mmc_timeout(struct timer_list *t) static struct mmc_host_ops meson_mx_mmc_ops = { .request = meson_mx_mmc_request, .set_ios = meson_mx_mmc_set_ios, - .card_busy = meson_mx_mmc_card_busy, .get_cd = mmc_gpio_get_cd, .get_ro = mmc_gpio_get_ro, }; -- 2.26.1