Lines Matching refs:hda

100 static void hda_tegra_init(struct hda_tegra *hda)  in hda_tegra_init()  argument
105 v = readl(hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
107 writel(v, hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
110 v = readl(hda->regs + HDA_CFG_CMD); in hda_tegra_init()
114 writel(v, hda->regs + HDA_CFG_CMD); in hda_tegra_init()
116 writel(HDA_BAR0_INIT_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
117 writel(HDA_BAR0_FINAL_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
118 writel(HDA_FPCI_BAR0_START, hda->regs + HDA_IPFS_FPCI_BAR0); in hda_tegra_init()
120 v = readl(hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
122 writel(v, hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
158 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_suspend() local
168 clk_bulk_disable_unprepare(hda->nclocks, hda->clocks); in hda_tegra_runtime_suspend()
177 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_resume() local
181 rc = reset_control_bulk_assert(hda->nresets, hda->resets); in hda_tegra_runtime_resume()
186 rc = clk_bulk_prepare_enable(hda->nclocks, hda->clocks); in hda_tegra_runtime_resume()
190 hda_tegra_init(hda); in hda_tegra_runtime_resume()
198 rc = reset_control_bulk_deassert(hda->nresets, hda->resets); in hda_tegra_runtime_resume()
227 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_dev_free() local
229 cancel_work_sync(&hda->probe_work); in hda_tegra_dev_free()
244 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_init_chip() local
248 hda->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in hda_tegra_init_chip()
249 if (IS_ERR(hda->regs)) in hda_tegra_init_chip()
250 return PTR_ERR(hda->regs); in hda_tegra_init_chip()
252 bus->remap_addr = hda->regs + HDA_BAR0; in hda_tegra_init_chip()
255 hda_tegra_init(hda); in hda_tegra_init_chip()
262 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_first_init() local
305 val = readl(hda->regs + FPCI_DBG_CFG_2) & ~FPCI_GCAP_NSDO_MASK; in hda_tegra_first_init()
307 writel(val, hda->regs + FPCI_DBG_CFG_2); in hda_tegra_first_init()
407 struct hda_tegra *hda) in hda_tegra_create() argument
416 chip = &hda->chip; in hda_tegra_create()
432 INIT_WORK(&hda->probe_work, hda_tegra_probe_work); in hda_tegra_create()
482 struct hda_tegra *hda; in hda_tegra_probe() local
485 hda = devm_kzalloc(&pdev->dev, sizeof(*hda), GFP_KERNEL); in hda_tegra_probe()
486 if (!hda) in hda_tegra_probe()
488 hda->dev = &pdev->dev; in hda_tegra_probe()
489 chip = &hda->chip; in hda_tegra_probe()
491 hda->soc = of_device_get_match_data(&pdev->dev); in hda_tegra_probe()
500 hda->resets[hda->nresets++].id = "hda"; in hda_tegra_probe()
506 if (hda->soc->has_hda2hdmi) in hda_tegra_probe()
507 hda->resets[hda->nresets++].id = "hda2hdmi"; in hda_tegra_probe()
514 if (hda->soc->has_hda2codec_2x_reset) in hda_tegra_probe()
515 hda->resets[hda->nresets++].id = "hda2codec_2x"; in hda_tegra_probe()
517 err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets, in hda_tegra_probe()
518 hda->resets); in hda_tegra_probe()
522 hda->clocks[hda->nclocks++].id = "hda"; in hda_tegra_probe()
523 if (hda->soc->has_hda2hdmi) in hda_tegra_probe()
524 hda->clocks[hda->nclocks++].id = "hda2hdmi"; in hda_tegra_probe()
525 hda->clocks[hda->nclocks++].id = "hda2codec_2x"; in hda_tegra_probe()
527 err = devm_clk_bulk_get(&pdev->dev, hda->nclocks, hda->clocks); in hda_tegra_probe()
531 err = hda_tegra_create(card, driver_flags, hda); in hda_tegra_probe()
538 pm_runtime_enable(hda->dev); in hda_tegra_probe()
540 pm_runtime_forbid(hda->dev); in hda_tegra_probe()
542 schedule_work(&hda->probe_work); in hda_tegra_probe()
553 struct hda_tegra *hda = container_of(work, struct hda_tegra, probe_work); in hda_tegra_probe_work() local
554 struct azx *chip = &hda->chip; in hda_tegra_probe_work()
555 struct platform_device *pdev = to_platform_device(hda->dev); in hda_tegra_probe_work()
558 pm_runtime_get_sync(hda->dev); in hda_tegra_probe_work()
580 pm_runtime_put(hda->dev); in hda_tegra_probe_work()