“b9835a90084bd3cc45d7ab80c37f282046bc13d3”上不存在“git@gitcode.net:openeuler/raspberrypi-kernel.git”
提交 cbe7dd69 编写于 作者: S Stefan Richter

ieee1394: ohci1394: flush MMIO writes before delay in initialization

and replace busy-wait by msleep.
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 9e234faf
...@@ -3199,15 +3199,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, ...@@ -3199,15 +3199,16 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
/* Now enable LPS, which we need in order to start accessing /* Now enable LPS, which we need in order to start accessing
* most of the registers. In fact, on some cards (ALI M5251), * most of the registers. In fact, on some cards (ALI M5251),
* accessing registers in the SClk domain without LPS enabled * accessing registers in the SClk domain without LPS enabled
* will lock up the machine. Wait 50msec to make sure we have * will lock up the machine. */
* full link enabled. */
reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS);
/* Disable and clear interrupts */ /* Disable and clear interrupts */
reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff);
reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff);
mdelay(50); /* Flush MMIO writes and wait to make sure we have full link enabled. */
reg_read(ohci, OHCI1394_Version);
msleep(50);
/* Determine the number of available IR and IT contexts. */ /* Determine the number of available IR and IT contexts. */
ohci->nb_iso_rcv_ctx = ohci->nb_iso_rcv_ctx =
...@@ -3422,7 +3423,8 @@ static int ohci1394_pci_resume(struct pci_dev *dev) ...@@ -3422,7 +3423,8 @@ static int ohci1394_pci_resume(struct pci_dev *dev)
reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS); reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_LPS);
reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff); reg_write(ohci, OHCI1394_IntEventClear, 0xffffffff);
reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff); reg_write(ohci, OHCI1394_IntMaskClear, 0xffffffff);
mdelay(50); reg_read(ohci, OHCI1394_Version);
msleep(50);
err = request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, err = request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED,
OHCI1394_DRIVER_NAME, ohci); OHCI1394_DRIVER_NAME, ohci);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部