diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-03-23 08:56:58 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-03-28 12:56:31 -0400 |
commit | 0d0644ebc63bce3784ebea28d0355071b4e90525 (patch) | |
tree | 260bb5aa3ed8f594cf00faefcf54e2cdec9375c1 /arch/arm/mach-kirkwood | |
parent | 7f23f62fc31c5c97947414c0937a72e08a947a41 (diff) |
ARM: Kirkwood: fix unused mvsdio gpio pins
mvsdio_platform_data allows to pass card detect and write protect gpio
numbers to the driver. Some kirkwood boards don't use both pins as they
are not connected, and don't set the corresponding value in platform_data.
This will leave the unset values in platform_data initialized as 0, which
is in fact a valid gpio pin. mvsdio will grab that pin and configure it as
gpio, which in turn breaks nand controller as mpp0 also carries nand_io2.
This patch fixes the above by initializing unused gpio functions in the
platform_data with an invalid (-1) value.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reported-by: Soeren Moch <smoch@web.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r-- | arch/arm/mach-kirkwood/guruplug-setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/openrd-setup.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/rd88f6281-setup.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c index 1c6e736cbbf8..08dd739aa709 100644 --- a/arch/arm/mach-kirkwood/guruplug-setup.c +++ b/arch/arm/mach-kirkwood/guruplug-setup.c | |||
@@ -53,6 +53,8 @@ static struct mv_sata_platform_data guruplug_sata_data = { | |||
53 | 53 | ||
54 | static struct mvsdio_platform_data guruplug_mvsdio_data = { | 54 | static struct mvsdio_platform_data guruplug_mvsdio_data = { |
55 | /* unfortunately the CD signal has not been connected */ | 55 | /* unfortunately the CD signal has not been connected */ |
56 | .gpio_card_detect = -1, | ||
57 | .gpio_write_protect = -1, | ||
56 | }; | 58 | }; |
57 | 59 | ||
58 | static struct gpio_led guruplug_led_pins[] = { | 60 | static struct gpio_led guruplug_led_pins[] = { |
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index 8ddd69fdc937..6a6eb548307d 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c | |||
@@ -55,6 +55,7 @@ static struct mv_sata_platform_data openrd_sata_data = { | |||
55 | 55 | ||
56 | static struct mvsdio_platform_data openrd_mvsdio_data = { | 56 | static struct mvsdio_platform_data openrd_mvsdio_data = { |
57 | .gpio_card_detect = 29, /* MPP29 used as SD card detect */ | 57 | .gpio_card_detect = 29, /* MPP29 used as SD card detect */ |
58 | .gpio_write_protect = -1, | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | static unsigned int openrd_mpp_config[] __initdata = { | 61 | static unsigned int openrd_mpp_config[] __initdata = { |
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index c7d93b48926b..d24223166e06 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -69,6 +69,7 @@ static struct mv_sata_platform_data rd88f6281_sata_data = { | |||
69 | 69 | ||
70 | static struct mvsdio_platform_data rd88f6281_mvsdio_data = { | 70 | static struct mvsdio_platform_data rd88f6281_mvsdio_data = { |
71 | .gpio_card_detect = 28, | 71 | .gpio_card_detect = 28, |
72 | .gpio_write_protect = -1, | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | static unsigned int rd88f6281_mpp_config[] __initdata = { | 75 | static unsigned int rd88f6281_mpp_config[] __initdata = { |