Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1480a16 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull libata updates from Tejun Heo:

 - Hannes's patchset implements support for better error reporting
   introduced by the new ATA command spec.

 - the deperecated pci_ dma API usages have been replaced by dma_ ones.

 - a bunch of hardware specific updates and some cleanups.

* 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ata: remove deprecated use of pci api
  ahci: st: st_configure_oob must be called after IP is clocked.
  ahci: st: Update the ahci_st DT documentation
  ahci: st: Update the DT example for how to obtain the PHY.
  sata_dwc_460ex: indent an if statement
  libata: Add tracepoints
  libata-eh: Set 'information' field for autosense
  libata: Implement support for sense data reporting
  libata: Implement NCQ autosense
  libata: use status bit definitions in ata_dump_status()
  ide,ata: Rename ATA_IDX to ATA_SENSE
  libata: whitespace fixes in ata_to_sense_error()
  libata: whitespace cleanup in ata_get_cmd_descript()
  libata: use READ_LOG_DMA_EXT
  libata: remove ATA_FLAG_LOWTAG
  sata_dwc_460ex: re-use hsdev->dev instead of dwc_dev
  sata_dwc_460ex: move to generic DMA driver
  sata_dwc_460ex: join messages back
  sata: xgene: add ACPI support for APM X-Gene SATA ports
  ata: sata_mv: add proper definitions for LP_PHY_CTL register values
parents 45141eea c54c719b
Loading
Loading
Loading
Loading
+33 −14
Original line number Diff line number Diff line
@@ -3,25 +3,28 @@ STMicroelectronics STi SATA controller
This binding describes a SATA device.

Required properties:
 - compatible	   : Must be "st,sti-ahci"
 - compatible	   : Must be "st,ahci"
 - reg		   : Physical base addresses and length of register sets
 - interrupts	   : Interrupt associated with the SATA device
 - interrupt-names :   Associated name must be; "hostc"
 - resets	   : The power-down and soft-reset lines of SATA IP
 - reset-names	   :   Associated names must be; "pwr-dwn" and "sw-rst"
 - clocks	   : The phandle for the clock
 - clock-names	   :   Associated name must be; "ahci_clk"
 - phys		   : The phandle for the PHY device
 - phys		   : The phandle for the PHY port
 - phy-names	   :   Associated name must be; "ahci_phy"

Optional properties:
 - resets	   : The power-down, soft-reset and power-reset lines of SATA IP
 - reset-names	   :   Associated names must be; "pwr-dwn", "sw-rst" and "pwr-rst"

Example:

	/* Example for stih416 */
	sata0: sata@fe380000 {
		compatible      = "st,sti-ahci";
		compatible	= "st,ahci";
		reg		= <0xfe380000 0x1000>;
		interrupts	= <GIC_SPI 157 IRQ_TYPE_NONE>;
		interrupt-names	= "hostc";
		phys	        = <&miphy365x_phy MIPHY_PORT_0 MIPHY_TYPE_SATA>;
		phys		= <&phy_port0 PHY_TYPE_SATA>;
		phy-names	= "ahci_phy";
		resets		= <&powerdown STIH416_SATA0_POWERDOWN>,
				  <&softreset STIH416_SATA0_SOFTRESET>;
@@ -29,3 +32,19 @@ Example:
		clocks		= <&clk_s_a0_ls CLK_ICN_REG>;
		clock-names	= "ahci_clk";
	};

	/* Example for stih407 family silicon */
	sata0: sata@9b20000 {
		compatible	= "st,ahci";
		reg		= <0x9b20000 0x1000>;
		interrupts	= <GIC_SPI 159 IRQ_TYPE_NONE>;
		interrupt-names	= "hostc";
		phys		= <&phy_port0 PHY_TYPE_SATA>;
		phy-names	= "ahci_phy";
		resets		= <&powerdown STIH407_SATA0_POWERDOWN>,
				  <&softreset STIH407_SATA0_SOFTRESET>,
				  <&softreset STIH407_SATA0_PWR_SOFTRESET>;
		reset-names	= "pwr-dwn", "sw-rst", "pwr-rst";
		clocks		= <&clk_s_c0_flexgen CLK_ICN_REG>;
		clock-names	= "ahci_clk";
	};
+2 −1
Original line number Diff line number Diff line
@@ -111,7 +111,8 @@ obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
# Should be last libata driver
obj-$(CONFIG_PATA_LEGACY)	+= pata_legacy.o

libata-y	:= libata-core.o libata-scsi.o libata-eh.o libata-transport.o
libata-y	:= libata-core.o libata-scsi.o libata-eh.o \
	libata-transport.o libata-trace.o
libata-$(CONFIG_ATA_SFF)	+= libata-sff.o
libata-$(CONFIG_SATA_PMP)	+= libata-pmp.o
libata-$(CONFIG_ATA_ACPI)	+= libata-acpi.o
+5 −5
Original line number Diff line number Diff line
@@ -181,10 +181,10 @@ static int acard_ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
	int rc;

	if (using_dac &&
	    !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
		rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
	    !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
		rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
		if (rc) {
			rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
			rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
			if (rc) {
				dev_err(&pdev->dev,
					   "64-bit DMA enable failed\n");
@@ -192,12 +192,12 @@ static int acard_ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
			}
		}
	} else {
		rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
		rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (rc) {
			dev_err(&pdev->dev, "32-bit DMA enable failed\n");
			return rc;
		}
		rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
		rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (rc) {
			dev_err(&pdev->dev,
				"32-bit consistent DMA enable failed\n");
+5 −5
Original line number Diff line number Diff line
@@ -738,10 +738,10 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
		return 0;

	if (using_dac &&
	    !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
		rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
	    !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
		rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
		if (rc) {
			rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
			rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
			if (rc) {
				dev_err(&pdev->dev,
					"64-bit DMA enable failed\n");
@@ -749,12 +749,12 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
			}
		}
	} else {
		rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
		rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (rc) {
			dev_err(&pdev->dev, "32-bit DMA enable failed\n");
			return rc;
		}
		rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
		rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
		if (rc) {
			dev_err(&pdev->dev,
				"32-bit consistent DMA enable failed\n");
+4 −2
Original line number Diff line number Diff line
@@ -68,8 +68,6 @@ static int st_ahci_deassert_resets(struct device *dev)
		}
	}

	st_ahci_configure_oob(drv_data->hpriv->mmio);

	if (drv_data->sw_rst) {
		err = reset_control_deassert(drv_data->sw_rst);
		if (err) {
@@ -172,6 +170,8 @@ static int st_ahci_probe(struct platform_device *pdev)
	if (err)
		return err;

	st_ahci_configure_oob(drv_data->hpriv->mmio);

	err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info,
				      &ahci_platform_sht);
	if (err) {
@@ -222,6 +222,8 @@ static int st_ahci_resume(struct device *dev)
		return err;
	}

	st_ahci_configure_oob(drv_data->hpriv->mmio);

	return ahci_platform_resume_host(dev);
}
#endif
Loading