]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: designware: Simplify dw_pcie_cfg_read/write() interfaces
authorGabriele Paoloni <gabriele.paoloni@huawei.com>
Thu, 8 Oct 2015 19:27:48 +0000 (14:27 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 8 Oct 2015 19:27:48 +0000 (14:27 -0500)
commit49fb5b49e1ab4c20979ca8f4ab34d09a0e9f7141
tree9cd03214cccebdd4cfcb72411d26b2d8b1c99245
parent91710c09707658bf14323a3bd6aa2eb22b8fd720
PCI: designware: Simplify dw_pcie_cfg_read/write() interfaces

Callers of dw_pcie_cfg_read() and dw_pcie_cfg_write() previously had to
split the address into "addr" and "where".  The callees assumed "addr" was
32-bit aligned (with zeros in the low two bits) and they used only the low
two bits of "where".

Accept the entire address in "addr" and drop the now-redundant "where"
argument.  As an example, this replaces this:

  int dw_pcie_cfg_read(void __iomem *addr, int where, int size, u32 *val)
    *val = readb(addr + (where & 1));

with this:

  int dw_pcie_cfg_read(void __iomem *addr, int size, u32 *val)
    *val = readb(addr):

[bhelgaas: changelog, split access size change to separate patch]
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pci-exynos.c
drivers/pci/host/pci-keystone-dw.c
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-designware.h
drivers/pci/host/pcie-spear13xx.c