提交 5bda8f7b 编写于 作者: Y Yongji Xie 提交者: Tomi Valkeinen

video: fbdev: offb: Call pci_enable_device() before using the PCI VGA device

Currently the offb module will use the PCI VGA device as frame
buffer device without calling something like pci_enable_device().
However, this would cause some problem if we disable memory
decoding of the upstream bridge before. When the console driver
issued memory access to the VGA device, the access cannot be
supported by the bridge which will cause EEH error on Power machine.
Signed-off-by: NYongji Xie <xyjxie@linux.vnet.ibm.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 220be8d0
......@@ -625,6 +625,21 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)
if (address == OF_BAD_ADDR && addr_prop)
address = (u64)addr_prop;
if (address != OF_BAD_ADDR) {
#ifdef CONFIG_PCI
const __be32 *vidp, *didp;
u32 vid, did;
struct pci_dev *pdev;
vidp = of_get_property(dp, "vendor-id", NULL);
didp = of_get_property(dp, "device-id", NULL);
if (vidp && didp) {
vid = be32_to_cpup(vidp);
did = be32_to_cpup(didp);
pdev = pci_get_device(vid, did, NULL);
if (!pdev || pci_enable_device(pdev))
return;
}
#endif
/* kludge for valkyrie */
if (strcmp(dp->name, "valkyrie") == 0)
address += 0x1000;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册