]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 19:31:25 +0000 (20:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 19:31:25 +0000 (20:31 +0100)
added patches:
ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch

queue-4.14/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch [new file with mode: 0644]
queue-4.14/ata-ahci_brcm-fix-ahci-resources-management.patch
queue-4.14/series

diff --git a/queue-4.14/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch b/queue-4.14/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch
new file mode 100644 (file)
index 0000000..1370cc0
--- /dev/null
@@ -0,0 +1,50 @@
+From 2b2c47d9e1fe90311b725125d6252a859ee87a79 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Mon, 1 Oct 2018 10:33:00 -0700
+Subject: ata: ahci_brcm: Allow optional reset controller to be used
+
+From: Florian Fainelli <f.fainelli@gmail.com>
+
+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>
+
+---
+ drivers/ata/ahci_brcm.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- 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"
+@@ -87,6 +88,7 @@ struct brcm_ahci_priv {
+       u32 port_mask;
+       u32 quirks;
+       enum brcm_ahci_version version;
++      struct reset_control *rcdev;
+ };
+ static const struct ata_port_info ahci_brcm_port_info = {
+@@ -327,6 +329,11 @@ static int brcm_ahci_probe(struct platfo
+       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;
index 1362bb6ec43244dddeea43e868aae7a792c7d6e5..fe1b67154c0e3fbbaf71751cd18c27fd48cb0b16 100644 (file)
@@ -40,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/drivers/ata/ahci_brcm.c
 +++ b/drivers/ata/ahci_brcm.c
-@@ -221,19 +221,12 @@ static void brcm_sata_phys_disable(struc
+@@ -223,19 +223,12 @@ static void brcm_sata_phys_disable(struc
                        brcm_sata_phy_disable(priv, i);
  }
  
@@ -62,7 +62,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  
        if (fls(impl) > SATA_TOP_MAX_PHYS)
                dev_warn(priv->dev, "warning: more ports than PHYs (%#x)\n",
-@@ -241,9 +234,6 @@ static u32 brcm_ahci_get_portmask(struct
+@@ -243,9 +236,6 @@ static u32 brcm_ahci_get_portmask(struct
        else if (!impl)
                dev_info(priv->dev, "no ports found\n");
  
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        return impl;
  }
  
-@@ -270,11 +260,10 @@ static int brcm_ahci_suspend(struct devi
+@@ -272,11 +262,10 @@ static int brcm_ahci_suspend(struct devi
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
        struct brcm_ahci_priv *priv = hpriv->plat_data;
@@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  static int brcm_ahci_resume(struct device *dev)
-@@ -282,11 +271,44 @@ static int brcm_ahci_resume(struct devic
+@@ -284,11 +273,44 @@ static int brcm_ahci_resume(struct devic
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
        struct brcm_ahci_priv *priv = hpriv->plat_data;
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  #endif
  
-@@ -333,38 +355,63 @@ static int brcm_ahci_probe(struct platfo
+@@ -340,38 +362,63 @@ static int brcm_ahci_probe(struct platfo
                priv->quirks |= BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE;
        }
  
@@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  static int brcm_ahci_remove(struct platform_device *pdev)
-@@ -374,12 +421,12 @@ static int brcm_ahci_remove(struct platf
+@@ -381,12 +428,12 @@ static int brcm_ahci_remove(struct platf
        struct brcm_ahci_priv *priv = hpriv->plat_data;
        int ret;
  
index f6a79179fd600dd400a4d3919db2101a484c26de..c053c85b30da5c409ed5b4c58bca637c3678f204 100644 (file)
@@ -34,6 +34,7 @@ dmaengine-fix-access-to-uninitialized-dma_slave_caps.patch
 compat_ioctl-block-handle-persistent-reservations.patch
 compat_ioctl-block-handle-blkreportzone-blkresetzone.patch
 ata-libahci_platform-export-again-ahci_platform_-en-dis-able_phys.patch
+ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch
 ata-ahci_brcm-fix-ahci-resources-management.patch
 gpiolib-fix-up-emulated-open-drain-outputs.patch
 tracing-fix-lock-inversion-in-trace_event_enable_tgid_record.patch