Lines Matching refs:hlink
102 struct hdac_ext_link *hlink = &h2link->hext_link; in hdaml_lnk_enum() local
105 hlink->lcaps = readl(ml_addr + AZX_REG_ML_LCAP); in hdaml_lnk_enum()
107 h2link->alt = FIELD_GET(AZX_ML_HDA_LCAP_ALT, hlink->lcaps); in hdaml_lnk_enum()
117 hlink->lsdiid = readw(ml_addr + AZX_REG_ML_LSDIID); in hdaml_lnk_enum()
120 link_idx, hlink->lsdiid); in hdaml_lnk_enum()
125 h2link->intc = FIELD_GET(AZX_ML_HDA_LCAP_INTC, hlink->lcaps); in hdaml_lnk_enum()
126 h2link->ofls = FIELD_GET(AZX_ML_HDA_LCAP_OFLS, hlink->lcaps); in hdaml_lnk_enum()
127 h2link->lss = FIELD_GET(AZX_ML_HDA_LCAP_LSS, hlink->lcaps); in hdaml_lnk_enum()
130 h2link->slcount = FIELD_GET(AZX_ML_HDA_LCAP_SLCOUNT, hlink->lcaps) + 1; in hdaml_lnk_enum()
381 struct hdac_ext_link *hlink; in hda_ml_alloc_h2link() local
389 hlink = &h2link->hext_link; in hda_ml_alloc_h2link()
391 hlink->index = index; in hda_ml_alloc_h2link()
392 hlink->bus = bus; in hda_ml_alloc_h2link()
393 hlink->ml_addr = bus->mlcap + AZX_ML_BASE + (AZX_ML_INTERVAL * index); in hda_ml_alloc_h2link()
395 ret = hdaml_lnk_enum(bus->dev, h2link, bus->remap_addr, hlink->ml_addr, index); in hda_ml_alloc_h2link()
403 list_add_tail(&hlink->list, &bus->hlink_list); in hda_ml_alloc_h2link()
410 hlink->ref_count = 1; in hda_ml_alloc_h2link()
441 struct hdac_ext_link *hlink, *_h; in hda_bus_ml_free() local
447 list_for_each_entry_safe(hlink, _h, &bus->hlink_list, list) { in hda_bus_ml_free()
448 list_del(&hlink->list); in hda_bus_ml_free()
449 h2link = hdac_ext_link_to_ext2(hlink); in hda_bus_ml_free()
460 struct hdac_ext_link *hlink; in find_ext2_link() local
462 list_for_each_entry(hlink, &bus->hlink_list, list) { in find_ext2_link()
463 struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink); in find_ext2_link()
487 struct hdac_ext_link *hlink; in hdac_bus_eml_enable_interrupt() local
496 hlink = &h2link->hext_link; in hdac_bus_eml_enable_interrupt()
500 hdaml_link_enable_interrupt(hlink->ml_addr + AZX_REG_ML_LCTL, enable); in hdac_bus_eml_enable_interrupt()
509 struct hdac_ext_link *hlink; in hdac_bus_eml_check_interrupt() local
518 hlink = &h2link->hext_link; in hdac_bus_eml_check_interrupt()
520 return hdaml_link_check_interrupt(hlink->ml_addr + AZX_REG_ML_LCTL); in hdac_bus_eml_check_interrupt()
527 struct hdac_ext_link *hlink; in hdac_bus_eml_set_syncprd_unlocked() local
536 hlink = &h2link->hext_link; in hdac_bus_eml_set_syncprd_unlocked()
538 hdaml_link_set_syncprd(hlink->ml_addr + AZX_REG_ML_LSYNC, syncprd); in hdac_bus_eml_set_syncprd_unlocked()
553 struct hdac_ext_link *hlink; in hdac_bus_eml_wait_syncpu_unlocked() local
562 hlink = &h2link->hext_link; in hdac_bus_eml_wait_syncpu_unlocked()
564 return hdaml_link_wait_syncpu(hlink->ml_addr + AZX_REG_ML_LSYNC); in hdac_bus_eml_wait_syncpu_unlocked()
577 struct hdac_ext_link *hlink; in hdac_bus_eml_sync_arm_unlocked() local
586 hlink = &h2link->hext_link; in hdac_bus_eml_sync_arm_unlocked()
588 hdaml_link_sync_arm(hlink->ml_addr + AZX_REG_ML_LSYNC, sublink); in hdac_bus_eml_sync_arm_unlocked()
601 struct hdac_ext_link *hlink; in hdac_bus_eml_sync_go_unlocked() local
610 hlink = &h2link->hext_link; in hdac_bus_eml_sync_go_unlocked()
612 hdaml_link_sync_go(hlink->ml_addr + AZX_REG_ML_LSYNC); in hdac_bus_eml_sync_go_unlocked()
627 struct hdac_ext_link *hlink; in hdac_bus_eml_check_cmdsync_unlocked() local
637 hlink = &h2link->hext_link; in hdac_bus_eml_check_cmdsync_unlocked()
642 return hdaml_link_check_cmdsync(hlink->ml_addr + AZX_REG_ML_LSYNC, in hdac_bus_eml_check_cmdsync_unlocked()
657 struct hdac_ext_link *hlink; in hdac_bus_eml_power_up_base() local
667 hlink = &h2link->hext_link; in hdac_bus_eml_power_up_base()
673 if (++hlink->ref_count > 1) in hdac_bus_eml_power_up_base()
680 ret = hdaml_link_init(hlink->ml_addr + AZX_REG_ML_LCTL, sublink); in hdac_bus_eml_power_up_base()
705 struct hdac_ext_link *hlink; in hdac_bus_eml_power_down_base() local
715 hlink = &h2link->hext_link; in hdac_bus_eml_power_down_base()
721 if (--hlink->ref_count > 0) in hdac_bus_eml_power_down_base()
727 ret = hdaml_link_shutdown(hlink->ml_addr + AZX_REG_ML_LCTL, sublink); in hdac_bus_eml_power_down_base()
763 struct hdac_ext_link *hlink; in hdac_bus_eml_sdw_get_lsdiid_unlocked() local
769 hlink = &h2link->hext_link; in hdac_bus_eml_sdw_get_lsdiid_unlocked()
771 *lsdiid = hdaml_link_get_lsdiid(hlink->ml_addr + AZX_REG_ML_LSDIID_OFFSET(sublink)); in hdac_bus_eml_sdw_get_lsdiid_unlocked()
779 struct hdac_ext_link *hlink; in hdac_bus_eml_sdw_set_lsdiid() local
785 hlink = &h2link->hext_link; in hdac_bus_eml_sdw_set_lsdiid()
789 hdaml_link_set_lsdiid(hlink->ml_addr + AZX_REG_ML_LSDIID_OFFSET(sublink), dev_num); in hdac_bus_eml_sdw_set_lsdiid()
842 struct hdac_ext_link *hlink; in hda_bus_ml_put_all() local
844 list_for_each_entry(hlink, &bus->hlink_list, list) { in hda_bus_ml_put_all()
845 struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink); in hda_bus_ml_put_all()
848 snd_hdac_ext_bus_link_put(bus, hlink); in hda_bus_ml_put_all()
855 struct hdac_ext_link *hlink; in hda_bus_ml_reset_losidv() local
858 list_for_each_entry(hlink, &bus->hlink_list, list) in hda_bus_ml_reset_losidv()
859 writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV); in hda_bus_ml_reset_losidv()
865 struct hdac_ext_link *hlink; in hda_bus_ml_resume() local
869 list_for_each_entry(hlink, &bus->hlink_list, list) { in hda_bus_ml_resume()
870 struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink); in hda_bus_ml_resume()
872 if (!h2link->alt && hlink->ref_count) { in hda_bus_ml_resume()
873 ret = snd_hdac_ext_bus_link_power_up(hlink); in hda_bus_ml_resume()
884 struct hdac_ext_link *hlink; in hda_bus_ml_suspend() local
887 list_for_each_entry(hlink, &bus->hlink_list, list) { in hda_bus_ml_suspend()
888 struct hdac_ext2_link *h2link = hdac_ext_link_to_ext2(hlink); in hda_bus_ml_suspend()
891 ret = snd_hdac_ext_bus_link_power_down(hlink); in hda_bus_ml_suspend()
951 struct hdac_ext_link *hlink; in hdac_bus_eml_enable_offload() local
960 hlink = &h2link->hext_link; in hdac_bus_eml_enable_offload()
964 hdaml_lctl_offload_enable(hlink->ml_addr + AZX_REG_ML_LCTL, enable); in hdac_bus_eml_enable_offload()