diff options
Diffstat (limited to 'arch/mips/pci/ops-bridge.c')
| -rw-r--r-- | arch/mips/pci/ops-bridge.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c index 1fa09929cd7a..b46b3e211775 100644 --- a/arch/mips/pci/ops-bridge.c +++ b/arch/mips/pci/ops-bridge.c | |||
| @@ -14,6 +14,22 @@ | |||
| 14 | #include <asm/sn/sn0/hub.h> | 14 | #include <asm/sn/sn0/hub.h> |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Most of the IOC3 PCI config register aren't present | ||
| 18 | * we emulate what is needed for a normal PCI enumeration | ||
| 19 | */ | ||
| 20 | static u32 emulate_ioc3_cfg(int where, int size) | ||
| 21 | { | ||
| 22 | if (size == 1 && where == 0x3d) | ||
| 23 | return 0x01; | ||
| 24 | else if (size == 2 && where == 0x3c) | ||
| 25 | return 0x0100; | ||
| 26 | else if (size == 4 && where == 0x3c) | ||
| 27 | return 0x00000100; | ||
| 28 | |||
| 29 | return 0; | ||
| 30 | } | ||
| 31 | |||
| 32 | /* | ||
| 17 | * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is | 33 | * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is |
| 18 | * not really documented, so right now I can't write code which uses it. | 34 | * not really documented, so right now I can't write code which uses it. |
| 19 | * Therefore we use type 0 accesses for now even though they won't work | 35 | * Therefore we use type 0 accesses for now even though they won't work |
| @@ -64,7 +80,7 @@ oh_my_gawd: | |||
| 64 | * generic PCI code a chance to look at the wrong register. | 80 | * generic PCI code a chance to look at the wrong register. |
| 65 | */ | 81 | */ |
| 66 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { | 82 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { |
| 67 | *value = 0; | 83 | *value = emulate_ioc3_cfg(where, size); |
| 68 | return PCIBIOS_SUCCESSFUL; | 84 | return PCIBIOS_SUCCESSFUL; |
| 69 | } | 85 | } |
| 70 | 86 | ||
| @@ -127,7 +143,7 @@ oh_my_gawd: | |||
| 127 | * generic PCI code a chance to look at the wrong register. | 143 | * generic PCI code a chance to look at the wrong register. |
| 128 | */ | 144 | */ |
| 129 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { | 145 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { |
| 130 | *value = 0; | 146 | *value = emulate_ioc3_cfg(where, size); |
| 131 | return PCIBIOS_SUCCESSFUL; | 147 | return PCIBIOS_SUCCESSFUL; |
| 132 | } | 148 | } |
| 133 | 149 | ||
