diff options
| author | Ralf Baechle <ralf@linux-mips.org> | 2015-11-27 19:17:01 +0100 | 
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2015-11-27 19:20:37 +0100 | 
| commit | c861519fcf95b2d46cb4275903423b43ae150a40 (patch) | |
| tree | 7e17dcbb79a0a12dc06eae6d1bc3a5a3d8fa58ce /arch/mips/pci | |
| parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
MIPS: Fix delay loops which may be removed by GCC.
GCC 4.1 and newer remove empty loops.  This becomes a problem when delay
loops get removed.  Fixed by rewriting to user the proper Linux interface
for such delays.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/pci')
| -rw-r--r-- | arch/mips/pci/pci-rt2880.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/pci/pci-rt2880.c b/arch/mips/pci/pci-rt2880.c index 8a978022630b..dbbeccc3d714 100644 --- a/arch/mips/pci/pci-rt2880.c +++ b/arch/mips/pci/pci-rt2880.c @@ -11,6 +11,7 @@   *  by the Free Software Foundation.   */ +#include <linux/delay.h>  #include <linux/types.h>  #include <linux/pci.h>  #include <linux/io.h> @@ -232,8 +233,7 @@ static int rt288x_pci_probe(struct platform_device *pdev)  	ioport_resource.end = RT2880_PCI_IO_BASE + RT2880_PCI_IO_SIZE - 1;  	rt2880_pci_reg_write(0, RT2880_PCI_REG_PCICFG_ADDR); -	for (i = 0; i < 0xfffff; i++) -		; +	udelay(1);  	rt2880_pci_reg_write(0x79, RT2880_PCI_REG_ARBCTL);  	rt2880_pci_reg_write(0x07FF0001, RT2880_PCI_REG_BAR0SETUP_ADDR);  | 
