config_atu:
if (!(flags & PCI_BASE_ADDRESS_SPACE))
- type = PCIE_ATU_TYPE_MEM;
+ type = PCIE_TLP_TYPE_MEM_RDWR;
else
- type = PCIE_ATU_TYPE_IO;
+ type = PCIE_TLP_TYPE_IO_RDWR;
if (epf_bar->num_submap)
ret = dw_pcie_ep_ib_atu_addr(ep, func_no, type, epf_bar);
struct dw_pcie_ob_atu_cfg atu = { 0 };
atu.func_no = func_no;
- atu.type = PCIE_ATU_TYPE_MEM;
+ atu.type = PCIE_TLP_TYPE_MEM_RDWR;
atu.parent_bus_addr = addr - pci->parent_bus_offset;
atu.pci_addr = pci_addr;
atu.size = size;
* remaining buses need type 1 iATU configuration.
*/
atu.index = 0;
- atu.type = PCIE_ATU_TYPE_CFG0;
+ atu.type = PCIE_TLP_TYPE_CFG0_RDWR;
atu.parent_bus_addr = pp->cfg0_base + SZ_1M;
/* 1MiB is to cover 1 (bus) * 32 (devices) * 8 (functions) */
atu.size = SZ_1M;
/* Configure remaining buses in type 1 iATU configuration */
atu.index = 1;
- atu.type = PCIE_ATU_TYPE_CFG1;
+ 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;
PCIE_ATU_FUNC(PCI_FUNC(devfn));
if (pci_is_root_bus(bus->parent))
- type = PCIE_ATU_TYPE_CFG0;
+ type = PCIE_TLP_TYPE_CFG0_RDWR;
else
- type = PCIE_ATU_TYPE_CFG1;
+ type = PCIE_TLP_TYPE_CFG1_RDWR;
atu.type = type;
atu.parent_bus_addr = pp->cfg0_base - pci->parent_bus_offset;
return ret;
if (pp->cfg0_io_shared) {
- atu.type = PCIE_ATU_TYPE_IO;
+ 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;
return ret;
if (pp->cfg0_io_shared) {
- atu.type = PCIE_ATU_TYPE_IO;
+ 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;
if (resource_type(entry->res) != IORESOURCE_MEM)
continue;
- atu.type = PCIE_ATU_TYPE_MEM;
+ 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;
if (pp->io_size) {
if (ob_iatu_index < pci->num_ob_windows) {
atu.index = ob_iatu_index;
- atu.type = PCIE_ATU_TYPE_IO;
+ 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;
window_size = MIN(pci->region_limit + 1, res_size);
ret = dw_pcie_prog_inbound_atu(pci, ib_iatu_index,
- PCIE_ATU_TYPE_MEM, res_start,
+ PCIE_TLP_TYPE_MEM_RDWR, res_start,
res_start - entry->offset, window_size);
if (ret) {
dev_err(pci->dev, "Failed to set DMA range %pr\n",
atu.code = PCIE_MSG_CODE_PME_TURN_OFF;
atu.routing = PCIE_MSG_TYPE_R_BC;
- atu.type = PCIE_ATU_TYPE_MSG;
+ atu.type = PCIE_TLP_TYPE_MSG;
atu.size = resource_size(pci->pp.msg_res);
atu.index = pci->pp.msg_atu_index;