static int rzg3s_pcie_config_init(struct rzg3s_pcie_host *host)
{
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
+ u32 mask = GENMASK(31, 8);
struct resource_entry *ft;
struct resource *bus;
u8 subordinate_bus;
writel_relaxed(0xffffffff, host->pcie + RZG3S_PCI_CFG_BARMSK00L);
writel_relaxed(0xffffffff, host->pcie + RZG3S_PCI_CFG_BARMSK00U);
+ /*
+ * Explicitly program class code. RZ/G3E requires this configuration.
+ * Harmless for RZ/G3S where this matches the hardware default.
+ */
+ rzg3s_pcie_update_bits(host->pcie, PCI_CLASS_REVISION, mask,
+ field_prep(mask, PCI_CLASS_BRIDGE_PCI_NORMAL));
+
/* Disable access control to the CFGU */
writel_relaxed(0, host->axi + RZG3S_PCI_PERM);