2021-04-08 16:42:28

by Sowjanya Komatineni

[permalink] [raw]
Subject: [PATCH v1] ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present

This patch adds a check on present of PM domain and calls legacy power
domain API tegra_powergate_power_off() only when PM domain is not present.

This is a follow-up patch to Tegra186 AHCI support patch series
https://lore.kernel.org/patchwork/cover/1408752/

Signed-off-by: Sowjanya Komatineni <[email protected]>

---
drivers/ata/ahci_tegra.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index 56612af..bd484dd 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -287,7 +287,8 @@ static void tegra_ahci_power_off(struct ahci_host_priv *hpriv)
reset_control_assert(tegra->sata_cold_rst);

clk_disable_unprepare(tegra->sata_clk);
- tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
+ if (!tegra->pdev->dev.pm_domain)
+ tegra_powergate_power_off(TEGRA_POWERGATE_SATA);

regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
}
--
2.7.4


2021-04-08 20:00:19

by Dmitry Osipenko

[permalink] [raw]
Subject: Re: [PATCH v1] ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present

08.04.2021 19:40, Sowjanya Komatineni пишет:
> This patch adds a check on present of PM domain and calls legacy power
> domain API tegra_powergate_power_off() only when PM domain is not present.
>
> This is a follow-up patch to Tegra186 AHCI support patch series
> https://lore.kernel.org/patchwork/cover/1408752/
>
> Signed-off-by: Sowjanya Komatineni <[email protected]>
>
> ---
> drivers/ata/ahci_tegra.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
> index 56612af..bd484dd 100644
> --- a/drivers/ata/ahci_tegra.c
> +++ b/drivers/ata/ahci_tegra.c
> @@ -287,7 +287,8 @@ static void tegra_ahci_power_off(struct ahci_host_priv *hpriv)
> reset_control_assert(tegra->sata_cold_rst);
>
> clk_disable_unprepare(tegra->sata_clk);
> - tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
> + if (!tegra->pdev->dev.pm_domain)
> + tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
>
> regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
> }
>

There are two instances of tegra_powergate_power_off() in the driver.

2021-04-08 20:52:47

by Sowjanya Komatineni

[permalink] [raw]
Subject: Re: [PATCH v1] ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present


On 4/8/21 12:58 PM, Dmitry Osipenko wrote:
> 08.04.2021 19:40, Sowjanya Komatineni пишет:
>> This patch adds a check on present of PM domain and calls legacy power
>> domain API tegra_powergate_power_off() only when PM domain is not present.
>>
>> This is a follow-up patch to Tegra186 AHCI support patch series
>> https://lore.kernel.org/patchwork/cover/1408752/
>>
>> Signed-off-by: Sowjanya Komatineni <[email protected]>
>>
>> ---
>> drivers/ata/ahci_tegra.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
>> index 56612af..bd484dd 100644
>> --- a/drivers/ata/ahci_tegra.c
>> +++ b/drivers/ata/ahci_tegra.c
>> @@ -287,7 +287,8 @@ static void tegra_ahci_power_off(struct ahci_host_priv *hpriv)
>> reset_control_assert(tegra->sata_cold_rst);
>>
>> clk_disable_unprepare(tegra->sata_clk);
>> - tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
>> + if (!tegra->pdev->dev.pm_domain)
>> + tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
>>
>> regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
>> }
>>
> There are two instances of tegra_powergate_power_off() in the driver.
Thanks Dmitry. Sorry missed it. Will fix