Add patch to improve MMC/SD speed on Raspberry Pi (bcm283x)

This commit is contained in:
Peter Robinson 2017-01-09 02:47:37 +00:00
parent eb69f22dd8
commit b50b299d49
2 changed files with 113 additions and 0 deletions

107
bcm283x-mmc-imp-speed.patch Normal file
View File

@ -0,0 +1,107 @@
From patchwork Fri Dec 30 15:24:32 2016
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [1/2] mmc: sdhci-iproc: Apply caps from bcm2835-mmc driver
From: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 9492281
Message-Id: <1483111474-29907-2-git-send-email-stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Gerd Hoffmann <kraxel@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Scott Branden <sbranden@broadcom.com>, Jon Mason <jonmason@broadcom.com>,
Ray Jui <rjui@broadcom.com>, linux-mmc@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org
Date: Fri, 30 Dec 2016 15:24:32 +0000
Since the mmc module on bcm2835 neither provide a capabilities register nor
free documentation we must rely on the downstream implementation [1].
So enable the following capabilities for bcm2835:
MMC_CAP_MMC_HIGHSPEED
MMC_CAP_SD_HIGHSPEED
MMC_CAP_DRIVER_TYPE_A
MMC_CAP_DRIVER_TYPE_C
[1] - https://github.com/raspberrypi/linux/blob/rpi-4.4.y/drivers/mmc/host/bcm2835-mmc.c
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-iproc.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index d7046d6..30b3fdf 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -211,14 +211,17 @@ static void sdhci_iproc_writeb(struct sdhci_host *host, u8 val, int reg)
static const struct sdhci_pltfm_data sdhci_bcm2835_pltfm_data = {
.quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
- SDHCI_QUIRK_MISSING_CAPS,
+ SDHCI_QUIRK_MISSING_CAPS |
+ SDHCI_QUIRK_NO_HISPD_BIT,
.ops = &sdhci_iproc_32only_ops,
};
static const struct sdhci_iproc_data bcm2835_data = {
.pdata = &sdhci_bcm2835_pltfm_data,
- .caps = SDHCI_CAN_VDD_330,
- .caps1 = 0x00000000,
+ .caps = SDHCI_CAN_VDD_330 |
+ SDHCI_CAN_DO_HISPD,
+ .caps1 = SDHCI_DRIVER_TYPE_A |
+ SDHCI_DRIVER_TYPE_C,
.mmc_caps = 0x00000000,
};
From patchwork Fri Dec 30 15:24:33 2016
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [2/2] mmc: sdhci-iproc: Increase max_blk_size for bcm2835
From: Stefan Wahren <stefan.wahren@i2se.com>
X-Patchwork-Id: 9492273
Message-Id: <1483111474-29907-3-git-send-email-stefan.wahren@i2se.com>
To: Eric Anholt <eric@anholt.net>, Gerd Hoffmann <kraxel@redhat.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
Scott Branden <sbranden@broadcom.com>, Jon Mason <jonmason@broadcom.com>,
Ray Jui <rjui@broadcom.com>, linux-mmc@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org
Date: Fri, 30 Dec 2016 15:24:33 +0000
According to the BCM2835 datasheet the maximum block size for the
eMMC module is restricted to the internal data FIFO which is 1024 byte.
But this is still an improvement to the default of 512 byte.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Scott Branden <scott.branden@broadcom.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci-iproc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 30b3fdf..3275d49 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -218,7 +218,9 @@ static void sdhci_iproc_writeb(struct sdhci_host *host, u8 val, int reg)
static const struct sdhci_iproc_data bcm2835_data = {
.pdata = &sdhci_bcm2835_pltfm_data,
- .caps = SDHCI_CAN_VDD_330 |
+ .caps = ((0x1 << SDHCI_MAX_BLOCK_SHIFT)
+ & SDHCI_MAX_BLOCK_MASK) |
+ SDHCI_CAN_VDD_330 |
SDHCI_CAN_DO_HISPD,
.caps1 = SDHCI_DRIVER_TYPE_A |
SDHCI_DRIVER_TYPE_C,

View File

@ -517,6 +517,9 @@ Patch430: ARM-tegra-usb-no-reset.patch
Patch431: bcm2837-initial-support.patch
# http://www.spinics.net/lists/linux-mmc/msg41151.html
Patch432: bcm283x-mmc-imp-speed.patch
Patch433: AllWinner-net-emac.patch
Patch460: lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
@ -2152,6 +2155,9 @@ fi
#
#
%changelog
* Mon Jan 9 2017 Peter Robinson <pbrobinson@fedoraproject.org>
- Add patch to improve MMC/SD speed on Raspberry Pi (bcm283x)
* Fri Jan 06 2017 Laura Abbott <labbott@fedoraproject.org>
- Disable JVMTI for perf (rhbz 1410296)