diff options
-rw-r--r-- | arch/x86/pci/early.c | 9 | ||||
-rw-r--r-- | include/asm-x86/pci-direct.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/pci/early.c b/arch/x86/pci/early.c index 42df4b6606df..8e2821e8dac5 100644 --- a/arch/x86/pci/early.c +++ b/arch/x86/pci/early.c | |||
@@ -49,7 +49,14 @@ void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) | |||
49 | { | 49 | { |
50 | PDprintk("%x writing to %x: %x\n", slot, offset, val); | 50 | PDprintk("%x writing to %x: %x\n", slot, offset, val); |
51 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 51 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
52 | outb(val, 0xcfc); | 52 | outb(val, 0xcfc + (offset&3)); |
53 | } | ||
54 | |||
55 | void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val) | ||
56 | { | ||
57 | PDprintk("%x writing to %x: %x\n", slot, offset, val); | ||
58 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | ||
59 | outw(val, 0xcfc + (offset&2)); | ||
53 | } | 60 | } |
54 | 61 | ||
55 | int early_pci_allowed(void) | 62 | int early_pci_allowed(void) |
diff --git a/include/asm-x86/pci-direct.h b/include/asm-x86/pci-direct.h index 5b21485be573..7bd40b4de751 100644 --- a/include/asm-x86/pci-direct.h +++ b/include/asm-x86/pci-direct.h | |||
@@ -11,6 +11,7 @@ extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset); | |||
11 | extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset); | 11 | extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset); |
12 | extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val); | 12 | extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val); |
13 | extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val); | 13 | extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val); |
14 | extern void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val); | ||
14 | 15 | ||
15 | extern int early_pci_allowed(void); | 16 | extern int early_pci_allowed(void); |
16 | 17 | ||