Lines Matching refs:hda
99 static void hda_tegra_init(struct hda_tegra *hda) in hda_tegra_init() argument
104 v = readl(hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
106 writel(v, hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
109 v = readl(hda->regs + HDA_CFG_CMD); in hda_tegra_init()
113 writel(v, hda->regs + HDA_CFG_CMD); in hda_tegra_init()
115 writel(HDA_BAR0_INIT_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
116 writel(HDA_BAR0_FINAL_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
117 writel(HDA_FPCI_BAR0_START, hda->regs + HDA_IPFS_FPCI_BAR0); in hda_tegra_init()
119 v = readl(hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
121 writel(v, hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
157 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_suspend() local
167 clk_bulk_disable_unprepare(hda->nclocks, hda->clocks); in hda_tegra_runtime_suspend()
176 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_resume() local
180 rc = reset_control_bulk_assert(hda->nresets, hda->resets); in hda_tegra_runtime_resume()
185 rc = clk_bulk_prepare_enable(hda->nclocks, hda->clocks); in hda_tegra_runtime_resume()
189 hda_tegra_init(hda); in hda_tegra_runtime_resume()
197 rc = reset_control_bulk_deassert(hda->nresets, hda->resets); in hda_tegra_runtime_resume()
226 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_dev_free() local
228 cancel_work_sync(&hda->probe_work); in hda_tegra_dev_free()
243 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_init_chip() local
247 hda->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in hda_tegra_init_chip()
248 if (IS_ERR(hda->regs)) in hda_tegra_init_chip()
249 return PTR_ERR(hda->regs); in hda_tegra_init_chip()
251 bus->remap_addr = hda->regs + HDA_BAR0; in hda_tegra_init_chip()
254 hda_tegra_init(hda); in hda_tegra_init_chip()
261 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_first_init() local
304 val = readl(hda->regs + FPCI_DBG_CFG_2) & ~FPCI_GCAP_NSDO_MASK; in hda_tegra_first_init()
306 writel(val, hda->regs + FPCI_DBG_CFG_2); in hda_tegra_first_init()
406 struct hda_tegra *hda) in hda_tegra_create() argument
415 chip = &hda->chip; in hda_tegra_create()
431 INIT_WORK(&hda->probe_work, hda_tegra_probe_work); in hda_tegra_create()
481 struct hda_tegra *hda; in hda_tegra_probe() local
484 hda = devm_kzalloc(&pdev->dev, sizeof(*hda), GFP_KERNEL); in hda_tegra_probe()
485 if (!hda) in hda_tegra_probe()
487 hda->dev = &pdev->dev; in hda_tegra_probe()
488 chip = &hda->chip; in hda_tegra_probe()
490 hda->soc = of_device_get_match_data(&pdev->dev); in hda_tegra_probe()
499 hda->resets[hda->nresets++].id = "hda"; in hda_tegra_probe()
505 if (hda->soc->has_hda2hdmi) in hda_tegra_probe()
506 hda->resets[hda->nresets++].id = "hda2hdmi"; in hda_tegra_probe()
513 if (hda->soc->has_hda2codec_2x_reset) in hda_tegra_probe()
514 hda->resets[hda->nresets++].id = "hda2codec_2x"; in hda_tegra_probe()
516 err = devm_reset_control_bulk_get_exclusive(&pdev->dev, hda->nresets, in hda_tegra_probe()
517 hda->resets); in hda_tegra_probe()
521 hda->clocks[hda->nclocks++].id = "hda"; in hda_tegra_probe()
522 if (hda->soc->has_hda2hdmi) in hda_tegra_probe()
523 hda->clocks[hda->nclocks++].id = "hda2hdmi"; in hda_tegra_probe()
524 hda->clocks[hda->nclocks++].id = "hda2codec_2x"; in hda_tegra_probe()
526 err = devm_clk_bulk_get(&pdev->dev, hda->nclocks, hda->clocks); in hda_tegra_probe()
530 err = hda_tegra_create(card, driver_flags, hda); in hda_tegra_probe()
537 pm_runtime_enable(hda->dev); in hda_tegra_probe()
539 pm_runtime_forbid(hda->dev); in hda_tegra_probe()
541 schedule_work(&hda->probe_work); in hda_tegra_probe()
552 struct hda_tegra *hda = container_of(work, struct hda_tegra, probe_work); in hda_tegra_probe_work() local
553 struct azx *chip = &hda->chip; in hda_tegra_probe_work()
554 struct platform_device *pdev = to_platform_device(hda->dev); in hda_tegra_probe_work()
557 pm_runtime_get_sync(hda->dev); in hda_tegra_probe_work()
579 pm_runtime_put(hda->dev); in hda_tegra_probe_work()