mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
generic: fix linux 6.12 build
This commit is contained in:
parent
c15d43eaec
commit
a6b29fbae9
@ -1199,14 +1199,20 @@ static int adm6996_gpio_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int adm6996_gpio_remove(struct platform_device *pdev)
|
static int adm6996_gpio_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void adm6996_gpio_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct adm6996_priv *priv = platform_get_drvdata(pdev);
|
struct adm6996_priv *priv = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
if (priv && (priv->model == ADM6996M || priv->model == ADM6996L))
|
if (priv && (priv->model == ADM6996M || priv->model == ADM6996L))
|
||||||
unregister_switch(&priv->dev);
|
unregister_switch(&priv->dev);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver adm6996_gpio_driver = {
|
static struct platform_driver adm6996_gpio_driver = {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/switch.h>
|
#include <linux/switch.h>
|
||||||
@ -1171,7 +1172,7 @@ ar8327_sw_hw_apply(struct switch_dev *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
|
ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
@ -1189,7 +1190,7 @@ ar8327_sw_get_port_igmp_snooping(struct switch_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
|
ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
@ -1207,7 +1208,7 @@ ar8327_sw_set_port_igmp_snooping(struct switch_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
|
ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
@ -1224,7 +1225,7 @@ ar8327_sw_get_igmp_snooping(struct switch_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
|
ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
@ -1240,7 +1241,7 @@ ar8327_sw_set_igmp_snooping(struct switch_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_get_igmp_v3(struct switch_dev *dev,
|
ar8327_sw_get_igmp_v3(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
@ -1256,7 +1257,7 @@ ar8327_sw_get_igmp_v3(struct switch_dev *dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
ar8327_sw_set_igmp_v3(struct switch_dev *dev,
|
ar8327_sw_set_igmp_v3(struct switch_dev *dev,
|
||||||
const struct switch_attr *attr,
|
const struct switch_attr *attr,
|
||||||
struct switch_val *val)
|
struct switch_val *val)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/platform_data/b53.h>
|
#include <linux/platform_data/b53.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "b53_priv.h"
|
#include "b53_priv.h"
|
||||||
|
|
||||||
@ -217,14 +218,20 @@ static int b53_mmap_probe(struct platform_device *pdev)
|
|||||||
return b53_swconfig_switch_register(dev);
|
return b53_swconfig_switch_register(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int b53_mmap_remove(struct platform_device *pdev)
|
static int b53_mmap_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void b53_mmap_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct b53_device *dev = platform_get_drvdata(pdev);
|
struct b53_device *dev = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
if (dev)
|
if (dev)
|
||||||
b53_switch_remove(dev);
|
b53_switch_remove(dev);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver b53_mmap_driver = {
|
static struct platform_driver b53_mmap_driver = {
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/platform_data/b53.h>
|
#include <linux/platform_data/b53.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "b53_priv.h"
|
#include "b53_priv.h"
|
||||||
|
|
||||||
@ -354,14 +355,20 @@ static int b53_srab_probe(struct platform_device *pdev)
|
|||||||
return b53_swconfig_switch_register(dev);
|
return b53_swconfig_switch_register(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int b53_srab_remove(struct platform_device *pdev)
|
static int b53_srab_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void b53_srab_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct b53_device *dev = platform_get_drvdata(pdev);
|
struct b53_device *dev = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
if (dev)
|
if (dev)
|
||||||
b53_switch_remove(dev);
|
b53_switch_remove(dev);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver b53_srab_driver = {
|
static struct platform_driver b53_srab_driver = {
|
||||||
|
@ -254,7 +254,7 @@ static int __rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
|
|||||||
#define MDC_MDIO_WRITE_OP 0x0003
|
#define MDC_MDIO_WRITE_OP 0x0003
|
||||||
#define MDC_REALTEK_PHY_ADDR 0x0
|
#define MDC_REALTEK_PHY_ADDR 0x0
|
||||||
|
|
||||||
int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
|
static int __rtl8366_mdio_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data)
|
||||||
{
|
{
|
||||||
u32 phy_id = smi->phy_id;
|
u32 phy_id = smi->phy_id;
|
||||||
struct mii_bus *mbus = smi->ext_mbus;
|
struct mii_bus *mbus = smi->ext_mbus;
|
||||||
@ -1527,7 +1527,7 @@ static void rtl8366_smi_reset(struct rtl8366_smi *smi, bool active)
|
|||||||
reset_control_deassert(smi->reset);
|
reset_control_deassert(smi->reset);
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi)
|
static int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8366_smi *smi)
|
||||||
{
|
{
|
||||||
int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0);
|
int sck = of_get_named_gpio(pdev->dev.of_node, "gpio-sck", 0);
|
||||||
int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0);
|
int sda = of_get_named_gpio(pdev->dev.of_node, "gpio-sda", 0);
|
||||||
@ -1577,7 +1577,7 @@ static inline int rtl8366_smi_probe_of(struct platform_device *pdev, struct rtl8
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi)
|
static int rtl8366_smi_probe_plat(struct platform_device *pdev, struct rtl8366_smi *smi)
|
||||||
{
|
{
|
||||||
struct rtl8366_platform_data *pdata = pdev->dev.platform_data;
|
struct rtl8366_platform_data *pdata = pdev->dev.platform_data;
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/rtl8366.h>
|
#include <linux/rtl8366.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "rtl8366_smi.h"
|
#include "rtl8366_smi.h"
|
||||||
|
|
||||||
@ -1478,7 +1479,11 @@ static int rtl8366rb_probe(struct platform_device *pdev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int rtl8366rb_remove(struct platform_device *pdev)
|
static int rtl8366rb_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void rtl8366rb_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
@ -1489,7 +1494,9 @@ static int rtl8366rb_remove(struct platform_device *pdev)
|
|||||||
kfree(smi);
|
kfree(smi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/rtl8366.h>
|
#include <linux/rtl8366.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "rtl8366_smi.h"
|
#include "rtl8366_smi.h"
|
||||||
|
|
||||||
@ -1266,7 +1267,11 @@ static int rtl8366s_probe(struct platform_device *pdev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int rtl8366s_remove(struct platform_device *pdev)
|
static int rtl8366s_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void rtl8366s_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
@ -1277,7 +1282,9 @@ static int rtl8366s_remove(struct platform_device *pdev)
|
|||||||
kfree(smi);
|
kfree(smi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/rtl8367.h>
|
#include <linux/rtl8367.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "rtl8366_smi.h"
|
#include "rtl8366_smi.h"
|
||||||
|
|
||||||
@ -1790,7 +1791,11 @@ static int rtl8367_probe(struct platform_device *pdev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int rtl8367_remove(struct platform_device *pdev)
|
static int rtl8367_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void rtl8367_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
@ -1801,7 +1806,9 @@ static int rtl8367_remove(struct platform_device *pdev)
|
|||||||
kfree(smi);
|
kfree(smi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtl8367_shutdown(struct platform_device *pdev)
|
static void rtl8367_shutdown(struct platform_device *pdev)
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/rtl8367.h>
|
#include <linux/rtl8367.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
|
||||||
#include "rtl8366_smi.h"
|
#include "rtl8366_smi.h"
|
||||||
|
|
||||||
@ -1423,7 +1424,11 @@ static int rtl8367b_probe(struct platform_device *pdev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
static int rtl8367b_remove(struct platform_device *pdev)
|
static int rtl8367b_remove(struct platform_device *pdev)
|
||||||
|
#else
|
||||||
|
static void rtl8367b_remove(struct platform_device *pdev)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
struct rtl8366_smi *smi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
@ -1434,7 +1439,9 @@ static int rtl8367b_remove(struct platform_device *pdev)
|
|||||||
kfree(smi);
|
kfree(smi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtl8367b_shutdown(struct platform_device *pdev)
|
static void rtl8367b_shutdown(struct platform_device *pdev)
|
||||||
|
@ -1060,7 +1060,7 @@ static struct genl_family switch_fam = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
void
|
static void
|
||||||
of_switch_load_portmap(struct switch_dev *dev)
|
of_switch_load_portmap(struct switch_dev *dev)
|
||||||
{
|
{
|
||||||
struct device_node *port;
|
struct device_node *port;
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
From 5f7c5e1c0d7a79be144e5efc1f24728ddd7fc25c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Sat, 5 Nov 2022 20:02:56 +0100
|
||||||
|
Subject: [PATCH 1/2] bus: mhi: core: add SBL state callback
|
||||||
|
|
||||||
|
Add support for SBL state callback in MHI core.
|
||||||
|
|
||||||
|
It is required for ath11k MHI devices in order to be able to set QRTR
|
||||||
|
instance ID in the SBL state so that QRTR instance ID-s dont conflict in
|
||||||
|
case of multiple PCI/MHI cards or AHB + PCI/MHI card.
|
||||||
|
Setting QRTR instance ID is only possible in SBL state and there is
|
||||||
|
currently no way to ensure that we are in that state, so provide a
|
||||||
|
callback that the controller can trigger off.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/bus/mhi/host/main.c | 1 +
|
||||||
|
include/linux/mhi.h | 2 ++
|
||||||
|
2 files changed, 3 insertions(+)
|
||||||
|
|
||||||
|
--- a/drivers/bus/mhi/host/main.c
|
||||||
|
+++ b/drivers/bus/mhi/host/main.c
|
||||||
|
@@ -906,6 +906,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
|
||||||
|
switch (event) {
|
||||||
|
case MHI_EE_SBL:
|
||||||
|
st = DEV_ST_TRANSITION_SBL;
|
||||||
|
+ mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_SBL_MODE);
|
||||||
|
break;
|
||||||
|
case MHI_EE_WFW:
|
||||||
|
case MHI_EE_AMSS:
|
||||||
|
--- a/include/linux/mhi.h
|
||||||
|
+++ b/include/linux/mhi.h
|
||||||
|
@@ -34,6 +34,7 @@ struct mhi_buf_info;
|
||||||
|
* @MHI_CB_SYS_ERROR: MHI device entered error state (may recover)
|
||||||
|
* @MHI_CB_FATAL_ERROR: MHI device entered fatal error state
|
||||||
|
* @MHI_CB_BW_REQ: Received a bandwidth switch request from device
|
||||||
|
+ * @MHI_CB_EE_SBL_MODE: MHI device entered SBL mode
|
||||||
|
*/
|
||||||
|
enum mhi_callback {
|
||||||
|
MHI_CB_IDLE,
|
||||||
|
@@ -45,6 +46,7 @@ enum mhi_callback {
|
||||||
|
MHI_CB_SYS_ERROR,
|
||||||
|
MHI_CB_FATAL_ERROR,
|
||||||
|
MHI_CB_BW_REQ,
|
||||||
|
+ MHI_CB_EE_SBL_MODE,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
Loading…
Reference in New Issue
Block a user