From e9aabda06a524ee22d1e12fb60a948c0ae8c598e Mon Sep 17 00:00:00 2001 From: John Michelau Date: Mon, 29 Nov 2010 17:21:51 -0600 Subject: [PATCH] stingray: Set AP to QCOM BP status pins for BP USB HW Bypass The AP status pins must be set properly to tell the BP that we've booted into BP USB HW Bypass mode. They were previously set incorrectly, which was preventing the BP from going online automatically as it should. Change-Id: Ic60bea141f6d5be270cdabb83fd4f38c7bdf8de7 Signed-off-by: John Michelau --- arch/arm/mach-tegra/board-stingray-power.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/board-stingray-power.c b/arch/arm/mach-tegra/board-stingray-power.c index 99926aa6c1ee..03230d7639a6 100644 --- a/arch/arm/mach-tegra/board-stingray-power.c +++ b/arch/arm/mach-tegra/board-stingray-power.c @@ -695,6 +695,7 @@ int __init stingray_power_init(void) { int i; unsigned long pmc_cntrl_0; + int qbp_usb_hw_bypass_enabled = stingray_qbp_usb_hw_bypass_enabled(); /* Enable CORE_PWR_REQ signal from T20. The signal must be enabled * before the CPCAP uC firmware is started. */ @@ -715,7 +716,7 @@ int __init stingray_power_init(void) for (i = 0; i < ARRAY_SIZE(cpcap_devices); i++) cpcap_device_register(cpcap_devices[i]); - if (!stingray_qbp_usb_hw_bypass_enabled()) + if (!qbp_usb_hw_bypass_enabled) cpcap_device_register(&cpcap_whisper_device); (void) cpcap_driver_register(&cpcap_validity_driver); @@ -726,6 +727,16 @@ int __init stingray_power_init(void) for (i = 0; i < MDM_CTRL_NUM_GPIOS; i++) tegra_gpio_enable(mdm_ctrl_platform_data.gpios[i].number); + if (qbp_usb_hw_bypass_enabled) { + /* The default AP status is "no bypass", so we must override it */ + mdm_ctrl_platform_data.gpios[MDM_CTRL_GPIO_AP_STATUS_0]. \ + default_value = 1; + mdm_ctrl_platform_data.gpios[MDM_CTRL_GPIO_AP_STATUS_1]. \ + default_value = 0; + mdm_ctrl_platform_data.gpios[MDM_CTRL_GPIO_AP_STATUS_2]. \ + default_value = 0; + } + platform_device_register(&mdm_ctrl_platform_device); return 0; -- 2.34.1