Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ahci: st: Add ports-implemented property in support

Despite ST AHCI version = 1.3, reading HOST_PORTS_IMPL
returns 0. So force_port_map to 1 by using ports-implemented
DT property.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Patrice Chotard and committed by
Tejun Heo
e7190699 16af080e

+4
+4
drivers/ata/ahci_st.c
··· 147 147 148 148 static int st_ahci_probe(struct platform_device *pdev) 149 149 { 150 + struct device *dev = &pdev->dev; 150 151 struct st_ahci_drv_data *drv_data; 151 152 struct ahci_host_priv *hpriv; 152 153 int err; ··· 170 169 return err; 171 170 172 171 st_ahci_configure_oob(hpriv->mmio); 172 + 173 + of_property_read_u32(dev->of_node, 174 + "ports-implemented", &hpriv->force_port_map); 173 175 174 176 err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, 175 177 &ahci_platform_sht);