Lines Matching refs:hda

92 static void hda_tegra_init(struct hda_tegra *hda)  in hda_tegra_init()  argument
97 v = readl(hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
99 writel(v, hda->regs + HDA_IPFS_CONFIG); in hda_tegra_init()
102 v = readl(hda->regs + HDA_CFG_CMD); in hda_tegra_init()
106 writel(v, hda->regs + HDA_CFG_CMD); in hda_tegra_init()
108 writel(HDA_BAR0_INIT_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
109 writel(HDA_BAR0_FINAL_PROGRAM, hda->regs + HDA_CFG_BAR0); in hda_tegra_init()
110 writel(HDA_FPCI_BAR0_START, hda->regs + HDA_IPFS_FPCI_BAR0); in hda_tegra_init()
112 v = readl(hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
114 writel(v, hda->regs + HDA_IPFS_INTR_MASK); in hda_tegra_init()
150 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_suspend() local
160 clk_bulk_disable_unprepare(hda->nclocks, hda->clocks); in hda_tegra_runtime_suspend()
169 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_runtime_resume() local
173 rc = reset_control_assert(hda->reset); in hda_tegra_runtime_resume()
178 rc = clk_bulk_prepare_enable(hda->nclocks, hda->clocks); in hda_tegra_runtime_resume()
182 hda_tegra_init(hda); in hda_tegra_runtime_resume()
190 rc = reset_control_deassert(hda->reset); in hda_tegra_runtime_resume()
219 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_dev_free() local
221 cancel_work_sync(&hda->probe_work); in hda_tegra_dev_free()
236 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_init_chip() local
240 hda->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in hda_tegra_init_chip()
241 if (IS_ERR(hda->regs)) in hda_tegra_init_chip()
242 return PTR_ERR(hda->regs); in hda_tegra_init_chip()
244 bus->remap_addr = hda->regs + HDA_BAR0; in hda_tegra_init_chip()
247 hda_tegra_init(hda); in hda_tegra_init_chip()
254 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); in hda_tegra_first_init() local
297 val = readl(hda->regs + FPCI_DBG_CFG_2) & ~FPCI_GCAP_NSDO_MASK; in hda_tegra_first_init()
299 writel(val, hda->regs + FPCI_DBG_CFG_2); in hda_tegra_first_init()
387 struct hda_tegra *hda) in hda_tegra_create() argument
396 chip = &hda->chip; in hda_tegra_create()
411 INIT_WORK(&hda->probe_work, hda_tegra_probe_work); in hda_tegra_create()
443 struct hda_tegra *hda; in hda_tegra_probe() local
446 hda = devm_kzalloc(&pdev->dev, sizeof(*hda), GFP_KERNEL); in hda_tegra_probe()
447 if (!hda) in hda_tegra_probe()
449 hda->dev = &pdev->dev; in hda_tegra_probe()
450 chip = &hda->chip; in hda_tegra_probe()
459 hda->reset = devm_reset_control_array_get_exclusive(&pdev->dev); in hda_tegra_probe()
460 if (IS_ERR(hda->reset)) { in hda_tegra_probe()
461 err = PTR_ERR(hda->reset); in hda_tegra_probe()
465 hda->clocks[hda->nclocks++].id = "hda"; in hda_tegra_probe()
466 hda->clocks[hda->nclocks++].id = "hda2hdmi"; in hda_tegra_probe()
467 hda->clocks[hda->nclocks++].id = "hda2codec_2x"; in hda_tegra_probe()
469 err = devm_clk_bulk_get(&pdev->dev, hda->nclocks, hda->clocks); in hda_tegra_probe()
473 err = hda_tegra_create(card, driver_flags, hda); in hda_tegra_probe()
480 pm_runtime_enable(hda->dev); in hda_tegra_probe()
482 pm_runtime_forbid(hda->dev); in hda_tegra_probe()
484 schedule_work(&hda->probe_work); in hda_tegra_probe()
495 struct hda_tegra *hda = container_of(work, struct hda_tegra, probe_work); in hda_tegra_probe_work() local
496 struct azx *chip = &hda->chip; in hda_tegra_probe_work()
497 struct platform_device *pdev = to_platform_device(hda->dev); in hda_tegra_probe_work()
500 pm_runtime_get_sync(hda->dev); in hda_tegra_probe_work()
522 pm_runtime_put(hda->dev); in hda_tegra_probe_work()