From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com,
Florian Fainelli <f.fainelli@gmail.com>,
Jens Axboe <axboe@kernel.dk>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
linux-ide@vger.kernel.org (open list:LIBATA SUBSYSTEM (Serial
and Parallel ATA drivers)),
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS)
Subject: [PATCH v2 2/4] ata: ahci_brcm: Allow optional reset controller to be used
Date: Mon, 1 Oct 2018 10:33:00 -0700 [thread overview]
Message-ID: <20181001173302.25398-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20181001173302.25398-1-f.fainelli@gmail.com>
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>
---
drivers/ata/ahci_brcm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index f3d557777d82..0e401b7c0856 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/reset.h>
#include <linux/string.h>
#include "ahci.h"
@@ -94,6 +95,7 @@ struct brcm_ahci_priv {
u32 port_mask;
u32 quirks;
enum brcm_ahci_version version;
+ struct reset_control *rcdev;
};
static inline u32 brcm_sata_readreg(void __iomem *addr)
@@ -411,6 +413,11 @@ static int brcm_ahci_probe(struct platform_device *pdev)
if (IS_ERR(priv->top_ctrl))
return PTR_ERR(priv->top_ctrl);
+ /* Reset is optional depending on platform */
+ priv->rcdev = devm_reset_control_get(&pdev->dev, "ahci");
+ if (!IS_ERR_OR_NULL(priv->rcdev))
+ reset_control_deassert(priv->rcdev);
+
if ((priv->version == BRCM_SATA_BCM7425) ||
(priv->version == BRCM_SATA_NSP)) {
priv->quirks |= BRCM_AHCI_QUIRK_NO_NCQ;
--
2.17.1
next prev parent reply other threads:[~2018-10-01 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 17:32 [PATCH v2 0/4] AHCI support for BCM63138 Florian Fainelli
2018-10-01 17:32 ` [PATCH v2 1/4] dt-bindings: ata: Document BCM63138 compatible string Florian Fainelli
2018-10-01 17:33 ` Florian Fainelli [this message]
2018-10-01 17:33 ` [PATCH v2 3/4] ata: ahci_brcm: Match BCM63138 compatible strings Florian Fainelli
2018-10-01 17:33 ` [PATCH v2 4/4] ata: ahci_brcm: Allow using driver or DSL SoCs Florian Fainelli
2018-10-01 22:39 ` [PATCH v2 0/4] AHCI support for BCM63138 Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181001173302.25398-3-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=axboe@kernel.dk \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).