mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
e2e2fc3cd0
Add updated patches for 6.6. DMA/cache-handling patches have been reworked / backported from upstream. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
From 2fd7c88ef318fd39023ce1eb73f37a29fbd25d74 Mon Sep 17 00:00:00 2001
|
|
From: Minda Chen <minda.chen@starfivetech.com>
|
|
Date: Mon, 8 Jan 2024 19:05:58 +0800
|
|
Subject: [PATCH 021/116] PCI: microchip: Change the argument of
|
|
plda_pcie_setup_iomems()
|
|
|
|
If other vendor do not select PCI_HOST_COMMON, the driver data is not
|
|
struct pci_host_bridge.
|
|
|
|
Move calling platform_get_drvdata() to mc_platform_init().
|
|
|
|
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
|
|
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
|
|
---
|
|
drivers/pci/controller/plda/pcie-microchip-host.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/pci/controller/plda/pcie-microchip-host.c
|
|
+++ b/drivers/pci/controller/plda/pcie-microchip-host.c
|
|
@@ -876,11 +876,10 @@ static void plda_pcie_setup_window(void
|
|
writel(0, bridge_base_addr + ATR0_PCIE_WIN0_SRC_ADDR);
|
|
}
|
|
|
|
-static int plda_pcie_setup_iomems(struct platform_device *pdev,
|
|
+static int plda_pcie_setup_iomems(struct pci_host_bridge *bridge,
|
|
struct plda_pcie_rp *port)
|
|
{
|
|
void __iomem *bridge_base_addr = port->bridge_addr;
|
|
- struct pci_host_bridge *bridge = platform_get_drvdata(pdev);
|
|
struct resource_entry *entry;
|
|
u64 pci_addr;
|
|
u32 index = 1;
|
|
@@ -1018,6 +1017,7 @@ static int mc_platform_init(struct pci_c
|
|
{
|
|
struct device *dev = cfg->parent;
|
|
struct platform_device *pdev = to_platform_device(dev);
|
|
+ struct pci_host_bridge *bridge = platform_get_drvdata(pdev);
|
|
void __iomem *bridge_base_addr =
|
|
port->axi_base_addr + MC_PCIE_BRIDGE_ADDR;
|
|
int ret;
|
|
@@ -1031,7 +1031,7 @@ static int mc_platform_init(struct pci_c
|
|
mc_pcie_enable_msi(port, cfg->win);
|
|
|
|
/* Configure non-config space outbound ranges */
|
|
- ret = plda_pcie_setup_iomems(pdev, &port->plda);
|
|
+ ret = plda_pcie_setup_iomems(bridge, &port->plda);
|
|
if (ret)
|
|
return ret;
|
|
|