From: Tom Rini Date: Thu, 12 Nov 2015 20:28:15 -0500 Subject: [U-Boot] pci: fix checking PCI_REGION_MEM in pci_hose_phys_to_bus() In-Reply-To: <1445636881.26450.6.camel@marvell.com> References: <1445636881.26450.6.camel@marvell.com> Message-ID: <20151113012815.GT8060@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Oct 23, 2015 at 09:48:01PM +0000, Cheng Gu wrote: > When converting between PCI bus and phys addresses, a two pass search > was introduced with preference to non-PCI_REGION_SYS_MEMORY regions. > See commit 2d43e873a29ca4959ba6a30fc7fb396d3fd0dccf. > > However, since PCI_REGION_MEM is defined as 0, the if statement was > always asserted true: ((flags & PCI_REGION_MEM) == PCI_REGION_MEM) > > This patch uses PCI_REGION_TYPE bit to check if the region is > PCI_REGION_MEM: ((flags & PCI_REGION_TYPE) == PCI_REGION_MEM) > > Signed-off-by: Cheng Gu > Reviewed-by: Bin Meng Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: