soc/tegra: Changes for v4.9-rc1

This contains a single patch to fix an issue with setting the deep power
 down mode of I/O rails.
 -----BEGIN PGP SIGNATURE-----
 
 iQIwBAABCAAaBQJX0tDXExx0cmVkaW5nQG52aWRpYS5jb20ACgkQ3SOs138+s6E2
 Fw/+PM0dk1O9b4jlb1m8aRfBaYFUhTpVZizedZW2xSX1n/Y9SJoqkMcASxKEeqAm
 kECoCCeJkuKWozeEffJ79ewiLvmqjWg+LLEsKrIklKZJKlzcsSV3ooUkTdOtDZUr
 l4YMWRneJ2md6rK3/jcZj9S3SdLyn3R6Pwh6DzJge/4+yyhjQ+axVJiUNOU/D345
 yLZr4ErzixHg/a968CfnoLu9+3Tetlc41+VqoUQWurLqNXKu2ehi/t63Oceii/uy
 DhjKYOxtwXQlB46E9vJ5qWhc6gYc32Kwg7BAjCKte00T24r0obOivSz6n1dV9a5k
 wQcQP6zZGEMFFcgJI0+ytBrIE3V24go7RIotTathbvKBCNLkgyVlkrT7uhoP7kH4
 z4cgoo489/HYGd1BLF7FkmobSH8mAFvjYv43LjmObi/5w1r+MDqDQQqHTkrJ5GT0
 WMzb51AZY7Xohu+nP5o9k2+RBUXjamJCT0sfjKK1rVCid0Z0ddWRuV9uuKs6evJT
 47EFQxQzDzMuWkcZX/FcO3WrT4+7k1mXn6Cj0HNaITBIwYNWKa38HRNJJD8mxyS7
 fTev9l+ymP2kW07F1zH+eO6tzGir+48a0iWLDAPN2KZBuDazbHezomoifNURCfat
 TCQtV7260e0+ZZJ3+S1O75vTk3femXmzkHTAETbVrcySgQM=
 =IFfY
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

Pull "soc/tegra: Changes for v4.9-rc1" from Thierry Reding:

This contains a single patch to fix an issue with setting the deep power
down mode of I/O rails.

* tag 'tegra-for-4.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Fix incorrect DPD request
This commit is contained in:
Arnd Bergmann 2016-09-15 00:41:12 +02:00
commit bdfb3af1b3
1 changed files with 8 additions and 20 deletions

View File

@ -967,8 +967,8 @@ static void tegra_io_rail_unprepare(void)
int tegra_io_rail_power_on(unsigned int id)
{
unsigned long request, status, value;
unsigned int bit, mask;
unsigned long request, status;
unsigned int bit;
int err;
mutex_lock(&pmc->powergates_lock);
@ -977,15 +977,9 @@ int tegra_io_rail_power_on(unsigned int id)
if (err)
goto error;
mask = 1 << bit;
tegra_pmc_writel(IO_DPD_REQ_CODE_OFF | BIT(bit), request);
value = tegra_pmc_readl(request);
value |= mask;
value &= ~IO_DPD_REQ_CODE_MASK;
value |= IO_DPD_REQ_CODE_OFF;
tegra_pmc_writel(value, request);
err = tegra_io_rail_poll(status, mask, 0, 250);
err = tegra_io_rail_poll(status, BIT(bit), 0, 250);
if (err) {
pr_info("tegra_io_rail_poll() failed: %d\n", err);
goto error;
@ -1002,8 +996,8 @@ EXPORT_SYMBOL(tegra_io_rail_power_on);
int tegra_io_rail_power_off(unsigned int id)
{
unsigned long request, status, value;
unsigned int bit, mask;
unsigned long request, status;
unsigned int bit;
int err;
mutex_lock(&pmc->powergates_lock);
@ -1014,15 +1008,9 @@ int tegra_io_rail_power_off(unsigned int id)
goto error;
}
mask = 1 << bit;
tegra_pmc_writel(IO_DPD_REQ_CODE_ON | BIT(bit), request);
value = tegra_pmc_readl(request);
value |= mask;
value &= ~IO_DPD_REQ_CODE_MASK;
value |= IO_DPD_REQ_CODE_ON;
tegra_pmc_writel(value, request);
err = tegra_io_rail_poll(status, mask, mask, 250);
err = tegra_io_rail_poll(status, BIT(bit), BIT(bit), 250);
if (err)
goto error;