From e1f0e15a08074c83faced0950cbfe04809555f54 Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Mon, 6 Dec 2021 10:51:16 +0800 Subject: [PATCH] ATA: ahci_platform: enable FBS for RK3588 Because the CAP parameters of AHCI are incorrect, FBS cannot be started automatically and needs to be configured manually. This configuration can improve the read-write performance when connecting multiple SATA hard disks through the PM chip. Signed-off-by: Yifeng Zhao Change-Id: I66ff92dce1711e3d189801c8caa3219217a50dda --- drivers/ata/ahci_platform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 3aab2e3d57f3..1825b33cc274 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -62,6 +62,9 @@ static int ahci_probe(struct platform_device *pdev) if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci")) hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ; + if (of_device_is_compatible(dev->of_node, "rockchip,rk-ahci")) + hpriv->flags |= AHCI_HFLAG_YES_FBS; + port = acpi_device_get_match_data(dev); if (!port) port = &ahci_port_info; @@ -88,6 +91,7 @@ static const struct of_device_id ahci_of_match[] = { { .compatible = "snps,dwc-ahci", }, { .compatible = "hisilicon,hisi-ahci", }, { .compatible = "cavium,octeon-7130-ahci", }, + { .compatible = "rockchip,rk-ahci", }, {}, }; MODULE_DEVICE_TABLE(of, ahci_of_match);