mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
core/linux-armv7 to 3.17.4-2
This commit is contained in:
parent
aa4b09218d
commit
2301ca81e0
2 changed files with 91 additions and 5 deletions
|
@ -0,0 +1,57 @@
|
|||
From 3c583f70a8e2feda03db77d2c8e9a41d302ac657 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Lunn <andrew@lunn.ch>
|
||||
Date: Wed, 12 Nov 2014 23:10:08 +0100
|
||||
Subject: [PATCH] mmc: mvsdio: Work around broken TX DMA
|
||||
|
||||
In order to use the mvsdio driver for sdio, it has been necessary to
|
||||
use a module parameter to disable DMA so to force PIO is used. It is
|
||||
then possible to use wireless LAN devices like mwifiex found on
|
||||
topkick and mirabox. However, accessing an MMC SD card does work with
|
||||
DMA.
|
||||
|
||||
Investigation has shown that MMC block device accesses are always
|
||||
aligned to 64 byte boundaries, where as transfers from mwifiex are
|
||||
rarely more than word aligned. It has also been determined that card
|
||||
to host transfers work with DMA for SDIO devices, but host to card
|
||||
transfers with DMA have problems.
|
||||
|
||||
This patch extends the current checks for buffers which are not word
|
||||
aligned or multiple of words. All host to card transfers which are not
|
||||
64 byte aligned are now also performed via PIO. This should not affect
|
||||
the performance of SD cards, but allow sdio devices to work out of the
|
||||
box, and they are likely to be more efficient since DMA will be used
|
||||
for card to host transfers.
|
||||
|
||||
Tested on mirabox for wifi via mwifiex
|
||||
Tested on 370 RD for file systems on an SD card.
|
||||
|
||||
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
---
|
||||
drivers/mmc/host/mvsdio.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
|
||||
index 6b4c5ad..4f8618f 100644
|
||||
--- a/drivers/mmc/host/mvsdio.c
|
||||
+++ b/drivers/mmc/host/mvsdio.c
|
||||
@@ -111,10 +111,15 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
|
||||
mvsd_write(MVSD_BLK_COUNT, data->blocks);
|
||||
mvsd_write(MVSD_BLK_SIZE, data->blksz);
|
||||
|
||||
- if (nodma || (data->blksz | data->sg->offset) & 3) {
|
||||
+ if (nodma || (data->blksz | data->sg->offset) & 3 ||
|
||||
+ ((!(data->flags & MMC_DATA_READ) && data->sg->offset & 0x3f))) {
|
||||
/*
|
||||
* We cannot do DMA on a buffer which offset or size
|
||||
* is not aligned on a 4-byte boundary.
|
||||
+ *
|
||||
+ * It also appears the host to card DMA can corrupt
|
||||
+ * data when the buffer is not aligned on a 64 byte
|
||||
+ * boundary.
|
||||
*/
|
||||
host->pio_size = data->blocks * data->blksz;
|
||||
host->pio_ptr = sg_virt(data->sg);
|
||||
--
|
||||
2.1.3
|
||||
|
|
@ -8,7 +8,7 @@ _srcname=linux-3.17
|
|||
_kernelname=${pkgbase#linux}
|
||||
_desc="ARMv7 multi-platform"
|
||||
pkgver=3.17.4
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
rcnrel=armv7-x3
|
||||
arch=('armv7h')
|
||||
url="http://www.kernel.org/"
|
||||
|
@ -24,6 +24,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
|||
'0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
|
||||
'0003-SMILE-Plug-device-tree-file.patch'
|
||||
'0004-fix-mvsdio-eMMC-timing.patch'
|
||||
'0001-mmc-mvsdio-Work-around-broken-TX-DMA.patch'
|
||||
'config')
|
||||
md5sums=('fb30d0f29214d75cddd2faa94f73d5cf'
|
||||
'df86f9de60a651ce3312af09729f7b1e'
|
||||
|
@ -33,6 +34,7 @@ md5sums=('fb30d0f29214d75cddd2faa94f73d5cf'
|
|||
'1c1aa520091fcd25fa135582eddd0671'
|
||||
'cbfb644a50651ef450f9e35570da1b3f'
|
||||
'19330f72bf29ce5271f77d8bf769706f'
|
||||
'8470443040fce04fec4411aa7ddd9f51'
|
||||
'c5b8d7891b5625144bf24ef7d25e7627')
|
||||
|
||||
prepare() {
|
||||
|
@ -49,6 +51,7 @@ prepare() {
|
|||
git apply ../0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
|
||||
git apply ../0003-SMILE-Plug-device-tree-file.patch
|
||||
git apply ../0004-fix-mvsdio-eMMC-timing.patch
|
||||
git apply ../0001-mmc-mvsdio-Work-around-broken-TX-DMA.patch
|
||||
|
||||
# AUFS patches
|
||||
cp -ru "${srcdir}/aufs3-standalone/Documentation" .
|
||||
|
@ -272,7 +275,7 @@ _package-headers() {
|
|||
_package-smileplug() {
|
||||
pkgdesc="The Linux Kernel - ${_desc} - Marvell SMILE Plug"
|
||||
depends=('linux-armv7')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-ax3')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-ax3' 'linux-armv7-d3plug' 'linux-armv7-cubox')
|
||||
replaces=('linux-mvebu-smileplug')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
@ -285,7 +288,7 @@ _package-smileplug() {
|
|||
_package-mirabox() {
|
||||
pkgdesc="The Linux Kernel - ${_desc} - Globalscale Mirabox"
|
||||
depends=('linux-armv7')
|
||||
conflicts=('linux-armv7-smileplug' 'linux-armv7-ax3')
|
||||
conflicts=('linux-armv7-smileplug' 'linux-armv7-ax3' 'linux-armv7-d3plug' 'linux-armv7-cubox')
|
||||
replaces=('linux-mvebu-mirabox')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
@ -298,7 +301,7 @@ _package-mirabox() {
|
|||
_package-ax3() {
|
||||
pkgdesc="The Linux Kernel - ${_desc} - OpenBlocks AX3-4"
|
||||
depends=('linux-armv7')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-smileplug')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-smileplug' 'linux-armv7-d3plug' 'linux-armv7-cubox')
|
||||
replaces=('linux-mvebu-ax3')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
@ -308,7 +311,33 @@ _package-ax3() {
|
|||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "${pkgname}" -d myimage "${pkgdir}/boot/uImage"
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-smileplug" "${pkgbase}-mirabox" "${pkgbase}-ax3")
|
||||
_package-d3plug() {
|
||||
pkgdesc="The Linux Kernel - ${_desc} - Globalscale D3Plug"
|
||||
depends=('linux-armv7')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-smileplug' 'linux-armv7-ax3' 'linux-armv7-cubox')
|
||||
#replaces=('linux-d3plug')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
mkdir -p "${pkgdir}/boot"
|
||||
cat arch/$KARCH/boot/zImage arch/$KARCH/boot/dts/dove-d3plug.dtb > myimage
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "${pkgname}" -d myimage "${pkgdir}/boot/uImage"
|
||||
}
|
||||
|
||||
_package-cubox() {
|
||||
pkgdesc="The Linux Kernel - ${_desc} - SolidRun Cubox (Marvell)"
|
||||
depends=('linux-armv7')
|
||||
conflicts=('linux-armv7-mirabox' 'linux-armv7-smileplug' 'linux-armv7-ax3' 'linux-armv7-d3plug')
|
||||
#replaces=('linux-cubox')
|
||||
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
mkdir -p "${pkgdir}/boot"
|
||||
cat arch/$KARCH/boot/zImage arch/$KARCH/boot/dts/dove-cubox.dtb > myimage
|
||||
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n "${pkgname}" -d myimage "${pkgdir}/boot/uImage"
|
||||
}
|
||||
|
||||
pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-smileplug" "${pkgbase}-mirabox" "${pkgbase}-ax3" "${pkgbase}-d3plug" "${pkgbase}-cubox")
|
||||
for _p in ${pkgname[@]}; do
|
||||
eval "package_${_p}() {
|
||||
_package${_p#${pkgbase}}
|
||||
|
|
Loading…
Reference in a new issue