1 --- a/drivers/ata/ahci_platform.c
2 +++ b/drivers/ata/ahci_platform.c
3 @@ -44,11 +44,18 @@ static struct scsi_host_template ahci_pl
7 +static const struct ata_port_info cns3xxx_port_info = {
8 + .flags = AHCI_FLAG_COMMON,
9 + .pio_mask = ATA_PIO4,
10 + .udma_mask = ATA_UDMA6,
11 + .port_ops = &ahci_pmp_retry_srst_ops,
14 static int ahci_probe(struct platform_device *pdev)
16 struct device *dev = &pdev->dev;
17 struct ahci_host_priv *hpriv;
18 - const struct ata_port_info *port;
19 + const struct ata_port_info *port = &ahci_port_info;
22 hpriv = ahci_platform_get_resources(pdev,
23 @@ -66,9 +73,14 @@ static int ahci_probe(struct platform_de
24 if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
25 hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
27 - port = acpi_device_get_match_data(dev);
29 - port = &ahci_port_info;
30 + if (IS_ENABLED(CONFIG_ARCH_CNS3XXX)) {
31 + port = &cns3xxx_port_info;
34 + port = acpi_device_get_match_data(dev);
36 + port = &ahci_port_info;
39 rc = ahci_platform_init_host(pdev, hpriv, port,