mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
dmaengine: dw-edma-pcie: Track non-LL mode in DMA data
The dw-edma-pcie driver copies static template data into a mutable dw_edma_pcie_data instance before applying capability-derived updates. Keep the derived non-LL mode in that copy as well, instead of only tracking it in a local variable in dw_edma_pcie_probe(). This prepares for keeping capability parsing behind match data without a separate non-LL output parameter. No functional change intended. Suggested-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Koichiro Den <den@valinux.co.jp> Link: https://patch.msgid.link/20260721062815.4117887-7-den@valinux.co.jp Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
b24a5e9db6
commit
1415d6d1f1
|
|
@ -73,6 +73,7 @@ struct dw_edma_pcie_data {
|
|||
u16 wr_ch_cnt;
|
||||
u16 rd_ch_cnt;
|
||||
u64 devmem_phys_off;
|
||||
bool cfg_non_ll;
|
||||
};
|
||||
|
||||
static const struct dw_edma_pcie_data snps_edda_data = {
|
||||
|
|
@ -326,7 +327,6 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
|||
struct dw_edma_chip *chip;
|
||||
int err, nr_irqs;
|
||||
int i, mask;
|
||||
bool non_ll = false;
|
||||
|
||||
if (!pdata)
|
||||
return -ENODEV;
|
||||
|
|
@ -361,14 +361,14 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
|||
* the HDMA IP.
|
||||
*/
|
||||
if (vsec_data->devmem_phys_off == DW_PCIE_XILINX_MDB_INVALID_ADDR)
|
||||
non_ll = true;
|
||||
vsec_data->cfg_non_ll = true;
|
||||
|
||||
/*
|
||||
* Configure the channel LL and data blocks if number of
|
||||
* channels enabled in VSEC capability are more than the
|
||||
* channels configured in xilinx_mdb_data.
|
||||
*/
|
||||
if (!non_ll)
|
||||
if (!vsec_data->cfg_non_ll)
|
||||
dw_edma_set_chan_region_offset(vsec_data, BAR_2, 0,
|
||||
DW_PCIE_XILINX_MDB_LL_OFF_GAP,
|
||||
DW_PCIE_XILINX_MDB_LL_SIZE,
|
||||
|
|
@ -421,7 +421,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
|||
chip->mf = vsec_data->mf;
|
||||
chip->nr_irqs = nr_irqs;
|
||||
chip->ops = &dw_edma_pcie_plat_ops;
|
||||
chip->cfg_non_ll = non_ll;
|
||||
chip->cfg_non_ll = vsec_data->cfg_non_ll;
|
||||
|
||||
chip->ll_wr_cnt = vsec_data->wr_ch_cnt;
|
||||
chip->ll_rd_cnt = vsec_data->rd_ch_cnt;
|
||||
|
|
@ -430,7 +430,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
|||
if (!chip->reg_base)
|
||||
return -ENOMEM;
|
||||
|
||||
for (i = 0; i < chip->ll_wr_cnt && !non_ll; i++) {
|
||||
for (i = 0; i < chip->ll_wr_cnt && !vsec_data->cfg_non_ll; i++) {
|
||||
struct dw_edma_region *ll_region = &chip->ll_region_wr[i];
|
||||
struct dw_edma_region *dt_region = &chip->dt_region_wr[i];
|
||||
struct dw_edma_block *ll_block = &vsec_data->ll_wr[i];
|
||||
|
|
@ -457,7 +457,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
|
|||
dt_region->sz = dt_block->sz;
|
||||
}
|
||||
|
||||
for (i = 0; i < chip->ll_rd_cnt && !non_ll; i++) {
|
||||
for (i = 0; i < chip->ll_rd_cnt && !vsec_data->cfg_non_ll; i++) {
|
||||
struct dw_edma_region *ll_region = &chip->ll_region_rd[i];
|
||||
struct dw_edma_region *dt_region = &chip->dt_region_rd[i];
|
||||
struct dw_edma_block *ll_block = &vsec_data->ll_rd[i];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user