diff options
author | Steve Lin <stlin@nvidia.com> | 2011-03-15 18:24:40 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-03-17 21:27:53 -0800 |
commit | 00a42778170bb81624a675725e5c8f5f686a172c (patch) | |
tree | 35780d2fd50bf9fd674f42f58eecf1c3cf067fb1 /arch | |
parent | 4386bf25272aad1e0d7cde3993186cc79ecede1a (diff) |
ARM: tegra: baseband: fix modem reset sequence
Fix baseband modem reset function on whistler.
Bug 776276
Change-Id: I13b6dae5ac9635ac63652b34ab8bf01289d4d35e
Reviewed-on: http://git-master/r/21920
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-baseband.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-baseband.c b/arch/arm/mach-tegra/board-whistler-baseband.c index 8909e61c512b..43b216b5f9a7 100644 --- a/arch/arm/mach-tegra/board-whistler-baseband.c +++ b/arch/arm/mach-tegra/board-whistler-baseband.c @@ -51,9 +51,9 @@ static int ph450_reset(void); static int ph450_handshake(void); static __initdata struct tegra_pingroup_config whistler_null_ulpi_pinmux[] = { - {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, + {TEGRA_PINGROUP_UAA, TEGRA_MUX_ULPI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_PULL_UP, + {TEGRA_PINGROUP_UAB, TEGRA_MUX_ULPI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_UDA, TEGRA_MUX_ULPI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, @@ -196,31 +196,37 @@ static int __init ph450_init(void) static int ph450_reset(void) { + int retry = 100; /* retry for 10 sec */ + gpio_set_value(AP2MDM_ACK2, 1); gpio_set_value(MODEM_PWR_ON, 0); gpio_set_value(MODEM_RESET, 0); mdelay(200); gpio_set_value(MODEM_RESET, 1); + mdelay(30); + gpio_set_value(MODEM_PWR_ON, 1); - return 0; -} - -static int ph450_handshake(void) -{ - while (1) { + while (retry) { /* wait for MDM2AP_ACK2 low */ int val = gpio_get_value(MDM2AP_ACK2); if (!val) { printk("MDM2AP_ACK2 detected\n"); - break; + return 0; } else { printk("."); + retry--; mdelay(100); } } + return 1; +} + +static int ph450_handshake(void) +{ /* set AP2MDM_ACK2 low */ gpio_set_value(AP2MDM_ACK2, 0); + return 0; } |