提交 5fafd7e3 编写于 作者: B Bin Meng 提交者: Tom Rini

pci: Avoid assigning PCI resources that are below 0x1000

commit b7598a43 ("[PATCH] Avoid assigning PCI resources from
zero address") only moved the bus lower address to 0x1000 if the
given bus start address is zero. The comment said 0x1000 is a
reasonable starting value, hence we'd better apply the same
adjustment when the given bus start address is below 0x1000.
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Reviewed-by: NStefan Roese <sr@denx.de>
上级 d5e994fc
......@@ -21,9 +21,10 @@ void pciauto_region_init(struct pci_region *res)
/*
* Avoid allocating PCI resources from address 0 -- this is illegal
* according to PCI 2.1 and moreover, this is known to cause Linux IDE
* drivers to fail. Use a reasonable starting value of 0x1000 instead.
* drivers to fail. Use a reasonable starting value of 0x1000 instead
* if the bus start address is below 0x1000.
*/
res->bus_lower = res->bus_start ? res->bus_start : 0x1000;
res->bus_lower = res->bus_start < 0x1000 ? 0x1000 : res->bus_start;
}
void pciauto_region_align(struct pci_region *res, pci_size_t size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册