kernel: bump 4.19 to 4.19.85
[openwrt/staging/rmilecki.git] / target / linux / cns3xxx / patches-4.19 / 080-sata_support.patch
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
4 AHCI_SHT(DRV_NAME),
5 };
6
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,
12 +};
13 +
14 static int ahci_probe(struct platform_device *pdev)
15 {
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;
20 int rc;
21
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;
26
27 - port = acpi_device_get_match_data(dev);
28 - if (!port)
29 - port = &ahci_port_info;
30 + if (IS_ENABLED(CONFIG_ARCH_CNS3XXX)) {
31 + port = &cns3xxx_port_info;
32 + }
33 + else {
34 + port = acpi_device_get_match_data(dev);
35 + if (!port)
36 + port = &ahci_port_info;
37 + }
38
39 rc = ahci_platform_init_host(pdev, hpriv, port,
40 &ahci_platform_sht);