Eric Biederman | 05f26fc | 2003-06-11 21:55:00 +0000 | [diff] [blame^] | 1 | |
2 | static unsigned pci_locate_device(unsigned addr) | ||||
3 | { | ||||
4 | addr &= ~0xff; | ||||
5 | for(; addr <= 0x00ffff00; addr += 0x00000100) { | ||||
6 | __builtin_outl(addr, 0x12); | ||||
7 | } | ||||
8 | return addr; | ||||
9 | } | ||||
10 | |||||
11 | static void main(void) | ||||
12 | { | ||||
13 | unsigned long addr; | ||||
14 | addr = pci_locate_device(0); | ||||
15 | __builtin_outl(addr, 0x12); | ||||
16 | } |