From: "Pali Rohár" <pali@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
"Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] MIPS: Cobalt: Explain GT64111 early PCI fixup
Date: Tue, 2 Nov 2021 18:12:59 +0100 [thread overview]
Message-ID: <20211102171259.9590-2-pali@kernel.org> (raw)
In-Reply-To: <20211102171259.9590-1-pali@kernel.org>
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 <pali@kernel.org>
---
Changes in v2:
* Split from ARM changes
* Removal of Kconfig changes
* Explanation is completely rewritten as as this MIPS Cobalt device
predates ARM Orion devices and reason is slightly different.
---
arch/mips/pci/fixup-cobalt.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c
index 44be65c3e6bb..00206ff52988 100644
--- a/arch/mips/pci/fixup-cobalt.c
+++ b/arch/mips/pci/fixup-cobalt.c
@@ -36,6 +36,21 @@
#define VIA_COBALT_BRD_ID_REG 0x94
#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4)
+/*
+ * Default value of PCI Class Code on GT64111 is PCI_CLASS_MEMORY_OTHER (0x0580)
+ * instead of PCI_CLASS_BRIDGE_HOST (0x0600). Galileo explained this choice in
+ * document "GT-64111 System Controller for RC4640, RM523X and VR4300 CPUs",
+ * section "6.5.3 PCI Autoconfiguration at RESET":
+ *
+ * Some PCs refuse to configure host bridges if they are found plugged into
+ * a PCI slot (ask the BIOS vendors why...). The "Memory Controller" Class
+ * Code does not cause a problem for these non-compliant BIOSes, so we used
+ * this as the default in the GT-64111.
+ *
+ * So fix the incorrect default value of PCI Class Code. More details are on:
+ * https://lore.kernel.org/r/20211102154831.xtrlgrmrizl5eidl@pali/
+ * https://lore.kernel.org/r/20211102150201.GA11675@alpha.franken.de/
+ */
static void qube_raq_galileo_early_fixup(struct pci_dev *dev)
{
if (dev->devfn == PCI_DEVFN(0, 0) &&
--
2.20.1
next prev parent reply other threads:[~2021-11-02 17:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 15:04 [PATCH] PCI: Marvell: Update PCIe fixup Pali Rohár
2021-11-01 16:27 ` Jason Gunthorpe
2021-11-01 17:56 ` Pali Rohár
2021-11-01 18:03 ` Jason Gunthorpe
2021-11-02 8:42 ` Thomas Bogendoerfer
2021-11-02 9:02 ` Pali Rohár
2021-11-02 9:47 ` Thomas Bogendoerfer
2021-11-02 10:00 ` Pali Rohár
2021-11-02 12:35 ` Maciej W. Rozycki
2021-11-02 12:58 ` Pali Rohár
2021-11-02 14:01 ` Maciej W. Rozycki
2021-11-02 14:49 ` Pali Rohár
2021-11-02 15:48 ` Pali Rohár
2021-11-02 17:03 ` Stefan Roese
2021-11-03 14:59 ` Maciej W. Rozycki
2021-11-03 14:49 ` Maciej W. Rozycki
2021-11-03 15:03 ` Pali Rohár
2021-11-02 15:02 ` Thomas Bogendoerfer
2021-11-02 15:13 ` Pali Rohár
2021-11-09 23:42 ` Pali Rohár
2021-11-10 8:55 ` Thomas Bogendoerfer
[not found] ` <20211102171259.9590-1-pali@kernel.org>
2021-11-02 17:12 ` Pali Rohár [this message]
2021-11-03 16:36 ` [PATCH v2 2/2] MIPS: Cobalt: Explain GT64111 early PCI fixup Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211102171259.9590-2-pali@kernel.org \
--to=pali@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).