]> git.baikalelectronics.ru Git - uboot.git/commit
arm: a37xx: pci: Disable bus mastering when unloading driver
authorPali Rohár <pali@kernel.org>
Wed, 26 May 2021 15:59:35 +0000 (17:59 +0200)
committerStefan Roese <sr@denx.de>
Fri, 4 Jun 2021 09:32:41 +0000 (11:32 +0200)
commitf3423c9645edda0144e6080eef6e4caa5147e632
tree6e7afaa518aac3c6c3b84931fa8789dac637e17b
parent6d22643e93cc3fd5770277a609dc1c4e94009f9c
arm: a37xx: pci: Disable bus mastering when unloading driver

Disable Root Bridge I/O space, memory space and bus mastering in Aardvark's
remove method, which is called before booting Linux kernel.

This ensures that PCIe device which was initialized and used by U-Boot
cannot do new DMA transfers until Linux initializes PCI subsystem and loads
appropriate drivers for the device.

During initialization of PCI subsystem Linux in fact disables this bus
mastering on Root Bridge (and later enables it when driver is loaded and
configured), but there is a possibility of a small window after U-Boot
boots Linux when bus mastering is enabled, which is not correct.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/pci/pci-aardvark.c