From: Rob Herring Date: Sat, 10 Jan 2015 02:34:39 +0000 (-0600) Subject: PCI: Add generic config accessors X-Git-Tag: fixes-v4.0-rc1~161^2~3^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f94a94f67e1083e19fb7b436dd7ca7a4ba03f2b;p=pandora-kernel.git PCI: Add generic config accessors Many PCI controllers' configuration space accesses are memory-mapped and vary only in address calculation and access checks. There are 2 main access methods: a decoded address space such as ECAM or a single address and data register similar to x86. This implementation can support both cases as well as be used in cases that need additional pre- or post-access handling. Add a new pci_ops member, map_bus, which can do access checks and any necessary setup. It returns the address to use for the configuration space access. The access types supported are 32-bit only accesses or correct byte, word, or dword sized accesses. Tested-by: Thierry Reding Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Reviewed-by: Thierry Reding --- Reading git-diff-tree failed