diff options
author | DKAY_CHEN <dkay_chen@openmoko.com> | 2009-02-04 12:33:17 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-04 12:33:17 +0000 |
commit | ee1423c5c1d7b63f76d281a8ce74c82570361cf1 (patch) | |
tree | 440d8cc441add94f2d4b7f3ae0ca9191d656fe62 | |
parent | 088da01e5e09455d2201b6c62052a258a4f82555 (diff) |
[GTA03] Fix power on/off sequence of the GSM module
Signed-off-by: DKAY_CHEN <dkay_chen@openmoko.com>
-rw-r--r-- | arch/arm/mach-s3c6410/om-gta03-features.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c6410/om-gta03-features.c b/arch/arm/mach-s3c6410/om-gta03-features.c index d3e2140ecba..f42476259a9 100644 --- a/arch/arm/mach-s3c6410/om-gta03-features.c +++ b/arch/arm/mach-s3c6410/om-gta03-features.c @@ -101,14 +101,19 @@ static void om_gta03_features_pwron_set_on(enum feature feature) case OM_GTA03_GSM: /* give power to GSM module */ s3c_gpio_setpull(GTA03_GPIO_N_MODEM_RESET, S3C_GPIO_PULL_NONE); + s3c_gpio_setpull(GTA03_GPIO_MODEN_ON, S3C_GPIO_PULL_NONE); s3c_gpio_cfgpin(GTA03_GPIO_N_MODEM_RESET, S3C_GPIO_SFN(1)); + s3c_gpio_cfgpin(GTA03_GPIO_MODEN_ON, S3C_GPIO_SFN(1)); + gpio_direction_output(GTA03_GPIO_MODEN_ON, 1); gpio_direction_output(GTA03_GPIO_N_MODEM_RESET, 0); - gpio_direction_output(GTA03_GPIO_MODEN_ON, 0); - s3c_gpio_setpull(GTA03_GPIO_MODEN_ON, S3C_GPIO_PULL_NONE); - s3c_gpio_cfgpin(GTA03_GPIO_MODEN_ON, S3C_GPIO_SFN(1)); - msleep(1); + msleep(150); gpio_direction_output(GTA03_GPIO_N_MODEM_RESET, 1); + msleep(10); + /* Release GPIO1 */ + s3c_gpio_cfgpin(GTA03_GPIO_N_MODEM_RESET, S3C_GPIO_SFN(0)); + msleep(300); + gpio_direction_output(GTA03_GPIO_MODEN_ON, 1); break; case OM_GTA03_USBHOST: pcf50633_gpio_set(om_gta03_pcf, PCF50633_GPO, 1); @@ -153,9 +158,10 @@ static void om_gta03_features_pwron_set_off(enum feature feature) break; case OM_GTA03_GSM: /* remove power from WLAN / BT module */ - gpio_direction_output(GTA03_GPIO_MODEN_ON, 1); - s3c_gpio_setpull(GTA03_GPIO_MODEN_ON, S3C_GPIO_PULL_NONE); s3c_gpio_cfgpin(GTA03_GPIO_MODEN_ON, S3C_GPIO_SFN(1)); + gpio_direction_output(GTA03_GPIO_MODEN_ON, 0); + msleep(1100); + gpio_direction_output(GTA03_GPIO_MODEN_ON, 1); break; case OM_GTA03_USBHOST: pcf50633_gpio_set(om_gta03_pcf, PCF50633_GPO, 0); |