summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci_brcm.c
AgeCommit message (Collapse)Author
2020-01-09ata: ahci_brcm: Fix AHCI resources managementFlorian Fainelli
commit c0cdf2ac4b5bf3e5ef2451ea29fb4104278cdabc upstream. The AHCI resources management within ahci_brcm.c is a little convoluted, largely because it historically had a dedicated clock that was managed within this file in the downstream tree. Once brough upstream though, the clock was left to be managed by libahci_platform.c which is entirely appropriate. This patch series ensures that the AHCI resources are fetched and enabled before any register access is done, thus avoiding bus errors on platforms which clock gate the controller by default. As a result we need to re-arrange the suspend() and resume() functions in order to avoid accessing registers after the clocks have been turned off respectively before the clocks have been turned on. Finally, we can refactor brcm_ahci_get_portmask() in order to fetch the number of ports from hpriv->mmio which is now accessible without jumping through hoops like we used to do. The commit pointed in the Fixes tag is both old and new enough not to require major headaches for backporting of this patch. Fixes: eba68f829794 ("ata: ahci_brcmstb: rename to support across Broadcom SoC's") Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09ata: ahci_brcm: Allow optional reset controller to be usedFlorian Fainelli
commit 2b2c47d9e1fe90311b725125d6252a859ee87a79 upstream. On BCM63138, we need to reset the AHCI core prior to start utilizing it, grab the reset controller device cookie and do that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-22ata: ahci_brcm: Avoid writing to read-only registersDoug Berger
This commit makes use of the AHCI_HFLAG_YES_ALPM flag to prevent the driver from writing to the read-only Host Capability register. It also sets the AHCI_HFLAG_NO_WRITE_TO_RO flag to prevent the AHCI library from writing to read-only registers. Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-06-16ata: ahci_brcm: Add support for Broadcom NSP SoCYendapally Reddy Dhananjaya Reddy
Add SATA3 support for Broadcom NSP SoC Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2016-06-16ata: ahci_brcmstb: rename to support across Broadcom SoC'sYendapally Reddy Dhananjaya Reddy
Rename the existing Broadcom STB ahci driver to common Broadcom SATA3 driver to share this across Broadcom SoCs. Signed-off-by: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>