diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-05-16 18:14:13 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-05-16 18:14:13 -0500 |
commit | f4036f64b581637121d2319923a788db3b0432ec (patch) | |
tree | 9ad9e6144af87f0232f7e197027286a9bd147ffe /drivers/pci/controller | |
parent | 102c69699b5b5d4aebfe8d15d5f91bde68dababd (diff) | |
parent | 2dba285caba53f309d6060fca911b43d63f41697 (diff) |
Merge branch 'pci/controller/rockchip'
- Configure endpoint BAR to be 64-bit if the PCI_BASE_ADDRESS_MEM_TYPE_64
flag is set instead of depending on the new BAR value itself (Niklas
Cassel)
- Set Subsystem Vendor ID correctly (Rick Wertenbroek)
* pci/controller/rockchip:
PCI: rockchip-ep: Remove wrong mask on subsys_vendor_id
PCI: rockchip-ep: Set a 64-bit BAR if requested
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r-- | drivers/pci/controller/pcie-rockchip-ep.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c index 8613df8184df..136274533656 100644 --- a/drivers/pci/controller/pcie-rockchip-ep.c +++ b/drivers/pci/controller/pcie-rockchip-ep.c @@ -98,10 +98,8 @@ static int rockchip_pcie_ep_write_header(struct pci_epc *epc, u8 fn, u8 vfn, /* All functions share the same vendor ID with function 0 */ if (fn == 0) { - u32 vid_regs = (hdr->vendorid & GENMASK(15, 0)) | - (hdr->subsys_vendor_id & GENMASK(31, 16)) << 16; - - rockchip_pcie_write(rockchip, vid_regs, + rockchip_pcie_write(rockchip, + hdr->vendorid | hdr->subsys_vendor_id << 16, PCIE_CORE_CONFIG_VENDOR); } @@ -153,7 +151,7 @@ static int rockchip_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, u8 vfn, ctrl = ROCKCHIP_PCIE_CORE_BAR_CFG_CTRL_IO_32BITS; } else { bool is_prefetch = !!(flags & PCI_BASE_ADDRESS_MEM_PREFETCH); - bool is_64bits = sz > SZ_2G; + bool is_64bits = !!(flags & PCI_BASE_ADDRESS_MEM_TYPE_64); if (is_64bits && (bar & 1)) return -EINVAL; |