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