Lines Matching refs:hpriv

118 static void brcm_sata_alpm_init(struct ahci_host_priv *hpriv)  in brcm_sata_alpm_init()  argument
120 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_sata_alpm_init()
125 host_caps = readl(hpriv->mmio + HOST_CAP); in brcm_sata_alpm_init()
127 hpriv->flags |= AHCI_HFLAG_YES_ALPM; in brcm_sata_alpm_init()
138 hpriv->mmio + SATA_PORT_PCTRL6(port_ctrl)); in brcm_sata_alpm_init()
217 static u32 brcm_ahci_get_portmask(struct ahci_host_priv *hpriv, in brcm_ahci_get_portmask() argument
222 impl = readl(hpriv->mmio + HOST_PORTS_IMPL); in brcm_ahci_get_portmask()
253 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_read_id() local
254 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_read_id()
255 void __iomem *mmio = hpriv->mmio; in brcm_ahci_read_id()
280 ahci_platform_disable_clks(hpriv); in brcm_ahci_read_id()
283 ahci_platform_enable_clks(hpriv); in brcm_ahci_read_id()
290 for (i = 0; i < hpriv->nports; i++) { in brcm_ahci_read_id()
291 rc = phy_init(hpriv->phys[i]); in brcm_ahci_read_id()
295 rc = phy_calibrate(hpriv->phys[i]); in brcm_ahci_read_id()
297 phy_exit(hpriv->phys[i]); in brcm_ahci_read_id()
314 phy_power_off(hpriv->phys[i]); in brcm_ahci_read_id()
315 phy_exit(hpriv->phys[i]); in brcm_ahci_read_id()
323 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_host_stop() local
325 ahci_platform_disable_resources(hpriv); in brcm_ahci_host_stop()
345 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_suspend() local
346 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_suspend()
365 struct ahci_host_priv *hpriv = host->private_data; in brcm_ahci_resume() local
366 struct brcm_ahci_priv *priv = hpriv->plat_data; in brcm_ahci_resume()
377 ret = ahci_platform_enable_clks(hpriv); in brcm_ahci_resume()
381 ret = ahci_platform_enable_regulators(hpriv); in brcm_ahci_resume()
387 brcm_sata_alpm_init(hpriv); in brcm_ahci_resume()
395 ret = ahci_platform_enable_phys(hpriv); in brcm_ahci_resume()
411 ahci_platform_disable_phys(hpriv); in brcm_ahci_resume()
414 ahci_platform_disable_regulators(hpriv); in brcm_ahci_resume()
416 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()