[PATCH u-boot-next 12/12] pci: sh7751: Fix access to config space via PCI_CONF1_ADDRESS() macro

Tom Rini trini at konsulko.com
Thu Jan 13 02:52:34 CET 2022


On Fri, Nov 26, 2021 at 11:42:52AM +0100, Pali Rohár wrote:

> sh7751 platform uses standard format of Config Address for PCI
> Configuration Mechanism #1.
> 
> Commit 72c2f4acd76f ("pci: sh7751: Convert to DM and DT probing") which did
> conversion of PCI sh7751 driver to DM, broke access to config space as that
> commit somehow swapped device and function bits in config address.
> 
> Fix all these issues by using new U-Boot macro PCI_CONF1_ADDRESS() which
> calculates Config Address correctly.
> 
> Also remove nonsense function sh7751_pci_addr_valid() which was introduced
> in commit 72c2f4acd76f ("pci: sh7751: Convert to DM and DT probing")
> probably due to workarounded issues with mixing/swapping device and
> function bits of config address which probably resulted in non-working
> access to some devices. With correct composing of config address there
> should not be such issue anymore.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Fixes: 72c2f4acd76f ("pci: sh7751: Convert to DM and DT probing")
> Cc: Marek Vasut <marek.vasut+renesas at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220112/04cfd688/attachment.sig>


More information about the U-Boot mailing list