summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguoyin.chen <guoyin.chen@freescale.com>2012-12-18 17:44:49 +0800
committerTapani <tapani@vmail.me>2013-03-29 11:41:55 +0800
commitf4ec9060d9e6b32d188c0bb732fce4cd97a8a430 (patch)
treefe681d99ca50c88a20ac4d8bbd50b6d2571890dc
parentf95a5d97dbe9addbf3c5fc69a84e8dcca307e8ef (diff)
ENGR00237520 MX6 PCIE: add flag to keep power supply
Keep power supply based on pcie_power_always_on for 3g modem,which is not function as a pcie device. Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
-rw-r--r--arch/arm/mach-mx6/pcie.c13
-rw-r--r--arch/arm/plat-mxc/include/mach/pcie.h1
2 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-mx6/pcie.c b/arch/arm/mach-mx6/pcie.c
index f39dd3d4314b..cac44bc173be 100644
--- a/arch/arm/mach-mx6/pcie.c
+++ b/arch/arm/mach-mx6/pcie.c
@@ -643,7 +643,8 @@ static void __init add_pcie_port(void __iomem *base, void __iomem *dbi_base,
spin_lock_init(&pp->conf_lock);
memset(pp->res, 0, sizeof(pp->res));
} else {
- pr_info("IMX PCIe port: link down!\n");
+ pr_info("IMX PCIe port: link down with power supply %d!\n",
+ pdata->pcie_power_always_on);
/* Release the clocks, and disable the power */
pcie_clk = clk_get(NULL, "pcie_clk");
@@ -656,11 +657,13 @@ static void __init add_pcie_port(void __iomem *base, void __iomem *dbi_base,
imx_pcie_clrset(iomuxc_gpr1_pcie_ref_clk_en, 0 << 16,
IOMUXC_GPR1);
- /* Disable PCIE power */
- gpio_request(pdata->pcie_pwr_en, "PCIE POWER_EN");
+ if (!pdata->pcie_power_always_on) {
+ /* Disable PCIE power */
+ gpio_request(pdata->pcie_pwr_en, "PCIE POWER_EN");
- /* activate PCIE_PWR_EN */
- gpio_direction_output(pdata->pcie_pwr_en, 0);
+ /* activate PCIE_PWR_EN */
+ gpio_direction_output(pdata->pcie_pwr_en, 0);
+ }
imx_pcie_clrset(iomuxc_gpr1_test_powerdown, 1 << 18,
IOMUXC_GPR1);
diff --git a/arch/arm/plat-mxc/include/mach/pcie.h b/arch/arm/plat-mxc/include/mach/pcie.h
index 775f65107978..2e8eb44be0c7 100644
--- a/arch/arm/plat-mxc/include/mach/pcie.h
+++ b/arch/arm/plat-mxc/include/mach/pcie.h
@@ -35,5 +35,6 @@ struct imx_pcie_platform_data {
unsigned int pcie_rst;
unsigned int pcie_wake_up;
unsigned int pcie_dis;
+ unsigned int pcie_power_always_on;
};
#endif /* __ASM_ARCH_IMX_PCIE_H */