Skip to content

Commit 36de23a

Browse files
palitsbogend
authored andcommitted
MIPS: Cobalt: Explain GT64111 early PCI fixup
Properly document why changing PCI Class Code for GT64111 device to Host Bridge is required as important details were after 20 years forgotten. Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent f69fa4c commit 36de23a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

arch/mips/pci/fixup-cobalt.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@
3636
#define VIA_COBALT_BRD_ID_REG 0x94
3737
#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4)
3838

39+
/*
40+
* Default value of PCI Class Code on GT64111 is PCI_CLASS_MEMORY_OTHER (0x0580)
41+
* instead of PCI_CLASS_BRIDGE_HOST (0x0600). Galileo explained this choice in
42+
* document "GT-64111 System Controller for RC4640, RM523X and VR4300 CPUs",
43+
* section "6.5.3 PCI Autoconfiguration at RESET":
44+
*
45+
* Some PCs refuse to configure host bridges if they are found plugged into
46+
* a PCI slot (ask the BIOS vendors why...). The "Memory Controller" Class
47+
* Code does not cause a problem for these non-compliant BIOSes, so we used
48+
* this as the default in the GT-64111.
49+
*
50+
* So fix the incorrect default value of PCI Class Code. More details are on:
51+
* https://lore.kernel.org/r/20211102154831.xtrlgrmrizl5eidl@pali/
52+
* https://lore.kernel.org/r/[email protected]/
53+
*/
3954
static void qube_raq_galileo_early_fixup(struct pci_dev *dev)
4055
{
4156
if (dev->devfn == PCI_DEVFN(0, 0) &&

0 commit comments

Comments
 (0)