mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 03:33:59 +08:00
ahci: add support for Hisilicon sata
The hip04 SoC of hisilicon has an AHCI compliant SATA controller, and it is compliant with the ahci 1.3 and sata 3.0 specification. There is a wrong bit in HOST_CAP of hip04 sata controller, which enable unsupported feature of FBS, use AHCI_HFLAG_NO_FBS hflag to disable it. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kefeng Wang <kefeng.wang@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
f9f3691790
commit
a1a205df6e
@ -8,6 +8,7 @@ Required properties:
|
|||||||
- "allwinner,sun4i-a10-ahci"
|
- "allwinner,sun4i-a10-ahci"
|
||||||
- "fsl,imx53-ahci"
|
- "fsl,imx53-ahci"
|
||||||
- "fsl,imx6q-ahci"
|
- "fsl,imx6q-ahci"
|
||||||
|
- "hisilicon,hisi-ahci"
|
||||||
- "ibm,476gtr-ahci"
|
- "ibm,476gtr-ahci"
|
||||||
- "marvell,armada-380-ahci"
|
- "marvell,armada-380-ahci"
|
||||||
- "snps,dwc-ahci"
|
- "snps,dwc-ahci"
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/libata.h>
|
#include <linux/libata.h>
|
||||||
#include <linux/ahci_platform.h>
|
#include <linux/ahci_platform.h>
|
||||||
@ -33,6 +34,7 @@ static int ahci_probe(struct platform_device *pdev)
|
|||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
struct ahci_platform_data *pdata = dev_get_platdata(dev);
|
||||||
struct ahci_host_priv *hpriv;
|
struct ahci_host_priv *hpriv;
|
||||||
|
unsigned long hflags = 0;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
hpriv = ahci_platform_get_resources(pdev);
|
hpriv = ahci_platform_get_resources(pdev);
|
||||||
@ -55,7 +57,11 @@ static int ahci_probe(struct platform_device *pdev)
|
|||||||
goto disable_resources;
|
goto disable_resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info, 0, 0, 0);
|
if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
|
||||||
|
hflags |= AHCI_HFLAG_NO_FBS;
|
||||||
|
|
||||||
|
rc = ahci_platform_init_host(pdev, hpriv, &ahci_port_info,
|
||||||
|
hflags, 0, 0);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto pdata_exit;
|
goto pdata_exit;
|
||||||
|
|
||||||
@ -76,6 +82,7 @@ static const struct of_device_id ahci_of_match[] = {
|
|||||||
{ .compatible = "snps,exynos5440-ahci", },
|
{ .compatible = "snps,exynos5440-ahci", },
|
||||||
{ .compatible = "ibm,476gtr-ahci", },
|
{ .compatible = "ibm,476gtr-ahci", },
|
||||||
{ .compatible = "snps,dwc-ahci", },
|
{ .compatible = "snps,dwc-ahci", },
|
||||||
|
{ .compatible = "hisilicon,hisi-ahci", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, ahci_of_match);
|
MODULE_DEVICE_TABLE(of, ahci_of_match);
|
||||||
|
Loading…
Reference in New Issue
Block a user