On Tue, Sep 29, 2015 at 7:27 PM, Gabriele Paoloni <gabriele.paoloni@xxxxxxxxxx> wrote: > From: gabriele paoloni <gabriele.paoloni@xxxxxxxxxx> > > This patch changes the implementation of dw_pcie_cfg_read() and > dw_pcie_cfg_write() to improve the function usage from the callers > perspective. > Currently the callers are obliged to pass the 32bit aligned address > of the register that contains the field of the PCI header that they > want to read/write; also they have to pass the offset of the field > in that register. This is quite tricky to use as the callers are > obliged to sum the PCI header base address to the field offset > masked to retrieve the 32b aligned register address. > > With the new API the callers have to pass directly the address of the > field they intend to read/write in the PCI header: so once they have > the base address of the PCI header they will just sum up the offset > of the field they intend to access and pass the sum to the functions' > addr field. > > This patch also changes the implementation of dw_pcie_cfg_read to > make it symmetric with dw_pcie_cfg_write. > > Signed-off-by: Gabriele Paoloni <gabriele.paoloni@xxxxxxxxxx> Acked-by: Pratyush Anand <pratyush.anand@xxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html