Lines Matching refs:hpriv

117 static void brcm_sata_alpm_init(struct ahci_host_priv *hpriv)  in brcm_sata_alpm_init()  argument
119 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_sata_alpm_init()
124 host_caps = readl(hpriv->mmio + HOST_CAP); in brcm_sata_alpm_init()
126 hpriv->flags |= AHCI_HFLAG_YES_ALPM; in brcm_sata_alpm_init()
137 hpriv->mmio + SATA_PORT_PCTRL6(port_ctrl)); in brcm_sata_alpm_init()
216 static u32 brcm_ahci_get_portmask(struct ahci_host_priv *hpriv, in brcm_ahci_get_portmask() argument
221 impl = readl(hpriv->mmio + HOST_PORTS_IMPL); in brcm_ahci_get_portmask()
252 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_read_id() local
253 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_read_id()
254 void __iomem *mmio = hpriv->mmio; in brcm_ahci_read_id()
279 ahci_platform_disable_clks(hpriv); in brcm_ahci_read_id()
282 ahci_platform_enable_clks(hpriv); in brcm_ahci_read_id()
289 for (i = 0; i < hpriv->nports; i++) { in brcm_ahci_read_id()
290 rc = phy_init(hpriv->phys[i]); in brcm_ahci_read_id()
294 rc = phy_calibrate(hpriv->phys[i]); in brcm_ahci_read_id()
296 phy_exit(hpriv->phys[i]); in brcm_ahci_read_id()
313 phy_power_off(hpriv->phys[i]); in brcm_ahci_read_id()
314 phy_exit(hpriv->phys[i]); in brcm_ahci_read_id()
322 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_host_stop() local
324 ahci_platform_disable_resources(hpriv); in brcm_ahci_host_stop()
344 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_suspend() local
345 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_suspend()
364 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_resume() local
365 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_resume()
376 ret = ahci_platform_enable_clks(hpriv); in brcm_ahci_resume()
380 ret = ahci_platform_enable_regulators(hpriv); in brcm_ahci_resume()
386 brcm_sata_alpm_init(hpriv); in brcm_ahci_resume()
394 ret = ahci_platform_enable_phys(hpriv); in brcm_ahci_resume()
410 ahci_platform_disable_phys(hpriv); in brcm_ahci_resume()
413 ahci_platform_disable_regulators(hpriv); in brcm_ahci_resume()
415 ahci_platform_disable_clks(hpriv); in brcm_ahci_resume()
439 struct ahci_host_priv *hpriv; in brcm_ahci_probe() local
469 hpriv = ahci_platform_get_resources(pdev, 0); in brcm_ahci_probe()
470 if (IS_ERR(hpriv)) in brcm_ahci_probe()
471 return PTR_ERR(hpriv); in brcm_ahci_probe()
473 hpriv->plat_data = priv; in brcm_ahci_probe()
474 hpriv->flags = AHCI_HFLAG_WAKE_BEFORE_STOP | AHCI_HFLAG_NO_WRITE_TO_RO; in brcm_ahci_probe()
478 hpriv->flags |= AHCI_HFLAG_DELAY_ENGINE; in brcm_ahci_probe()
481 hpriv->flags |= AHCI_HFLAG_NO_NCQ; in brcm_ahci_probe()
495 ret = ahci_platform_enable_clks(hpriv); in brcm_ahci_probe()
499 ret = ahci_platform_enable_regulators(hpriv); in brcm_ahci_probe()
509 priv->port_mask = brcm_ahci_get_portmask(hpriv, priv); in brcm_ahci_probe()
518 brcm_sata_alpm_init(hpriv); in brcm_ahci_probe()
520 ret = ahci_platform_enable_phys(hpriv); in brcm_ahci_probe()
524 ret = ahci_platform_init_host(pdev, hpriv, &ahci_brcm_port_info, in brcm_ahci_probe()
534 ahci_platform_disable_phys(hpriv); in brcm_ahci_probe()
538 ahci_platform_disable_regulators(hpriv); in brcm_ahci_probe()
540 ahci_platform_disable_clks(hpriv); in brcm_ahci_probe()
550 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_remove() local
551 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_remove()