struct reset_control *sata_cold_rst;
/* Needs special handling, cannot use ahci_platform */
struct clk *sata_clk;
+ struct tegra_pmc *pmc;
struct regulator_bulk_data *supplies;
const struct tegra_ahci_soc *soc;
};
return ret;
if (!tegra->pdev->dev.pm_domain) {
- ret = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_SATA,
- tegra->sata_clk,
- tegra->sata_rst);
+ ret = tegra_pmc_powergate_sequence_power_up(tegra->pmc,
+ TEGRA_POWERGATE_SATA,
+ tegra->sata_clk,
+ tegra->sata_rst);
if (ret)
goto disable_regulators;
}
clk_disable_unprepare(tegra->sata_clk);
if (!tegra->pdev->dev.pm_domain)
- tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
+ tegra_pmc_powergate_power_off(tegra->pmc, TEGRA_POWERGATE_SATA);
disable_regulators:
regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
clk_disable_unprepare(tegra->sata_clk);
if (!tegra->pdev->dev.pm_domain)
- tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
+ tegra_pmc_powergate_power_off(tegra->pmc, TEGRA_POWERGATE_SATA);
regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
}
return PTR_ERR(tegra->sata_clk);
}
+ tegra->pmc = devm_tegra_pmc_get(&pdev->dev);
+ if (IS_ERR(tegra->pmc))
+ return dev_err_probe(&pdev->dev, PTR_ERR(tegra->pmc),
+ "failed to get PMC\n");
+
tegra->supplies = devm_kcalloc(&pdev->dev,
tegra->soc->num_supplies,
sizeof(*tegra->supplies), GFP_KERNEL);