diff options
Diffstat (limited to 'arch/arm/mach-pxa/z2.c')
-rw-r--r-- | arch/arm/mach-pxa/z2.c | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 31db09bb0b5c..4df1ecb14543 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -139,8 +139,7 @@ static unsigned long z2_pin_config[] = { | |||
139 | GPIO1_GPIO, /* Power button */ | 139 | GPIO1_GPIO, /* Power button */ |
140 | GPIO37_GPIO, /* Headphone detect */ | 140 | GPIO37_GPIO, /* Headphone detect */ |
141 | GPIO98_GPIO, /* Lid switch */ | 141 | GPIO98_GPIO, /* Lid switch */ |
142 | GPIO14_GPIO, /* WiFi Reset */ | 142 | GPIO14_GPIO, /* WiFi Power */ |
143 | GPIO15_GPIO, /* WiFi Power */ | ||
144 | GPIO24_GPIO, /* WiFi CS */ | 143 | GPIO24_GPIO, /* WiFi CS */ |
145 | GPIO36_GPIO, /* WiFi IRQ */ | 144 | GPIO36_GPIO, /* WiFi IRQ */ |
146 | GPIO88_GPIO, /* LCD CS */ | 145 | GPIO88_GPIO, /* LCD CS */ |
@@ -512,26 +511,16 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
512 | { | 511 | { |
513 | int ret = 0; | 512 | int ret = 0; |
514 | 513 | ||
515 | ret = gpio_request(GPIO15_ZIPITZ2_WIFI_POWER, "WiFi Power"); | 514 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_POWER, "WiFi Power"); |
516 | if (ret) | 515 | if (ret) |
517 | goto err; | 516 | goto err; |
518 | 517 | ||
519 | ret = gpio_direction_output(GPIO15_ZIPITZ2_WIFI_POWER, 1); | 518 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_POWER, 1); |
520 | if (ret) | 519 | if (ret) |
521 | goto err2; | 520 | goto err2; |
522 | 521 | ||
523 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_RESET, "WiFi Reset"); | 522 | /* Wait until card is powered on */ |
524 | if (ret) | ||
525 | goto err2; | ||
526 | |||
527 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_RESET, 0); | ||
528 | if (ret) | ||
529 | goto err3; | ||
530 | |||
531 | /* Reset the card */ | ||
532 | mdelay(180); | 523 | mdelay(180); |
533 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 1); | ||
534 | mdelay(20); | ||
535 | 524 | ||
536 | spi->bits_per_word = 16; | 525 | spi->bits_per_word = 16; |
537 | spi->mode = SPI_MODE_2, | 526 | spi->mode = SPI_MODE_2, |
@@ -540,22 +529,18 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
540 | 529 | ||
541 | return 0; | 530 | return 0; |
542 | 531 | ||
543 | err3: | ||
544 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
545 | err2: | 532 | err2: |
546 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | 533 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
547 | err: | 534 | err: |
548 | return ret; | 535 | return ret; |
549 | }; | 536 | }; |
550 | 537 | ||
551 | static int z2_lbs_spi_teardown(struct spi_device *spi) | 538 | static int z2_lbs_spi_teardown(struct spi_device *spi) |
552 | { | 539 | { |
553 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 0); | 540 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_POWER, 0); |
554 | gpio_set_value(GPIO15_ZIPITZ2_WIFI_POWER, 0); | 541 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
555 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
556 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | ||
557 | return 0; | ||
558 | 542 | ||
543 | return 0; | ||
559 | }; | 544 | }; |
560 | 545 | ||
561 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { | 546 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { |