2019-01-28 09:05:10 +00:00
|
|
|
--- a/drivers/ata/ahci_platform.c
|
|
|
|
+++ b/drivers/ata/ahci_platform.c
|
2019-11-21 13:09:35 +00:00
|
|
|
@@ -44,11 +44,18 @@ static struct scsi_host_template ahci_pl
|
2019-01-28 09:05:10 +00:00
|
|
|
AHCI_SHT(DRV_NAME),
|
|
|
|
};
|
|
|
|
|
|
|
|
+static const struct ata_port_info cns3xxx_port_info = {
|
|
|
|
+ .flags = AHCI_FLAG_COMMON,
|
|
|
|
+ .pio_mask = ATA_PIO4,
|
|
|
|
+ .udma_mask = ATA_UDMA6,
|
|
|
|
+ .port_ops = &ahci_pmp_retry_srst_ops,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
static int ahci_probe(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct device *dev = &pdev->dev;
|
|
|
|
struct ahci_host_priv *hpriv;
|
2019-11-21 13:09:35 +00:00
|
|
|
- const struct ata_port_info *port;
|
|
|
|
+ const struct ata_port_info *port = &ahci_port_info;
|
2019-01-28 09:05:10 +00:00
|
|
|
int rc;
|
|
|
|
|
|
|
|
hpriv = ahci_platform_get_resources(pdev,
|
2019-11-21 13:09:35 +00:00
|
|
|
@@ -66,9 +73,14 @@ static int ahci_probe(struct platform_de
|
|
|
|
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
|
|
|
|
hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
|
|
|
|
|
|
|
|
- port = acpi_device_get_match_data(dev);
|
|
|
|
- if (!port)
|
|
|
|
- port = &ahci_port_info;
|
|
|
|
+ if (IS_ENABLED(CONFIG_ARCH_CNS3XXX)) {
|
|
|
|
+ port = &cns3xxx_port_info;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ port = acpi_device_get_match_data(dev);
|
|
|
|
+ if (!port)
|
|
|
|
+ port = &ahci_port_info;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
rc = ahci_platform_init_host(pdev, hpriv, port,
|
|
|
|
&ahci_platform_sht);
|