Some AllWinner MMC driver fixes

This commit is contained in:
Peter Robinson 2018-08-01 14:42:36 +01:00
parent 9baae8ee0e
commit f16068badd
3 changed files with 188 additions and 0 deletions

View File

@ -588,6 +588,11 @@ Patch306: arm-sdhci-esdhc-imx-fixes.patch
Patch307: arm-tegra-fix-nouveau-crash.patch
# https://patchwork.kernel.org/patch/10539291/
Patch308: mmc-sunxi-allow-3.3V-DDR-when-DDR-is-available.patch
# https://patchwork.kernel.org/patch/10540521/
Patch309: mmc-sunxi-remove-output-of-virtual-base-address.patch
# Enabling Patches for the RPi3+
Patch330: bcm2837-enable-pmu.patch
@ -1901,6 +1906,7 @@ fi
%changelog
* Tue Jul 31 2018 Peter Robinson <pbrobinson@fedoraproject.org>
- Add two bcm283x vc4 stability patches
- Some AllWinner MMC driver fixes
* Tue Jul 31 2018 Hans de Goede <hdegoede@redhat.com>
- Add patch to fix FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER on s390x and

View File

@ -0,0 +1,81 @@
From patchwork Sun Jul 22 12:54:07 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Icenowy Zheng <icenowy@aosc.io>
X-Patchwork-Id: 10539291
Return-Path: <linux-mmc-owner@kernel.org>
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 86834112B
for <patchwork-linux-mmc@patchwork.kernel.org>;
Sun, 22 Jul 2018 12:54:34 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 684332808F
for <patchwork-linux-mmc@patchwork.kernel.org>;
Sun, 22 Jul 2018 12:54:34 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 5959228372; Sun, 22 Jul 2018 12:54:34 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_HI 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 F3C822808F
for <patchwork-linux-mmc@patchwork.kernel.org>;
Sun, 22 Jul 2018 12:54:33 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1728446AbeGVNvI (ORCPT
<rfc822;patchwork-linux-mmc@patchwork.kernel.org>);
Sun, 22 Jul 2018 09:51:08 -0400
Received: from hermes.aosc.io ([199.195.250.187]:56330 "EHLO hermes.aosc.io"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1728438AbeGVNvI (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
Sun, 22 Jul 2018 09:51:08 -0400
Received: from localhost (localhost [127.0.0.1]) (Authenticated sender:
icenowy@aosc.io)
by hermes.aosc.io (Postfix) with ESMTPSA id 04DFE9F3AA;
Sun, 22 Jul 2018 12:54:27 +0000 (UTC)
From: Icenowy Zheng <icenowy@aosc.io>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Chen-Yu Tsai <wens@csie.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
Icenowy Zheng <icenowy@aosc.io>
Subject: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available
Date: Sun, 22 Jul 2018 20:54:07 +0800
Message-Id: <20180722125407.43107-1-icenowy@aosc.io>
Sender: linux-mmc-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-mmc.vger.kernel.org>
X-Mailing-List: linux-mmc@vger.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
(e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
capable of doing 3.3V DDR transmission.
Add capability of 3.3V DDR when DDR is available (extra clock or new
timing).
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
drivers/mmc/host/sunxi-mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 8e7f3e35ee3d..4ea8e2611079 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1388,7 +1388,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;
if (host->cfg->clk_delays || host->use_new_timings)
- mmc->caps |= MMC_CAP_1_8V_DDR;
+ mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
ret = mmc_of_parse(mmc);
if (ret)

View File

@ -0,0 +1,101 @@
From patchwork Mon Jul 23 15:34:31 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Andre Przywara <andre.przywara@arm.com>
X-Patchwork-Id: 10540521
Return-Path: <linux-mmc-owner@kernel.org>
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 1B83B157A
for <patchwork-linux-mmc@patchwork.kernel.org>;
Mon, 23 Jul 2018 15:34:37 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08A2228B94
for <patchwork-linux-mmc@patchwork.kernel.org>;
Mon, 23 Jul 2018 15:34:37 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id F046028C33; Mon, 23 Jul 2018 15:34: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_HI 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 903BC28B94
for <patchwork-linux-mmc@patchwork.kernel.org>;
Mon, 23 Jul 2018 15:34:36 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S2387995AbeGWQgV (ORCPT
<rfc822;patchwork-linux-mmc@patchwork.kernel.org>);
Mon, 23 Jul 2018 12:36:21 -0400
Received: from foss.arm.com ([217.140.101.70]:35828 "EHLO foss.arm.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S2387968AbeGWQgV (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
Mon, 23 Jul 2018 12:36:21 -0400
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D7E580D;
Mon, 23 Jul 2018 08:34:35 -0700 (PDT)
Received: from e104803-lin.Emea.Arm.com (e104803-lin.Emea.Arm.com
[10.4.12.215])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id
B9BD43F237;
Mon, 23 Jul 2018 08:34:33 -0700 (PDT)
From: Andre Przywara <andre.przywara@arm.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
Chen-Yu Tsai <wens@csie.org>,
Robin Murphy <robin.murphy@arm.com>, linux-mmc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com
Subject: [PATCH v3] mmc: sunxi: remove output of virtual base address
Date: Mon, 23 Jul 2018 16:34:31 +0100
Message-Id: <20180723153431.8669-1-andre.przywara@arm.com>
X-Mailer: git-send-email 2.14.4
Sender: linux-mmc-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-mmc.vger.kernel.org>
X-Mailing-List: linux-mmc@vger.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
Recent Linux versions refuse to print actual virtual kernel addresses,
to not give a hint about the location of the kernel in a randomized virtual
address space. This affects the output of the sunxi MMC controller
driver, which now produces the rather uninformative line:
[ 1.482660] sunxi-mmc 1c0f000.mmc: base:0x(____ptrval____) irq:8
Since the virtual base address is not really interesting in the first
place, let's just drop this value. The same applies to Linux' notion of
the interrupt number, which is independent from the GIC SPI number.
We have the physical address as part of the DT node name, which is way
more useful for debugging purposes.
To keep a success message in the driver, we make this purpose explicit
with the word "initialized", plus print some information that is not too
obvious and that we learned while probing the device:
the maximum request size and whether it uses the new timing mode.
So the output turns into:
[ 1.750626] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 1.786699] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
drivers/mmc/host/sunxi-mmc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 8e7f3e35ee3d..c18cf035ac00 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1407,7 +1407,10 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
if (ret)
goto error_free_dma;
- dev_info(&pdev->dev, "base:0x%p irq:%u\n", host->reg_base, host->irq);
+ dev_info(&pdev->dev, "initialized, max. request size: %u KB%s\n",
+ mmc->max_req_size >> 10,
+ host->use_new_timings ? ", uses new timings mode" : "");
+
return 0;
error_free_dma: