[PATCH u-boot-marvell 2/5] pci: pci_mvebu: cosmetic fix
Stefan Roese
sr at denx.de
Fri Feb 26 10:12:13 CET 2021
On 08.02.21 23:01, Marek Behún wrote:
> Write bdf address in a same way in mvebu_pcie_read/write_config.
>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Phil Sutter <phil at nwl.cc>
> Cc: Mario Six <mario.six at gdsys.cc>
> Cc: Baruch Siach <baruch at tkos.co.il>
Reviewed-by: Stefan Roese <sr at denx.de>
Thanks,
Stefan
> ---
> drivers/pci/pci_mvebu.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
> index 5c55a76d0e..abc6e9e6e0 100644
> --- a/drivers/pci/pci_mvebu.c
> +++ b/drivers/pci/pci_mvebu.c
> @@ -150,7 +150,6 @@ static int mvebu_pcie_read_config(const struct udevice *bus, pci_dev_t bdf,
> struct mvebu_pcie *pcie = dev_get_plat(bus);
> int local_bus = PCI_BUS(pcie->dev);
> int local_dev = PCI_DEV(pcie->dev);
> - u32 reg;
> u32 data;
>
> debug("PCIE CFG read: loc_bus=%d loc_dev=%d (b,d,f)=(%2d,%2d,%2d) ",
> @@ -171,8 +170,9 @@ static int mvebu_pcie_read_config(const struct udevice *bus, pci_dev_t bdf,
> }
>
> /* write address */
> - reg = PCIE_CONF_ADDR(bdf, offset);
> - writel(reg, pcie->base + PCIE_CONF_ADDR_OFF);
> + writel(PCIE_CONF_ADDR(bdf, offset), pcie->base + PCIE_CONF_ADDR_OFF);
> +
> + /* read data */
> data = readl(pcie->base + PCIE_CONF_DATA_OFF);
> debug("(addr,val)=(0x%04x, 0x%08x)\n", offset, data);
> *valuep = pci_conv_32_to_size(data, offset, size);
> @@ -205,7 +205,10 @@ static int mvebu_pcie_write_config(struct udevice *bus, pci_dev_t bdf,
> return 0;
> }
>
> + /* write address */
> writel(PCIE_CONF_ADDR(bdf, offset), pcie->base + PCIE_CONF_ADDR_OFF);
> +
> + /* write data */
> data = pci_conv_size_to_32(0, value, offset, size);
> writel(data, pcie->base + PCIE_CONF_DATA_OFF);
>
>
Viele Grüße,
Stefan
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
More information about the U-Boot
mailing list