• Home
  • Raw
  • Download

Lines Matching full:pdi

343 	/* number of PDI and ports is interchangeable */  in cdns_reg_show()
1077 struct sdw_cdns_pdi *pdi; in cdns_allocate_pdi() local
1083 pdi = devm_kcalloc(cdns->dev, num, sizeof(*pdi), GFP_KERNEL); in cdns_allocate_pdi()
1084 if (!pdi) in cdns_allocate_pdi()
1088 pdi[i].num = i + pdi_offset; in cdns_allocate_pdi()
1091 *stream = pdi; in cdns_allocate_pdi()
1096 * sdw_cdns_pdi_init() - PDI initialization routine
1620 * cdns_find_pdi() - Find a free PDI
1625 * @pdi: PDI instances
1628 * Find a PDI for a given PDI array. The PDI num and dai_id are
1634 struct sdw_cdns_pdi *pdi, in cdns_find_pdi() argument
1640 if (pdi[i].num == dai_id) in cdns_find_pdi()
1641 return &pdi[i]; in cdns_find_pdi()
1652 * @pdi: PDI to be used
1655 u32 ch, u32 dir, struct sdw_cdns_pdi *pdi) in sdw_cdns_config_stream() argument
1665 offset = CDNS_PORTCTRL + pdi->num * CDNS_PORT_OFFSET; in sdw_cdns_config_stream()
1670 val = pdi->num; in sdw_cdns_config_stream()
1673 cdns_writel(cdns, CDNS_PDI_CONFIG(pdi->num), val); in sdw_cdns_config_stream()
1678 * sdw_cdns_alloc_pdi() - Allocate a PDI
1690 struct sdw_cdns_pdi *pdi = NULL; in sdw_cdns_alloc_pdi() local
1693 pdi = cdns_find_pdi(cdns, 0, stream->num_in, stream->in, in sdw_cdns_alloc_pdi()
1696 pdi = cdns_find_pdi(cdns, 0, stream->num_out, stream->out, in sdw_cdns_alloc_pdi()
1699 /* check if we found a PDI, else find in bi-directional */ in sdw_cdns_alloc_pdi()
1700 if (!pdi) in sdw_cdns_alloc_pdi()
1701 pdi = cdns_find_pdi(cdns, 2, stream->num_bd, stream->bd, in sdw_cdns_alloc_pdi()
1704 if (pdi) { in sdw_cdns_alloc_pdi()
1705 pdi->l_ch_num = 0; in sdw_cdns_alloc_pdi()
1706 pdi->h_ch_num = ch - 1; in sdw_cdns_alloc_pdi()
1707 pdi->dir = dir; in sdw_cdns_alloc_pdi()
1708 pdi->ch_count = ch; in sdw_cdns_alloc_pdi()
1711 return pdi; in sdw_cdns_alloc_pdi()