Lines Matching +full:ahci +full:- +full:compatible

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Freescale QorIQ AHCI SATA platform driver
20 #include "ahci.h"
22 #define DRV_NAME "ahci-qoriq"
72 { .compatible = "fsl,ls1021a-ahci", .data = (void *)AHCI_LS1021A},
73 { .compatible = "fsl,ls1028a-ahci", .data = (void *)AHCI_LS1028A},
74 { .compatible = "fsl,ls1043a-ahci", .data = (void *)AHCI_LS1043A},
75 { .compatible = "fsl,ls2080a-ahci", .data = (void *)AHCI_LS2080A},
76 { .compatible = "fsl,ls1046a-ahci", .data = (void *)AHCI_LS1046A},
77 { .compatible = "fsl,ls1088a-ahci", .data = (void *)AHCI_LS1088A},
78 { .compatible = "fsl,ls2088a-ahci", .data = (void *)AHCI_LS2088A},
79 { .compatible = "fsl,lx2160a-ahci", .data = (void *)AHCI_LX2160A},
93 const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); in ahci_qoriq_hardreset()
94 void __iomem *port_mmio = ahci_port_base(link->ap); in ahci_qoriq_hardreset()
96 struct ata_port *ap = link->ap; in ahci_qoriq_hardreset()
97 struct ahci_port_priv *pp = ap->private_data; in ahci_qoriq_hardreset()
98 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_qoriq_hardreset()
99 struct ahci_qoriq_priv *qoriq_priv = hpriv->plat_data; in ahci_qoriq_hardreset()
100 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; in ahci_qoriq_hardreset()
104 bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A); in ahci_qoriq_hardreset()
106 hpriv->stop_engine(ap); in ahci_qoriq_hardreset()
110 * A-009042: The device detection initialization sequence in ahci_qoriq_hardreset()
125 ata_tf_init(link->device, &tf); in ahci_qoriq_hardreset()
143 hpriv->start_engine(ap); in ahci_qoriq_hardreset()
168 struct ahci_qoriq_priv *qpriv = hpriv->plat_data; in ahci_qoriq_phy_init()
169 void __iomem *reg_base = hpriv->mmio; in ahci_qoriq_phy_init()
171 switch (qpriv->type) { in ahci_qoriq_phy_init()
173 if (!(qpriv->ecc_addr || ecc_initialized)) in ahci_qoriq_phy_init()
174 return -EINVAL; in ahci_qoriq_phy_init()
175 else if (qpriv->ecc_addr && !ecc_initialized) in ahci_qoriq_phy_init()
176 writel(SATA_ECC_DISABLE, qpriv->ecc_addr); in ahci_qoriq_phy_init()
183 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
189 if (!(qpriv->ecc_addr || ecc_initialized)) in ahci_qoriq_phy_init()
190 return -EINVAL; in ahci_qoriq_phy_init()
191 else if (qpriv->ecc_addr && !ecc_initialized) in ahci_qoriq_phy_init()
192 writel(readl(qpriv->ecc_addr) | in ahci_qoriq_phy_init()
194 qpriv->ecc_addr); in ahci_qoriq_phy_init()
199 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
208 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
213 if (!(qpriv->ecc_addr || ecc_initialized)) in ahci_qoriq_phy_init()
214 return -EINVAL; in ahci_qoriq_phy_init()
215 else if (qpriv->ecc_addr && !ecc_initialized) in ahci_qoriq_phy_init()
216 writel(readl(qpriv->ecc_addr) | in ahci_qoriq_phy_init()
218 qpriv->ecc_addr); in ahci_qoriq_phy_init()
223 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
230 if (!(qpriv->ecc_addr || ecc_initialized)) in ahci_qoriq_phy_init()
231 return -EINVAL; in ahci_qoriq_phy_init()
232 else if (qpriv->ecc_addr && !ecc_initialized) in ahci_qoriq_phy_init()
233 writel(readl(qpriv->ecc_addr) | in ahci_qoriq_phy_init()
235 qpriv->ecc_addr); in ahci_qoriq_phy_init()
240 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
249 if (qpriv->is_dmacoherent) in ahci_qoriq_phy_init()
260 struct device_node *np = pdev->dev.of_node; in ahci_qoriq_probe()
262 struct device *dev = &pdev->dev; in ahci_qoriq_probe()
274 acpi_id = acpi_match_device(ahci_qoriq_acpi_match, &pdev->dev); in ahci_qoriq_probe()
276 return -ENODEV; in ahci_qoriq_probe()
280 return -ENOMEM; in ahci_qoriq_probe()
283 qoriq_priv->type = (unsigned long)of_id->data; in ahci_qoriq_probe()
285 qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data; in ahci_qoriq_probe()
290 "sata-ecc"); in ahci_qoriq_probe()
292 qoriq_priv->ecc_addr = in ahci_qoriq_probe()
294 if (IS_ERR(qoriq_priv->ecc_addr)) in ahci_qoriq_probe()
295 return PTR_ERR(qoriq_priv->ecc_addr); in ahci_qoriq_probe()
299 if (device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT) in ahci_qoriq_probe()
300 qoriq_priv->is_dmacoherent = true; in ahci_qoriq_probe()
306 hpriv->plat_data = qoriq_priv; in ahci_qoriq_probe()
328 struct ahci_host_priv *hpriv = host->private_data; in ahci_qoriq_resume()
372 MODULE_DESCRIPTION("Freescale QorIQ AHCI SATA platform driver");