diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-aardvark.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-emul-uclass.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-rcar-gen2.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci-rcar-gen3.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci-uclass.c | 14 | ||||
-rw-r--r-- | drivers/pci/pci_mpc85xx.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci_mvebu.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci_sandbox.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci_sh7751.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci_tegra.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci_x86.c | 5 | ||||
-rw-r--r-- | drivers/pci/pcie_dw_mvebu.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_dw_ti.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_ecam_generic.c | 11 | ||||
-rw-r--r-- | drivers/pci/pcie_fsl.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_imx.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_intel_fpga.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie_layerscape.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie_layerscape_gen4.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_mediatek.c | 4 | ||||
-rw-r--r-- | drivers/pci/pcie_phytium.c | 7 | ||||
-rw-r--r-- | drivers/pci/pcie_xilinx.c | 4 |
22 files changed, 46 insertions, 43 deletions
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index aa0b4bc8456..f1527ac6679 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -297,7 +297,7 @@ static int pcie_advk_check_pio_status(struct pcie_advk *pcie, * * Return: 0 on success */ -static int pcie_advk_read_config(struct udevice *bus, pci_dev_t bdf, +static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c index 0f63e491a79..9486e1cb96e 100644 --- a/drivers/pci/pci-emul-uclass.c +++ b/drivers/pci/pci-emul-uclass.c @@ -15,7 +15,7 @@ struct sandbox_pci_emul_priv { int dev_count; }; -int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn, +int sandbox_pci_get_emul(const struct udevice *bus, pci_dev_t find_devfn, struct udevice **containerp, struct udevice **emulp) { struct pci_emul_uc_priv *upriv; diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c index d913d53f3c3..014d8704788 100644 --- a/drivers/pci/pci-rcar-gen2.c +++ b/drivers/pci/pci-rcar-gen2.c @@ -107,7 +107,7 @@ static int rcar_gen2_pci_addr_valid(pci_dev_t d, uint offset) return 0; } -static u32 get_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) +static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset) { struct rcar_gen2_pci_priv *priv = dev_get_priv(dev); @@ -126,7 +126,7 @@ static u32 setup_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) return get_bus_address(dev, bdf, offset); } -static int rcar_gen2_pci_read_config(struct udevice *dev, pci_dev_t bdf, +static int rcar_gen2_pci_read_config(const struct udevice *dev, pci_dev_t bdf, uint offset, ulong *value, enum pci_size_t size) { diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c index 52ca13b70cb..30eff67dca2 100644 --- a/drivers/pci/pci-rcar-gen3.c +++ b/drivers/pci/pci-rcar-gen3.c @@ -143,7 +143,7 @@ static void rcar_rmw32(struct udevice *dev, int where, u32 mask, u32 data) mask << shift, data << shift); } -static u32 rcar_read_conf(struct udevice *dev, int where) +static u32 rcar_read_conf(const struct udevice *dev, int where) { struct rcar_gen3_pcie_priv *priv = dev_get_platdata(dev); int shift = 8 * (where & 3); @@ -151,7 +151,7 @@ static u32 rcar_read_conf(struct udevice *dev, int where) return readl(priv->regs + (where & ~3)) >> shift; } -static int rcar_pcie_config_access(struct udevice *udev, +static int rcar_pcie_config_access(const struct udevice *udev, unsigned char access_type, pci_dev_t bdf, int where, ulong *data) { @@ -204,7 +204,7 @@ static int rcar_gen3_pcie_addr_valid(pci_dev_t d, uint where) return 0; } -static int rcar_gen3_pcie_read_config(struct udevice *dev, pci_dev_t bdf, +static int rcar_gen3_pcie_read_config(const struct udevice *dev, pci_dev_t bdf, uint where, ulong *val, enum pci_size_t size) { diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 5be2dfd0bf6..78d4129572e 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -124,7 +124,7 @@ static void pci_dev_find_ofnode(struct udevice *bus, phys_addr_t bdf, } }; -int pci_bus_find_devfn(struct udevice *bus, pci_dev_t find_devfn, +int pci_bus_find_devfn(const struct udevice *bus, pci_dev_t find_devfn, struct udevice **devp) { struct udevice *dev; @@ -551,8 +551,9 @@ int pci_auto_config_devices(struct udevice *bus) } int pci_generic_mmap_write_config( - struct udevice *bus, - int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp), + const struct udevice *bus, + int (*addr_f)(const struct udevice *bus, pci_dev_t bdf, uint offset, + void **addrp), pci_dev_t bdf, uint offset, ulong value, @@ -579,8 +580,9 @@ int pci_generic_mmap_write_config( } int pci_generic_mmap_read_config( - struct udevice *bus, - int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp), + const struct udevice *bus, + int (*addr_f)(const struct udevice *bus, pci_dev_t bdf, uint offset, + void **addrp), pci_dev_t bdf, uint offset, ulong *valuep, @@ -1054,7 +1056,7 @@ static int pci_uclass_child_post_bind(struct udevice *dev) return 0; } -static int pci_bridge_read_config(struct udevice *bus, pci_dev_t bdf, +static int pci_bridge_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c index e58ab60ee04..8dff68dbd0e 100644 --- a/drivers/pci/pci_mpc85xx.c +++ b/drivers/pci/pci_mpc85xx.c @@ -15,7 +15,7 @@ struct mpc85xx_pci_priv { void __iomem *cfg_data; }; -static int mpc85xx_pci_dm_read_config(struct udevice *dev, pci_dev_t bdf, +static int mpc85xx_pci_dm_read_config(const struct udevice *dev, pci_dev_t bdf, uint offset, ulong *value, enum pci_size_t size) { diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c index f9b08f38a15..7d9ad34e9d2 100644 --- a/drivers/pci/pci_mvebu.c +++ b/drivers/pci/pci_mvebu.c @@ -136,7 +136,7 @@ static inline struct mvebu_pcie *hose_to_pcie(struct pci_controller *hose) return container_of(hose, struct mvebu_pcie, hose); } -static int mvebu_pcie_read_config(struct udevice *bus, pci_dev_t bdf, +static int mvebu_pcie_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c index 2af2b79c05d..fa4c4765978 100644 --- a/drivers/pci/pci_sandbox.c +++ b/drivers/pci/pci_sandbox.c @@ -39,7 +39,7 @@ static int sandbox_pci_write_config(struct udevice *bus, pci_dev_t devfn, return ops->write_config(emul, offset, value, size); } -static int sandbox_pci_read_config(struct udevice *bus, pci_dev_t devfn, +static int sandbox_pci_read_config(const struct udevice *bus, pci_dev_t devfn, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c index 53e1668c99f..2f48b967193 100644 --- a/drivers/pci/pci_sh7751.c +++ b/drivers/pci/pci_sh7751.c @@ -80,12 +80,12 @@ static int sh7751_pci_addr_valid(pci_dev_t d, uint offset) return 0; } -static u32 get_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset) +static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset) { return BIT(31) | (PCI_DEV(bdf) << 8) | (offset & ~3); } -static int sh7751_pci_read_config(struct udevice *dev, pci_dev_t bdf, +static int sh7751_pci_read_config(const struct udevice *dev, pci_dev_t bdf, uint offset, ulong *value, enum pci_size_t size) { diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c index 56c08585e6d..96d308f7bfd 100644 --- a/drivers/pci/pci_tegra.c +++ b/drivers/pci/pci_tegra.c @@ -308,7 +308,7 @@ static int tegra_pcie_conf_address(struct tegra_pcie *pcie, pci_dev_t bdf, } } -static int pci_tegra_read_config(struct udevice *bus, pci_dev_t bdf, +static int pci_tegra_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pci_x86.c b/drivers/pci/pci_x86.c index e76a9c6e44f..8d036930e73 100644 --- a/drivers/pci/pci_x86.c +++ b/drivers/pci/pci_x86.c @@ -8,8 +8,9 @@ #include <pci.h> #include <asm/pci.h> -static int _pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset, - ulong *valuep, enum pci_size_t size) +static int _pci_x86_read_config(const struct udevice *bus, pci_dev_t bdf, + uint offset, ulong *valuep, + enum pci_size_t size) { return pci_x86_read_config(bdf, offset, valuep, size); } diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c index 693591e3750..1f216e1c680 100644 --- a/drivers/pci/pcie_dw_mvebu.c +++ b/drivers/pci/pcie_dw_mvebu.c @@ -240,7 +240,7 @@ static int pcie_dw_addr_valid(pci_dev_t d, int first_busno) * * Return: 0 on success */ -static int pcie_dw_mvebu_read_config(struct udevice *bus, pci_dev_t bdf, +static int pcie_dw_mvebu_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c index b37fc2de7fb..433640d3e70 100644 --- a/drivers/pci/pcie_dw_ti.c +++ b/drivers/pci/pcie_dw_ti.c @@ -289,7 +289,7 @@ static int pcie_dw_addr_valid(pci_dev_t d, int first_busno) * * Return: 0 on success */ -static int pcie_dw_ti_read_config(struct udevice *bus, pci_dev_t bdf, +static int pcie_dw_ti_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c index 00644edd264..c875f3a5b7d 100644 --- a/drivers/pci/pcie_ecam_generic.c +++ b/drivers/pci/pcie_ecam_generic.c @@ -35,8 +35,9 @@ struct generic_ecam_pcie { * code. Otherwise the address to access will be written to the pointer pointed * to by @paddress. */ -static int pci_generic_ecam_conf_address(struct udevice *bus, pci_dev_t bdf, - uint offset, void **paddress) +static int pci_generic_ecam_conf_address(const struct udevice *bus, + pci_dev_t bdf, uint offset, + void **paddress) { struct generic_ecam_pcie *pcie = dev_get_priv(bus); void *addr; @@ -63,9 +64,9 @@ static int pci_generic_ecam_conf_address(struct udevice *bus, pci_dev_t bdf, * space of the device identified by the bus, device & function numbers in @bdf * on the PCI bus @bus. */ -static int pci_generic_ecam_read_config(struct udevice *bus, pci_dev_t bdf, - uint offset, ulong *valuep, - enum pci_size_t size) +static int pci_generic_ecam_read_config(const struct udevice *bus, + pci_dev_t bdf, uint offset, + ulong *valuep, enum pci_size_t size) { return pci_generic_mmap_read_config(bus, pci_generic_ecam_conf_address, bdf, offset, valuep, size); diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c index ab25aeee731..f516ec0576e 100644 --- a/drivers/pci/pcie_fsl.c +++ b/drivers/pci/pcie_fsl.c @@ -42,7 +42,7 @@ static int fsl_pcie_addr_valid(struct fsl_pcie *pcie, pci_dev_t bdf) return 0; } -static int fsl_pcie_read_config(struct udevice *bus, pci_dev_t bdf, +static int fsl_pcie_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c index 3621636cb28..8e1713a2d1d 100644 --- a/drivers/pci/pcie_imx.c +++ b/drivers/pci/pcie_imx.c @@ -748,7 +748,7 @@ void pci_init_board(void) imx_pcie_init(); } #else -static int imx_pcie_dm_read_config(struct udevice *dev, pci_dev_t bdf, +static int imx_pcie_dm_read_config(const struct udevice *dev, pci_dev_t bdf, uint offset, ulong *value, enum pci_size_t size) { diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c index a5ea4888f34..a1f6e95e69f 100644 --- a/drivers/pci/pcie_intel_fpga.c +++ b/drivers/pci/pcie_intel_fpga.c @@ -226,7 +226,7 @@ static int tlp_cfg_dword_write(struct intel_fpga_pcie *pcie, pci_dev_t bdf, return tlp_read_packet(pcie, NULL); } -int intel_fpga_rp_conf_addr(struct udevice *bus, pci_dev_t bdf, +int intel_fpga_rp_conf_addr(const struct udevice *bus, pci_dev_t bdf, uint offset, void **paddress) { struct intel_fpga_pcie *pcie = dev_get_priv(bus); @@ -326,7 +326,7 @@ static int _pcie_intel_fpga_write_config(struct intel_fpga_pcie *pcie, byte_en, data); } -static int pcie_intel_fpga_read_config(struct udevice *bus, pci_dev_t bdf, +static int pcie_intel_fpga_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 2ab67d1fc95..8b313e92786 100644 --- a/drivers/pci/pcie_layerscape.c +++ b/drivers/pci/pcie_layerscape.c @@ -243,7 +243,7 @@ static int ls_pcie_addr_valid(struct ls_pcie *pcie, pci_dev_t bdf) return 0; } -int ls_pcie_conf_address(struct udevice *bus, pci_dev_t bdf, +int ls_pcie_conf_address(const struct udevice *bus, pci_dev_t bdf, uint offset, void **paddress) { struct ls_pcie *pcie = dev_get_priv(bus); @@ -271,7 +271,7 @@ int ls_pcie_conf_address(struct udevice *bus, pci_dev_t bdf, return 0; } -static int ls_pcie_read_config(struct udevice *bus, pci_dev_t bdf, +static int ls_pcie_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c index 1fd8761bbcc..cec61fa7d65 100644 --- a/drivers/pci/pcie_layerscape_gen4.c +++ b/drivers/pci/pcie_layerscape_gen4.c @@ -227,7 +227,7 @@ void *ls_pcie_g4_conf_address(struct ls_pcie_g4 *pcie, pci_dev_t bdf, return pcie->cfg + offset; } -static int ls_pcie_g4_read_config(struct udevice *bus, pci_dev_t bdf, +static int ls_pcie_g4_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c index a0dcb258b02..0b412aca0e8 100644 --- a/drivers/pci/pcie_mediatek.c +++ b/drivers/pci/pcie_mediatek.c @@ -66,7 +66,7 @@ struct mtk_pcie { struct list_head ports; }; -static int mtk_pcie_config_address(struct udevice *udev, pci_dev_t bdf, +static int mtk_pcie_config_address(const struct udevice *udev, pci_dev_t bdf, uint offset, void **paddress) { struct mtk_pcie *pcie = dev_get_priv(udev); @@ -77,7 +77,7 @@ static int mtk_pcie_config_address(struct udevice *udev, pci_dev_t bdf, return 0; } -static int mtk_pcie_read_config(struct udevice *bus, pci_dev_t bdf, +static int mtk_pcie_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c index 92e281e7c2f..51b2171f9fa 100644 --- a/drivers/pci/pcie_phytium.c +++ b/drivers/pci/pcie_phytium.c @@ -75,9 +75,8 @@ static int phytium_pci_skip_dev(pci_dev_t parent) * code. Otherwise the address to access will be written to the pointer pointed * to by @paddress. */ -static int pci_phytium_conf_address(struct udevice *bus, pci_dev_t bdf, - uint offset, - void **paddress) +static int pci_phytium_conf_address(const struct udevice *bus, pci_dev_t bdf, + uint offset, void **paddress) { struct phytium_pcie *pcie = dev_get_priv(bus); void *addr; @@ -119,7 +118,7 @@ static int pci_phytium_conf_address(struct udevice *bus, pci_dev_t bdf, * space of the device identified by the bus, device & function numbers in @bdf * on the PCI bus @bus. */ -static int pci_phytium_read_config(struct udevice *bus, pci_dev_t bdf, +static int pci_phytium_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c index 44a5f1e1f4f..05787ae1448 100644 --- a/drivers/pci/pcie_xilinx.c +++ b/drivers/pci/pcie_xilinx.c @@ -54,7 +54,7 @@ static bool pcie_xilinx_link_up(struct xilinx_pcie *pcie) * * Return: 0 on success, else -ENODEV */ -static int pcie_xilinx_config_address(struct udevice *udev, pci_dev_t bdf, +static int pcie_xilinx_config_address(const struct udevice *udev, pci_dev_t bdf, uint offset, void **paddress) { struct xilinx_pcie *pcie = dev_get_priv(udev); @@ -97,7 +97,7 @@ static int pcie_xilinx_config_address(struct udevice *udev, pci_dev_t bdf, * * Return: 0 on success, else -ENODEV or -EINVAL */ -static int pcie_xilinx_read_config(struct udevice *bus, pci_dev_t bdf, +static int pcie_xilinx_read_config(const struct udevice *bus, pci_dev_t bdf, uint offset, ulong *valuep, enum pci_size_t size) { |