mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
core/linux-kirkwood fix SD-card support on guruplug etc./update to 3.9.3
This commit is contained in:
parent
ead66a9e4c
commit
e7174a9a99
2 changed files with 80 additions and 7 deletions
core/linux-kirkwood
|
@ -7,9 +7,9 @@ pkgbase=linux-kirkwood
|
|||
pkgname=('linux-kirkwood' 'linux-headers-kirkwood')
|
||||
#pkgname=linux-test # Build kernel with a different name
|
||||
_kernelname=${pkgname#linux}
|
||||
_basekernel=3.9.2
|
||||
_basekernel=3.9.3
|
||||
pkgver=${_basekernel}
|
||||
pkgrel=2
|
||||
pkgrel=1
|
||||
cryptover=1.6
|
||||
bfqver=v6r1
|
||||
arch=('arm')
|
||||
|
@ -24,22 +24,24 @@ source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.bz2
|
|||
'mach-types::http://www.arm.linux.org.uk/developer/machines/download.php'
|
||||
'change-default-console-loglevel.patch'
|
||||
'usb-add-reset-resume-quirk-for-several-webcams.patch'
|
||||
'fix-sdio-kirkwood.patch'
|
||||
'aufs3-3.9.patch.xz'
|
||||
"http://download.gna.org/cryptodev-linux/cryptodev-linux-${cryptover}.tar.gz"
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-$(echo $_basekernel | cut -c 1-3).patch"
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-$(echo $_basekernel |cut -c 1-3).patch"
|
||||
'aufs3-3.9.patch.xz')
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$(echo $_basekernel |cut -c 1-3).0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-$(echo $_basekernel |cut -c 1-3).patch")
|
||||
|
||||
md5sums=('661100fdf8a633f53991684b555373ba'
|
||||
md5sums=('7b4ec4367917d9f3dfbcf5545533b546'
|
||||
'a47687b9b52ec74bf833851b918fa8b5'
|
||||
'f5d3635da03cb45904bedd69b47133de'
|
||||
'd699018dcf0cd8850743daa605c7ab66'
|
||||
'73e81c21600fe1bab1baffa537bb3dbe'
|
||||
'80b2fb500e6811495c6b072d7e6fd112'
|
||||
'9b5a265440abf57d2052838f31486a3a'
|
||||
'bf6900bb056ba2b213bd9e23693889ad'
|
||||
'30ed1ba9b6c391e371d022fbcf79f7ed'
|
||||
'eade38998313c25fd7934719cdf8a2ea'
|
||||
'62dff7101a1381d33faf2e1f101ba684'
|
||||
'2c719719165dccf5fc52705e59797d26'
|
||||
'30ed1ba9b6c391e371d022fbcf79f7ed')
|
||||
'2c719719165dccf5fc52705e59797d26')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
|
@ -55,6 +57,9 @@ msg2 "requested additional support, mach-types"
|
|||
patch -Np1 -i "${srcdir}/support.patch"
|
||||
cp "${srcdir}/mach-types" arch/arm/tools
|
||||
|
||||
msg2 "Add SDIO fix for kirkwoods"
|
||||
patch -Np1 -i "${srcdir}/fix-sdio-kirkwood.patch"
|
||||
|
||||
msg2 "Add AUFS3 patches"
|
||||
patch -Np1 -i "${srcdir}/aufs3-3.9.patch"
|
||||
|
||||
|
|
68
core/linux-kirkwood/fix-sdio-kirkwood.patch
Normal file
68
core/linux-kirkwood/fix-sdio-kirkwood.patch
Normal file
|
@ -0,0 +1,68 @@
|
|||
Ralph Droms <rdroms at gmail.com> reported that 3.9-rc was breaking the
|
||||
SDIO interface on his Sheevaplug platform, and that the recent changes
|
||||
to the mvsdio driver are responsible for this breakage. Precisely, the
|
||||
regression has been introduced by 07728b77c03d (mmc: mvsdio: use
|
||||
slot-gpio for card detect gpio).
|
||||
|
||||
After investigation, is turns out that the Sheevaplug does not have
|
||||
any "card detect" GPIO, and the Sheevaplug has not been converted to
|
||||
the Device Tree. Therefore, the Sheevaplug board code does not define
|
||||
a value for the .gpio_card_detect field of the mvsdio_platform_data
|
||||
structure, which means that its value is 0. Unfortunately,
|
||||
gpio_is_valid() considers 0 as a valid GPIO, and therefore calls
|
||||
mmc_gpio_request_cd(), which fails and makes the entire probing of the
|
||||
driver fail.
|
||||
|
||||
In fact, in the previous mvsdio code, before the Device Tree binding
|
||||
was introduced, 0 was not considered as a valid GPIO. Therefore, this
|
||||
fix revert back to this behavior in the non-DT case, by setting the
|
||||
gpio_card_detect and gpio_write_protect local variables to -EINVAL
|
||||
when the corresponding fields of the mvsdio_platform_data structure
|
||||
are set to zero (i.e, left undefined). Of course, it prevents to use
|
||||
GPIO 0 as a card detect or write protect GPIO, but it was a defiency
|
||||
of the previous non-DT code, and the fix moving forward is to convert
|
||||
platforms to the Device Tree.
|
||||
|
||||
The problem has been reproduced successfully on the Kirkwood-based
|
||||
Marvell DB-88F6281-BP Development Board (that doesn't use the Device
|
||||
Tree) and the fix has proven to work properly, after of course
|
||||
removing the gpio_card_detect field of the mvsdio_platform_data
|
||||
instance for this board.
|
||||
|
||||
Reported-by: Ralph Droms <rdroms at gmail.com>
|
||||
Tested-by: Ralph Droms <rdroms at gmail.com>
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
|
||||
---
|
||||
This patch should be applied on 3.9-rcX.
|
||||
|
||||
Changes between v2 and v3:
|
||||
* Add a reference to the commit introducing the regression. Suggested
|
||||
by Russell King.
|
||||
* Fix the e-mail address from Ralph Droms, and add his Tested-by.
|
||||
* No code change.
|
||||
|
||||
Changes between v1 and v2:
|
||||
* Send the patch to the MMC maintainer instead of the Marvell
|
||||
maintainers.
|
||||
---
|
||||
drivers/mmc/host/mvsdio.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
|
||||
index 145cdaf..1e4d567 100644
|
||||
--- a/drivers/mmc/host/mvsdio.c
|
||||
+++ b/drivers/mmc/host/mvsdio.c
|
||||
@@ -741,8 +741,8 @@ static int __init mvsd_probe(struct platform_device *pdev)
|
||||
goto out;
|
||||
}
|
||||
host->base_clock = mvsd_data->clock / 2;
|
||||
- gpio_card_detect = mvsd_data->gpio_card_detect;
|
||||
- gpio_write_protect = mvsd_data->gpio_write_protect;
|
||||
+ gpio_card_detect = mvsd_data->gpio_card_detect ? : -EINVAL;
|
||||
+ gpio_write_protect = mvsd_data->gpio_write_protect ? : -EINVAL;
|
||||
}
|
||||
|
||||
mmc->ops = &mvsd_ops;
|
||||
--
|
||||
1.7.9.5
|
||||
|
Loading…
Reference in a new issue