Searched refs:imxpriv (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/ata/
H A Dahci_imx.c219 struct imx_ahci_priv *imxpriv = hpriv->plat_data; imx_sata_enable() local
220 struct device *dev = &imxpriv->ahci_pdev->dev; imx_sata_enable()
223 if (imxpriv->no_device) imx_sata_enable()
230 ret = clk_prepare_enable(imxpriv->sata_ref_clk); imx_sata_enable()
234 if (imxpriv->type == AHCI_IMX6Q) { imx_sata_enable()
241 regmap_update_bits(imxpriv->gpr, IOMUXC_GPR13, imx_sata_enable()
252 imxpriv->phy_params); imx_sata_enable()
253 regmap_update_bits(imxpriv->gpr, IOMUXC_GPR13, imx_sata_enable()
271 clk_disable_unprepare(imxpriv->sata_ref_clk); imx_sata_enable()
280 struct imx_ahci_priv *imxpriv = hpriv->plat_data; imx_sata_disable() local
282 if (imxpriv->no_device) imx_sata_disable()
285 if (imxpriv->type == AHCI_IMX6Q) { imx_sata_disable()
286 regmap_update_bits(imxpriv->gpr, IOMUXC_GPR13, imx_sata_disable()
291 clk_disable_unprepare(imxpriv->sata_ref_clk); imx_sata_disable()
303 struct imx_ahci_priv *imxpriv = hpriv->plat_data; ahci_imx_error_handler() local
307 if (!(imxpriv->first_time) || ahci_imx_hotplug) ahci_imx_error_handler()
310 imxpriv->first_time = false; ahci_imx_error_handler()
322 imxpriv->no_device = true; ahci_imx_error_handler()
334 struct imx_ahci_priv *imxpriv = hpriv->plat_data; ahci_imx_softreset() local
337 if (imxpriv->type == AHCI_IMX53) ahci_imx_softreset()
339 else if (imxpriv->type == AHCI_IMX6Q) ahci_imx_softreset()
534 struct imx_ahci_priv *imxpriv; imx_ahci_probe() local
542 imxpriv = devm_kzalloc(dev, sizeof(*imxpriv), GFP_KERNEL); imx_ahci_probe()
543 if (!imxpriv) imx_ahci_probe()
546 imxpriv->ahci_pdev = pdev; imx_ahci_probe()
547 imxpriv->no_device = false; imx_ahci_probe()
548 imxpriv->first_time = true; imx_ahci_probe()
549 imxpriv->type = (enum ahci_imx_type)of_id->data; imx_ahci_probe()
551 imxpriv->sata_clk = devm_clk_get(dev, "sata"); imx_ahci_probe()
552 if (IS_ERR(imxpriv->sata_clk)) { imx_ahci_probe()
554 return PTR_ERR(imxpriv->sata_clk); imx_ahci_probe()
557 imxpriv->sata_ref_clk = devm_clk_get(dev, "sata_ref"); imx_ahci_probe()
558 if (IS_ERR(imxpriv->sata_ref_clk)) { imx_ahci_probe()
560 return PTR_ERR(imxpriv->sata_ref_clk); imx_ahci_probe()
563 imxpriv->ahb_clk = devm_clk_get(dev, "ahb"); imx_ahci_probe()
564 if (IS_ERR(imxpriv->ahb_clk)) { imx_ahci_probe()
566 return PTR_ERR(imxpriv->ahb_clk); imx_ahci_probe()
569 if (imxpriv->type == AHCI_IMX6Q) { imx_ahci_probe()
572 imxpriv->gpr = syscon_regmap_lookup_by_compatible( imx_ahci_probe()
574 if (IS_ERR(imxpriv->gpr)) { imx_ahci_probe()
577 return PTR_ERR(imxpriv->gpr); imx_ahci_probe()
583 imxpriv->phy_params = imx_ahci_probe()
594 hpriv->plat_data = imxpriv; imx_ahci_probe()
596 ret = clk_prepare_enable(imxpriv->sata_clk); imx_ahci_probe()
622 reg_val = clk_get_rate(imxpriv->ahb_clk) / 1000; imx_ahci_probe()
635 clk_disable_unprepare(imxpriv->sata_clk); imx_ahci_probe()
642 struct imx_ahci_priv *imxpriv = hpriv->plat_data; ahci_imx_host_stop() local
645 clk_disable_unprepare(imxpriv->sata_clk); ahci_imx_host_stop()

Completed in 47 milliseconds