summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Lin <yelin@nvidia.com>2013-01-03 15:01:56 -0800
committerEric Brower <ebrower@nvidia.com>2013-01-04 14:21:54 -0800
commitc319d0e904e6bff6e6c89d3c8cf651949c379925 (patch)
treeb815a33b9774c1163b057427654bba1eab1a18bf
parent8bd060e546c9c7f4296caca52ea35a3ccd2c953a (diff)
arm: tegra: sata: Fix LP0 resume problem
- Fix a bug in ahci-tegra.c when checking if SATA is on when resuming - Add codes to support PM315 which uses LDO1 regulator for SATA rails bug 1206518 Change-Id: Iaa910b1948fbcf5e45491977fd8ed0b313d2e0ae Signed-off-by: Yen Lin <yelin@nvidia.com> Reviewed-on: http://git-master/r/188441 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bibek Basu <bbasu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Peng Wu <pengw@nvidia.com> Tested-by: Peng Wu <pengw@nvidia.com> Reviewed-by: Eric Brower <ebrower@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-cardhu-power.c20
-rw-r--r--drivers/ata/ahci-tegra.c2
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c
index db86a07778b4..d69426a30c67 100644
--- a/arch/arm/mach-tegra/board-cardhu-power.c
+++ b/arch/arm/mach-tegra/board-cardhu-power.c
@@ -115,6 +115,18 @@ static struct regulator_consumer_supply tps6591x_ldo1_supply_0[] = {
REGULATOR_SUPPLY("vdd_pexa", NULL),
};
+static struct regulator_consumer_supply tps6591x_ldo1_supply_pm315[] = {
+ REGULATOR_SUPPLY("avdd_pexb", NULL),
+ REGULATOR_SUPPLY("vdd_pexb", NULL),
+ REGULATOR_SUPPLY("avdd_pex_pll", NULL),
+ REGULATOR_SUPPLY("avdd_pexa", NULL),
+ REGULATOR_SUPPLY("vdd_pexa", NULL),
+ REGULATOR_SUPPLY("avdd_sata", NULL),
+ REGULATOR_SUPPLY("vdd_sata", NULL),
+ REGULATOR_SUPPLY("avdd_sata_pll", NULL),
+ REGULATOR_SUPPLY("avdd_plle", NULL),
+};
+
static struct regulator_consumer_supply tps6591x_ldo2_supply_0[] = {
REGULATOR_SUPPLY("avdd_sata", NULL),
REGULATOR_SUPPLY("vdd_sata", NULL),
@@ -453,6 +465,14 @@ int __init cardhu_regulator_init(void)
pr_info("VSEL 1:0 %d%d\n",
tps62361_pdata.vsel1_def_state,
tps62361_pdata.vsel0_def_state);
+ } else if (board_info.board_id == BOARD_PM315) {
+ /* On PM315, SATA rails are on LDO1 */
+ pdata_ldo1_0.regulator.num_consumer_supplies =
+ ARRAY_SIZE(tps6591x_ldo1_supply_pm315);
+ pdata_ldo1_0.regulator.consumer_supplies =
+ tps6591x_ldo1_supply_pm315;
+ pdata_ldo2_0.regulator.num_consumer_supplies = 0;
+ pdata_ldo2_0.regulator.consumer_supplies = NULL;
}
if (((board_info.board_id == BOARD_E1291) ||
diff --git a/drivers/ata/ahci-tegra.c b/drivers/ata/ahci-tegra.c
index 39cf4acf0ae6..c90472827b9b 100644
--- a/drivers/ata/ahci-tegra.c
+++ b/drivers/ata/ahci-tegra.c
@@ -926,7 +926,7 @@ static int tegra_ahci_controller_resume(struct platform_device *pdev)
}
spin_lock_irqsave(&host->lock, flags);
- if (!tegra_hpriv->pg_state == SATA_ON) {
+ if (tegra_hpriv->pg_state == SATA_ON) {
dev_dbg(host->dev, "resume: SATA already powered on\n");
} else {
dev_dbg(host->dev, "resume: powering on SATA...\n");