[openwrt/openwrt] lantiq: fix pcie driver build warnings
LEDE Commits
lede-commits at lists.infradead.org
Fri Jul 18 04:31:36 PDT 2025
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/988133846d61e12d2de8d346474ee29eb3f156bd
commit 988133846d61e12d2de8d346474ee29eb3f156bd
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Thu May 8 21:43:02 2025 +0800
lantiq: fix pcie driver build warnings
This patch fixes the following build warnings:
arch/mips/pci/ifxmips_pcie.c:1084:36: error: invalid use of undefined type 'struct platform_device'
1084 | struct device_node *node = pdev->dev.of_node;
| ^~
arch/mips/pci/ifxmips_pcie.c:1204:12: error: no previous prototype for 'ifx_pcie_bios_init' [-Werror=missing-prototypes]
1204 | int __init ifx_pcie_bios_init(void)
| ^~~~~~~~~~~~~~~~~~
Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
---
.../0151-lantiq-ifxmips_pcie-use-of.patch | 25 +++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/target/linux/lantiq/patches-6.6/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.6/0151-lantiq-ifxmips_pcie-use-of.patch
index 65253bc7e4..92e0f4830e 100644
--- a/target/linux/lantiq/patches-6.6/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-6.6/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -23,7 +23,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
obj-$(CONFIG_SOC_TX4938) += pci-tx4938.o
--- a/arch/mips/pci/ifxmips_pcie.c
+++ b/arch/mips/pci/ifxmips_pcie.c
-@@ -16,8 +16,15 @@
+@@ -16,8 +16,16 @@
#include <asm/paccess.h>
#include <linux/pci.h>
#include <linux/pci_regs.h>
@@ -35,11 +35,12 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
+#include <linux/of_gpio.h>
+#include <linux/of_platform.h>
++#include <linux/platform_device.h>
+
#include "ifxmips_pcie.h"
#include "ifxmips_pcie_reg.h"
-@@ -25,11 +32,6 @@
+@@ -25,11 +33,6 @@
#define IFX_PCIE_ERROR_INT
#define IFX_PCIE_IO_32BIT
@@ -51,7 +52,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
#define MS(_v, _f) (((_v) & (_f)) >> _f##_S)
#define SM(_v, _f) (((_v) << _f##_S) & (_f))
#define IFX_REG_SET_BIT(_f, _r) \
-@@ -40,30 +42,30 @@
+@@ -40,30 +43,30 @@
static DEFINE_SPINLOCK(ifx_pcie_lock);
u32 g_pcie_debug_flag = PCIE_MSG_ANY & (~PCIE_MSG_CFG);
@@ -87,7 +88,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
},
},
},
-@@ -82,6 +84,22 @@ void ifx_pcie_debug(const char *fmt, ...
+@@ -82,6 +85,22 @@ void ifx_pcie_debug(const char *fmt, ...
printk("%s", buf);
}
@@ -110,7 +111,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
static inline int pcie_ltssm_enable(int pcie_port)
{
-@@ -857,7 +875,8 @@ pcie_rc_core_int_init(int pcie_port)
+@@ -857,7 +876,8 @@ pcie_rc_core_int_init(int pcie_port)
ret = request_irq(pcie_irqs[pcie_port].ir_irq.irq, pcie_rc_core_isr, 0,
pcie_irqs[pcie_port].ir_irq.name, &ifx_pcie_controller[pcie_port]);
if (ret)
@@ -120,7 +121,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
return ret;
}
-@@ -988,10 +1007,26 @@ int ifx_pcie_bios_plat_dev_init(struct
+@@ -988,10 +1008,26 @@ int ifx_pcie_bios_plat_dev_init(struct
static int
pcie_rc_initialize(int pcie_port)
{
@@ -149,7 +150,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
pcie_ep_gpio_rst_init(pcie_port);
-@@ -1000,26 +1035,21 @@ pcie_rc_initialize(int pcie_port)
+@@ -1000,26 +1036,21 @@ pcie_rc_initialize(int pcie_port)
* reset PCIe PHY will solve this issue
*/
for (i = 0; i < IFX_PCIE_PHY_LOOP_CNT; i++) {
@@ -186,7 +187,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
/* Enable PCIe PHY and Clock */
pcie_core_pmu_setup(pcie_port);
-@@ -1035,6 +1065,10 @@ pcie_rc_initialize(int pcie_port)
+@@ -1035,6 +1066,10 @@ pcie_rc_initialize(int pcie_port)
/* Once link is up, break out */
if (pcie_app_loigc_setup(pcie_port) == 0)
break;
@@ -197,7 +198,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
}
if (i >= IFX_PCIE_PHY_LOOP_CNT) {
printk(KERN_ERR "%s link up failed!!!!!\n", __func__);
-@@ -1045,17 +1079,73 @@ pcie_rc_initialize(int pcie_port)
+@@ -1045,17 +1080,73 @@ pcie_rc_initialize(int pcie_port)
return 0;
}
@@ -273,7 +274,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){
if (pcie_rc_initialize(pcie_port) == 0) {
IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n",
-@@ -1066,7 +1156,19 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1066,7 +1157,19 @@ static int __init ifx_pcie_bios_init(voi
IFX_PCIE_PRINT(PCIE_MSG_ERR, "%s io space ioremap failed\n", __func__);
return -ENOMEM;
}
@@ -293,7 +294,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
register_pci_controller(&ifx_pcie_controller[pcie_port].pcic);
/* XXX, clear error status */
-@@ -1083,6 +1185,29 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1083,6 +1186,29 @@ static int __init ifx_pcie_bios_init(voi
return 0;
}
@@ -312,7 +313,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
+ },
+};
+
-+int __init ifx_pcie_bios_init(void)
++static int __init ifx_pcie_bios_init(void)
+{
+ int ret = platform_driver_register(<q_pci_driver);
+ if (ret)
More information about the lede-commits
mailing list