Commit 13775dac authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-4.20/libata-20181021' of git://git.kernel.dk/linux-block

Pull libata updates from Jens Axboe:
 "Here are the libata changes queued up for 4.20:

   - %pOFn device_node.name conversion (Rob Herring)

   - Use LBAM/LBAH password defines instead of hardcoding (Linus
     Walleij)

   - Series adding support for the allwinner R40 AHCI controller
     (Corentin Labbe)

   - Disable ALPM for Ampere Computing device (Suman Tripathi)

   - ahci bcrm fixes (Florian Fainelli)

   - Redundant Kconfig defaults (Bartlomiej Zolnierkiewicz)

   - Code cleanups (Nathan Chancellor)"

* tag 'for-4.20/libata-20181021' of git://git.kernel.dk/linux-block:
  ata: remove redundant 'default n' from Kconfig
  ata: ep93xx: Use proper enums for directions
  ata: ahci_brcm: Allow using driver or DSL SoCs
  ata: ahci_brcm: Match BCM63138 compatible strings
  ata: ahci_brcm: Allow optional reset controller to be used
  dt-bindings: ata: Document BCM63138 compatible string
  pata_atiixp: Remove unnecessary parentheses
  ata: Disable AHCI ALPM feature for Ampere Computing eMAG SATA
  dt-bindings: ata: update ahci_sunxi bindings
  ata: ahci_sunxi: add support for r40
  dt-bindings: ata: ahci-platform: document phy-supply
  ata: ahci_platform: add support for PHY controller regulator
  dt-bindings: ata: ahci-platform: document ahci-supply
  ata: ahci_platform: add support for AHCI controller regulator
  dt-bindings: ata: ahci-platform: fix indentation of target-supply
  libata: Use SMART LBAM/LBAH password defines
  ata: ahci: Convert to using %pOFn instead of device_node.name
parents 6ab9e092 b3cd92db
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ PHYs.
Required properties:
- compatible        : compatible string, one of:
  - "allwinner,sun4i-a10-ahci"
  - "allwinner,sun8i-r40-ahci"
  - "brcm,iproc-ahci"
  - "hisilicon,hisi-ahci"
  - "cavium,octeon-7130-ahci"
@@ -31,8 +32,10 @@ Optional properties:
- clocks            : a list of phandle + clock specifier pairs
- resets            : a list of phandle + reset specifier pairs
- target-supply     : regulator for SATA target power
- phy-supply        : regulator for PHY power
- phys              : reference to the SATA PHY node
- phy-names         : must be "sata-phy"
- ahci-supply       : regulator for AHCI controller
- ports-implemented : Mask that indicates which ports that the HBA supports
		      are available for software to use. Useful if PORTS_IMPL
		      is not programmed by the BIOS, which is true with
@@ -42,6 +45,7 @@ Required properties when using sub-nodes:
- #address-cells    : number of cells to encode an address
- #size-cells       : number of cells representing the size of an address

For allwinner,sun8i-r40-ahci, the reset propertie must be present.

Sub-nodes required properties:
- reg		    : the port number
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Required properties:
			"brcm,bcm7445-ahci"
			"brcm,bcm-nsp-ahci"
			"brcm,sata3-ahci"
			"brcm,bcm63138-ahci"
- reg                : register mappings for AHCI and SATA_TOP_CTRL
- reg-names          : "ahci" and "top-ctrl"
- interrupts         : interrupt mapping for SATA IRQ
+2 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ if ATA

config ATA_NONSTANDARD
       bool
       default n

config ATA_VERBOSE_ERROR
	bool "Verbose ATA error reporting"
@@ -62,7 +61,6 @@ config ATA_ACPI
config SATA_ZPODD
	bool "SATA Zero Power Optical Disc Drive (ZPODD) support"
	depends on ATA_ACPI && PM
	default n
	help
	  This option adds support for SATA Zero Power Optical Disc
	  Drive (ZPODD). It requires both the ODD and the platform
@@ -121,7 +119,8 @@ config SATA_AHCI_PLATFORM

config AHCI_BRCM
	tristate "Broadcom AHCI SATA support"
	depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP
	depends on ARCH_BRCMSTB || BMIPS_GENERIC || ARCH_BCM_NSP || \
		   ARCH_BCM_63XX
	help
	  This option enables support for the AHCI SATA3 controller found on
	  Broadcom SoC's.
+2 −0
Original line number Diff line number Diff line
@@ -352,6 +352,8 @@ struct ahci_host_priv {
	struct clk		*clks[AHCI_MAX_CLKS]; /* Optional */
	struct reset_control	*rsts;		/* Optional */
	struct regulator	**target_pwrs;	/* Optional */
	struct regulator	*ahci_regulator;/* Optional */
	struct regulator	*phy_regulator;/* Optional */
	/*
	 * If platform uses PHYs. There is a 1:1 relation between the port number and
	 * the PHY position in this array.
+8 −0
Original line number Diff line number Diff line
@@ -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)
@@ -381,6 +383,7 @@ static struct scsi_host_template ahci_platform_sht = {
static const struct of_device_id ahci_of_match[] = {
	{.compatible = "brcm,bcm7425-ahci", .data = (void *)BRCM_SATA_BCM7425},
	{.compatible = "brcm,bcm7445-ahci", .data = (void *)BRCM_SATA_BCM7445},
	{.compatible = "brcm,bcm63138-ahci", .data = (void *)BRCM_SATA_BCM7445},
	{.compatible = "brcm,bcm-nsp-ahci", .data = (void *)BRCM_SATA_NSP},
	{},
};
@@ -411,6 +414,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;
Loading