atu
struct atu *atu;
iotsb_num = pbm->iommu->atu->iotsb->iotsb_num;
if (pbm->iommu->atu) {
kfree(pbm->iommu->atu);
pbm->iommu->atu = NULL;
struct atu *atu;
iommu->atu = NULL;
atu = kzalloc_obj(*atu);
if (!atu)
iommu->atu = atu;
kfree(iommu->atu);
tbl = &iommu->atu->tbl;
struct atu *atu;
atu = iommu->atu;
tbl = &atu->tbl;
iotsb_num = atu->iotsb->iotsb_num;
struct atu *atu;
atu = iommu->atu;
tbl = &atu->tbl;
struct atu *atu;
atu = iommu->atu;
iotsb_num = atu->iotsb->iotsb_num;
tbl = &atu->tbl;
struct atu *atu;
atu = iommu->atu;
tbl = &atu->tbl;
struct atu *atu;
atu = iommu->atu;
iotsb_num = atu->iotsb->iotsb_num;
tbl = &atu->tbl;
struct atu *atu = pbm->iommu->atu;
atu->iotsb = iotsb;
table_size = (atu->size / IO_PAGE_SIZE) * 8;
iotsb->dvma_size = atu->size;
iotsb->dvma_base = atu->base;
return iommu->atu && mask > DMA_BIT_MASK(32);
struct atu *atu = pbm->iommu->atu;
atu->ranges = (struct atu_ranges *)ranges;
atu->base = atu->ranges[3].base;
atu->size = ATU_64_SPACE_SIZE;
dma_mask = (roundup_pow_of_two(atu->size) - 1UL);
num_iotte = atu->size / IO_PAGE_SIZE;
atu->tbl.table_map_base = atu->base;
atu->dma_addr_mask = dma_mask;
atu->tbl.map = kzalloc(map_size, GFP_KERNEL);
if (!atu->tbl.map)
iommu_tbl_pool_init(&atu->tbl, num_iotte, IO_PAGE_SHIFT,
struct dw_pcie_ob_atu_cfg *atu)
atu->index = free_win;
ret = dw_pcie_prog_outbound_atu(pci, atu);
ep->outbound_addr[free_win] = atu->parent_bus_addr;
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.func_no = func_no;
atu.type = PCIE_TLP_TYPE_MEM_RDWR;
atu.parent_bus_addr = addr - pci->parent_bus_offset;
atu.pci_addr = pci_addr;
atu.size = size;
ret = dw_pcie_ep_outbound_atu(ep, &atu);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.code = PCIE_MSG_CODE_PME_TURN_OFF;
atu.routing = PCIE_MSG_TYPE_R_BC;
atu.type = PCIE_TLP_TYPE_MSG;
atu.size = resource_size(pci->pp.msg_res);
atu.index = pci->pp.msg_atu_index;
atu.parent_bus_addr = pci->pp.msg_res->start - pci->parent_bus_offset;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
struct dw_pcie_ob_atu_cfg atu = {0};
atu.index = 0;
atu.type = PCIE_TLP_TYPE_CFG0_RDWR;
atu.parent_bus_addr = pp->cfg0_base + SZ_1M;
atu.size = SZ_1M;
atu.ctrl2 = PCIE_ATU_CFG_SHIFT_MODE_ENABLE;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
atu.index = 1;
atu.type = PCIE_TLP_TYPE_CFG1_RDWR;
atu.parent_bus_addr = pp->cfg0_base + SZ_2M;
atu.size = (SZ_1M * bus_range_max) - SZ_2M;
atu.ctrl2 = PCIE_ATU_CFG_SHIFT_MODE_ENABLE;
return dw_pcie_prog_outbound_atu(pci, &atu);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.type = type;
atu.parent_bus_addr = pp->cfg0_base - pci->parent_bus_offset;
atu.pci_addr = busdev;
atu.size = pp->cfg0_size;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.type = PCIE_TLP_TYPE_IO_RDWR;
atu.parent_bus_addr = pp->io_base - pci->parent_bus_offset;
atu.pci_addr = pp->io_bus_addr;
atu.size = pp->io_size;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.type = PCIE_TLP_TYPE_IO_RDWR;
atu.parent_bus_addr = pp->io_base - pci->parent_bus_offset;
atu.pci_addr = pp->io_bus_addr;
atu.size = pp->io_size;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.type = PCIE_TLP_TYPE_MEM_RDWR;
atu.parent_bus_addr = entry->res->start - pci->parent_bus_offset;
atu.pci_addr = entry->res->start - entry->offset;
atu.index = ob_iatu_index;
atu.size = MIN(pci->region_limit + 1, res_size);
ret = dw_pcie_prog_outbound_atu(pci, &atu);
atu.parent_bus_addr += atu.size;
atu.pci_addr += atu.size;
res_size -= atu.size;
atu.index = ob_iatu_index;
atu.type = PCIE_TLP_TYPE_IO_RDWR;
atu.parent_bus_addr = pp->io_base - pci->parent_bus_offset;
atu.pci_addr = pp->io_bus_addr;
atu.size = pp->io_size;
ret = dw_pcie_prog_outbound_atu(pci, &atu);
const struct dw_pcie_ob_atu_cfg *atu)
u64 parent_bus_addr = atu->parent_bus_addr;
if (atu->index >= pci->num_ob_windows)
limit_addr = parent_bus_addr + atu->size - 1;
!IS_ALIGNED(atu->pci_addr, pci->region_align) || !atu->size) {
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_LOWER_BASE,
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_UPPER_BASE,
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_LIMIT,
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_UPPER_LIMIT,
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_LOWER_TARGET,
lower_32_bits(atu->pci_addr));
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_UPPER_TARGET,
upper_32_bits(atu->pci_addr));
val = atu->type | atu->routing | PCIE_ATU_FUNC_NUM(atu->func_no);
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL1, val);
val = PCIE_ATU_ENABLE | atu->ctrl2;
if (atu->type == PCIE_TLP_TYPE_MSG) {
val |= PCIE_ATU_INHIBIT_PAYLOAD | atu->code;
dw_pcie_writel_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL2, val);
val = dw_pcie_readl_atu_ob(pci, atu->index, PCIE_ATU_REGION_CTRL2);
const struct dw_pcie_ob_atu_cfg *atu);