Commit af829310 authored by Haojian Zhuang's avatar Haojian Zhuang

ARM: pxa: fix invalid mfp pin issue

Failure is reported on hx4700 with kernel v3.3-rc1.

__mfp_validate: GPIO20 is invalid pin
__mfp_validate: GPIO21 is invalid pin
__mfp_validate: GPIO15 is invalid pin
__mfp_validate: GPIO78 is invalid pin
__mfp_validate: GPIO79 is invalid pin
__mfp_validate: GPIO80 is invalid pin
__mfp_validate: GPIO33 is invalid pin
__mfp_validate: GPIO48 is invalid pin
__mfp_validate: GPIO49 is invalid pin
__mfp_validate: GPIO50 is invalid pin

Since pxa_last_gpio is used in mfp-pxa2xx driver. But it's only
updated in pxa-gpio driver that run after mfp-pxa2xx driver.

So update the pxa_last_gpio first in mfp-pxa2xx driver.
Reported-by: default avatarPaul Parsons <lost.distance@yahoo.com>
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
parent 0c7de34b
...@@ -226,6 +226,12 @@ static void __init pxa25x_mfp_init(void) ...@@ -226,6 +226,12 @@ static void __init pxa25x_mfp_init(void)
{ {
int i; int i;
/* running before pxa_gpio_probe() */
#ifdef CONFIG_CPU_PXA26x
pxa_last_gpio = 89;
#else
pxa_last_gpio = 84;
#endif
for (i = 0; i <= pxa_last_gpio; i++) for (i = 0; i <= pxa_last_gpio; i++)
gpio_desc[i].valid = 1; gpio_desc[i].valid = 1;
...@@ -295,6 +301,7 @@ static void __init pxa27x_mfp_init(void) ...@@ -295,6 +301,7 @@ static void __init pxa27x_mfp_init(void)
{ {
int i, gpio; int i, gpio;
pxa_last_gpio = 120; /* running before pxa_gpio_probe() */
for (i = 0; i <= pxa_last_gpio; i++) { for (i = 0; i <= pxa_last_gpio; i++) {
/* skip GPIO2, 5, 6, 7, 8, they are not /* skip GPIO2, 5, 6, 7, 8, they are not
* valid pins allow configuration * valid pins allow configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment