From patchwork Tue Sep 3 14:21:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 172794 Delivered-To: patches@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp5641257ocp; Tue, 3 Sep 2019 07:22:34 -0700 (PDT) X-Received: by 2002:a19:c14a:: with SMTP id r71mr20111725lff.55.1567520553969; Tue, 03 Sep 2019 07:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567520553; cv=none; d=google.com; s=arc-20160816; b=IsUMzMeVYAQsxra/oeFaAQ7LzWa4dVDr6OP5Ms0wwhmYaf2fal5lQocSIA2WWH3o18 mOXR/g/dHg+lzmccxg9h0VEF069GKYVYC2bPOnjQZX06szW+j2I52ih5qscibF//j+UO Yywadgq81+mCZhWnvvS5FFFJ+G5hGSHs5FZqYYlDNJ8xF0CXOYKX5Ta9JelQDSoNZ2GQ hneh2Rx9DNc0wBHEVZErfCXPJwZCqBgeCd6uZGZofC4KR2eSYAgv7LQv2uZMoscKUgP4 4XzutTHHkKgrtfE1ORGCRD8WyIUzjUau2mO2s/7Hs1q5UeRp+Or/pWwXdSQXqANlq8ew h4rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=jxeGFOcZojq09mDU5ChwaMdlo1ENQtr/dK8PzPkIcNw=; b=vM0nPDIKipSVbGFGqsVOMDBR8vEIKE9w5wgCPkC0iXx4agFch28qdXeIwAq9QHl1Q3 enNQDKlrf6VPgSMPRjnzWTrD9DEq6fTAubyJ6omLxHXrBKHJm4UXu9fw2RBNBFkcfubM BxAFbLafggdnJQiqGVppFKLI+mBZ4y3+KKxxNr+gVMex8Wt+O2slIMHjaUW9ihOLKqLJ l4JapmPphWn7iHEKPsZtQsjPPrgyY/GcQJ4dCHApVfmmuowva74zxeYHNRLjAJ1aRiOk 51GIspWCBbPVn1TjVqBgMyYBUVhUXESnyBzeB4C198JfgMl8WyGMz2AoLFx2ICPAfbGX FEWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kOUvGuZP; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id j7sor4883888lfk.13.2019.09.03.07.22.33 for (Google Transport Security); Tue, 03 Sep 2019 07:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kOUvGuZP; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jxeGFOcZojq09mDU5ChwaMdlo1ENQtr/dK8PzPkIcNw=; b=kOUvGuZPDWhYmoFZ35uZfgKof779e/mNRWaIlCuKoDc0z3PMHRNxbDGTHBXqZz/2iX OSKysAxrn1xT+ofGb+IXLEQgvcNF0k9/Tn7YqJc2ZYwjSaGQl4RkDUQjiBAfnJMNUOV4 iE1GyRugTEu3VYfJInaXRoeFiej1bLSQBZ7NBwz3WnFC25vDBmuusqNYItGjFwbLtlDX aqgKGQ0I/2WguqVVqp2ALpPELYXObaA8Vz/6M+j1xt6Vy0ulakacsE45tKyvIQQhOpjE zhMsdp7RQhJE4lJaf1MYw3tzhQumhHZbkTP21KOW3EmBVEAwibHTnZ+dhArKcBLzP8Tg nQCA== 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; bh=jxeGFOcZojq09mDU5ChwaMdlo1ENQtr/dK8PzPkIcNw=; b=rdFc0p6BWbV38IVX7klXjaUPinKgNNCo3oaACT4ex3vnbQFFjzLFvgLKoFLU1zFEt1 WnJ3H5qydPCk7jnPoYtbIZHU5oHvtyuRLOKJqt6SEoISM3oXsYIupp7U08lnXXh8ayWy bJlLaDTdUzkVkLu8E1u2M8WOaWY2+dCuE2Bi142rXAJ83eQKg+Add9C4j6yiv3JXodR0 A7DzUpFwScKe5nY47KuItFhQV78d4wL6GY8iXf9ij7xlDRkxFNi8RGKPBtZDX7SZ8uo6 4RTj+EAOlU2ThI138ulIc5juM5/3kclBIkmthK1B6pT5PQxuXJscVDPch6a85abdQCCZ xgEQ== X-Gm-Message-State: APjAAAWS4YE6Ora0uC7mpjGE09AVTbNjTlEjewhIcwHeO8i0bn8rfsfK Zkj2E4df5mcxJGw13ybIbINSrM0xWVWhWA== X-Google-Smtp-Source: APXvYqw8xc5Srvx7uVIgZ6CAWg48jVMdxECIPClJ1jocPjMMn6ha3+WY+sH6SwYYQ8AJcdr0Js7Fsg== X-Received: by 2002:ac2:5dfa:: with SMTP id z26mr13175013lfq.37.1567520553527; Tue, 03 Sep 2019 07:22:33 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v10sm2430862ljc.64.2019.09.03.07.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 07:22:32 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Shawn Lin , Jaehoon Chung , Yong Mao , Chaotian Jing , linux-kernel@vger.kernel.org Subject: [PATCH 00/11] mmc: core: PM fixes/improvements for SDIO IRQs Date: Tue, 3 Sep 2019 16:21:56 +0200 Message-Id: <20190903142207.5825-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 The power management support for SDIO cards have slowly been improved, but there are still quite some serious problems, especially when dealing with the so called SDIO IRQs during system suspend/resume. This series makes some additional improvements to this code in the mmc core, but also includes some needed adaptations for the sdhci, the dw_mmc and the mtk-sd host drivers. So far the series has only been compile tested, so definitely need some help in testing this on HW, which of course would be greatly appreciated. The series is also available at: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdio_irq_suspend_next Kind regards Uffe Matthias Kaehlcke (1): mmc: core: Move code to get pending SDIO IRQs to a function Ulf Hansson (10): mmc: core: Add helper function to indicate if SDIO IRQs is enabled mmc: dw_mmc: Re-store SDIO IRQs mask at system resume mmc: mtk-sd: Re-store SDIO IRQs mask at system resume mmc: core: Clarify sdio_irq_pending flag for MMC_CAP2_SDIO_IRQ_NOTHREAD mmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory mmc: core: WARN if SDIO IRQs are enabled for non-powered card in suspend mmc: core: Fixup processing of SDIO IRQs during system suspend/resume mmc: sdhci: Drop redundant check in sdhci_ack_sdio_irq() mmc: sdhci: Drop redundant code for SDIO IRQs mmc: sdhci: Convert to use sdio_irq_enabled() drivers/mmc/core/sdio.c | 4 ++- drivers/mmc/core/sdio_irq.c | 57 +++++++++++++++++++----------- drivers/mmc/host/dw_mmc.c | 4 +++ drivers/mmc/host/mtk-sd.c | 3 ++ drivers/mmc/host/sdhci-esdhc-imx.c | 34 ++++++++---------- drivers/mmc/host/sdhci.c | 12 ++----- drivers/mmc/host/sdhci.h | 6 ---- include/linux/mmc/host.h | 10 ++++++ 8 files changed, 75 insertions(+), 55 deletions(-) -- 2.17.1