From patchwork Tue Jun 18 15:34:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167175 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375277ilk; Tue, 18 Jun 2019 08:35:02 -0700 (PDT) X-Received: by 2002:ac2:514f:: with SMTP id q15mr12878513lfd.145.1560872101740; Tue, 18 Jun 2019 08:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872101; cv=none; d=google.com; s=arc-20160816; b=gSkjoYWyiZ6O0Tb319vNfnmhmd9eeoV9LFn889zto8lMrNPhvL7IyAD/YxkXjgmyfR oOlESa+a54XmDjxu2SIog7x/uTpo2eiH4rx7weE3+c4Ks/C4a7uTncaNfjQwAwcKQCep zZw1rVZLwMrqfIYO1GlC+h4oDNkslqdgMn/F88IA0eHc9FZjwu5YQMC07sOlwKP1NDuM m6+vMwB179i250aynfUmkJBHjMMJAtH1zgCIdjMY4zRuphAeYXPIz5aziPBflTmElzjH 9Kil9lifRxCTlO8rNdh+euwAu65lZz45spcaMHcgMoLmVtOD5n0EVP/5GyWaj/7jv83e vgTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZXFe8l122poOCFrcN8cZI3D2EE1Nc366dY+GJ8RNKw4=; b=J+6EA956+n6K+6sIA+JBep8FxS89r1hSjKeOtfghM31HQ+ESHOui5j8a19EGHyeJpF W4SshTMNgWPJbiYBzjtKwga3FwbrrbxiB9lY4mRHwgCjXMVOF2PZroA+cJaqFXk07Qcy H+4skLMeWlXlIrEKMnnzDp5TCy+/9Dybh3K2lGoZ7l9+ghbwF/9DVo55R4CcQceJCytP 4BgNLidziSQNC9YfPCQe1RaKYVAKEyYRaLtq8Abdiy4nTM38TK20BLslQ5na2lYtn4qb 5hRiZRcVOIHUAJfvLrg8AhET12MAl4JsOjO3HBC9IRzaycg3Jso5Bkuqc6D89ikrRJRF Cq+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VBR0Zcst; 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 x9sor3858177lfa.69.2019.06.18.08.35.00 for (Google Transport Security); Tue, 18 Jun 2019 08:35:00 -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=VBR0Zcst; 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:in-reply-to:references; bh=ZXFe8l122poOCFrcN8cZI3D2EE1Nc366dY+GJ8RNKw4=; b=VBR0Zcst/y6Zg7oIQ4mCiOZS9J4Gla0OUrgxhrMyHzEX3xyIlkxoYPJ5WnVcOwRdPe xWKodz+F4ubwZAi3LVLAOmbh3sGvqYCT4fb7hu9NqFdIV8folFmY/Iw2nC4vj+54N0DQ 3rhY0tHUiuUUPz7ADBDPvIzCWmjyiTTvPnzP5PYVyo8DOLizYbCzaRYXvaKR3Jds24pY 83Z6HVJhtk3eDVKic08lSLmasQr0e3102/hWgIOKrkdAMHO6PgYjuDAvRZJs9o6iJFSR mcjHJjyR26i8a4mjI/ZXNE4cTrnxyN94674N5liojrdPmAoewMaZorggNXMMnPNLjTDh EVRA== 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; bh=ZXFe8l122poOCFrcN8cZI3D2EE1Nc366dY+GJ8RNKw4=; b=hJ+zgr7ouu0HhfEaISSprLYZLaYuCf8ZE2Hf2nrPKzB46JScscoyNe4bE/8pKQqCMi 7WAUX49U6479GFYGdSf7ZmpvYo2cEwf2t0hW8TJKoVmo37eV/OjmAY7O+0XbmCDBHKQa vtI0AnLIqBzW/h7NInv758TzJSxGpSt1U+8SUqahroXMCrXwA8yvS9Q7YHfbehUnofPE Wt3xS2Eap9AfF1WMmWW+nLvpZixtYsEbr3rsy9XXRINKbO5jHbxXL0kF/pk8EalXd9+k X33P9dfPwIIVJSSSTibzHVMT4TkIvI/d0QX/blRAxDeRryPKUl6t65j7pTniaSS9VZcd yEFw== X-Gm-Message-State: APjAAAXrZZH/WTl0bLs/r81sCqr7M11eym8mAOx0k3bsWhurPgpAThsA U5uig5ipvNg19quOmaJg4sBXXmjt X-Google-Smtp-Source: APXvYqyOREFdkP4FC4HW7yzVMISId5ZhI6EQ+UQ/bNuv27HzdT0y6uvxlbXF6tdziRwwwuG91a5bpw== X-Received: by 2002:a19:750b:: with SMTP id y11mr21457683lfe.16.1560872099899; Tue, 18 Jun 2019 08:34:59 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:34:59 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 1/7] mmc: sdio: Turn sdio_run_irqs() into static Date: Tue, 18 Jun 2019 17:34:42 +0200 Message-Id: <20190618153448.27145-2-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> All external users of sdio_run_irqs() have converted into using the preferred sdio_signal_irq() interface, thus not calling the function directly any more. Avoid further new users of it, by turning it into static. Suggested-by: Douglas Anderson Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio_irq.c | 3 +-- include/linux/mmc/host.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 Reviewed-by: Douglas Anderson diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 9f54a259a1b3..0bcc5e83bd1a 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -92,7 +92,7 @@ static int process_sdio_pending_irqs(struct mmc_host *host) return ret; } -void sdio_run_irqs(struct mmc_host *host) +static void sdio_run_irqs(struct mmc_host *host) { mmc_claim_host(host); if (host->sdio_irqs) { @@ -103,7 +103,6 @@ void sdio_run_irqs(struct mmc_host *host) } mmc_release_host(host); } -EXPORT_SYMBOL_GPL(sdio_run_irqs); void sdio_irq_work(struct work_struct *work) { diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index ecb7972e2423..a9b12322c775 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -504,7 +504,6 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host) wake_up_process(host->sdio_irq_thread); } -void sdio_run_irqs(struct mmc_host *host); void sdio_signal_irq(struct mmc_host *host); #ifdef CONFIG_REGULATOR From patchwork Tue Jun 18 15:34:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167174 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375271ilk; Tue, 18 Jun 2019 08:35:01 -0700 (PDT) X-Received: by 2002:ac2:494f:: with SMTP id o15mr29979365lfi.84.1560872101707; Tue, 18 Jun 2019 08:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872101; cv=none; d=google.com; s=arc-20160816; b=0h37ZBpjS04T44ZRTm3JxrJr071C50Y5Kxp7At1dQOdBhQJAbRCBshs1hUfdMZ05+P mSUjmsdnztYPnncirnsp+Ms6r2ttA2hhpOWBFdF7FjqeIJN788jE3p2Oe6QBWiUS62Za ZmcZ8BfURJV9d/bVJ5q2xHhtwHh11EcOuOhJD8hvHcRnpasypSTu/qxq6R3WKJMcEWND OI7XT2PrmM/76lGeViRMIX+IXfZ91o0gY3vDK9cK2J7ALUOaxXyqBRm3uoVb24gW4l8G vj6vCJ1zKi9vvQcUfFdlyBU4lj2sDWkZRRIXXeeZk/AdwT/tbMBtanaB75or0uVWL573 LfMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DYh01G4YOAJJOYFXYzW1f6GX4EFwB2UrYsYuTpn+ycI=; b=YsUeFDLF/AIFHxJF3TiZehlYYwZs/tYGj9h+sZ1TPrAH9R2yCmbUCs4vrCHFr6ackU makOhP/DTrgT0I8Zw84PnZ+bOO022oEJZOzqBaWSn6P1GQyEtMAJz3g3koYkLRBNPlQp pTGt3XU2oQNlkooLiZgYlRcyERgSfbTeUy1t4okIErxVdLqYtxZLXuR8lQHqgYX6Omdn eReg8zdgYx92CtegzA3CcL6XL8tN+Eqsht0KehQsc3KCUOZgPSowaQdpJ1iU8WOju9Cm 8u6J/IN994D1tnpVppixGy3FO3Vn+Ryj2psS7tNdl7pqd/9W4Ar3YOWdpstmdkXX46Ry kKvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J/MtpnCD"; 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 y17sor8353456lji.23.2019.06.18.08.35.01 for (Google Transport Security); Tue, 18 Jun 2019 08:35:01 -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="J/MtpnCD"; 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:in-reply-to:references; bh=DYh01G4YOAJJOYFXYzW1f6GX4EFwB2UrYsYuTpn+ycI=; b=J/MtpnCDLrtQ7KxlyDUgTAqGs3KuQ/4fJwmuU8bU6mB5r9cAat/xZ/DKkI0M65UMB9 rVcQ5kQBHCpqxA7pFi8Hmq9WF9Gc2q8U72goWwgVUjYR+tHFCwaeCZc5eqrZjnyTwpRT HER9nQ5mOeTG0OvpVhqWZE3hf2FRoRbytTwWhMuNamB6rZ4htlVyPNtZGy4viwbHYAep pA95TU5DbmdQDKXLH4BfELfKI6DGVW0dB2YOzhcNy6BE41rEl+NNPmmrnHbqfl3cOvMG uvzzgko4/X+koH4dR/TvAzwwshOh4rP6+cY5dTximIpVpbFfRAQ/lwMDWV4N7OAKzHk3 miJQ== 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; bh=DYh01G4YOAJJOYFXYzW1f6GX4EFwB2UrYsYuTpn+ycI=; b=Rnckubfzw/LmRhtvaHDjFDCpoCogHFoVYCApX47vQ9CSZ4KPy0MBPNXi9LR6HOLHnR PtHjbEYtCXu801lZzSV7qUUaFkaVeia82RrY2FtcUYkzbTb0nQO9a9GBnVlKBiiMlpPx SI/hOuaZ2tiyR7ooEKb/EKMNxNZ9HU/KQ4y/aqKCXm8oftFYwOLI1Th9w4zsPlmsI/E2 LgjktC4tXeZ4i2ZH7Ww77qXvPEt8OGImY+35MRcoWuuC+szfFY2ZU4yRhiJvSZB+usES q7ER3Me0xPEwnxQCOQCqdsfmd7KlcNKVIXxdoCULmAswQWBz2p/YhWecRA1Y8Ka8YSoe tiHw== X-Gm-Message-State: APjAAAXXVUrjzZo4CqNBJesODsKdmqGsreRJ8ZGdokMK2CF+0Ro5WpBR v5d5Y3D+cKyBU50dLIOpQu5x21PV X-Google-Smtp-Source: APXvYqw5trtqABkhMNMmqPOkzUYmnAODdHE+SClNusmc+GT7Oc0Wvq4MM6vIfnYuKJBTztnp3HM2fA== X-Received: by 2002:a2e:8650:: with SMTP id i16mr14898729ljj.178.1560872101420; Tue, 18 Jun 2019 08:35:01 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.35.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:35:00 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 2/7] mmc: sdio: Drop mmc_claim|release_host() in mmc_sdio_power_restore() Date: Tue, 18 Jun 2019 17:34:43 +0200 Message-Id: <20190618153448.27145-3-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> The function mmc_sdio_power_restore() is called either from mmc_sdio_runtime_resume() or from mmc_sdio_hw_reset(). Both callers either claims/releases the host or require its callers to do so. Therefore let's drop the redundant calls to mmc_claim|release_host() in mmc_sdio_power_restore(). Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.17.1 Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 712a7742765e..b3303b7d9956 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1030,14 +1030,10 @@ static int mmc_sdio_power_restore(struct mmc_host *host) * */ - mmc_claim_host(host); - ret = mmc_sdio_reinit_card(host, mmc_card_keep_power(host)); if (!ret && host->sdio_irqs) mmc_signal_sdio_irq(host); - mmc_release_host(host); - return ret; } From patchwork Tue Jun 18 15:34:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167176 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375312ilk; Tue, 18 Jun 2019 08:35:03 -0700 (PDT) X-Received: by 2002:a2e:88d3:: with SMTP id a19mr22028182ljk.32.1560872103258; Tue, 18 Jun 2019 08:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872103; cv=none; d=google.com; s=arc-20160816; b=gytYUVKh32e4jeLofP9sowjCvzGl5c1cTZ+bmvuYTGBgfWz3fy8tRaHg2++m32Be11 +Q5Efy+bEn5S7ystVRIU3+/unhCvMb2SBPc2fR0Og8GZ7RcIuT/+gsr9xbaa7qAbtyFv JVra5nDCOi99G3HDGuJ0G239LxZBVBs9Plj65E9fRKzC+zzixev7DJd4aOgXcjhFW9cL SJ3xz8DIPNmCnuwHh2PlpguFYkcvQQrbL5gWV/2e1zIosjJq8W47TLjf/3HXV69rwgv1 XXEBmUpOeg89oioKNbJDeseQaT0LNXkKZ9gAVmHpOJaMkgLfEYJRSLHF7eLhBNykSO3p rNqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=c5yGWy1zg49aN6GRQcjrcvmt09k7bH4XaHWBtn+q+0o=; b=daKQMsc9LLvp4ifOrX78UrnDskBn8f+pJ57CS8OoxpGkTQpyKxRQHRjR1z8LIOKJnG czkkQrPjysVKVy9j6TRq7FCjJZlhOAzMczd7aBYRlRD0BMfEyT9Wyw7Ee3YrD5tzJO93 /ZiEEVkUEStnqOGMhJNWMUjq4B2kik2+nBtpSiFUbHqvDgyqriQjDZbhygc7PSRGI7nZ S+cZDprp0OZntbtDbMNcLK8+w05AMyxdpWR2pKG7+2k33cAVD6YqfthSESpxdIF9vWcf S5BDMz9TjRYv22y+wmVQfd5cPnoTXiCYsYDYtfAddIGhkOhv+5aNsbp4C966ciIuTW++ vs8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AWfQY563; 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 g5sor8377290lja.9.2019.06.18.08.35.03 for (Google Transport Security); Tue, 18 Jun 2019 08:35:03 -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=AWfQY563; 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:in-reply-to:references; bh=c5yGWy1zg49aN6GRQcjrcvmt09k7bH4XaHWBtn+q+0o=; b=AWfQY563Cs6uiHCgDXOpnzfIB2jQtUS5c6tpfPq29tpIfFizbAppk6XyIVk2RMlaTd 7+dC5QsO1m26GUKss71/vufkrvTa6mefUC9SVswE69DbA/qjMljtULHmdahqzG12tD/1 gDjTojlfzA35GC0wJPOEF0fo4LyRhD5Ttdnadxgih0SlfJMLCboztBD/M7oDADoZ46HC azW0fOhpOhQVB4ow/QQzNqLmMwZEH7wSDnHVahmgI/AZMRYqz33g7YXzQlhWJe1851Fd fnntnOxtg0CfuKdvljr5cRxXgbrTHeMWI9l4VDnkqPeFKNfZgIlgbR3wWEtKXqlEdW/5 b8YA== 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; bh=c5yGWy1zg49aN6GRQcjrcvmt09k7bH4XaHWBtn+q+0o=; b=OfKfmqlXUKnvApsMoifN7gqckeD6jQWt/RO/wHDA3ViJLmRhJycE4wKfNJsm+Df2r9 lsZa7TopexaUzw6kNciszXMo4gpw1g37bOyBeZORPrTLHqEbPwtOeDz0YWZ6xQXZHDO0 Q1AKQu7qJk/zrK4UUWgGnTVnxqBf1J5qnD8pkxVyogxSEE9GoFVWF3SQ2z0P6wH23RGZ W4XYoo67xfYzMAoSYAHJEaEYMhxb8zR5S3EY7E3MIK8NSOzR/xMBOorFIzN94DltohZc Pw2MB2Nw1uu5P70Zfdt9Wa+WCV9uRWhjusivCV3/83HLF3mBtW+9SCyqlJoK5nbwE2kc zuzQ== X-Gm-Message-State: APjAAAX0YJqGEQ2XYWQvu0CBFfdE9oG/yD39+savZ9euOtsaVYRoh5GJ SgYvkC0n9B5nLvhXg7dhVg9Ni0QH X-Google-Smtp-Source: APXvYqyWp6/pWGfLpGS9IcidD8xSifQetpMr76o4NJS07T91XQmhf98xQaZZrtNOcwj2DZQia2ZQng== X-Received: by 2002:a2e:9198:: with SMTP id f24mr17460634ljg.221.1560872102934; Tue, 18 Jun 2019 08:35:02 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.35.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:35:02 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 3/7] mmc: sdio: Move comment about re-initialization to mmc_sdio_reinit_card() Date: Tue, 18 Jun 2019 17:34:44 +0200 Message-Id: <20190618153448.27145-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> The comment in mmc_sdio_power_restore() belongs in mmc_sdio_reinit_card(), which was created during a previous commit that re-factored some code. Fix this by moving the comment into mmc_sdio_reinit_card(). Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index b3303b7d9956..29f86c1e9923 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -820,6 +820,23 @@ static int mmc_sdio_reinit_card(struct mmc_host *host, bool powered_resume) { int ret; + /* + * Reset the card by performing the same steps that are taken by + * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe. + * + * sdio_reset() is technically not needed. Having just powered up the + * hardware, it should already be in reset state. However, some + * platforms (such as SD8686 on OLPC) do not instantly cut power, + * meaning that a reset is required when restoring power soon after + * powering off. It is harmless in other cases. + * + * The CMD5 reset (mmc_send_io_op_cond()), according to the SDIO spec, + * is not necessary for non-removable cards. However, it is required + * for OLPC SD8686 (which expects a [CMD5,5,3,7] init sequence), and + * harmless in other situations. + * + */ + sdio_reset(host); mmc_go_idle(host); mmc_send_if_cond(host, host->card->ocr); @@ -1013,23 +1030,6 @@ static int mmc_sdio_power_restore(struct mmc_host *host) { int ret; - /* - * Reset the card by performing the same steps that are taken by - * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe. - * - * sdio_reset() is technically not needed. Having just powered up the - * hardware, it should already be in reset state. However, some - * platforms (such as SD8686 on OLPC) do not instantly cut power, - * meaning that a reset is required when restoring power soon after - * powering off. It is harmless in other cases. - * - * The CMD5 reset (mmc_send_io_op_cond()), according to the SDIO spec, - * is not necessary for non-removable cards. However, it is required - * for OLPC SD8686 (which expects a [CMD5,5,3,7] init sequence), and - * harmless in other situations. - * - */ - ret = mmc_sdio_reinit_card(host, mmc_card_keep_power(host)); if (!ret && host->sdio_irqs) mmc_signal_sdio_irq(host); From patchwork Tue Jun 18 15:34:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167177 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375382ilk; Tue, 18 Jun 2019 08:35:06 -0700 (PDT) X-Received: by 2002:a2e:9b81:: with SMTP id z1mr173482lji.101.1560872106562; Tue, 18 Jun 2019 08:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872106; cv=none; d=google.com; s=arc-20160816; b=s2ggR9DJ3bJ54TIkZRAqSI9iUQkDh1RU32NAYoE8aHEz75YBHQ1DVbYZuNJuNT6DNA giLXBUGPliZnyY2n/i3yRjqWyT1XtLRZnxFAcP/AebkOM0amevwF3M0uIO0LhAwSE8bt Dz3/CpcJO3mERQ4/BmfEsLpIm5lEFU/aPDH70dv1lNw98ZFSBEeFPDCfntZz5hnBrXqY odovuZ3wMOErEbO9F+2JKj2al/kElYwl6JQtTI1x9aIs1RTBZMGt5gsfVyRajo0AgLub ncc1dtQ+9H8v5Aygx5jvPjIAC1QvQ0sIMm2kAbm9etQlhPYN5k0Q2bJ43K4s2yFdaTnR PVCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Eio1rBJiXbAWHfP/5yZZpxExzsuzz/VQXaABMKwUz1s=; b=EYkHZaQJ/XIVdYfkMjpbPDVi8dOIMOHb+Ab4Fa8cZAgb9JiM8CS6q0m3tsDbZujq7c YwwUuX4SFLe9cG/v1DuAQXH+hJrpXSFHrSOxHn5gxax+xx/MZmiP26GZMlMLqspbqqp0 jcKWysTMKw3c5u2sEhv4Nz/Oysu76paSs70eRpwrR37MiI5++AiMxdlRSjJK2Yng1Omq HMqWS4SzadSXg2tLPoFEPGLNJ0ZTc9FOxb63zQnOK038MEh6FhyGW1zSy7DQWUsXAuN1 cUp0zuoreIS+PC9sE/cIBppk2LMPFjO1oc+4clXqk/cLx18sLnvbjB4mDTJzazBs49VE z9fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CiqtmVs1; 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 v9sor8388868ljh.19.2019.06.18.08.35.06 for (Google Transport Security); Tue, 18 Jun 2019 08:35:06 -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=CiqtmVs1; 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:in-reply-to:references; bh=Eio1rBJiXbAWHfP/5yZZpxExzsuzz/VQXaABMKwUz1s=; b=CiqtmVs1O7WUxp0c8LA8vVFi4qYer4R0mJQ/igwJV1BCqNCUcI3fnHmGOwSWK2B8DO 3LPIA5GtovHe+mPAlWVq5UPetkOcLnPBbJIq5Jeh1H5reB9bsKo5XVhFeMF3jjMMDwRz TcxXSwb0sUixM+eACxy+1EYpLJcuO51RPho+zAgWk1vmY+U8mXukv09+lEwH/gZmpTRd 2NAfdT36kfBdwVhrRcBF+OsP7iWKNGeOW/Lv40rY+/75NrUEU79o5AT5CYQ/vHpOeoWd sj8ARY1ChBP2ul/qBWMT0A2yRbHl+jZx9biXecU1Hp1A5uXlWqq5nznZFHH0yY+zmGks FB9A== 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; bh=Eio1rBJiXbAWHfP/5yZZpxExzsuzz/VQXaABMKwUz1s=; b=FvccijNlub+SGcLtJmB67CKJ0EZ7T8BGJ1GTqjfl4uvBtViprfU95rvK9BeO15OULx pWHCldd5vN0u7+H5y5DKx6vhC70NMi3jmUfvR0TTf2gGAVCvkNqQbzj3UrF0mFNAOK8z CkLB5HfB0kZOqljOVTXFV6UTQlyul6H1abjuqPzZQeAp5nqIQOVsxiL6nq5nhccl+M6B HnC6dSOveJ5U1kuLYV/ysGgoiBCCxol+kSiWH7pLvum8Ot4JeWJoY/ebi6dNcruHbLKE vEG4iIAOJIg4+dL7hIQS+K6dyeMy1+qZEpMMZ8kuLA3dgg6jyONttShUhf89jLRnavn2 VoJQ== X-Gm-Message-State: APjAAAUI/KVBC9ucuOzawOcmhLgTsHS9FJiaHWB2/POH68V7QPxnkHRi rCYBgdnyw9ZzTMIy2pFr6ZIBNktT X-Google-Smtp-Source: APXvYqzDLTL4QE/CEhY3P6VAQOmWh2YCo3YYWY667+/MrWCmuTWHUVHLgfW4j2uiZywQJ56lw5myFA== X-Received: by 2002:a2e:9997:: with SMTP id w23mr30443359lji.45.1560872105883; Tue, 18 Jun 2019 08:35:05 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.35.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:35:05 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 5/7] mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume Date: Tue, 18 Jun 2019 17:34:46 +0200 Message-Id: <20190618153448.27145-6-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> It looks like the original idea behind always doing a re-initialization of a removable SDIO card during system resume in mmc_sdio_resume(), is to try to play safe to detect whether the card has been removed. However, this seems like a really a bad idea as it will most likely screw things up, especially when the card is expected to remain powered on during system suspend by the SDIO func driver. Let's fix this, simply by trusting that the detect work checks if the card is alive and inserted, which is being scheduled at the PM_POST_SUSPEND notification anyway. Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.17.1 Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index a9bfcae8db5b..945416c53b56 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -982,7 +982,11 @@ static int mmc_sdio_resume(struct mmc_host *host) /* Basic card reinitialization. */ mmc_claim_host(host); - /* Restore power if needed */ + /* + * Restore power and reinitialize the card when needed. Note that a + * removable card is checked from a detect work later on in the resume + * process. + */ if (!mmc_card_keep_power(host)) { mmc_power_up(host, host->card->ocr); /* @@ -996,12 +1000,8 @@ static int mmc_sdio_resume(struct mmc_host *host) pm_runtime_set_active(&host->card->dev); pm_runtime_enable(&host->card->dev); } - } - - /* No need to reinitialize powered-resumed nonremovable cards */ - if (mmc_card_is_removable(host) || !mmc_card_keep_power(host)) { - err = mmc_sdio_reinit_card(host, mmc_card_keep_power(host)); - } else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) { + err = mmc_sdio_reinit_card(host, 0); + } else if (mmc_card_wake_sdio_irq(host)) { /* We may have switched to 1-bit mode during suspend */ err = sdio_enable_4bit_bus(host->card); } From patchwork Tue Jun 18 15:34:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167181 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375467ilk; Tue, 18 Jun 2019 08:35:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpHofFxVL3Mw3nA5Ts+Cih5oo3gc8nRpj1Ng977Xkz16GmeWZ5TAJLkWYCGZUQvoJDkygU X-Received: by 2002:a65:60d9:: with SMTP id r25mr3243171pgv.228.1560872111047; Tue, 18 Jun 2019 08:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872111; cv=none; d=google.com; s=arc-20160816; b=gdLVHBk4x0U3Km+RweWXwRB9TLf9RH7T97xR0Qcsxhzxi8g7S82zpaCyGVDbkkZpaq hd1cj0/N60fU0GkCZmOg8ea71o4VJqQpy4Q0zZwr96bVzZcmOldxP2zoqXvX42uuw2RJ HHXNS6tbtMXldhX4I7piZ3R8t+gzrhU6uvBy9/PV60gSKC/iC9E83374EYJHucPpxzxL zTifHbq7kCsJKa7mqDJRhOv4g/iL0ZPXAvaffAWXE9OeP6YVl+FfqCEdekMgHJnWWCJW uBKpcGKXQtlkXjqM/pcff59Zu3fWaqlPSPiAigg7KHiMP7XtAYd2WsPlPJEAJaUujSFg cwPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=esuXjtqW4uUKLJzIZfGaOG3mfIeuD1RYtSgNoLM7wQI=; b=zIRaThZz/PC6DkL3mdJAQ50KAxU012GMvsSb4WcGziwLmHdcyJsQlx/ugTuAr05uJ/ X3VsbrtTghn/Ouc6ez6ww5WS0h/R/9CT3WBNjOSjSfIWTatqRRA8audNT4iOfgodKhDI YETPnDMcZdGrEcpfC6GReQZuXYiZsAFY48BSsVTxmV/K05Ih7TXNg2UXBovCjHAE0qKd KnzZmRpbucGH+oAW+4t2Z8G/cjrBj8pxfN4hMku3b1Jxg1JL7R9fQ67AaHqP3YZ3sJIo yjn+8fYVINIw2NIMLpp7mAmD9VobV/ZK6v6okD3G/LTsWfmqMMkw5kUK8pppl3RpTjaF awEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbu1o1Zd; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si13551783plc.132.2019.06.18.08.35.10; Tue, 18 Jun 2019 08:35:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tbu1o1Zd; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729272AbfFRPfK (ORCPT + 5 others); Tue, 18 Jun 2019 11:35:10 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37592 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729701AbfFRPfJ (ORCPT ); Tue, 18 Jun 2019 11:35:09 -0400 Received: by mail-lj1-f196.google.com with SMTP id 131so14911ljf.4 for ; Tue, 18 Jun 2019 08:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=esuXjtqW4uUKLJzIZfGaOG3mfIeuD1RYtSgNoLM7wQI=; b=tbu1o1Zd9clAqV903WpQWYeICZSQRtZDs4H7OVK9VyaTFqToYWJlF/kdv1qtyf+gTm HLfE13sD46FlxWNViy5vu/o1sQwXqVlA4tcHSu7qJ3v78Sw0NMDTlBP+q6870RGOqhGR Q5hMDdhjWXBX5T1ShnsUPaouX+8VWG2kzJwQepTbaPEMw7mubSy2SkjLuyA4bYYTlF+B A2ThCYTnSd8MqrYRlnJewRkh6ABvjOfdzZVtaqCa2ejuZ0Tss52HfLky1AhjaX9YQzJY GHyZZJXNckhFYDA0//onqdJnF1zar0IDTBnCQaIYuPZzRAvTDcG1jmqFlVUMpFZ63IUN 5IBw== 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; bh=esuXjtqW4uUKLJzIZfGaOG3mfIeuD1RYtSgNoLM7wQI=; b=etgYDrXkGzQ0bj2oqNGNS7fLSidBCLC+Vy3GcOGidzO9yPGhaQRITBAbAuC0LV1W2K izOwmGVBtDHHhL7iS6rHj+oajJ1dIAqS+P9yiMH3/VvLy0KLTax93BF4fxY2FHjejnt8 omjyZTaWNKfKof1/wxMY/OpukmpTvoxZnKzBm5hSFnidGpJJhPqyC2125RAwx/ozeqYO wJmNximZv+o+OcN2dZNMw0zQdme/MPAFmyLtaYR0J6SYfgwj7pQ7on9sb3peq695n1PH VlKnL4/hmKv9ZAC9Gj34RYZwGd+MLa11ctZpRhdF57bVm+dCcHFqr6gyLT7LUyGRGX0d d1iQ== X-Gm-Message-State: APjAAAV5qtW98P0qMSjt0OFvaCUo9G1TzLPcwqRs+DxJnv3qhFd8HSFC EEMPpMuZhXYWPBFsvcYr5ySniLhYjtQ= X-Received: by 2002:a2e:9dd7:: with SMTP id x23mr155663ljj.160.1560872107526; Tue, 18 Jun 2019 08:35:07 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.35.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:35:07 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 6/7] mmc: sdio: Drop unused in-parameter to mmc_sdio_reinit_card() Date: Tue, 18 Jun 2019 17:34:47 +0200 Message-Id: <20190618153448.27145-7-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The "powered_resume" in-parameter to mmc_sdio_reinit_card() has now become redundant as all callers set it to 0. Therefore let's just drop it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 945416c53b56..0bf603670f61 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -816,7 +816,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, return err; } -static int mmc_sdio_reinit_card(struct mmc_host *host, bool powered_resume) +static int mmc_sdio_reinit_card(struct mmc_host *host) { int ret; @@ -845,8 +845,7 @@ static int mmc_sdio_reinit_card(struct mmc_host *host, bool powered_resume) if (ret) return ret; - return mmc_sdio_init_card(host, host->card->ocr, host->card, - powered_resume); + return mmc_sdio_init_card(host, host->card->ocr, host->card, 0); } /* @@ -1000,7 +999,7 @@ static int mmc_sdio_resume(struct mmc_host *host) pm_runtime_set_active(&host->card->dev); pm_runtime_enable(&host->card->dev); } - err = mmc_sdio_reinit_card(host, 0); + err = mmc_sdio_reinit_card(host); } else if (mmc_card_wake_sdio_irq(host)) { /* We may have switched to 1-bit mode during suspend */ err = sdio_enable_4bit_bus(host->card); @@ -1026,11 +1025,6 @@ static int mmc_sdio_resume(struct mmc_host *host) return err; } -static int mmc_sdio_power_restore(struct mmc_host *host) -{ - return mmc_sdio_reinit_card(host, 0); -} - static int mmc_sdio_runtime_suspend(struct mmc_host *host) { /* No references to the card, cut the power to it. */ @@ -1048,7 +1042,7 @@ static int mmc_sdio_runtime_resume(struct mmc_host *host) /* Restore power and re-initialize. */ mmc_claim_host(host); mmc_power_up(host, host->card->ocr); - ret = mmc_sdio_power_restore(host); + ret = mmc_sdio_reinit_card(host); mmc_release_host(host); return ret; @@ -1057,7 +1051,7 @@ static int mmc_sdio_runtime_resume(struct mmc_host *host) static int mmc_sdio_hw_reset(struct mmc_host *host) { mmc_power_cycle(host, host->card->ocr); - return mmc_sdio_power_restore(host); + return mmc_sdio_reinit_card(host); } static int mmc_sdio_sw_reset(struct mmc_host *host) @@ -1069,7 +1063,7 @@ static int mmc_sdio_sw_reset(struct mmc_host *host) mmc_set_initial_state(host); mmc_set_initial_signal_voltage(host); - return mmc_sdio_reinit_card(host, 0); + return mmc_sdio_reinit_card(host); } static const struct mmc_bus_ops mmc_sdio_ops = { From patchwork Tue Jun 18 15:34:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 167179 Delivered-To: patches@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4375428ilk; Tue, 18 Jun 2019 08:35:09 -0700 (PDT) X-Received: by 2002:a05:6512:21c:: with SMTP id a28mr14528023lfo.14.1560872109165; Tue, 18 Jun 2019 08:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560872109; cv=none; d=google.com; s=arc-20160816; b=W05gJWuTdUVw4XvY9H8q0wRMxxS32yWMI4vXJzo+MKw2MUnAxOd9o0WKkzHfsOk28E 3Vywcu5Z1eUuL0LgBHzDZi7JM05AcNAqKKvnz7J0FoQfkmdqLM590zlqfucxpr9jHP0V vYd7wUx6wa8o1YPGkLvJXIeIJVSs+VBX5+9CZzO70qJxejMTCNUIX7lwNs3KDV1sWcg/ 6ccoNuwy3czSUtribciF5T1vrP4XtGUiJ4xwiGpBpGkKZAN/yGueNPRARamsLVxAOBQ1 liNaDfvStDhz3jMrfRy+TQrkVLMZ6i/w4cdeyh8yqfxHyADM4gMwMkSyt2J0euZPQfde u/+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TrltWt+RtwnpkQQYwVLsi9uq9P2cQCYA5NaB1ic9l5s=; b=nNmBGvVtGO5X/6bzb5Jyk07k6Au9x0zXkLyZsRW2Iv1c1j6QHQLXNj66HXpNSKqk1w V3uiYC0b4djxRMmvFxdZomqf9Xli0EZLnLJBSiPbagCjZFEltwVcjsI8uJ6GvddPxNKQ d+FG/DBj30Ih5GCngLMfXrAygOYHPYdu5h/vX6M0EuiypO8Nnca6FykBA56/X/KQUAE4 BSHEnrtRHLtYtDNZmKZmbeqJfsLA8k3dbdalFvxz76WCiiIm417rsORHH6TJgtIe7XuY 1JuvjlrZHEmOhZhenu7l3MUYz2GFMT5riuQ2tHVxsIrmeqHbBZP6KxVFnxuxzS2UUAja PIdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NJtQhNNg; 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 o6sor8346509lji.36.2019.06.18.08.35.09 for (Google Transport Security); Tue, 18 Jun 2019 08:35:09 -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=NJtQhNNg; 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:in-reply-to:references; bh=TrltWt+RtwnpkQQYwVLsi9uq9P2cQCYA5NaB1ic9l5s=; b=NJtQhNNg78seUtT1XUqdcun+UMhElbfhoNIrmqOJPrg/y7Ye3phqcqBR+aZ98PY7ym zUS1Vbkl7gJo+0odr3yJ5u8RTMX6IrzSFKnETVm9+PgQwUE27CphCmVDe6yrgYsFAe+A vUp+Xg+bcEVLGDGlBNWf6iJoXoKGOvCDpSqPsgD/pvHpgLSzQiptjF3BsGaopi4BMqp+ XFjo3sJS4EJsFBOZwpsS36awBA+3QlazSpplPuyNVvJiLweDSIgfVFA1ryUwTPf7mA7O HRVjx/ouXbr276JXXyh6bEZedldNFLG48LVgbS6Ogn5U+GFfUUTNBtwEZLpg9XIZ3GJz sqrg== 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; bh=TrltWt+RtwnpkQQYwVLsi9uq9P2cQCYA5NaB1ic9l5s=; b=qeSIVlE5ZzPr6H0R1qo1HlEx6jB7bEWK8wrtREn99yOH/S5vjnN1mCu7A7WwcOEfXL mDPRBx3Ukp27cl+Wozmw5ShqVMcXo/vsQGf16diNRVstmNIHLO/qO9wLBFJaPkx7xlDr JFWuMdjc+4G4EOpLj0Sk2lijlPIeuNqQ5ZJJqOEZKReSLBjrB2840uPOcsvMwqXrM62k MCNwmyZePah4JbXm8NGny0KL8OxIaNA9S3puzQrHFVgOqJlAY5NlF2vb3IMsJFMp3hPr Jrng+Egqhf9jdy2mnf5k1exOYa+oDQuoI1PaXOf0ok6JYEOP/Hp4uK2if2U/AaE0tFgK bk/g== X-Gm-Message-State: APjAAAUq4eGCN+BKEAEYUDYtLStTF4c76LlXqIZ/II2Y1HJrpCuRordm /kSpJu+ZqcMU6zyl9xD7LjKUnWeVxO46+w== X-Google-Smtp-Source: APXvYqxung57/e+YH3aN47rF4dI9dtCp6RtpYgXnvVsMJBceOG9OE7z7rJ0srhWqzysCxn/FVJaEtQ== X-Received: by 2002:a2e:9685:: with SMTP id q5mr14919419lji.227.1560872108802; Tue, 18 Jun 2019 08:35:08 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id d15sm2203121lfq.76.2019.06.18.08.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:35:08 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson Cc: Brian Norris , Shawn Lin , Guenter Roeck , Heiko Stuebner , Kalle Valo , Arend Van Spriel , linux-wireless@vger.kernel.org Subject: [PATCH 7/7] mmc: sdio: Drop unused in-parameter from mmc_sdio_init_card() Date: Tue, 18 Jun 2019 17:34:48 +0200 Message-Id: <20190618153448.27145-8-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190618153448.27145-1-ulf.hansson@linaro.org> References: <20190618153448.27145-1-ulf.hansson@linaro.org> The "powered_resume" in-parameter to mmc_sdio_init_card() has now become redundant as all callers set it to 0. Therefore let's just drop it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) -- 2.17.1 Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 0bf603670f61..8dd8fc32ecca 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -559,7 +559,7 @@ static void mmc_sdio_resend_if_cond(struct mmc_host *host, * we're trying to reinitialise. */ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, - struct mmc_card *oldcard, int powered_resume) + struct mmc_card *oldcard) { struct mmc_card *card; int err; @@ -582,11 +582,9 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, /* * Inform the card of the voltage */ - if (!powered_resume) { - err = mmc_send_io_op_cond(host, ocr, &rocr); - if (err) - goto err; - } + err = mmc_send_io_op_cond(host, ocr, &rocr); + if (err) + goto err; /* * For SPI, enable CRC as appropriate. @@ -645,7 +643,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, * try to init uhs card. sdio_read_cccr will take over this task * to make sure which speed mode should work. */ - if (!powered_resume && (rocr & ocr & R4_18V_PRESENT)) { + if (rocr & ocr & R4_18V_PRESENT) { err = mmc_set_uhs_voltage(host, ocr_card); if (err == -EAGAIN) { mmc_sdio_resend_if_cond(host, card); @@ -659,7 +657,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, /* * For native busses: set card RCA and quit open drain mode. */ - if (!powered_resume && !mmc_host_is_spi(host)) { + if (!mmc_host_is_spi(host)) { err = mmc_send_relative_addr(host, &card->rca); if (err) goto remove; @@ -687,7 +685,7 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, /* * Select card, as all following commands rely on that. */ - if (!powered_resume && !mmc_host_is_spi(host)) { + if (!mmc_host_is_spi(host)) { err = mmc_select_card(card); if (err) goto remove; @@ -845,7 +843,7 @@ static int mmc_sdio_reinit_card(struct mmc_host *host) if (ret) return ret; - return mmc_sdio_init_card(host, host->card->ocr, host->card, 0); + return mmc_sdio_init_card(host, host->card->ocr, host->card); } /* @@ -1113,7 +1111,7 @@ int mmc_attach_sdio(struct mmc_host *host) /* * Detect and init the card. */ - err = mmc_sdio_init_card(host, rocr, NULL, 0); + err = mmc_sdio_init_card(host, rocr, NULL); if (err) goto err;