Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: ahci_brcm: BCM7216 reset is self de-asserting

The BCM7216 reset controller line is self-deasserting, unlike other
platforms, so make use of reset_control_reset() instead of
reset_control_deassert().

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Florian Fainelli and committed by
Jens Axboe
272ecd60 1a0600d1

+12 -4
+12 -4
drivers/ata/ahci_brcm.c
··· 352 352 else 353 353 ret = 0; 354 354 355 - reset_control_assert(priv->rcdev); 355 + if (priv->version != BRCM_SATA_BCM7216) 356 + reset_control_assert(priv->rcdev); 356 357 357 358 return ret; 358 359 } ··· 365 364 struct brcm_ahci_priv *priv = hpriv->plat_data; 366 365 int ret = 0; 367 366 368 - ret = reset_control_deassert(priv->rcdev); 367 + if (priv->version == BRCM_SATA_BCM7216) 368 + ret = reset_control_reset(priv->rcdev); 369 + else 370 + ret = reset_control_deassert(priv->rcdev); 369 371 if (ret) 370 372 return ret; 371 373 ··· 479 475 break; 480 476 } 481 477 482 - ret = reset_control_deassert(priv->rcdev); 478 + if (priv->version == BRCM_SATA_BCM7216) 479 + ret = reset_control_reset(priv->rcdev); 480 + else 481 + ret = reset_control_deassert(priv->rcdev); 483 482 if (ret) 484 483 return ret; 485 484 ··· 527 520 out_disable_clks: 528 521 ahci_platform_disable_clks(hpriv); 529 522 out_reset: 530 - reset_control_assert(priv->rcdev); 523 + if (priv->version != BRCM_SATA_BCM7216) 524 + reset_control_assert(priv->rcdev); 531 525 return ret; 532 526 } 533 527