Browse Source

Clear the pcie internal port useless irq ,otherwise it maybe cause the linked device irq error in kernel.

Change-Id: I308a61b60a196b2a59e58bf67ecb8b67bee4c7d6
master
wusheng 6 years ago
parent
commit
c6b08d78f7
  1. 21
      Targets/Bonito3a3000_7a/Bonito/tgt_machdep.c

21
Targets/Bonito3a3000_7a/Bonito/tgt_machdep.c

@ -416,7 +416,7 @@ run:
} }
#endif #endif
printf("devconfig done.\n"); printf("devconfig done.\n");
clear_pcie_inter_irq();
ls_pcie_interrupt_fixup(); ls_pcie_interrupt_fixup();
} }
@ -1228,6 +1228,25 @@ int get_update(char *p)
return 0; return 0;
} }
void clear_pcie_inter_irq(void)
{
unsigned int dev;
unsigned int val;
unsigned int addr;
int i;
for(i = 9;i < 21;i++) {
dev = _pci_make_tag(0, i, 0);
val = _pci_conf_read(dev, 0x00);
if( val != 0xffffffff){
addr = ((_pci_conf_read(dev, 0x10) & (~0xf)) | 0x80000000);
val = inl(addr + 0x18);
if(val){
outl(addr + 0x1c, val);
}
}
}
}
void ls_pcie_interrupt_fixup(void) void ls_pcie_interrupt_fixup(void)
{ {

Loading…
Cancel
Save