Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
d9102619a6
@ -279,12 +279,11 @@ endef
|
||||
define Image/Manifest
|
||||
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
|
||||
ifndef IB
|
||||
$(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
|
||||
$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
|
||||
$(TMP_DIR)/.packageinfo \
|
||||
ifneq ($(CONFIG_JSON_CYCLONEDX_SBOM),)
|
||||
$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
|
||||
$(if $(IB),$(TOPDIR)/.packageinfo, $(TMP_DIR)/.packageinfo) \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@ -44,7 +44,6 @@ $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
|
||||
)$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
|
||||
)$(if $(HIDDEN),Hidden: $(HIDDEN)
|
||||
)Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
|
||||
$(MAINTAINER)
|
||||
@@
|
||||
$(if $(Package/$(1)/config),Config:
|
||||
$(Package/$(1)/config)
|
||||
|
||||
@ -63,9 +63,11 @@ define Build/Trusted-Firmware-A/Target
|
||||
URL:=https://www.trustedfirmware.org/projects/tf-a/
|
||||
endef
|
||||
|
||||
define Package/trusted-firmware-a-$(1)/install
|
||||
ifndef Package/trusted-firmware-a-$(1)/install
|
||||
define Package/trusted-firmware-a-$(1)/install
|
||||
$$(Package/trusted-firmware-a/install)
|
||||
endef
|
||||
endef
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Configure/Trusted-Firmware-A
|
||||
|
||||
@ -33,6 +33,7 @@ define Trusted-Firmware-A/Default
|
||||
NAND_TYPE:=
|
||||
BOARD_QFN:=
|
||||
DRAM_USE_COMB:=
|
||||
RAM_BOOT_UART_DL:=
|
||||
USE_UBI:=
|
||||
endef
|
||||
|
||||
@ -113,6 +114,17 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
|
||||
DDR3_FLYBY:=1
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-ram-ddr4
|
||||
NAME:=MediaTek MT7981 (RAM, DDR4)
|
||||
BOOT_DEVICE:=ram
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7981
|
||||
DDR_TYPE:=ddr4
|
||||
RAM_BOOT_UART_DL:=1
|
||||
HIDDEN:=
|
||||
DEFAULT:=TARGET_mediatek_filogic
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-emmc-ddr4
|
||||
NAME:=MediaTek MT7981 (eMMC, DDR4)
|
||||
BOOT_DEVICE:=emmc
|
||||
@ -137,6 +149,17 @@ define Trusted-Firmware-A/mt7981-nor-ddr3
|
||||
DDR_TYPE:=ddr3
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-ram-ddr3
|
||||
NAME:=MediaTek MT7981 (RAM, DDR3)
|
||||
BOOT_DEVICE:=ram
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7981
|
||||
DDR_TYPE:=ddr3
|
||||
RAM_BOOT_UART_DL:=1
|
||||
HIDDEN:=
|
||||
DEFAULT:=TARGET_mediatek_filogic
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7981-emmc-ddr3
|
||||
NAME:=MediaTek MT7981 (eMMC, DDR3)
|
||||
BOOT_DEVICE:=emmc
|
||||
@ -169,6 +192,17 @@ define Trusted-Firmware-A/mt7981-spim-nand-ddr3
|
||||
DDR_TYPE:=ddr3
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-ram-ddr4
|
||||
NAME:=MediaTek MT7986 (RAM, DDR4)
|
||||
BOOT_DEVICE:=ram
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7986
|
||||
DDR_TYPE:=ddr4
|
||||
RAM_BOOT_UART_DL:=1
|
||||
HIDDEN:=
|
||||
DEFAULT:=TARGET_mediatek_filogic
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-nor-ddr4
|
||||
NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
|
||||
BOOT_DEVICE:=nor
|
||||
@ -229,6 +263,17 @@ define Trusted-Firmware-A/mt7986-spim-nand-4k-ddr4
|
||||
NAND_TYPE:=spim:4k+256
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-ram-ddr3
|
||||
NAME:=MediaTek MT7986 (RAM, DDR3)
|
||||
BOOT_DEVICE:=ram
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7986
|
||||
DDR_TYPE:=ddr3
|
||||
RAM_BOOT_UART_DL:=1
|
||||
HIDDEN:=
|
||||
DEFAULT:=TARGET_mediatek_filogic
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7986-nor-ddr3
|
||||
NAME:=MediaTek MT7986 (SPI-NOR, DDR3)
|
||||
BOOT_DEVICE:=nor
|
||||
@ -349,6 +394,17 @@ define Trusted-Firmware-A/mt7988-spim-nand-ddr4
|
||||
DDR_TYPE:=ddr4
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7988-ram-comb
|
||||
NAME:=MediaTek MT7988 (RAM)
|
||||
BOOT_DEVICE:=ram
|
||||
BUILD_SUBTARGET:=filogic
|
||||
PLAT:=mt7988
|
||||
DRAM_USE_COMB:=1
|
||||
RAM_BOOT_UART_DL:=1
|
||||
HIDDEN:=
|
||||
DEFAULT:=TARGET_mediatek_filogic
|
||||
endef
|
||||
|
||||
define Trusted-Firmware-A/mt7988-nor-comb
|
||||
NAME:=MediaTek MT7988 (SPI-NOR)
|
||||
BOOT_DEVICE:=nor
|
||||
@ -418,18 +474,22 @@ TFA_TARGETS:= \
|
||||
mt7622-emmc-2ddr \
|
||||
mt7622-sdmmc-1ddr \
|
||||
mt7622-sdmmc-2ddr \
|
||||
mt7981-ram-ddr3 \
|
||||
mt7981-emmc-ddr3 \
|
||||
mt7981-nor-ddr3 \
|
||||
mt7981-sdmmc-ddr3 \
|
||||
mt7981-snand-ddr3 \
|
||||
mt7981-spim-nand-ddr3 \
|
||||
mt7981-ram-ddr4 \
|
||||
mt7981-emmc-ddr4 \
|
||||
mt7981-spim-nand-ddr4 \
|
||||
mt7986-ram-ddr3 \
|
||||
mt7986-emmc-ddr3 \
|
||||
mt7986-nor-ddr3 \
|
||||
mt7986-sdmmc-ddr3 \
|
||||
mt7986-snand-ddr3 \
|
||||
mt7986-spim-nand-ddr3 \
|
||||
mt7986-ram-ddr4 \
|
||||
mt7986-emmc-ddr4 \
|
||||
mt7986-nor-ddr4 \
|
||||
mt7986-sdmmc-ddr4 \
|
||||
@ -447,6 +507,7 @@ TFA_TARGETS:= \
|
||||
mt7988-sdmmc-ddr4 \
|
||||
mt7988-snand-ddr4 \
|
||||
mt7988-spim-nand-ddr4 \
|
||||
mt7988-ram-comb \
|
||||
mt7988-emmc-comb \
|
||||
mt7988-nor-comb \
|
||||
mt7988-sdmmc-comb \
|
||||
@ -464,9 +525,20 @@ TFA_MAKE_FLAGS += \
|
||||
HAVE_DRAM_OBJ_FILE=yes \
|
||||
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
|
||||
$(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
|
||||
$(if $(RAM_BOOT_UART_DL),RAM_BOOT_UART_DL=1) \
|
||||
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
|
||||
all
|
||||
|
||||
define Package/trusted-firmware-a-ram/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.bin $(BIN_DIR)/$(BUILD_VARIANT)-bl2.bin
|
||||
endef
|
||||
Package/trusted-firmware-a-mt7981-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
|
||||
Package/trusted-firmware-a-mt7981-ram-ddr4/install = $(Package/trusted-firmware-a-ram/install)
|
||||
Package/trusted-firmware-a-mt7986-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
|
||||
Package/trusted-firmware-a-mt7986-ram-ddr4/install = $(Package/trusted-firmware-a-ram/install)
|
||||
Package/trusted-firmware-a-mt7988-ram-comb/install = $(Package/trusted-firmware-a-ram/install)
|
||||
|
||||
define Package/trusted-firmware-a/install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.img
|
||||
|
||||
@ -57,6 +57,9 @@ ubnt,unifi-6-lr-v2-ubootmod|\
|
||||
ubnt,unifi-6-lr-v3-ubootmod)
|
||||
ubootenv_add_uci_config "/dev/mtd$(find_mtd_index "u-boot-env")" "0x0" "0x4000" "0x1000"
|
||||
;;
|
||||
ubnt,unifi-6-lr-v2)
|
||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x1000" "1"
|
||||
;;
|
||||
xiaomi,redmi-router-ax6s)
|
||||
ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x40000"
|
||||
;;
|
||||
|
||||
@ -186,7 +186,7 @@
|
||||
+reset_factory=eraseenv && reset
|
||||
+_init_env=setenv _init_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu _update_bootdev _init_env boot_first
|
||||
+_update_bootdev=setenv _update_bootdev ; setenv bootargs "$console root=/dev/mmcblk0p65"
|
||||
+_update_bootdev=setenv _update_bootdev ; setenv bootargs "$console root=/dev/fit0 rootwait"
|
||||
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
||||
--- a/arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts
|
||||
|
||||
@ -13,7 +13,7 @@ PKG_VERSION:=$(LINUX_VERSION)
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
|
||||
|
||||
PKG_BUILD_FLAGS:=gc-sections lto
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
@ -23,8 +23,9 @@ include $(INCLUDE_DIR)/nls.mk
|
||||
define Package/kselftests-bpf
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
DEPENDS:= +libelf +zlib +libpthread +librt @!IN_SDK \
|
||||
@KERNEL_DEBUG_FS @KERNEL_DEBUG_INFO_BTF @KERNEL_BPF_EVENTS
|
||||
DEPENDS:= \
|
||||
+libelf +zlib +libpthread +librt @!IN_SDK \
|
||||
@KERNEL_DEBUG_FS @KERNEL_DEBUG_INFO_BTF @KERNEL_BPF_EVENTS
|
||||
TITLE:=Linux Kernel Selftests (BPF)
|
||||
URL:=http://www.kernel.org
|
||||
endef
|
||||
@ -33,31 +34,40 @@ define Package/kselftests-bpf/description
|
||||
kselftests-bpf is the Linux kernel BPF test suite
|
||||
endef
|
||||
|
||||
TEST_TARGET = test_verifier
|
||||
EXE_TARGETS = test_verifier
|
||||
|
||||
MOD_TARGETS = $(if $(call kernel_patchver_ge,6.4),bpf_testmod.ko)
|
||||
|
||||
MAKE_PATH:=tools/testing/selftests/bpf
|
||||
|
||||
MAKE_VARS = \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
SAN_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||
LDLIBS="$(TARGET_LDFLAGS)" \
|
||||
TOOLCHAIN_INCLUDE="$(TOOLCHAIN_INC_DIRS)" \
|
||||
VMLINUX_BTF="$(LINUX_DIR)/vmlinux"
|
||||
KBUILD_OUTPUT="$(LINUX_DIR)"
|
||||
|
||||
MAKE_FLAGS = \
|
||||
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
|
||||
O=$(PKG_BUILD_DIR)
|
||||
OUTPUT=$(PKG_BUILD_DIR)
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE_VARS) \
|
||||
$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR)/$(MAKE_PATH) \
|
||||
$(MAKE_FLAGS) $(TEST_TARGET) ;
|
||||
$(MAKE_FLAGS) $(EXE_TARGETS) $(MOD_TARGETS) ;
|
||||
endef
|
||||
|
||||
define Package/kselftests-bpf/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(TEST_TARGET) $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/$(PKG_NAME)
|
||||
$(foreach tgt,$(MOD_TARGETS), \
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/$(tgt) $(1)/usr/libexec/$(PKG_NAME); \
|
||||
)
|
||||
$(foreach tgt,$(EXE_TARGETS), \
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_BUILD_DIR)/$(tgt) $(1)/usr/libexec/$(PKG_NAME); \
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,kselftests-bpf))
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-dp
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-06-06
|
||||
PKG_SOURCE_VERSION:=fa67464466f69f00967cc373d1bdd6025f57eb89
|
||||
PKG_MIRROR_HASH:=39329770042c85b32780cd12eef2aad2c5df79f34d1b7081e5ba1e1cc0b1b161
|
||||
PKG_SOURCE_DATE:=2024-04-16
|
||||
PKG_SOURCE_VERSION:=5bf8b91e9fc209f175f9a58723b03055ace3d581
|
||||
PKG_MIRROR_HASH:=e86b04ea674c18fb69cd09a45ccab50317b85117e40d76c8457052c2e55d7c18
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/include/nss_dp_dev.h
|
||||
+++ b/include/nss_dp_dev.h
|
||||
@@ -202,13 +202,10 @@ struct nss_dp_dev {
|
||||
@@ -225,13 +225,10 @@ struct nss_dp_dev {
|
||||
unsigned long drv_flags; /* Driver specific feature flags */
|
||||
|
||||
/* Phy related stuff */
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -418,7 +418,7 @@ static int nss_dp_open(struct net_device
|
||||
@@ -436,7 +436,7 @@ static int nss_dp_open(struct net_device
|
||||
|
||||
netif_start_queue(netdev);
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
/* Notify data plane link is up */
|
||||
if (dp_priv->data_plane_ops->link_state(dp_priv->dpc, 1)) {
|
||||
netdev_dbg(netdev, "Data plane set link failed\n");
|
||||
@@ -615,6 +615,12 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
@@ -633,6 +633,12 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
if (of_property_read_u32(np, "qcom,mactype", &hal_pdata->mactype)) {
|
||||
pr_err("%s: error reading mactype\n", np->name);
|
||||
return -EFAULT;
|
||||
@@ -635,18 +641,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
@@ -653,18 +659,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
return -EFAULT;
|
||||
#endif
|
||||
|
||||
@ -84,7 +84,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
|
||||
maddr = (uint8_t *)of_get_mac_address(np);
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0))
|
||||
@@ -695,56 +689,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
@@ -753,56 +747,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
#ifdef CONFIG_NET_SWITCHDEV
|
||||
/*
|
||||
* nss_dp_is_phy_dev()
|
||||
@@ -803,7 +747,6 @@ static int32_t nss_dp_probe(struct platf
|
||||
@@ -861,7 +805,6 @@ static int32_t nss_dp_probe(struct platf
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct nss_gmac_hal_platform_data gmac_hal_pdata;
|
||||
int32_t ret = 0;
|
||||
@ -149,7 +149,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
#if defined(NSS_DP_PPE_SUPPORT)
|
||||
uint32_t vsi_id;
|
||||
fal_port_t port_id;
|
||||
@@ -880,22 +823,14 @@ static int32_t nss_dp_probe(struct platf
|
||||
@@ -940,22 +883,15 @@ static int32_t nss_dp_probe(struct platf
|
||||
|
||||
dp_priv->drv_flags |= NSS_DP_PRIV_FLAG(INIT_DONE);
|
||||
|
||||
@ -161,20 +161,22 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
- }
|
||||
- snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
|
||||
- dp_priv->miibus->id, dp_priv->phy_mdio_addr);
|
||||
-
|
||||
+ if (dp_priv->phy_node) {
|
||||
SET_NETDEV_DEV(netdev, &pdev->dev);
|
||||
|
||||
- dp_priv->phydev = phy_connect(netdev, phy_id,
|
||||
- &nss_dp_adjust_link,
|
||||
- dp_priv->phy_mii_type);
|
||||
- if (IS_ERR(dp_priv->phydev)) {
|
||||
- netdev_dbg(netdev, "failed to connect to phy device\n");
|
||||
- goto phy_setup_fail;
|
||||
- }
|
||||
+ dp_priv->phydev = of_phy_connect(netdev, dp_priv->phy_node,
|
||||
+ &nss_dp_adjust_link, 0,
|
||||
+ dp_priv->phy_mii_type);
|
||||
+ &nss_dp_adjust_link, 0,
|
||||
+ dp_priv->phy_mii_type);
|
||||
+ if (!(dp_priv->phydev)) {
|
||||
+ netdev_err(netdev, "failed to connect to phy device\n");
|
||||
goto phy_setup_fail;
|
||||
}
|
||||
+ goto phy_setup_fail;
|
||||
+ }
|
||||
}
|
||||
|
||||
#if defined(NSS_DP_PPE_SUPPORT)
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -746,18 +746,29 @@ static int32_t nss_dp_probe(struct platf
|
||||
@@ -804,18 +804,29 @@ static int32_t nss_dp_probe(struct platf
|
||||
struct nss_dp_dev *dp_priv;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct nss_gmac_hal_platform_data gmac_hal_pdata;
|
||||
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
|
||||
#define NSS_DP_SWITCH_ID 0
|
||||
#define NSS_DP_SW_ETHTYPE_PID 0 /* PPE ethtype profile ID for slow protocols */
|
||||
@@ -521,7 +523,76 @@ static struct notifier_block *nss_dp_sw_
|
||||
@@ -534,7 +536,76 @@ static struct notifier_block *nss_dp_sw_
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 01ec275bd0942ddc6b80e1d3671cdc66be670f57 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 1 Sep 2023 12:23:58 +0200
|
||||
Subject: [PATCH] nss-dp: include <net/netdev_rx_queue.h>
|
||||
|
||||
Since 6.5 netdev_rx_queue was moved out of netdevice.h so include the new
|
||||
header since that is where it lives now.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_dp_main.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -34,6 +34,9 @@
|
||||
#if defined(NSS_DP_MAC_POLL_SUPPORT)
|
||||
#include <init/ssdk_init.h>
|
||||
#endif
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))
|
||||
+#include <net/netdev_rx_queue.h>
|
||||
+#endif
|
||||
|
||||
#include "nss_dp_hal.h"
|
||||
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/include/nss_dp_dev.h
|
||||
+++ b/include/nss_dp_dev.h
|
||||
@@ -312,6 +312,7 @@ void nss_dp_set_ethtool_ops(struct net_d
|
||||
@@ -349,6 +349,7 @@ void nss_dp_set_ethtool_ops(struct net_d
|
||||
*/
|
||||
#ifdef CONFIG_NET_SWITCHDEV
|
||||
void nss_dp_switchdev_setup(struct net_device *dev);
|
||||
@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -913,6 +913,10 @@ static int nss_dp_remove(struct platform
|
||||
@@ -972,6 +972,10 @@ static int nss_dp_remove(struct platform
|
||||
if (!dp_priv)
|
||||
continue;
|
||||
|
||||
@ -39,7 +39,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/nss_dp_switchdev.c
|
||||
+++ b/nss_dp_switchdev.c
|
||||
@@ -635,4 +635,17 @@ void nss_dp_switchdev_setup(struct net_d
|
||||
@@ -648,4 +648,17 @@ void nss_dp_switchdev_setup(struct net_d
|
||||
|
||||
switch_init_done = true;
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -1082,6 +1082,8 @@ int __init nss_dp_init(void)
|
||||
@@ -1163,6 +1163,8 @@ int __init nss_dp_init(void)
|
||||
*/
|
||||
void __exit nss_dp_exit(void)
|
||||
{
|
||||
@ -24,7 +24,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
/*
|
||||
* TODO Move this to soc_ops
|
||||
*/
|
||||
@@ -1089,8 +1091,6 @@ void __exit nss_dp_exit(void)
|
||||
@@ -1170,8 +1172,6 @@ void __exit nss_dp_exit(void)
|
||||
nss_dp_hal_cleanup();
|
||||
dp_global_ctx.common_init_done = false;
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -920,6 +920,9 @@ static int nss_dp_remove(struct platform
|
||||
@@ -979,6 +979,9 @@ static int nss_dp_remove(struct platform
|
||||
dp_ops = dp_priv->data_plane_ops;
|
||||
hal_ops = dp_priv->gmac_hal_ops;
|
||||
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
if (dp_priv->phydev)
|
||||
phy_disconnect(dp_priv->phydev);
|
||||
|
||||
@@ -931,7 +934,6 @@ static int nss_dp_remove(struct platform
|
||||
@@ -990,7 +993,6 @@ static int nss_dp_remove(struct platform
|
||||
#endif
|
||||
hal_ops->exit(dp_priv->gmac_hal_ctx);
|
||||
dp_ops->deinit(dp_priv->dpc);
|
||||
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -924,7 +924,7 @@ static int nss_dp_remove(struct platform
|
||||
@@ -983,7 +983,7 @@ static int nss_dp_remove(struct platform
|
||||
unregister_netdev(dp_priv->netdev);
|
||||
|
||||
if (dp_priv->phydev)
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-ssdk
|
||||
PKG_RELEASE:=6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-10-04
|
||||
PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0
|
||||
PKG_MIRROR_HASH:=53fb201053b3aca004c4da07b06a0608b0b3322a2062b1f7ab3b3a7871ddabcb
|
||||
PKG_SOURCE_DATE:=2024-04-17
|
||||
PKG_SOURCE_VERSION:=3d060f7ad70d087f6b0452abe79ab6d042e8cd53
|
||||
PKG_MIRROR_HASH:=6f5e390b294e699491584094f5d7eb941de6237ad8c5320191e9e306fbcd8eb5
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
From f6c0115daaac586740e873a3b8145c5370a73dce Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Sat, 17 Feb 2024 13:02:31 +0100
|
||||
Subject: [PATCH] config: identify kernel 6.6
|
||||
|
||||
Identify kernel 6.6 so it can be compiled against.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
config | 5 +++++
|
||||
make/linux_opt.mk | 4 ++--
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -27,6 +27,11 @@ endif
|
||||
ifeq ($(KVER),$(filter 6.1%,$(KVER)))
|
||||
OS_VER=6_1
|
||||
endif
|
||||
+
|
||||
+ifeq ($(KVER),$(filter 6.6%,$(KVER)))
|
||||
+ OS_VER=6_6
|
||||
+endif
|
||||
+
|
||||
ifeq ($(KVER), 3.4.0)
|
||||
OS_VER=3_4
|
||||
endif
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -450,7 +450,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
KASAN_SHADOW_SCALE_SHIFT := 3
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 5_4 6_1, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 5_4 6_1 6_6, $(OS_VER)))
|
||||
ifeq ($(ARCH), arm64)
|
||||
KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
|
||||
endif
|
||||
@@ -481,7 +481,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 4_4 5_4 6_1, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 4_4 5_4 6_1 6_6, $(OS_VER)))
|
||||
MODULE_CFLAG += -DKVER34
|
||||
MODULE_CFLAG += -DKVER32
|
||||
MODULE_CFLAG += -DLNX26_22
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/src/hsl/phy/hsl_phy.c
|
||||
+++ b/src/hsl/phy/hsl_phy.c
|
||||
@@ -1335,6 +1335,9 @@ hsl_port_phydev_interface_mode_status_ge
|
||||
@@ -1322,6 +1322,9 @@ hsl_port_phydev_interface_mode_status_ge
|
||||
case PHY_INTERFACE_MODE_10GKR:
|
||||
*interface_mode_status = PORT_10GBASE_R;
|
||||
break;
|
||||
|
||||
@ -24,15 +24,15 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
|
||||
--- a/include/init/ssdk_dts.h
|
||||
+++ b/include/init/ssdk_dts.h
|
||||
@@ -101,6 +101,7 @@ typedef struct
|
||||
@@ -99,6 +99,7 @@ typedef struct
|
||||
a_uint32_t emu_chip_ver; /*only valid when is_emulation is true*/
|
||||
a_uint32_t clk_mode;
|
||||
a_uint32_t pcie_hw_base;
|
||||
+ a_uint32_t port3_pcs_channel;
|
||||
led_ctrl_pattern_t source_pattern[SSDK_MAX_PORT_NUM][PORT_LED_SOURCE_MAX];
|
||||
} ssdk_dt_cfg;
|
||||
|
||||
#define SSDK_MAX_NR_ETH 6
|
||||
@@ -162,6 +163,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
|
||||
@@ -161,6 +162,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
|
||||
struct device_node *ssdk_dts_node_get(a_uint32_t dev_id);
|
||||
struct clk *ssdk_dts_essclk_get(a_uint32_t dev_id);
|
||||
struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id);
|
||||
@ -62,7 +62,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
cppe_port_mux_ctrl.bf.port4_pcs_sel =
|
||||
--- a/src/adpt/hppe/adpt_hppe_uniphy.c
|
||||
+++ b/src/adpt/hppe/adpt_hppe_uniphy.c
|
||||
@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
@@ -1160,9 +1160,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
{
|
||||
a_uint32_t i;
|
||||
sw_error_t rv = SW_OK;
|
||||
@ -72,7 +72,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
|
||||
union uniphy_mode_ctrl_u uniphy_mode_ctrl;
|
||||
|
||||
@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
@@ -1172,9 +1169,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
|
||||
SSDK_DEBUG("uniphy %d is psgmii mode\n", uniphy_index);
|
||||
#if defined(CPPE)
|
||||
if (adpt_ppe_type_get(dev_id) == CPPE_TYPE) {
|
||||
@ -96,10 +96,10 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
+ return cfg->port3_pcs_channel;
|
||||
+}
|
||||
+
|
||||
#ifndef BOARD_AR71XX
|
||||
#if defined(CONFIG_OF) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
|
||||
static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
|
||||
@@ -306,6 +313,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
|
||||
struct device_node *switch_node, ssdk_init_cfg *cfg)
|
||||
@@ -305,6 +312,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
|
||||
|
||||
return;
|
||||
}
|
||||
@ -125,7 +125,7 @@ Signed-off-by: Mantas Pucka <mantas@8devices.com>
|
||||
#ifdef IN_UNIPHY
|
||||
static void ssdk_dt_parse_uniphy(a_uint32_t dev_id)
|
||||
{
|
||||
@@ -1292,6 +1318,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
|
||||
@@ -1347,6 +1373,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
|
||||
rv = ssdk_dt_parse_access_mode(switch_node, ssdk_dt_priv);
|
||||
SW_RTN_ON_ERROR(rv);
|
||||
ssdk_dt_parse_mac_mode(*dev_id, switch_node, cfg);
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
From bdae481e89cbe551068a99028bb57119b59f5ff4 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Tue, 26 Mar 2024 12:19:49 +0100
|
||||
Subject: [PATCH] mdio: adapt to C22 and C45 read/write split
|
||||
|
||||
Kernel 6.3 has introduced separate C45 read/write operations, and thus
|
||||
split them out of the C22 operations completely so the old way of marking
|
||||
C45 reads and writes via the register value does not work anymore.
|
||||
|
||||
This is causing SSDK to fail and find C45 only PHY-s such as Aquantia ones:
|
||||
[ 22.187877] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phytype doesn't match
|
||||
[ 22.209924] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 0, phy_id = 0x0 phytype doesn't match
|
||||
|
||||
This in turn causes USXGMII MAC autoneg bit to not get set and then UNIPHY
|
||||
autoneg will time out, causing the 10G ports not to work:
|
||||
[ 37.292784] uniphy autoneg time out!
|
||||
|
||||
So, lets detect C45 reads and writes by the magic BIT(30) in the register
|
||||
argument and if so call separate C45 mdiobus read/write functions.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
include/init/ssdk_plat.h | 7 +++++++
|
||||
src/init/ssdk_plat.c | 30 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 37 insertions(+)
|
||||
|
||||
--- a/include/init/ssdk_plat.h
|
||||
+++ b/include/init/ssdk_plat.h
|
||||
@@ -505,3 +505,10 @@ void ssdk_plat_exit(a_uint32_t dev_id);
|
||||
|
||||
#endif
|
||||
/*qca808x_end*/
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
|
||||
+#define MII_ADDR_C45 (1<<30)
|
||||
+#define MII_DEVADDR_C45_SHIFT 16
|
||||
+#define MII_DEVADDR_C45_MASK GENMASK(20, 16)
|
||||
+#define MII_REGADDR_C45_MASK GENMASK(15, 0)
|
||||
+#endif
|
||||
--- a/src/init/ssdk_plat.c
|
||||
+++ b/src/init/ssdk_plat.c
|
||||
@@ -356,6 +356,18 @@ phy_addr_validation_check(a_uint32_t phy
|
||||
return A_TRUE;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
|
||||
+static inline u16 mdiobus_c45_regad(u32 regnum)
|
||||
+{
|
||||
+ return FIELD_GET(MII_REGADDR_C45_MASK, regnum);
|
||||
+}
|
||||
+
|
||||
+static inline u16 mdiobus_c45_devad(u32 regnum)
|
||||
+{
|
||||
+ return FIELD_GET(MII_DEVADDR_C45_MASK, regnum);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
sw_error_t
|
||||
qca_ar8327_phy_read(a_uint32_t dev_id, a_uint32_t phy_addr,
|
||||
a_uint32_t reg, a_uint16_t* data)
|
||||
@@ -371,9 +383,18 @@ qca_ar8327_phy_read(a_uint32_t dev_id, a
|
||||
if (!bus)
|
||||
return SW_NOT_SUPPORTED;
|
||||
phy_addr = TO_PHY_ADDR(phy_addr);
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ if (reg & MII_ADDR_C45)
|
||||
+ *data = __mdiobus_c45_read(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg));
|
||||
+ else
|
||||
+ *data = __mdiobus_read(bus, phy_addr, reg);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+#else
|
||||
mutex_lock(&bus->mdio_lock);
|
||||
*data = __mdiobus_read(bus, phy_addr, reg);
|
||||
mutex_unlock(&bus->mdio_lock);
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -393,9 +414,18 @@ qca_ar8327_phy_write(a_uint32_t dev_id,
|
||||
if (!bus)
|
||||
return SW_NOT_SUPPORTED;
|
||||
phy_addr = TO_PHY_ADDR(phy_addr);
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
|
||||
+ mutex_lock(&bus->mdio_lock);
|
||||
+ if (reg & MII_ADDR_C45)
|
||||
+ __mdiobus_c45_write(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg), data);
|
||||
+ else
|
||||
+ __mdiobus_write(bus, phy_addr, reg, data);
|
||||
+ mutex_unlock(&bus->mdio_lock);
|
||||
+#else
|
||||
mutex_lock(&bus->mdio_lock);
|
||||
__mdiobus_write(bus, phy_addr, reg, data);
|
||||
mutex_unlock(&bus->mdio_lock);
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -40,7 +40,7 @@
|
||||
kslib_c:
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -777,6 +777,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
|
||||
@@ -778,6 +778,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
|
||||
####################################################################
|
||||
# cflags for LNX Modules-Style Makefile
|
||||
####################################################################
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
--- a/src/fal/fal_port_ctrl.c
|
||||
+++ b/src/fal/fal_port_ctrl.c
|
||||
@@ -2089,7 +2089,7 @@ fal_port_hibernate_get (a_uint32_t dev_i
|
||||
*/
|
||||
sw_error_t
|
||||
fal_port_cdt (a_uint32_t dev_id, fal_port_t port_id, a_uint32_t mdi_pair,
|
||||
- a_uint32_t * cable_status, a_uint32_t * cable_len)
|
||||
+ fal_cable_status_t * cable_status, a_uint32_t * cable_len)
|
||||
{
|
||||
sw_error_t rv;
|
||||
|
||||
--- a/src/fal/fal_portvlan.c
|
||||
+++ b/src/fal/fal_portvlan.c
|
||||
@@ -2173,7 +2173,7 @@ fal_netisolate_get(a_uint32_t dev_id, a_
|
||||
* @return SW_OK or error code
|
||||
*/
|
||||
sw_error_t
|
||||
-fal_eg_trans_filter_bypass_en_set(a_uint32_t dev_id, a_bool_t enable)
|
||||
+fal_eg_trans_filter_bypass_en_set(a_uint32_t dev_id, a_uint32_t enable)
|
||||
{
|
||||
sw_error_t rv;
|
||||
|
||||
@@ -2190,7 +2190,7 @@ fal_eg_trans_filter_bypass_en_set(a_uint
|
||||
* @return SW_OK or error code
|
||||
*/
|
||||
sw_error_t
|
||||
-fal_eg_trans_filter_bypass_en_get(a_uint32_t dev_id, a_bool_t* enable)
|
||||
+fal_eg_trans_filter_bypass_en_get(a_uint32_t dev_id, a_uint32_t* enable)
|
||||
{
|
||||
sw_error_t rv;
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbpf
|
||||
PKG_VERSION:=1.4.0
|
||||
PKG_VERSION:=1.4.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
|
||||
PKG_MIRROR_HASH:=4c37636699c604de345937bdbdf8f2e6ce69cbf768a4aa669c32b542e5302de6
|
||||
PKG_MIRROR_HASH:=46469f720ed246529e46d84a6444ae1c1a1eaf2a717a5a055c9973bb52159ec3
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=v1.4.0
|
||||
PKG_SOURCE_VERSION:=v1.4.1
|
||||
PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
|
||||
|
||||
PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
|
||||
|
||||
@ -161,6 +161,7 @@ define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbedcrypto.pc \
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dropbear
|
||||
PKG_VERSION:=2022.83
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
@ -57,7 +57,7 @@ define Package/dropbear
|
||||
CATEGORY:=Base system
|
||||
TITLE:=Small SSH2 client/server
|
||||
DEPENDS:= +DROPBEAR_ZLIB:zlib
|
||||
ALTERNATIVES:=
|
||||
ALTERNATIVES:=100:/usr/bin/ssh-keygen:/usr/sbin/dropbear
|
||||
$(if $(CONFIG_DROPBEAR_SCP),ALTERNATIVES+= \
|
||||
100:/usr/bin/scp:/usr/sbin/dropbear,)
|
||||
$(if $(CONFIG_DROPBEAR_DBCLIENT),ALTERNATIVES+= \
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
PKG_MIRROR_HASH:=08fddf4294929d1713e0c3f7b258f8c7bf4abe731d5f34fceb797faa411f7a58
|
||||
PKG_SOURCE_DATE:=2023-10-24
|
||||
PKG_SOURCE_VERSION:=d8118f6e76e5519881f9a37137c3a06b3cb60fd2
|
||||
PKG_MIRROR_HASH:=f6e1c18551a00e01229fa12caa7b3fe33ad82785150fedcbe615fcc651ba2876
|
||||
PKG_SOURCE_DATE:=2024-05-08
|
||||
PKG_SOURCE_VERSION:=a29882318a4ccb3ae26f7cc0145e06ad4ead224b
|
||||
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -20,7 +20,7 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
leasetime string 12h DHCPv4 address leasetime
|
||||
start integer 100 DHCPv4 pool start
|
||||
limit integer 150 DHCPv4 pool size
|
||||
-preferred_lifetime string 12h Value for the preferred lifetime
|
||||
-preferred_lifetime string 7d Value for the preferred lifetime
|
||||
+max_preferred_lifetime string 45m Upper limit for the preferred lifetime
|
||||
+ for a prefix
|
||||
+max_valid_lifetime string 90m Upper limit for the valid lifetime
|
||||
@ -84,7 +84,7 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
iface->ndp = MODE_DISABLED;
|
||||
iface->learn_routes = 1;
|
||||
iface->dhcp_leasetime = 43200;
|
||||
- iface->preferred_lifetime = 43200;
|
||||
- iface->preferred_lifetime = 604800; /* rfc4861#section-6.2.1: AdvPreferredLifetime 7 days */
|
||||
+ iface->max_preferred_lifetime = ND_PREFERRED_LIMIT;
|
||||
+ iface->max_valid_lifetime = ND_VALID_LIMIT;
|
||||
iface->dhcpv4_start.s_addr = htonl(START_DEFAULT);
|
||||
@ -105,14 +105,14 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
+ iface->max_preferred_lifetime = time;
|
||||
+ } else {
|
||||
syslog(LOG_ERR, "Invalid %s value configured for interface '%s'",
|
||||
- iface_attrs[IFACE_ATTR_PREFERRED_LIFETIME].name, iface->name);
|
||||
- iface_attrs[IFACE_ATTR_PREFERRED_LIFETIME].name, iface->name);
|
||||
+ iface_attrs[IFACE_ATTR_MAX_PREFERRED_LIFETIME].name, iface->name);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+
|
||||
+ if ((c = tb[IFACE_ATTR_MAX_VALID_LIFETIME])) {
|
||||
+ double time = parse_leasetime(c);
|
||||
+
|
||||
|
||||
+ if (time >= 0) {
|
||||
+ iface->max_valid_lifetime = time;
|
||||
+ } else {
|
||||
@ -122,7 +122,7 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
}
|
||||
|
||||
if ((c = tb[IFACE_ATTR_START])) {
|
||||
@@ -978,9 +990,6 @@ int config_parse_interface(void *data, s
|
||||
@@ -979,9 +991,6 @@ int config_parse_interface(void *data, s
|
||||
if ((c = tb[IFACE_ATTR_RA_LIFETIME]))
|
||||
iface->ra_lifetime = blobmsg_get_u32(c);
|
||||
|
||||
@ -138,8 +138,8 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
|
||||
static inline bool valid_addr(const struct odhcpd_ipaddr *addr, time_t now)
|
||||
{
|
||||
- return (addr->prefix <= 96 && addr->preferred > (uint32_t)now);
|
||||
+ return (addr->prefix <= 96 && addr->valid > (uint32_t)now && addr->preferred > (uint32_t)now);
|
||||
- return (addr->prefix <= 96 && addr->preferred_lt > (uint32_t)now);
|
||||
+ return (addr->prefix <= 96 && addr->valid_lt > (uint32_t)now && addr->preferred_lt > (uint32_t)now);
|
||||
}
|
||||
|
||||
static size_t get_preferred_addr(const struct odhcpd_ipaddr *addrs, const size_t addrlen)
|
||||
@ -147,18 +147,18 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
}
|
||||
|
||||
if (a) {
|
||||
- uint32_t leasetime, pref;
|
||||
- uint32_t leasetime, preferred_lt;
|
||||
+ uint32_t leasetime;
|
||||
|
||||
if (a->leasetime) {
|
||||
leasetime = a->leasetime;
|
||||
- pref = a->leasetime;
|
||||
- preferred_lt = a->leasetime;
|
||||
} else {
|
||||
leasetime = iface->dhcp_leasetime;
|
||||
- pref = iface->preferred_lifetime;
|
||||
- preferred_lt = iface->preferred_lifetime;
|
||||
}
|
||||
|
||||
- uint32_t valid = leasetime;
|
||||
- uint32_t valid_lt = leasetime;
|
||||
+ uint32_t floor_preferred_lifetime, floor_valid_lifetime; /* For calculating T1 / T2 */
|
||||
+
|
||||
+ if (iface->max_preferred_lifetime && iface->max_preferred_lifetime < leasetime) {
|
||||
@ -175,60 +175,59 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
|
||||
struct odhcpd_ipaddr *addrs = (a->managed) ? a->managed : iface->addr6;
|
||||
size_t addrlen = (a->managed) ? (size_t)a->managed_size : iface->addr6_len;
|
||||
@@ -1071,17 +1081,19 @@ static size_t build_ia(uint8_t *buf, siz
|
||||
prefix_pref = addrs[i].preferred;
|
||||
prefix_valid = addrs[i].valid;
|
||||
@@ -1071,15 +1081,20 @@ static size_t build_ia(uint8_t *buf, siz
|
||||
prefix_preferred_lt = addrs[i].preferred_lt;
|
||||
prefix_valid_lt = addrs[i].valid_lt;
|
||||
|
||||
- if (prefix_pref != UINT32_MAX)
|
||||
+ if (prefix_pref != UINT32_MAX) {
|
||||
prefix_pref -= now;
|
||||
- if (prefix_preferred_lt != UINT32_MAX)
|
||||
+ if (prefix_preferred_lt != UINT32_MAX) {
|
||||
prefix_preferred_lt -= now;
|
||||
|
||||
- if (prefix_pref > pref)
|
||||
- prefix_pref = pref;
|
||||
+ if (iface->max_preferred_lifetime && prefix_pref > iface->max_preferred_lifetime)
|
||||
+ prefix_pref = iface->max_preferred_lifetime;
|
||||
- if (prefix_preferred_lt > preferred_lt)
|
||||
- prefix_preferred_lt = preferred_lt;
|
||||
+ if (iface->max_preferred_lifetime && prefix_preferred_lt > iface->max_preferred_lifetime)
|
||||
+ prefix_preferred_lt = iface->max_preferred_lifetime;
|
||||
+ }
|
||||
|
||||
- if (prefix_valid != UINT32_MAX)
|
||||
+ if (prefix_valid != UINT32_MAX) {
|
||||
prefix_valid -= now;
|
||||
- if (prefix_valid_lt != UINT32_MAX)
|
||||
+ if (prefix_valid_lt != UINT32_MAX) {
|
||||
prefix_valid_lt -= now;
|
||||
|
||||
- if (prefix_valid > leasetime)
|
||||
- prefix_valid = leasetime;
|
||||
+ if (iface->max_valid_lifetime && prefix_valid > iface->max_valid_lifetime)
|
||||
+ prefix_valid = iface->max_valid_lifetime;
|
||||
+ if (iface->max_valid_lifetime && prefix_valid_lt > iface->max_valid_lifetime)
|
||||
+ prefix_valid_lt = iface->max_valid_lifetime;
|
||||
+ }
|
||||
+
|
||||
if (prefix_valid_lt > leasetime)
|
||||
prefix_valid_lt = leasetime;
|
||||
|
||||
if (prefix_pref > prefix_valid)
|
||||
prefix_pref = prefix_valid;
|
||||
@@ -1133,24 +1145,24 @@ static size_t build_ia(uint8_t *buf, siz
|
||||
@@ -1133,24 +1148,24 @@ static size_t build_ia(uint8_t *buf, siz
|
||||
|
||||
/* Calculate T1 / T2 based on non-deprecated addresses */
|
||||
if (prefix_pref > 0) {
|
||||
- if (prefix_pref < pref)
|
||||
- pref = prefix_pref;
|
||||
+ if (floor_preferred_lifetime > prefix_pref)
|
||||
+ floor_preferred_lifetime = prefix_pref;
|
||||
if (prefix_preferred_lt > 0) {
|
||||
- if (prefix_preferred_lt < preferred_lt)
|
||||
- preferred_lt = prefix_preferred_lt;
|
||||
+ if (floor_preferred_lifetime > prefix_preferred_lt)
|
||||
+ floor_preferred_lifetime = prefix_preferred_lt;
|
||||
|
||||
- if (prefix_valid < valid)
|
||||
- valid = prefix_valid;
|
||||
+ if (floor_valid_lifetime > prefix_valid)
|
||||
+ floor_valid_lifetime = prefix_valid;
|
||||
- if (prefix_valid_lt < valid_lt)
|
||||
- valid_lt = prefix_valid_lt;
|
||||
+ if (floor_valid_lifetime > prefix_valid_lt)
|
||||
+ floor_valid_lifetime = prefix_valid_lt;
|
||||
}
|
||||
}
|
||||
|
||||
if (!INFINITE_VALID(a->valid_until))
|
||||
/* UINT32_MAX is considered as infinite leasetime */
|
||||
- a->valid_until = (valid == UINT32_MAX) ? 0 : valid + now;
|
||||
/* UINT32_MAX is RFC defined as infinite lease-time */
|
||||
- a->valid_until = (valid_lt == UINT32_MAX) ? 0 : valid_lt + now;
|
||||
+ a->valid_until = (floor_valid_lifetime == UINT32_MAX) ? 0 : floor_valid_lifetime + now;
|
||||
|
||||
if (!INFINITE_VALID(a->preferred_until))
|
||||
/* UINT32_MAX is considered as infinite leasetime */
|
||||
- a->preferred_until = (pref == UINT32_MAX) ? 0 : pref + now;
|
||||
/* UINT32_MAX is RFC defined as infinite lease-time */
|
||||
- a->preferred_until = (preferred_lt == UINT32_MAX) ? 0 : preferred_lt + now;
|
||||
+ a->preferred_until = (floor_preferred_lifetime == UINT32_MAX) ? 0 : floor_preferred_lifetime + now;
|
||||
|
||||
- o_ia.t1 = htonl((pref == UINT32_MAX) ? pref : pref * 5 / 10);
|
||||
- o_ia.t2 = htonl((pref == UINT32_MAX) ? pref : pref * 8 / 10);
|
||||
- o_ia.t1 = htonl((preferred_lt == UINT32_MAX) ? preferred_lt : preferred_lt * 5 / 10);
|
||||
- o_ia.t2 = htonl((preferred_lt == UINT32_MAX) ? preferred_lt : preferred_lt * 8 / 10);
|
||||
+ o_ia.t1 = htonl((floor_preferred_lifetime == UINT32_MAX) ? floor_preferred_lifetime : floor_preferred_lifetime * 5 / 10);
|
||||
+ o_ia.t2 = htonl((floor_preferred_lifetime == UINT32_MAX) ? floor_preferred_lifetime : floor_preferred_lifetime * 8 / 10);
|
||||
|
||||
@ -267,7 +266,7 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
uint32_t dhcp_leasetime;
|
||||
--- a/src/router.c
|
||||
+++ b/src/router.c
|
||||
@@ -371,7 +371,7 @@ static int calc_adv_interval(struct inte
|
||||
@@ -376,7 +376,7 @@ static int calc_adv_interval(struct inte
|
||||
|
||||
static uint32_t calc_ra_lifetime(struct interface *iface, uint32_t maxival)
|
||||
{
|
||||
@ -276,43 +275,44 @@ Signed-off-by: Aviana Cruz <gwencroft@proton.me>
|
||||
|
||||
if (iface->ra_lifetime >= 0) {
|
||||
lifetime = iface->ra_lifetime;
|
||||
@@ -590,16 +590,15 @@ static int send_router_advert(struct int
|
||||
if (addr->preferred > (uint32_t)now) {
|
||||
preferred = TIME_LEFT(addr->preferred, now);
|
||||
@@ -600,17 +600,16 @@ static int send_router_advert(struct int
|
||||
if (addr->preferred_lt > (uint32_t)now) {
|
||||
preferred_lt = TIME_LEFT(addr->preferred_lt, now);
|
||||
|
||||
- if (iface->ra_useleasetime &&
|
||||
- preferred > iface->preferred_lifetime)
|
||||
- preferred = iface->preferred_lifetime;
|
||||
+ if (iface->max_preferred_lifetime && preferred > iface->max_preferred_lifetime)
|
||||
+ preferred = iface->max_preferred_lifetime;
|
||||
- if (preferred_lt > iface->preferred_lifetime) {
|
||||
- /* set to possibly user mandated preferred_lt */
|
||||
- preferred_lt = iface->preferred_lifetime;
|
||||
+ if (iface->max_preferred_lifetime && preferred_lt > iface->max_preferred_lifetime) {
|
||||
+ preferred_lt = iface->max_preferred_lifetime;
|
||||
}
|
||||
}
|
||||
|
||||
if (addr->valid > (uint32_t)now) {
|
||||
valid = TIME_LEFT(addr->valid, now);
|
||||
if (addr->valid_lt > (uint32_t)now) {
|
||||
valid_lt = TIME_LEFT(addr->valid_lt, now);
|
||||
|
||||
- if (iface->ra_useleasetime && valid > iface->dhcp_leasetime)
|
||||
- valid = iface->dhcp_leasetime;
|
||||
+ if (iface->max_valid_lifetime && valid > iface->max_valid_lifetime)
|
||||
+ valid = iface->max_valid_lifetime;
|
||||
- if (iface->ra_useleasetime && valid_lt > iface->dhcp_leasetime)
|
||||
- valid_lt = iface->dhcp_leasetime;
|
||||
+ if (iface->max_valid_lifetime && valid_lt > iface->max_valid_lifetime)
|
||||
+ valid_lt = iface->max_valid_lifetime;
|
||||
}
|
||||
|
||||
if (minvalid > valid)
|
||||
@@ -643,9 +642,9 @@ static int send_router_advert(struct int
|
||||
if (preferred_lt > valid_lt) {
|
||||
@@ -663,9 +662,9 @@ static int send_router_advert(struct int
|
||||
|
||||
if (default_route) {
|
||||
syslog(LOG_WARNING, "A default route is present but there is no public prefix "
|
||||
- "on %s thus we don't announce a default route by overriding ra_lifetime!", iface->name);
|
||||
+ "on %s thus we don't announce a default route by setting ra_lifetime to zero!", iface->name);
|
||||
- "on %s thus we announce no default route by overriding ra_lifetime to 0!", iface->name);
|
||||
+ "on %s thus we announce no default route by setting ra_lifetime to 0!", iface->name);
|
||||
} else {
|
||||
- syslog(LOG_WARNING, "No default route present, overriding ra_lifetime!");
|
||||
+ syslog(LOG_WARNING, "No default route present, setting ra_lifetime to zero!");
|
||||
- syslog(LOG_WARNING, "No default route present, overriding ra_lifetime to 0!");
|
||||
+ syslog(LOG_WARNING, "No default route present, setting ra_lifetime to 0!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,7 +709,7 @@ static int send_router_advert(struct int
|
||||
@@ -730,7 +729,7 @@ static int send_router_advert(struct int
|
||||
|
||||
if (iface->pref64_length) {
|
||||
/* RFC 8781 § 4.1 rounding up lifetime to multiply of 8 */
|
||||
/* RFC 8781 § 4.1 rounding up lifetime to multiple of 8 */
|
||||
- uint16_t pref64_lifetime = lifetime < (UINT16_MAX - 7) ? lifetime + 7 : UINT16_MAX;
|
||||
+ uint16_t pref64_lifetime = lifetime < (UINT16_MAX - 7) ? lifetime + 7 : (UINT16_MAX - 7);
|
||||
uint8_t prefix_length_code;
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mtd-utils
|
||||
PKG_VERSION:=2.1.6
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
|
||||
@ -59,7 +59,7 @@ endef
|
||||
MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-tests \
|
||||
--enable-tests \
|
||||
--without-crypto \
|
||||
--without-xattr \
|
||||
--without-zstd \
|
||||
@ -76,7 +76,8 @@ endef
|
||||
define Package/nand-utils/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) \
|
||||
$(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
|
||||
$(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/mtd-utils/nandbiterrs $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ubi-utils))
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
PKG_SOURCE_DATE:=2024-04-07
|
||||
PKG_SOURCE_VERSION:=5507654a498a339c44b642f62e203e1d5fb1f725
|
||||
PKG_MIRROR_HASH:=40d3df5308faaf3cddfca4ebbcd9ee7fff98cf7e7d406dc177972a7abf0ca16b
|
||||
PKG_SOURCE_DATE:=2024-05-09
|
||||
PKG_SOURCE_VERSION:=0d823e702bfe5f2bb5be694030a98afedf34aa6b
|
||||
PKG_MIRROR_HASH:=c52d499d2490e958e36ed80c32e8fd6d94cacf3b43b9d14c45c68a25bc44d536
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
@ -155,6 +155,10 @@ $(eval $(call UcodeModule, \
|
||||
rtnl, RTNL_SUPPORT, +libnl-tiny +libubox, \
|
||||
The rtnl plugin provides access to the Linux routing netlink API.))
|
||||
|
||||
$(eval $(call UcodeModule, \
|
||||
socket, SOCKET_SUPPORT, , \
|
||||
The socket plugin provides access to IPv4, IPv6, Unix and packet socket APIs.))
|
||||
|
||||
$(eval $(call UcodeModule, \
|
||||
struct, STRUCT_SUPPORT, , \
|
||||
The struct plugin implements Python 3 compatible struct.pack/unpack functionality.))
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Wed, 1 May 2024 18:40:19 +0200
|
||||
Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination
|
||||
|
||||
When uloop has been integrated with eloop (in hostapd/wpa_supplicant),
|
||||
uloop_cancelling will return false, since uloop_run is not being called.
|
||||
This leads to ubus.defer() calling uloop_run in a context where it can
|
||||
prevent the other event loop from running.
|
||||
|
||||
Fix this by detecting event loop integration via uloop_fd_set_cb being set
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/lib/ubus.c
|
||||
+++ b/lib/ubus.c
|
||||
@@ -665,6 +665,9 @@ uc_ubus_have_uloop(void)
|
||||
bool prev = uloop_cancelled;
|
||||
bool active;
|
||||
|
||||
+ if (uloop_fd_set_cb)
|
||||
+ return true;
|
||||
+
|
||||
uloop_cancelled = true;
|
||||
active = uloop_cancelling();
|
||||
uloop_cancelled = prev;
|
||||
@ -10,6 +10,7 @@ FEATURES:=fpu pci pcie rtc usb boot-part rootfs-part
|
||||
FEATURES+=cpiogz ext4 ramdisk squashfs targz vmdk
|
||||
|
||||
KERNEL_PATCHVER:=6.1
|
||||
KERNEL_TESTING_PATCHVER:=6.6
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
||||
83
target/linux/armsr/armv7/config-6.6
Normal file
83
target/linux/armsr/armv7/config-6.6
Normal file
@ -0,0 +1,83 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=8
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
# CONFIG_ARCH_MULTI_V4 is not set
|
||||
# CONFIG_ARCH_MULTI_V4T is not set
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_VIRT=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_LPAE=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PHYS_OFFSET=0
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
# CONFIG_UNWINDER_FRAME_POINTER is not set
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
852
target/linux/armsr/armv8/config-6.6
Normal file
852
target/linux/armsr/armv8/config-6.6
Normal file
@ -0,0 +1,852 @@
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ACPI_APEI=y
|
||||
# CONFIG_ACPI_FFH is not set
|
||||
# CONFIG_ACPI_FPDT is not set
|
||||
CONFIG_ACPI_HMAT=y
|
||||
CONFIG_ACPI_PCC=y
|
||||
CONFIG_AHCI_IMX=y
|
||||
CONFIG_AHCI_MVEBU=y
|
||||
CONFIG_AHCI_QORIQ=y
|
||||
CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
# CONFIG_ARCH_BCMBCA is not set
|
||||
CONFIG_ARCH_BCM_IPROC=y
|
||||
CONFIG_ARCH_BRCMSTB=y
|
||||
CONFIG_ARCH_HISI=y
|
||||
CONFIG_ARCH_INTEL_SOCFPGA=y
|
||||
CONFIG_ARCH_LAYERSCAPE=y
|
||||
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_ARCH_MXC=y
|
||||
CONFIG_ARCH_NXP=y
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_R8A774A1=y
|
||||
CONFIG_ARCH_R8A774B1=y
|
||||
CONFIG_ARCH_R8A774C0=y
|
||||
CONFIG_ARCH_R8A774E1=y
|
||||
# CONFIG_ARCH_R8A77950 is not set
|
||||
# CONFIG_ARCH_R8A77951 is not set
|
||||
# CONFIG_ARCH_R8A77960 is not set
|
||||
# CONFIG_ARCH_R8A77961 is not set
|
||||
# CONFIG_ARCH_R8A77965 is not set
|
||||
# CONFIG_ARCH_R8A77970 is not set
|
||||
# CONFIG_ARCH_R8A77980 is not set
|
||||
# CONFIG_ARCH_R8A77990 is not set
|
||||
# CONFIG_ARCH_R8A77995 is not set
|
||||
# CONFIG_ARCH_R8A779A0 is not set
|
||||
# CONFIG_ARCH_R8A779F0 is not set
|
||||
# CONFIG_ARCH_R8A779G0 is not set
|
||||
CONFIG_ARCH_R9A07G043=y
|
||||
CONFIG_ARCH_R9A07G044=y
|
||||
CONFIG_ARCH_R9A07G054=y
|
||||
CONFIG_ARCH_R9A09G011=y
|
||||
CONFIG_ARCH_RENESAS=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_SYNQUACER=y
|
||||
CONFIG_ARCH_THUNDER=y
|
||||
CONFIG_ARCH_THUNDER2=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_ARCH_ZYNQMP=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
CONFIG_ARM64_AMU_EXTN=y
|
||||
CONFIG_ARM64_BTI=y
|
||||
CONFIG_ARM64_CNP=y
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_ARM64_E0PD=y
|
||||
CONFIG_ARM64_EPAN=y
|
||||
CONFIG_ARM64_ERRATUM_1024718=y
|
||||
CONFIG_ARM64_ERRATUM_1165522=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_1319367=y
|
||||
CONFIG_ARM64_ERRATUM_1418040=y
|
||||
CONFIG_ARM64_ERRATUM_1463225=y
|
||||
CONFIG_ARM64_ERRATUM_1508412=y
|
||||
CONFIG_ARM64_ERRATUM_1530923=y
|
||||
CONFIG_ARM64_ERRATUM_1542419=y
|
||||
CONFIG_ARM64_ERRATUM_1742098=y
|
||||
CONFIG_ARM64_ERRATUM_2051678=y
|
||||
CONFIG_ARM64_ERRATUM_2054223=y
|
||||
CONFIG_ARM64_ERRATUM_2067961=y
|
||||
CONFIG_ARM64_ERRATUM_2077057=y
|
||||
CONFIG_ARM64_ERRATUM_2441007=y
|
||||
CONFIG_ARM64_ERRATUM_2441009=y
|
||||
CONFIG_ARM64_ERRATUM_2457168=y
|
||||
CONFIG_ARM64_ERRATUM_2658417=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_845719=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_MTE=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_PTR_AUTH=y
|
||||
CONFIG_ARM64_PTR_AUTH_KERNEL=y
|
||||
CONFIG_ARM64_RAS_EXTN=y
|
||||
CONFIG_ARM64_SME=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_TLB_RANGE=y
|
||||
CONFIG_ARM64_VA_BITS=48
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
|
||||
CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
|
||||
CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
|
||||
# CONFIG_ARMADA_37XX_RWTM_MBOX is not set
|
||||
CONFIG_ARMADA_37XX_WATCHDOG=y
|
||||
CONFIG_ARMADA_THERMAL=y
|
||||
CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
|
||||
# CONFIG_ARM_DMC620_PMU is not set
|
||||
# CONFIG_ARM_MHU_V2 is not set
|
||||
CONFIG_ARM_PSCI_CPUIDLE=y
|
||||
CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
|
||||
CONFIG_ARM_SBSA_WATCHDOG=y
|
||||
CONFIG_ARM_SCPI_POWER_DOMAIN=y
|
||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||
CONFIG_ARM_SMCCC_SOC_ID=y
|
||||
CONFIG_ARM_SMC_WATCHDOG=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
|
||||
# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
# CONFIG_ARM_SMMU_V3_PMU is not set
|
||||
# CONFIG_ARM_SMMU_V3_SVA is not set
|
||||
CONFIG_ATOMIC64_SELFTEST=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
# CONFIG_AXI_DMAC is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
# CONFIG_BCM2711_THERMAL is not set
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_BCM2835_POWER=y
|
||||
# CONFIG_BCM2835_THERMAL is not set
|
||||
# CONFIG_BCM2835_VCHIQ is not set
|
||||
CONFIG_BCM2835_WDT=y
|
||||
# CONFIG_BCMASP is not set
|
||||
# CONFIG_BCMGENET is not set
|
||||
# CONFIG_BCM_CYGNUS_PHY is not set
|
||||
# CONFIG_BCM_FLEXRM_MBOX is not set
|
||||
# CONFIG_BCM_NS_THERMAL is not set
|
||||
# CONFIG_BCM_PDC_MBOX is not set
|
||||
# CONFIG_BCM_SR_THERMAL is not set
|
||||
CONFIG_BCM_VIDEOCORE=y
|
||||
# CONFIG_BGMAC_PLATFORM is not set
|
||||
CONFIG_BLK_PM=y
|
||||
# CONFIG_BRCMSTB_PM is not set
|
||||
# CONFIG_BRCMSTB_THERMAL is not set
|
||||
CONFIG_BRCM_USB_PINMAP=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23144=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
CONFIG_CAVIUM_ERRATUM_30115=y
|
||||
CONFIG_CAVIUM_TX2_ERRATUM_219=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_BCM_NS2=y
|
||||
CONFIG_CLK_BCM_SR=y
|
||||
CONFIG_CLK_IMX8MM=y
|
||||
CONFIG_CLK_IMX8MN=y
|
||||
CONFIG_CLK_IMX8MP=y
|
||||
CONFIG_CLK_IMX8MQ=y
|
||||
CONFIG_CLK_IMX8QXP=y
|
||||
CONFIG_CLK_IMX8ULP=y
|
||||
CONFIG_CLK_IMX93=y
|
||||
CONFIG_CLK_INTEL_SOCFPGA=y
|
||||
CONFIG_CLK_INTEL_SOCFPGA64=y
|
||||
CONFIG_CLK_LS1028A_PLLDIG=y
|
||||
CONFIG_CLK_PX30=y
|
||||
CONFIG_CLK_QORIQ=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y
|
||||
CONFIG_CLK_RENESAS=y
|
||||
CONFIG_CLK_RK3308=y
|
||||
CONFIG_CLK_RK3328=y
|
||||
CONFIG_CLK_RK3368=y
|
||||
CONFIG_CLK_RK3399=y
|
||||
CONFIG_CLK_RK3568=y
|
||||
CONFIG_CLK_RK3588=y
|
||||
CONFIG_CLK_SP810=y
|
||||
CONFIG_CLK_SUNXI=y
|
||||
CONFIG_CLK_SUNXI_CLOCKS=y
|
||||
# CONFIG_CLK_SUNXI_PRCM_SUN6I is not set
|
||||
# CONFIG_CLK_SUNXI_PRCM_SUN8I is not set
|
||||
# CONFIG_CLK_SUNXI_PRCM_SUN9I is not set
|
||||
CONFIG_CLK_VEXPRESS_OSC=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=19
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
CONFIG_CMA_SIZE_MBYTES=32
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
# CONFIG_COMMON_CLK_FSL_FLEXSPI is not set
|
||||
# CONFIG_COMMON_CLK_FSL_SAI is not set
|
||||
CONFIG_COMMON_CLK_HI3516CV300=y
|
||||
CONFIG_COMMON_CLK_HI3519=y
|
||||
CONFIG_COMMON_CLK_HI3559A=y
|
||||
CONFIG_COMMON_CLK_HI3660=y
|
||||
CONFIG_COMMON_CLK_HI3670=y
|
||||
CONFIG_COMMON_CLK_HI3798CV200=y
|
||||
CONFIG_COMMON_CLK_HI6220=y
|
||||
CONFIG_COMMON_CLK_HI655X=y
|
||||
CONFIG_COMMON_CLK_ROCKCHIP=y
|
||||
CONFIG_COMMON_CLK_SCPI=y
|
||||
CONFIG_COMMON_CLK_ZYNQMP=y
|
||||
CONFIG_COMMON_RESET_HI3660=y
|
||||
CONFIG_COMMON_RESET_HI6220=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
|
||||
CONFIG_CRYPTO_CHACHA20=y
|
||||
CONFIG_CRYPTO_CHACHA20_NEON=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
# CONFIG_CRYPTO_DEV_ALLWINNER is not set
|
||||
# CONFIG_CRYPTO_DEV_BCM_SPU is not set
|
||||
# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM is not set
|
||||
# CONFIG_CRYPTO_DEV_HISI_HPRE is not set
|
||||
# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set
|
||||
# CONFIG_CRYPTO_DEV_HISI_TRNG is not set
|
||||
# CONFIG_CRYPTO_DEV_OCTEONTX2_CPT is not set
|
||||
# CONFIG_CRYPTO_DEV_ROCKCHIP is not set
|
||||
# CONFIG_CRYPTO_DEV_ZYNQMP_AES is not set
|
||||
# CONFIG_CRYPTO_DEV_ZYNQMP_SHA3 is not set
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
|
||||
CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA256_ARM64=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
|
||||
# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set
|
||||
# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set
|
||||
# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
|
||||
# CONFIG_DEV_DAX_HMEM is not set
|
||||
CONFIG_DMA_BCM2835=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
# CONFIG_DMA_NUMA_CMA is not set
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_SUN6I=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_BOCHS=y
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
# CONFIG_DRM_FSL_LDB is not set
|
||||
CONFIG_DRM_GEM_SHMEM_HELPER=y
|
||||
# CONFIG_DRM_IMX8QM_LDB is not set
|
||||
# CONFIG_DRM_IMX8QXP_LDB is not set
|
||||
# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set
|
||||
# CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set
|
||||
# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set
|
||||
# CONFIG_DRM_IMX_DCSS is not set
|
||||
# CONFIG_DRM_IMX_LCDC is not set
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_BRIDGE=y
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
|
||||
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
|
||||
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
|
||||
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
|
||||
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
|
||||
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
|
||||
CONFIG_DRM_QXL=y
|
||||
# CONFIG_DRM_RCAR_DU is not set
|
||||
# CONFIG_DRM_ROCKCHIP is not set
|
||||
# CONFIG_DRM_RZG2L_MIPI_DSI is not set
|
||||
# CONFIG_DRM_SHMOBILE is not set
|
||||
CONFIG_DRM_TTM=y
|
||||
CONFIG_DRM_TTM_HELPER=y
|
||||
# CONFIG_DRM_V3D is not set
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_DRM_VIRTIO_GPU_KMS=y
|
||||
CONFIG_DRM_VRAM_HELPER=y
|
||||
# CONFIG_DWMAC_SUN8I is not set
|
||||
# CONFIG_DWMAC_SUNXI is not set
|
||||
CONFIG_DW_WATCHDOG=y
|
||||
CONFIG_EFI_CAPSULE_LOADER=y
|
||||
CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
|
||||
CONFIG_EFI_SOFT_RESERVE=y
|
||||
CONFIG_EFI_VARS_PSTORE=y
|
||||
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_ARMCLCD=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_MX3=y
|
||||
# CONFIG_FB_SH_MOBILE_LCDC is not set
|
||||
# CONFIG_FB_XILINX is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
# CONFIG_FSL_DPAA is not set
|
||||
# CONFIG_FSL_DPAA2_QDMA is not set
|
||||
CONFIG_FSL_ERRATUM_A008585=y
|
||||
# CONFIG_FSL_IMX8_DDR_PMU is not set
|
||||
# CONFIG_FSL_PQ_MDIO is not set
|
||||
CONFIG_FUJITSU_ERRATUM_010001=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
# CONFIG_GIANFAR is not set
|
||||
CONFIG_GPIO_BCM_XGS_IPROC=y
|
||||
CONFIG_GPIO_BRCMSTB=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_MPC8XXX=y
|
||||
CONFIG_GPIO_MXC=y
|
||||
CONFIG_GPIO_RASPBERRYPI_EXP=y
|
||||
CONFIG_GPIO_ROCKCHIP=y
|
||||
CONFIG_GPIO_THUNDERX=y
|
||||
CONFIG_GPIO_XLP=y
|
||||
CONFIG_GPIO_ZYNQ=y
|
||||
CONFIG_GPIO_ZYNQMP_MODEPIN=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HI3660_MBOX=y
|
||||
CONFIG_HI6220_MBOX=y
|
||||
CONFIG_HISILICON_ERRATUM_161600802=y
|
||||
CONFIG_HISILICON_LPC=y
|
||||
CONFIG_HISI_PMU=y
|
||||
CONFIG_HISI_THERMAL=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_ACPI=y
|
||||
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
|
||||
# CONFIG_HOTPLUG_PCI_CPCI is not set
|
||||
# CONFIG_HOTPLUG_PCI_PCIE is not set
|
||||
# CONFIG_HOTPLUG_PCI_SHPC is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y
|
||||
# CONFIG_HW_RANDOM_HISI is not set
|
||||
# CONFIG_HW_RANDOM_HISTB is not set
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_ALGOBIT=y
|
||||
CONFIG_I2C_ALTERA=y
|
||||
# CONFIG_I2C_BCM2835 is not set
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
# CONFIG_I2C_HIX5HD2 is not set
|
||||
CONFIG_I2C_IMX=y
|
||||
CONFIG_I2C_IMX_LPI2C=y
|
||||
CONFIG_I2C_RIIC=y
|
||||
# CONFIG_I2C_RZV2M is not set
|
||||
# CONFIG_I2C_SLAVE_TESTUNIT is not set
|
||||
CONFIG_I2C_SYNQUACER=y
|
||||
CONFIG_I2C_THUNDERX=y
|
||||
# CONFIG_I2C_XLP9XX is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
# CONFIG_IMX2_WDT is not set
|
||||
# CONFIG_IMX8MM_THERMAL is not set
|
||||
# CONFIG_IMX8QXP_ADC is not set
|
||||
# CONFIG_IMX93_ADC is not set
|
||||
# CONFIG_IMX_DMA is not set
|
||||
# CONFIG_IMX_DSP is not set
|
||||
CONFIG_IMX_INTMUX=y
|
||||
CONFIG_IMX_IRQSTEER=y
|
||||
CONFIG_IMX_MBOX=y
|
||||
# CONFIG_IMX_MU_MSI is not set
|
||||
CONFIG_IMX_SCU=y
|
||||
CONFIG_IMX_SCU_PD=y
|
||||
# CONFIG_IMX_SC_THERMAL is not set
|
||||
# CONFIG_IMX_SC_WDT is not set
|
||||
# CONFIG_IMX_SDMA is not set
|
||||
# CONFIG_IMX_WEIM is not set
|
||||
# CONFIG_INPUT_BBNSM_PWRKEY is not set
|
||||
# CONFIG_INPUT_HISI_POWERKEY is not set
|
||||
# CONFIG_INPUT_IBM_PANEL is not set
|
||||
# CONFIG_INTEL_STRATIX10_RSU is not set
|
||||
# CONFIG_INTEL_STRATIX10_SERVICE is not set
|
||||
CONFIG_INTERCONNECT=y
|
||||
CONFIG_INTERCONNECT_IMX=y
|
||||
CONFIG_INTERCONNECT_IMX8MM=y
|
||||
CONFIG_INTERCONNECT_IMX8MN=y
|
||||
CONFIG_INTERCONNECT_IMX8MP=y
|
||||
CONFIG_INTERCONNECT_IMX8MQ=y
|
||||
# CONFIG_IOMMUFD is not set
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
|
||||
CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
|
||||
CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_DART is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
# CONFIG_IPMMU_VMSA is not set
|
||||
# CONFIG_K3_DMA is not set
|
||||
CONFIG_KCMP=y
|
||||
# CONFIG_KEYBOARD_IMX_SC_KEY is not set
|
||||
# CONFIG_KEYBOARD_SUN4I_LRADC is not set
|
||||
CONFIG_KSM=y
|
||||
# CONFIG_KUNPENG_HCCS is not set
|
||||
CONFIG_KVM=y
|
||||
CONFIG_LCD_CLASS_DEVICE=m
|
||||
# CONFIG_LCD_PLATFORM is not set
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MARVELL_10G_PHY=y
|
||||
# CONFIG_MARVELL_CN10K_DDR_PMU is not set
|
||||
# CONFIG_MARVELL_CN10K_TAD_PMU is not set
|
||||
# CONFIG_MARVELL_GTI_WDT is not set
|
||||
CONFIG_MDIO_BCM_IPROC=y
|
||||
CONFIG_MDIO_BUS_MUX_BCM_IPROC=y
|
||||
CONFIG_MDIO_SUN4I=y
|
||||
# CONFIG_MFD_ALTERA_A10SR is not set
|
||||
CONFIG_MFD_ALTERA_SYSMGR=y
|
||||
# CONFIG_MFD_AXP20X_RSB is not set
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_HI655X_PMIC=y
|
||||
# CONFIG_MFD_KHADAS_MCU is not set
|
||||
CONFIG_MFD_SUN4I_GPADC=y
|
||||
# CONFIG_MFD_SUN6I_PRCM is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MFD_VEXPRESS_SYSREG=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_MMC_BCM2835=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_CAVIUM_THUNDERX=y
|
||||
CONFIG_MMC_DW=y
|
||||
# CONFIG_MMC_DW_BLUEFIELD is not set
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
# CONFIG_MMC_DW_HI3798CV200 is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
# CONFIG_MMC_DW_PCI is not set
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
# CONFIG_MMC_MXC is not set
|
||||
CONFIG_MMC_RICOH_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_ACPI=y
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
CONFIG_MMC_SDHCI_ESDHC_IMX=y
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
CONFIG_MMC_SDHCI_OF_ESDHC=y
|
||||
CONFIG_MMC_SDHCI_PCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHI=y
|
||||
CONFIG_MMC_SDHI_INTERNAL_DMAC=y
|
||||
# CONFIG_MMC_SDHI_SYS_DMAC is not set
|
||||
# CONFIG_MMC_SH_MMCIF is not set
|
||||
CONFIG_MMC_SUNXI=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
# CONFIG_MVNETA is not set
|
||||
# CONFIG_MVPP2 is not set
|
||||
# CONFIG_MV_XOR is not set
|
||||
# CONFIG_MX3_IPU is not set
|
||||
CONFIG_MXC_CLK=y
|
||||
CONFIG_MXC_CLK_SCU=y
|
||||
# CONFIG_MXS_DMA is not set
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
# CONFIG_NET_VENDOR_ALLWINNER is not set
|
||||
CONFIG_NODES_SHIFT=4
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=256
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
# CONFIG_NVHE_EL2_DEBUG is not set
|
||||
CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
|
||||
# CONFIG_NVMEM_IMX_IIM is not set
|
||||
# CONFIG_NVMEM_IMX_OCOTP_ELE is not set
|
||||
CONFIG_NVMEM_IMX_OCOTP_SCU=y
|
||||
# CONFIG_NVMEM_LAYERSCAPE_SFP is not set
|
||||
CONFIG_NVMEM_ROCKCHIP_EFUSE=y
|
||||
# CONFIG_NVMEM_ROCKCHIP_OTP is not set
|
||||
# CONFIG_NVMEM_SNVS_LPGPR is not set
|
||||
# CONFIG_NVMEM_SUNXI_SID is not set
|
||||
# CONFIG_NVMEM_ZYNQMP is not set
|
||||
CONFIG_PCC=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEASPM=y
|
||||
CONFIG_PCIEASPM_DEFAULT=y
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
# CONFIG_PCIEASPM_POWERSAVE is not set
|
||||
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_ARMADA_8K=y
|
||||
CONFIG_PCIE_BRCMSTB=y
|
||||
CONFIG_PCIE_HISI_STB=y
|
||||
CONFIG_PCIE_IPROC_MSI=y
|
||||
CONFIG_PCIE_IPROC_PLATFORM=y
|
||||
CONFIG_PCIE_LAYERSCAPE=y
|
||||
CONFIG_PCIE_MOBIVEIL_PLAT=y
|
||||
# CONFIG_PCIE_RCAR_EP is not set
|
||||
CONFIG_PCIE_RCAR_HOST=y
|
||||
CONFIG_PCIE_ROCKCHIP=y
|
||||
# CONFIG_PCIE_ROCKCHIP_DW_HOST is not set
|
||||
CONFIG_PCIE_ROCKCHIP_HOST=y
|
||||
CONFIG_PCIE_XILINX_CPM=y
|
||||
CONFIG_PCIE_XILINX_NWL=y
|
||||
CONFIG_PCI_AARDVARK=y
|
||||
CONFIG_PCI_HISI=y
|
||||
CONFIG_PCI_HOST_THUNDER_ECAM=y
|
||||
CONFIG_PCI_HOST_THUNDER_PEM=y
|
||||
CONFIG_PCI_IMX6=y
|
||||
CONFIG_PCI_IMX6_HOST=y
|
||||
CONFIG_PCI_IOV=y
|
||||
CONFIG_PCI_LAYERSCAPE=y
|
||||
CONFIG_PCI_PASID=y
|
||||
# CONFIG_PCI_RCAR_GEN2 is not set
|
||||
CONFIG_PHY_BCM_SR_PCIE=y
|
||||
CONFIG_PHY_BCM_SR_USB=y
|
||||
CONFIG_PHY_BRCM_SATA=y
|
||||
CONFIG_PHY_BRCM_USB=y
|
||||
CONFIG_PHY_FSL_IMX8M_PCIE=y
|
||||
# CONFIG_PHY_FSL_LYNX_28G is not set
|
||||
CONFIG_PHY_HI3660_USB=y
|
||||
CONFIG_PHY_HI3670_PCIE=y
|
||||
CONFIG_PHY_HI3670_USB=y
|
||||
CONFIG_PHY_HI6220_USB=y
|
||||
CONFIG_PHY_HISI_INNO_USB2=y
|
||||
# CONFIG_PHY_HISTB_COMBPHY is not set
|
||||
# CONFIG_PHY_MIXEL_LVDS_PHY is not set
|
||||
CONFIG_PHY_MVEBU_A3700_COMPHY=y
|
||||
CONFIG_PHY_MVEBU_A3700_UTMI=y
|
||||
CONFIG_PHY_MVEBU_A38X_COMPHY=y
|
||||
CONFIG_PHY_MVEBU_CP110_COMPHY=y
|
||||
CONFIG_PHY_NS2_PCIE=y
|
||||
CONFIG_PHY_NS2_USB_DRD=y
|
||||
# CONFIG_PHY_R8A779F0_ETHERNET_SERDES is not set
|
||||
# CONFIG_PHY_RCAR_GEN2 is not set
|
||||
CONFIG_PHY_RCAR_GEN3_PCIE=y
|
||||
CONFIG_PHY_RCAR_GEN3_USB2=y
|
||||
CONFIG_PHY_RCAR_GEN3_USB3=y
|
||||
# CONFIG_PHY_ROCKCHIP_DP is not set
|
||||
# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
|
||||
CONFIG_PHY_ROCKCHIP_EMMC=y
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
|
||||
# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set
|
||||
CONFIG_PHY_ROCKCHIP_PCIE=y
|
||||
CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
|
||||
CONFIG_PHY_ROCKCHIP_TYPEC=y
|
||||
# CONFIG_PHY_ROCKCHIP_USB is not set
|
||||
CONFIG_PHY_SUN4I_USB=y
|
||||
CONFIG_PHY_SUN50I_USB3=y
|
||||
# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
|
||||
CONFIG_PHY_SUN9I_USB=y
|
||||
# CONFIG_PHY_XILINX_ZYNQMP is not set
|
||||
CONFIG_PINCTRL_IMX=y
|
||||
CONFIG_PINCTRL_IMX8DXL=y
|
||||
CONFIG_PINCTRL_IMX8MM=y
|
||||
CONFIG_PINCTRL_IMX8MN=y
|
||||
CONFIG_PINCTRL_IMX8MP=y
|
||||
CONFIG_PINCTRL_IMX8MQ=y
|
||||
CONFIG_PINCTRL_IMX8QM=y
|
||||
CONFIG_PINCTRL_IMX8QXP=y
|
||||
CONFIG_PINCTRL_IMX8ULP=y
|
||||
CONFIG_PINCTRL_IMX93=y
|
||||
# CONFIG_PINCTRL_IMXRT1050 is not set
|
||||
# CONFIG_PINCTRL_IMXRT1170 is not set
|
||||
CONFIG_PINCTRL_IMX_SCU=y
|
||||
CONFIG_PINCTRL_IPROC_GPIO=y
|
||||
CONFIG_PINCTRL_NS2_MUX=y
|
||||
CONFIG_PINCTRL_ROCKCHIP=y
|
||||
# CONFIG_PINCTRL_SUN20I_D1 is not set
|
||||
CONFIG_PINCTRL_SUN4I_A10=y
|
||||
CONFIG_PINCTRL_SUN50I_A100=y
|
||||
CONFIG_PINCTRL_SUN50I_A100_R=y
|
||||
CONFIG_PINCTRL_SUN50I_A64=y
|
||||
CONFIG_PINCTRL_SUN50I_A64_R=y
|
||||
CONFIG_PINCTRL_SUN50I_H5=y
|
||||
CONFIG_PINCTRL_SUN50I_H6=y
|
||||
CONFIG_PINCTRL_SUN50I_H616=y
|
||||
CONFIG_PINCTRL_SUN50I_H616_R=y
|
||||
CONFIG_PINCTRL_SUN50I_H6_R=y
|
||||
CONFIG_PINCTRL_SUN5I=y
|
||||
# CONFIG_PINCTRL_SUN6I_A31 is not set
|
||||
# CONFIG_PINCTRL_SUN6I_A31_R is not set
|
||||
# CONFIG_PINCTRL_SUN8I_A23 is not set
|
||||
# CONFIG_PINCTRL_SUN8I_A23_R is not set
|
||||
# CONFIG_PINCTRL_SUN8I_A33 is not set
|
||||
# CONFIG_PINCTRL_SUN8I_A83T is not set
|
||||
# CONFIG_PINCTRL_SUN8I_A83T_R is not set
|
||||
# CONFIG_PINCTRL_SUN8I_H3 is not set
|
||||
# CONFIG_PINCTRL_SUN8I_H3_R is not set
|
||||
# CONFIG_PINCTRL_SUN8I_V3S is not set
|
||||
# CONFIG_PINCTRL_SUN9I_A80 is not set
|
||||
# CONFIG_PINCTRL_SUN9I_A80_R is not set
|
||||
CONFIG_PINCTRL_ZYNQMP=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_GENERIC_DOMAINS=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_HISI=y
|
||||
CONFIG_POWER_RESET_VEXPRESS=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
# CONFIG_PTP_1588_CLOCK_DTE is not set
|
||||
# CONFIG_PWM_BCM2835 is not set
|
||||
CONFIG_QCOM_FALKOR_ERRATUM_1003=y
|
||||
CONFIG_QCOM_FALKOR_ERRATUM_1009=y
|
||||
CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
|
||||
CONFIG_QCOM_QDF2400_ERRATUM_0065=y
|
||||
CONFIG_QORIQ_THERMAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RANDOMIZE_BASE=y
|
||||
CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# CONFIG_RAVB is not set
|
||||
CONFIG_RCAR_DMAC=y
|
||||
# CONFIG_RCAR_GEN3_THERMAL is not set
|
||||
# CONFIG_RCAR_THERMAL is not set
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_ANATOP=y
|
||||
CONFIG_REGULATOR_AXP20X=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_HI655X=y
|
||||
CONFIG_REGULATOR_PFUZE100=y
|
||||
# CONFIG_REGULATOR_VEXPRESS is not set
|
||||
CONFIG_RELOCATABLE=y
|
||||
# CONFIG_RENESAS_ETHER_SWITCH is not set
|
||||
CONFIG_RENESAS_OSTM=y
|
||||
# CONFIG_RENESAS_RZAWDT is not set
|
||||
# CONFIG_RENESAS_RZG2LWDT is not set
|
||||
# CONFIG_RENESAS_RZN1WDT is not set
|
||||
CONFIG_RENESAS_USB_DMAC=y
|
||||
# CONFIG_RENESAS_WDT is not set
|
||||
# CONFIG_RESET_BRCMSTB is not set
|
||||
CONFIG_RESET_IMX7=y
|
||||
# CONFIG_RESET_RASPBERRYPI is not set
|
||||
CONFIG_RESET_RZG2L_USBPHY_CTRL=y
|
||||
CONFIG_ROCKCHIP_IODOMAIN=y
|
||||
CONFIG_ROCKCHIP_IOMMU=y
|
||||
# CONFIG_ROCKCHIP_MBOX is not set
|
||||
CONFIG_ROCKCHIP_PM_DOMAINS=y
|
||||
# CONFIG_ROCKCHIP_SARADC is not set
|
||||
# CONFIG_ROCKCHIP_THERMAL is not set
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
# CONFIG_RTC_DRV_BBNSM is not set
|
||||
# CONFIG_RTC_DRV_BRCMSTB is not set
|
||||
# CONFIG_RTC_DRV_FSL_FTM_ALARM is not set
|
||||
# CONFIG_RTC_DRV_IMXDI is not set
|
||||
# CONFIG_RTC_DRV_IMX_SC is not set
|
||||
CONFIG_RTC_DRV_MV=y
|
||||
# CONFIG_RTC_DRV_MXC is not set
|
||||
# CONFIG_RTC_DRV_MXC_V2 is not set
|
||||
# CONFIG_RTC_DRV_SH is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
# CONFIG_RZG2L_ADC is not set
|
||||
# CONFIG_RZG2L_THERMAL is not set
|
||||
CONFIG_RZ_DMAC=y
|
||||
CONFIG_RZ_MTU3=y
|
||||
CONFIG_SATA_SIL24=y
|
||||
# CONFIG_SCHED_CORE is not set
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
# CONFIG_SENSORS_ARM_SCPI is not set
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_SERIAL_8250_BCM7271=y
|
||||
# CONFIG_SERIAL_8250_EXAR is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
|
||||
CONFIG_SERIAL_FSL_LPUART=y
|
||||
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
|
||||
CONFIG_SERIAL_IMX=y
|
||||
CONFIG_SERIAL_IMX_CONSOLE=y
|
||||
CONFIG_SERIAL_IMX_EARLYCON=y
|
||||
CONFIG_SERIAL_MVEBU_CONSOLE=y
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
CONFIG_SERIAL_SH_SCI=y
|
||||
CONFIG_SERIAL_SH_SCI_CONSOLE=y
|
||||
CONFIG_SERIAL_SH_SCI_DMA=y
|
||||
CONFIG_SERIAL_SH_SCI_EARLYCON=y
|
||||
CONFIG_SERIAL_SH_SCI_NR_UARTS=18
|
||||
# CONFIG_SMC91X is not set
|
||||
# CONFIG_SND_SOC_RCAR is not set
|
||||
# CONFIG_SND_SOC_RZ is not set
|
||||
# CONFIG_SND_SOC_SH4_FSI is not set
|
||||
# CONFIG_SND_SUN4I_I2S is not set
|
||||
# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
|
||||
# CONFIG_SND_SUN50I_DMIC is not set
|
||||
# CONFIG_SND_SUN8I_CODEC is not set
|
||||
# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
|
||||
# CONFIG_SNI_NETSEC is not set
|
||||
CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
|
||||
CONFIG_SOC_IMX8M=y
|
||||
CONFIG_SOC_IMX9=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SPI_ARMADA_3700=y
|
||||
# CONFIG_SPI_BCM2835 is not set
|
||||
CONFIG_SPI_FSL_LPSPI=y
|
||||
# CONFIG_SPI_FSL_QUADSPI is not set
|
||||
# CONFIG_SPI_HISI_KUNPENG is not set
|
||||
# CONFIG_SPI_HISI_SFC is not set
|
||||
# CONFIG_SPI_HISI_SFC_V3XX is not set
|
||||
CONFIG_SPI_IMX=y
|
||||
# CONFIG_SPI_ROCKCHIP_SFC is not set
|
||||
# CONFIG_SPI_RSPI is not set
|
||||
# CONFIG_SPI_RZV2M_CSI is not set
|
||||
# CONFIG_SPI_SH_HSPI is not set
|
||||
# CONFIG_SPI_SH_MSIOF is not set
|
||||
# CONFIG_SPI_SUN4I is not set
|
||||
# CONFIG_SPI_SUN6I is not set
|
||||
# CONFIG_SPI_SYNQUACER is not set
|
||||
CONFIG_SPI_THUNDERX=y
|
||||
# CONFIG_SPI_XLP is not set
|
||||
# CONFIG_SSIF_IPMI_BMC is not set
|
||||
CONFIG_STUB_CLK_HI3660=y
|
||||
CONFIG_STUB_CLK_HI6220=y
|
||||
# CONFIG_SUN20I_GPADC is not set
|
||||
# CONFIG_SUN20I_PPU is not set
|
||||
CONFIG_SUN50I_A100_CCU=y
|
||||
CONFIG_SUN50I_A100_R_CCU=y
|
||||
CONFIG_SUN50I_A64_CCU=y
|
||||
CONFIG_SUN50I_H616_CCU=y
|
||||
CONFIG_SUN50I_H6_CCU=y
|
||||
CONFIG_SUN50I_H6_R_CCU=y
|
||||
CONFIG_SUN50I_IOMMU=y
|
||||
CONFIG_SUN6I_MSGBOX=y
|
||||
CONFIG_SUN6I_RTC_CCU=y
|
||||
# CONFIG_SUN8I_A83T_CCU is not set
|
||||
CONFIG_SUN8I_DE2_CCU=y
|
||||
# CONFIG_SUN8I_H3_CCU is not set
|
||||
CONFIG_SUN8I_R_CCU=y
|
||||
CONFIG_SUN8I_THERMAL=y
|
||||
CONFIG_SUNXI_CCU=y
|
||||
CONFIG_SUNXI_RSB=y
|
||||
CONFIG_SUNXI_WATCHDOG=y
|
||||
CONFIG_SYNC_FILE=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
# CONFIG_TCG_TIS_SYNQUACER is not set
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
# CONFIG_THUNDERX2_PMU is not set
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
|
||||
# CONFIG_TURRIS_MOX_RWTM is not set
|
||||
CONFIG_TYPEC=y
|
||||
# CONFIG_TYPEC_ANX7411 is not set
|
||||
# CONFIG_TYPEC_DP_ALTMODE is not set
|
||||
# CONFIG_TYPEC_FUSB302 is not set
|
||||
# CONFIG_TYPEC_HD3SS3220 is not set
|
||||
# CONFIG_TYPEC_MUX_FSA4480 is not set
|
||||
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
|
||||
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
|
||||
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
|
||||
# CONFIG_TYPEC_RT1711H is not set
|
||||
# CONFIG_TYPEC_RT1719 is not set
|
||||
# CONFIG_TYPEC_STUSB160X is not set
|
||||
CONFIG_TYPEC_TCPCI=y
|
||||
# CONFIG_TYPEC_TCPCI_MAXIM is not set
|
||||
CONFIG_TYPEC_TCPM=y
|
||||
# CONFIG_TYPEC_TPS6598X is not set
|
||||
# CONFIG_TYPEC_WUSB3801 is not set
|
||||
# CONFIG_UACCE is not set
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
# CONFIG_USB_BRCMSTB is not set
|
||||
# CONFIG_USB_CDNS2_UDC is not set
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_GENERIC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_IMX=y
|
||||
CONFIG_USB_CHIPIDEA_PCI=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_DUAL_ROLE=y
|
||||
# CONFIG_USB_DWC3_GADGET is not set
|
||||
CONFIG_USB_DWC3_HAPS=y
|
||||
# CONFIG_USB_DWC3_HOST is not set
|
||||
CONFIG_USB_DWC3_IMX8MP=y
|
||||
# CONFIG_USB_DWC3_OF_SIMPLE is not set
|
||||
CONFIG_USB_DWC3_PCI=y
|
||||
# CONFIG_USB_DWC3_ULPI is not set
|
||||
CONFIG_USB_DWC3_XILINX=y
|
||||
CONFIG_USB_EHCI_FSL=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_ORION=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
# CONFIG_USB_EMXX is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_MXS_PHY=y
|
||||
CONFIG_USB_OHCI_EXYNOS=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PCI=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_OTG_FSM=y
|
||||
CONFIG_USB_RENESAS_USB3=y
|
||||
CONFIG_USB_RENESAS_USBF=y
|
||||
CONFIG_USB_RENESAS_USBHS=y
|
||||
CONFIG_USB_RENESAS_USBHS_HCD=y
|
||||
CONFIG_USB_RENESAS_USBHS_UDC=y
|
||||
CONFIG_USB_RZV2M_USB3DRD=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_HISTB=y
|
||||
CONFIG_USB_XHCI_MVEBU=y
|
||||
CONFIG_USB_XHCI_PLATFORM=y
|
||||
# CONFIG_USB_XHCI_RCAR is not set
|
||||
CONFIG_USB_XHCI_RZV2M=y
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
# CONFIG_VFIO_AMBA is not set
|
||||
CONFIG_VIDEOMODE_HELPERS=y
|
||||
# CONFIG_VIDEO_IMX7_CSI is not set
|
||||
# CONFIG_VIDEO_IMX8MQ_MIPI_CSI2 is not set
|
||||
# CONFIG_VIDEO_IMX8_ISI is not set
|
||||
# CONFIG_VIDEO_RZG2L_CRU is not set
|
||||
# CONFIG_VIDEO_RZG2L_CSI2 is not set
|
||||
CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
|
||||
# CONFIG_VIRTIO_IOMMU is not set
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_WDAT_WDT=y
|
||||
# CONFIG_XILINX_AMS is not set
|
||||
# CONFIG_XILINX_INTC is not set
|
||||
CONFIG_XLNX_EVENT_MANAGER=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
CONFIG_ZYNQMP_FIRMWARE=y
|
||||
# CONFIG_ZYNQMP_FIRMWARE_DEBUG is not set
|
||||
CONFIG_ZYNQMP_PM_DOMAINS=y
|
||||
CONFIG_ZYNQMP_POWER=y
|
||||
@ -3,18 +3,26 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
KERNEL_MAJOR=$(uname -r | awk -F '.' '{print $1}')
|
||||
KERNEL_MINOR=$(uname -r | awk -F '.' '{print $2}')
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
traverse,ten64)
|
||||
ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376"
|
||||
ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377"
|
||||
ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "378"
|
||||
ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "379"
|
||||
ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "369"
|
||||
ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "373"
|
||||
if [ "${KERNEL_MAJOR}" -ge "6" ] && [ "${KERNEL_MINOR}" -ge "6" ]; then
|
||||
I2C_GPIO_BASE=640
|
||||
else
|
||||
I2C_GPIO_BASE=368
|
||||
fi
|
||||
ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "$(($I2C_GPIO_BASE + 8))"
|
||||
ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "$(($I2C_GPIO_BASE + 9))"
|
||||
ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "$((I2C_GPIO_BASE + 10))"
|
||||
ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "$(($I2C_GPIO_BASE + 11))"
|
||||
ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "$(($I2C_GPIO_BASE + 1))"
|
||||
ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "$(($I2C_GPIO_BASE + 5))"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This script migrates GPIO switch pin numbers
|
||||
# from kernel versions prior to 6.6
|
||||
# See https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042448.html
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
ten64_update_gpioswitch_num() {
|
||||
local section="$1"
|
||||
config_get gpio_pin "${section}" gpio_pin
|
||||
config_get gpio_name "${section}" name
|
||||
if [ -z "${gpio_pin}" ]; then
|
||||
return
|
||||
fi
|
||||
local this_pin_name=$(uci get "system.${section}.name")
|
||||
if [ "${gpio_pin}" -lt 640 ]; then
|
||||
new_pin_value=$(( $gpio_pin + 272 ))
|
||||
uci set "system.${section}.gpio_pin=${new_pin_value}"
|
||||
fi
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
if [ "${board}" != "traverse,ten64" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
KERNEL_MINOR=$(uname -r | awk -F '.' '{print $2}')
|
||||
if [ "${KERNEL_MINOR}" -lt "6" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
config_load system
|
||||
config_foreach ten64_update_gpioswitch_num gpio_switch
|
||||
|
||||
exit 0
|
||||
338
target/linux/armsr/config-6.6
Normal file
338
target/linux/armsr/config-6.6
Normal file
@ -0,0 +1,338 @@
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_9P_FS=y
|
||||
# CONFIG_9P_FS_POSIX_ACL is not set
|
||||
# CONFIG_9P_FS_SECURITY is not set
|
||||
# CONFIG_A64FX_DIAG is not set
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_ACPI_AC=y
|
||||
CONFIG_ACPI_APEI=y
|
||||
CONFIG_ACPI_APEI_EINJ=y
|
||||
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
|
||||
CONFIG_ACPI_APEI_GHES=y
|
||||
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
|
||||
CONFIG_ACPI_APEI_PCIEAER=y
|
||||
CONFIG_ACPI_BATTERY=y
|
||||
# CONFIG_ACPI_BGRT is not set
|
||||
CONFIG_ACPI_BUTTON=y
|
||||
CONFIG_ACPI_CCA_REQUIRED=y
|
||||
CONFIG_ACPI_CONTAINER=y
|
||||
CONFIG_ACPI_CPPC_CPUFREQ=y
|
||||
# CONFIG_ACPI_DEBUG is not set
|
||||
# CONFIG_ACPI_DEBUGGER is not set
|
||||
# CONFIG_ACPI_DOCK is not set
|
||||
# CONFIG_ACPI_EC_DEBUGFS is not set
|
||||
CONFIG_ACPI_FAN=y
|
||||
CONFIG_ACPI_GENERIC_GSI=y
|
||||
CONFIG_ACPI_GTDT=y
|
||||
CONFIG_ACPI_HOTPLUG_CPU=y
|
||||
CONFIG_ACPI_I2C_OPREGION=y
|
||||
CONFIG_ACPI_IORT=y
|
||||
CONFIG_ACPI_MCFG=y
|
||||
# CONFIG_ACPI_PCI_SLOT is not set
|
||||
# CONFIG_ACPI_PFRUT is not set
|
||||
CONFIG_ACPI_PPTT=y
|
||||
CONFIG_ACPI_PRMT=y
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
CONFIG_ACPI_PROCESSOR_IDLE=y
|
||||
CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y
|
||||
CONFIG_ACPI_SPCR_TABLE=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
# CONFIG_ACPI_TINY_POWER_BUTTON is not set
|
||||
# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set
|
||||
CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_TAGGED_ADDR_ABI=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_SMMU_V3_PMU is not set
|
||||
CONFIG_ATA=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_BALLOON_COMPACTION=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ACPI=y
|
||||
CONFIG_DMA_DIRECT_REMAP=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
CONFIG_DMI_SYSFS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
CONFIG_EFI_ARMSTUB_DTB_LOADER=y
|
||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
# CONFIG_EFI_COCO_SECRET is not set
|
||||
# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
|
||||
# CONFIG_EFI_DISABLE_PCI_DMA is not set
|
||||
# CONFIG_EFI_DISABLE_RUNTIME is not set
|
||||
CONFIG_EFI_EARLYCON=y
|
||||
CONFIG_EFI_ESRT=y
|
||||
CONFIG_EFI_GENERIC_STUB=y
|
||||
# CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is not set
|
||||
CONFIG_EFI_PARAMS_FROM_FDT=y
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
CONFIG_EFI_STUB=y
|
||||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_EFI_ZBOOT is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FAILOVER=y
|
||||
CONFIG_FB_EFI=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_AUTOSELECT=y
|
||||
CONFIG_FONT_SUPPORT=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_ACPI=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
# CONFIG_GPIO_HISI is not set
|
||||
CONFIG_GPIO_PL061=y
|
||||
# CONFIG_GPIO_VF610 is not set
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HID=y
|
||||
CONFIG_HID_GENERIC=y
|
||||
CONFIG_HID_SUPPORT=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HOTPLUG_PCI_ACPI=y
|
||||
CONFIG_HVC_DRIVER=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
# CONFIG_I2C_AMD_MP2 is not set
|
||||
CONFIG_I2C_HID_ACPI=y
|
||||
# CONFIG_I2C_HISI is not set
|
||||
# CONFIG_I2C_SLAVE_TESTUNIT is not set
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_ISCSI_IBFT is not set
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY_BALLOON=y
|
||||
CONFIG_MIGRATION=y
|
||||
# CONFIG_MLXBF_GIGE is not set
|
||||
CONFIG_MMC_SDHCI_ACPI=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NET_9P=y
|
||||
# CONFIG_NET_9P_DEBUG is not set
|
||||
# CONFIG_NET_9P_FD is not set
|
||||
CONFIG_NET_9P_VIRTIO=y
|
||||
CONFIG_NET_FAILOVER=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NR_CPUS=256
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVME_CORE=y
|
||||
# CONFIG_NVME_MULTIPATH is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_REPORTING=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
# CONFIG_PCIE_HISI_ERR is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_ECAM=y
|
||||
CONFIG_PCI_HOST_COMMON=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_PCI_LABEL=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PGTABLE_LEVELS=3
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
# CONFIG_PMIC_OPREGION is not set
|
||||
CONFIG_PNP=y
|
||||
CONFIG_PNPACPI=y
|
||||
CONFIG_PNP_DEBUG_MESSAGES=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
# CONFIG_RESET_ATTACK_MITIGATION is not set
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_EFI=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_SATA_HOST=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_PNP=y
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_EARLYCON=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SRCU=y
|
||||
# CONFIG_SURFACE_PLATFORMS is not set
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYSFB=y
|
||||
# CONFIG_SYSFB_SIMPLEFB is not set
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_ACPI=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
# CONFIG_UACCE is not set
|
||||
CONFIG_UCS2_STRING=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_HID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB_PCI=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_PCI=y
|
||||
CONFIG_VIRTIO=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_PCI_LEGACY=y
|
||||
CONFIG_VIRTIO_PCI_LIB=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VT=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
# CONFIG_VT_HW_CONSOLE_BINDING is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
@ -92,6 +92,7 @@ define KernelPackage/fsl-enetc-net
|
||||
CONFIG_FSL_ENETC_QOS=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc.ko \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-core.ko@ge6.3 \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-vf.ko \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko \
|
||||
$(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-ierb.ko
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
From b77c0ecdc7915e5c5c515da1aa6cfaf6f4eb8351 Mon Sep 17 00:00:00 2001
|
||||
From: Mathew McBride <matt@traverse.com.au>
|
||||
Date: Wed, 28 Sep 2022 16:39:31 +1000
|
||||
Subject: [PATCH] arm: disable code size reduction measures
|
||||
(gc-sections,-f*-sections)
|
||||
|
||||
This interferes with the EFI boot stub on armv7l.
|
||||
|
||||
Signed-off-by: Mathew McBride <matt@traverse.com.au>
|
||||
---
|
||||
arch/arm/Kconfig | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -128,7 +128,6 @@ config ARM
|
||||
select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
|
||||
select IRQ_FORCED_THREADING
|
||||
select LOCK_MM_AND_FIND_VMA
|
||||
- select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
select MODULES_USE_ELF_REL
|
||||
select NEED_DMA_MAP_STATE
|
||||
select OF_EARLY_FLATTREE if OF
|
||||
@ -11,7 +11,7 @@ FEATURES:=squashfs pci rtc usb dt gpio display ext4 rootfs-part boot-part
|
||||
CPU_TYPE:=fa526
|
||||
SUBTARGETS:=generic
|
||||
|
||||
KERNEL_PATCHVER:=6.1
|
||||
KERNEL_PATCHVER:=6.6
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for the StorLink/Cortina Gemini CS351x ARM FA526 CPU
|
||||
|
||||
@ -10,10 +10,10 @@ CONFIG_ARCH_MULTI_V4=y
|
||||
# CONFIG_ARCH_MULTI_V4T is not set
|
||||
CONFIG_ARCH_MULTI_V4_V5=y
|
||||
# CONFIG_ARCH_MULTI_V5 is not set
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
@ -21,7 +21,6 @@ CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
@ -33,6 +32,8 @@ CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BUFFER_HEAD=y
|
||||
CONFIG_CACHESTAT_SYSCALL=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
@ -84,6 +85,7 @@ CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_CMAC=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
# CONFIG_CRYPTO_DEV_JH7110 is not set
|
||||
CONFIG_CRYPTO_DEV_SL3516=y
|
||||
# CONFIG_CRYPTO_DEV_SL3516_DEBUG is not set
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
@ -92,14 +94,18 @@ CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_ENGINE=y
|
||||
CONFIG_CRYPTO_GENIV=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
|
||||
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
|
||||
CONFIG_CRYPTO_MD4=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
@ -107,7 +113,10 @@ CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA3=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_USER=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
@ -133,7 +142,6 @@ CONFIG_DRM_FBDEV_EMULATION=y
|
||||
CONFIG_DRM_FBDEV_OVERALLOC=100
|
||||
CONFIG_DRM_GEM_DMA_HELPER=y
|
||||
CONFIG_DRM_KMS_HELPER=y
|
||||
CONFIG_DRM_NOMODESET=y
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_BRIDGE=y
|
||||
CONFIG_DRM_PANEL_ILITEK_IL9322=y
|
||||
@ -145,18 +153,17 @@ CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_93CX6=y
|
||||
CONFIG_ELF_CORE=y
|
||||
# CONFIG_EMBEDDED is not set
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
# CONFIG_EXPERT is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FARADAY_FTINTC010=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CFB_COPYAREA=y
|
||||
CONFIG_FB_CFB_FILLRECT=y
|
||||
CONFIG_FB_CFB_IMAGEBLIT=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
CONFIG_FB_CORE=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_DMAMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
|
||||
CONFIG_FB_SYS_COPYAREA=y
|
||||
CONFIG_FB_SYS_FILLRECT=y
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
@ -175,11 +182,13 @@ CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FTTMR010_TIMER=y
|
||||
CONFIG_FTWDT010_WATCHDOG=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
|
||||
CONFIG_GEMINI_ETHERNET=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
@ -207,6 +216,7 @@ CONFIG_GRO_CELLS=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HIGHMEM=y
|
||||
@ -224,10 +234,6 @@ CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_KEYBOARD=y
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_IPC_NS=y
|
||||
CONFIG_IRQCHIP=y
|
||||
@ -263,10 +269,10 @@ CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MODULE_UNLOAD is not set
|
||||
CONFIG_MQ_IOSCHED_DEADLINE=y
|
||||
@ -282,6 +288,7 @@ CONFIG_NAMESPACES=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_KUSER_HELPERS=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_REALTEK=y
|
||||
@ -290,13 +297,17 @@ CONFIG_NET_DSA_REALTEK=y
|
||||
CONFIG_NET_DSA_REALTEK_RTL8366RB=y
|
||||
CONFIG_NET_DSA_REALTEK_SMI=y
|
||||
CONFIG_NET_DSA_TAG_RTL4_A=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
@ -311,6 +322,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||
# CONFIG_PANIC_ON_OOPS is not set
|
||||
CONFIG_PANIC_ON_OOPS_VALUE=0
|
||||
CONFIG_PANIC_TIMEOUT=0
|
||||
@ -327,6 +339,7 @@ CONFIG_PCI_FTPCI100=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PID_NS=y
|
||||
CONFIG_PINCTRL=y
|
||||
@ -382,12 +395,14 @@ CONFIG_SERIAL_8250_EXAR=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_PCI=y
|
||||
CONFIG_SERIAL_8250_PCILIB=y
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
@ -397,7 +412,7 @@ CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=999999
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_STACKDEPOT=y
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
@ -432,6 +447,8 @@ CONFIG_USE_OF=y
|
||||
CONFIG_UTS_NS=y
|
||||
CONFIG_VGA_ARB=y
|
||||
CONFIG_VGA_ARB_MAX_GPUS=16
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
CONFIG_VITESSE_PHY=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_VT=y
|
||||
@ -124,6 +124,7 @@ endef
|
||||
# All DTB files are prefixed with "gemini-"
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
DEVICE_DTS_DIR = $$(DTS_DIR)/gemini
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | append-dtb
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
From d5a026cc8306ccd3e99e1455c87e38f8e6fa18df Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 7 Nov 2022 00:05:06 +0100
|
||||
Subject: [PATCH 01/29] usb: phy: phy-gpio-vbus-usb: Add device tree probing
|
||||
|
||||
Make it possible to probe the GPIO VBUS detection driver
|
||||
from the device tree compatible for GPIO USB B connectors.
|
||||
|
||||
Since this driver is using the "gpio-usb-b-connector"
|
||||
compatible, it is important to discern it from the role
|
||||
switch connector driver (which does not provide a phy),
|
||||
so we add some Kconfig text and depend on !USB_CONN_GPIO.
|
||||
|
||||
Cc: Rob Herring <robh@kernel.org>
|
||||
Cc: Prashant Malani <pmalani@chromium.org>
|
||||
Cc: Felipe Balbi <balbi@kernel.org>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221106230506.1646101-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/phy/Kconfig
|
||||
+++ b/drivers/usb/phy/Kconfig
|
||||
@@ -93,12 +93,16 @@ config USB_GPIO_VBUS
|
||||
tristate "GPIO based peripheral-only VBUS sensing 'transceiver'"
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
|
||||
+ depends on !USB_CONN_GPIO
|
||||
select USB_PHY
|
||||
help
|
||||
Provides simple GPIO VBUS sensing for controllers with an
|
||||
internal transceiver via the usb_phy interface, and
|
||||
optionally control of a D+ pullup GPIO as well as a VBUS
|
||||
- current limit regulator.
|
||||
+ current limit regulator. This driver is for devices that do
|
||||
+ NOT support role switch. OTG devices that can do role switch
|
||||
+ (master/peripheral) shall use the USB based connection
|
||||
+ detection driver USB_CONN_GPIO.
|
||||
|
||||
config OMAP_OTG
|
||||
tristate "OMAP USB OTG controller driver"
|
||||
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
|
||||
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
|
||||
@@ -366,12 +366,24 @@ static const struct dev_pm_ops gpio_vbus
|
||||
|
||||
MODULE_ALIAS("platform:gpio-vbus");
|
||||
|
||||
+/*
|
||||
+ * NOTE: this driver matches against "gpio-usb-b-connector" for
|
||||
+ * devices that do NOT support role switch.
|
||||
+ */
|
||||
+static const struct of_device_id gpio_vbus_of_match[] = {
|
||||
+ {
|
||||
+ .compatible = "gpio-usb-b-connector",
|
||||
+ },
|
||||
+ {},
|
||||
+};
|
||||
+
|
||||
static struct platform_driver gpio_vbus_driver = {
|
||||
.driver = {
|
||||
.name = "gpio-vbus",
|
||||
#ifdef CONFIG_PM
|
||||
.pm = &gpio_vbus_dev_pm_ops,
|
||||
#endif
|
||||
+ .of_match_table = gpio_vbus_of_match,
|
||||
},
|
||||
.probe = gpio_vbus_probe,
|
||||
.remove = gpio_vbus_remove,
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,332 +0,0 @@
|
||||
From 0dbc77a99267a5efef0603a4b49ac02ece6a3f23 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 23 Oct 2022 16:47:07 +0200
|
||||
Subject: [PATCH 03/29] usb: fotg210: Compile into one module
|
||||
|
||||
It is since ages perfectly possible to compile both of these
|
||||
modules into the same kernel, which makes no sense since it
|
||||
is one piece of hardware.
|
||||
|
||||
Compile one module named "fotg210.ko" for both HCD and UDC
|
||||
drivers by collecting the init calls into a fotg210-core.c
|
||||
file and start to centralize things handling one and the same
|
||||
piece of hardware.
|
||||
|
||||
Stub out the initcalls if one or the other part of the driver
|
||||
was not selected.
|
||||
|
||||
Tested by compiling one or the other or both of the drivers
|
||||
into the kernel and as modules.
|
||||
|
||||
Cc: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com>
|
||||
Cc: Felipe Balbi <balbi@kernel.org>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221023144708.3596563-2-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/Kconfig
|
||||
+++ b/drivers/usb/fotg210/Kconfig
|
||||
@@ -12,7 +12,7 @@ config USB_FOTG210
|
||||
if USB_FOTG210
|
||||
|
||||
config USB_FOTG210_HCD
|
||||
- tristate "Faraday FOTG210 USB Host Controller support"
|
||||
+ bool "Faraday FOTG210 USB Host Controller support"
|
||||
depends on USB
|
||||
help
|
||||
Faraday FOTG210 is an OTG controller which can be configured as
|
||||
@@ -24,7 +24,7 @@ config USB_FOTG210_HCD
|
||||
|
||||
config USB_FOTG210_UDC
|
||||
depends on USB_GADGET
|
||||
- tristate "Faraday FOTG210 USB Peripheral Controller support"
|
||||
+ bool "Faraday FOTG210 USB Peripheral Controller support"
|
||||
help
|
||||
Faraday USB2.0 OTG controller which can be configured as
|
||||
high speed or full speed USB device. This driver suppports
|
||||
--- a/drivers/usb/fotg210/Makefile
|
||||
+++ b/drivers/usb/fotg210/Makefile
|
||||
@@ -1,3 +1,10 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
-obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o
|
||||
-obj-$(CONFIG_USB_FOTG210_UDC) += fotg210-udc.o
|
||||
+
|
||||
+# This setup links the different object files into one single
|
||||
+# module so we don't have to EXPORT() a lot of internal symbols
|
||||
+# or create unnecessary submodules.
|
||||
+fotg210-objs-y += fotg210-core.o
|
||||
+fotg210-objs-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o
|
||||
+fotg210-objs-$(CONFIG_USB_FOTG210_UDC) += fotg210-udc.o
|
||||
+fotg210-objs := $(fotg210-objs-y)
|
||||
+obj-$(CONFIG_USB_FOTG210) += fotg210.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -0,0 +1,79 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Central probing code for the FOTG210 dual role driver
|
||||
+ * We register one driver for the hardware and then we decide
|
||||
+ * whether to proceed with probing the host or the peripheral
|
||||
+ * driver.
|
||||
+ */
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/usb.h>
|
||||
+
|
||||
+#include "fotg210.h"
|
||||
+
|
||||
+static int fotg210_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD)) {
|
||||
+ ret = fotg210_hcd_probe(pdev);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_UDC))
|
||||
+ ret = fotg210_udc_probe(pdev);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int fotg210_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
|
||||
+ fotg210_hcd_remove(pdev);
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_UDC))
|
||||
+ fotg210_udc_remove(pdev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_OF
|
||||
+static const struct of_device_id fotg210_of_match[] = {
|
||||
+ { .compatible = "faraday,fotg210" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, fotg210_of_match);
|
||||
+#endif
|
||||
+
|
||||
+static struct platform_driver fotg210_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "fotg210",
|
||||
+ .of_match_table = of_match_ptr(fotg210_of_match),
|
||||
+ },
|
||||
+ .probe = fotg210_probe,
|
||||
+ .remove = fotg210_remove,
|
||||
+};
|
||||
+
|
||||
+static int __init fotg210_init(void)
|
||||
+{
|
||||
+ if (usb_disabled())
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
|
||||
+ fotg210_hcd_init();
|
||||
+ return platform_driver_register(&fotg210_driver);
|
||||
+}
|
||||
+module_init(fotg210_init);
|
||||
+
|
||||
+static void __exit fotg210_cleanup(void)
|
||||
+{
|
||||
+ platform_driver_unregister(&fotg210_driver);
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
|
||||
+ fotg210_hcd_cleanup();
|
||||
+}
|
||||
+module_exit(fotg210_cleanup);
|
||||
+
|
||||
+MODULE_AUTHOR("Yuan-Hsin Chen, Feng-Hsin Chiang");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_DESCRIPTION("FOTG210 Dual Role Controller Driver");
|
||||
--- a/drivers/usb/fotg210/fotg210-hcd.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-hcd.c
|
||||
@@ -39,8 +39,8 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
-#define DRIVER_AUTHOR "Yuan-Hsin Chen"
|
||||
-#define DRIVER_DESC "FOTG210 Host Controller (EHCI) Driver"
|
||||
+#include "fotg210.h"
|
||||
+
|
||||
static const char hcd_name[] = "fotg210_hcd";
|
||||
|
||||
#undef FOTG210_URB_TRACE
|
||||
@@ -5490,9 +5490,6 @@ static int fotg210_get_frame(struct usb_
|
||||
* functions and in order to facilitate role switching we cannot
|
||||
* give the fotg210 driver exclusive access to those.
|
||||
*/
|
||||
-MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
-MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
-MODULE_LICENSE("GPL");
|
||||
|
||||
static const struct hc_driver fotg210_fotg210_hc_driver = {
|
||||
.description = hcd_name,
|
||||
@@ -5560,7 +5557,7 @@ static void fotg210_init(struct fotg210_
|
||||
* then invokes the start() method for the HCD associated with it
|
||||
* through the hotplug entry's driver_data.
|
||||
*/
|
||||
-static int fotg210_hcd_probe(struct platform_device *pdev)
|
||||
+int fotg210_hcd_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct usb_hcd *hcd;
|
||||
@@ -5652,7 +5649,7 @@ fail_create_hcd:
|
||||
* @dev: USB Host Controller being removed
|
||||
*
|
||||
*/
|
||||
-static int fotg210_hcd_remove(struct platform_device *pdev)
|
||||
+int fotg210_hcd_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct usb_hcd *hcd = platform_get_drvdata(pdev);
|
||||
struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd);
|
||||
@@ -5668,27 +5665,8 @@ static int fotg210_hcd_remove(struct pla
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_OF
|
||||
-static const struct of_device_id fotg210_of_match[] = {
|
||||
- { .compatible = "faraday,fotg210" },
|
||||
- {},
|
||||
-};
|
||||
-MODULE_DEVICE_TABLE(of, fotg210_of_match);
|
||||
-#endif
|
||||
-
|
||||
-static struct platform_driver fotg210_hcd_driver = {
|
||||
- .driver = {
|
||||
- .name = "fotg210-hcd",
|
||||
- .of_match_table = of_match_ptr(fotg210_of_match),
|
||||
- },
|
||||
- .probe = fotg210_hcd_probe,
|
||||
- .remove = fotg210_hcd_remove,
|
||||
-};
|
||||
-
|
||||
-static int __init fotg210_hcd_init(void)
|
||||
+int __init fotg210_hcd_init(void)
|
||||
{
|
||||
- int retval = 0;
|
||||
-
|
||||
if (usb_disabled())
|
||||
return -ENODEV;
|
||||
|
||||
@@ -5704,24 +5682,11 @@ static int __init fotg210_hcd_init(void)
|
||||
|
||||
fotg210_debug_root = debugfs_create_dir("fotg210", usb_debug_root);
|
||||
|
||||
- retval = platform_driver_register(&fotg210_hcd_driver);
|
||||
- if (retval < 0)
|
||||
- goto clean;
|
||||
- return retval;
|
||||
-
|
||||
-clean:
|
||||
- debugfs_remove(fotg210_debug_root);
|
||||
- fotg210_debug_root = NULL;
|
||||
-
|
||||
- clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
|
||||
- return retval;
|
||||
+ return 0;
|
||||
}
|
||||
-module_init(fotg210_hcd_init);
|
||||
|
||||
-static void __exit fotg210_hcd_cleanup(void)
|
||||
+void __exit fotg210_hcd_cleanup(void)
|
||||
{
|
||||
- platform_driver_unregister(&fotg210_hcd_driver);
|
||||
debugfs_remove(fotg210_debug_root);
|
||||
clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
|
||||
}
|
||||
-module_exit(fotg210_hcd_cleanup);
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
|
||||
+#include "fotg210.h"
|
||||
#include "fotg210-udc.h"
|
||||
|
||||
#define DRIVER_DESC "FOTG210 USB Device Controller Driver"
|
||||
@@ -1081,7 +1082,7 @@ static const struct usb_gadget_ops fotg2
|
||||
.udc_stop = fotg210_udc_stop,
|
||||
};
|
||||
|
||||
-static int fotg210_udc_remove(struct platform_device *pdev)
|
||||
+int fotg210_udc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct fotg210_udc *fotg210 = platform_get_drvdata(pdev);
|
||||
int i;
|
||||
@@ -1098,7 +1099,7 @@ static int fotg210_udc_remove(struct pla
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int fotg210_udc_probe(struct platform_device *pdev)
|
||||
+int fotg210_udc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res, *ires;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
@@ -1223,17 +1224,3 @@ err_alloc:
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
-
|
||||
-static struct platform_driver fotg210_driver = {
|
||||
- .driver = {
|
||||
- .name = udc_name,
|
||||
- },
|
||||
- .probe = fotg210_udc_probe,
|
||||
- .remove = fotg210_udc_remove,
|
||||
-};
|
||||
-
|
||||
-module_platform_driver(fotg210_driver);
|
||||
-
|
||||
-MODULE_AUTHOR("Yuan-Hsin Chen, Feng-Hsin Chiang <john453@faraday-tech.com>");
|
||||
-MODULE_LICENSE("GPL");
|
||||
-MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/fotg210/fotg210.h
|
||||
@@ -0,0 +1,42 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+#ifndef __FOTG210_H
|
||||
+#define __FOTG210_H
|
||||
+
|
||||
+#ifdef CONFIG_USB_FOTG210_HCD
|
||||
+int fotg210_hcd_probe(struct platform_device *pdev);
|
||||
+int fotg210_hcd_remove(struct platform_device *pdev);
|
||||
+int fotg210_hcd_init(void);
|
||||
+void fotg210_hcd_cleanup(void);
|
||||
+#else
|
||||
+static inline int fotg210_hcd_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static inline int fotg210_hcd_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static inline int fotg210_hcd_init(void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static inline void fotg210_hcd_cleanup(void)
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_USB_FOTG210_UDC
|
||||
+int fotg210_udc_probe(struct platform_device *pdev);
|
||||
+int fotg210_udc_remove(struct platform_device *pdev);
|
||||
+#else
|
||||
+static inline int fotg210_udc_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+static inline int fotg210_udc_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* __FOTG210_H */
|
||||
@ -1,68 +0,0 @@
|
||||
From 7c0b661926097e935f2711857596fc2277b2304a Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 23 Oct 2022 16:47:08 +0200
|
||||
Subject: [PATCH 04/29] usb: fotg210: Select subdriver by mode
|
||||
|
||||
Check which mode the hardware is in, and selecte the peripheral
|
||||
driver if the hardware is in explicit peripheral mode, otherwise
|
||||
select host mode.
|
||||
|
||||
This should solve the immediate problem that both subdrivers
|
||||
can get probed.
|
||||
|
||||
Cc: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com>
|
||||
Cc: Felipe Balbi <balbi@kernel.org>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221023144708.3596563-3-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -10,30 +10,37 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb.h>
|
||||
+#include <linux/usb/otg.h>
|
||||
|
||||
#include "fotg210.h"
|
||||
|
||||
static int fotg210_probe(struct platform_device *pdev)
|
||||
{
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ enum usb_dr_mode mode;
|
||||
int ret;
|
||||
|
||||
- if (IS_ENABLED(CONFIG_USB_FOTG210_HCD)) {
|
||||
- ret = fotg210_hcd_probe(pdev);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
- }
|
||||
- if (IS_ENABLED(CONFIG_USB_FOTG210_UDC))
|
||||
+ mode = usb_get_dr_mode(dev);
|
||||
+
|
||||
+ if (mode == USB_DR_MODE_PERIPHERAL)
|
||||
ret = fotg210_udc_probe(pdev);
|
||||
+ else
|
||||
+ ret = fotg210_hcd_probe(pdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fotg210_remove(struct platform_device *pdev)
|
||||
{
|
||||
- if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
|
||||
- fotg210_hcd_remove(pdev);
|
||||
- if (IS_ENABLED(CONFIG_USB_FOTG210_UDC))
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ enum usb_dr_mode mode;
|
||||
+
|
||||
+ mode = usb_get_dr_mode(dev);
|
||||
+
|
||||
+ if (mode == USB_DR_MODE_PERIPHERAL)
|
||||
fotg210_udc_remove(pdev);
|
||||
+ else
|
||||
+ fotg210_hcd_remove(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,135 +0,0 @@
|
||||
From f7f6c8aca91093e2f886ec97910b1a7d9a69bf9b Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 9 Nov 2022 21:05:54 +0100
|
||||
Subject: [PATCH 05/29] usb: fotg2: add Gemini-specific handling
|
||||
|
||||
The Cortina Systems Gemini has bolted on a PHY inside the
|
||||
silicon that can be handled by six bits in a MISC register in
|
||||
the system controller.
|
||||
|
||||
If we are running on Gemini, look up a syscon regmap through
|
||||
a phandle and enable VBUS and optionally the Mini-B connector.
|
||||
|
||||
If the device is flagged as "wakeup-source" using the standard
|
||||
DT bindings, we also enable this in the global controller for
|
||||
respective port.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221109200554.1957185-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/Kconfig
|
||||
+++ b/drivers/usb/fotg210/Kconfig
|
||||
@@ -5,6 +5,7 @@ config USB_FOTG210
|
||||
depends on USB || USB_GADGET
|
||||
depends on HAS_DMA && HAS_IOMEM
|
||||
default ARCH_GEMINI
|
||||
+ select MFD_SYSCON
|
||||
help
|
||||
Faraday FOTG210 is a dual-mode USB controller that can act
|
||||
in both host controller and peripheral controller mode.
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -5,15 +5,86 @@
|
||||
* whether to proceed with probing the host or the peripheral
|
||||
* driver.
|
||||
*/
|
||||
+#include <linux/bitops.h>
|
||||
#include <linux/device.h>
|
||||
+#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/regmap.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/otg.h>
|
||||
|
||||
#include "fotg210.h"
|
||||
|
||||
+/*
|
||||
+ * Gemini-specific initialization function, only executed on the
|
||||
+ * Gemini SoC using the global misc control register.
|
||||
+ *
|
||||
+ * The gemini USB blocks are connected to either Mini-A (host mode) or
|
||||
+ * Mini-B (peripheral mode) plugs. There is no role switch support on the
|
||||
+ * Gemini SoC, just either-or.
|
||||
+ */
|
||||
+#define GEMINI_GLOBAL_MISC_CTRL 0x30
|
||||
+#define GEMINI_MISC_USB0_WAKEUP BIT(14)
|
||||
+#define GEMINI_MISC_USB1_WAKEUP BIT(15)
|
||||
+#define GEMINI_MISC_USB0_VBUS_ON BIT(22)
|
||||
+#define GEMINI_MISC_USB1_VBUS_ON BIT(23)
|
||||
+#define GEMINI_MISC_USB0_MINI_B BIT(29)
|
||||
+#define GEMINI_MISC_USB1_MINI_B BIT(30)
|
||||
+
|
||||
+static int fotg210_gemini_init(struct device *dev, struct resource *res,
|
||||
+ enum usb_dr_mode mode)
|
||||
+{
|
||||
+ struct device_node *np = dev->of_node;
|
||||
+ struct regmap *map;
|
||||
+ bool wakeup;
|
||||
+ u32 mask, val;
|
||||
+ int ret;
|
||||
+
|
||||
+ map = syscon_regmap_lookup_by_phandle(np, "syscon");
|
||||
+ if (IS_ERR(map)) {
|
||||
+ dev_err(dev, "no syscon\n");
|
||||
+ return PTR_ERR(map);
|
||||
+ }
|
||||
+ wakeup = of_property_read_bool(np, "wakeup-source");
|
||||
+
|
||||
+ /*
|
||||
+ * Figure out if this is USB0 or USB1 by simply checking the
|
||||
+ * physical base address.
|
||||
+ */
|
||||
+ mask = 0;
|
||||
+ if (res->start == 0x69000000) {
|
||||
+ mask = GEMINI_MISC_USB1_VBUS_ON | GEMINI_MISC_USB1_MINI_B |
|
||||
+ GEMINI_MISC_USB1_WAKEUP;
|
||||
+ if (mode == USB_DR_MODE_HOST)
|
||||
+ val = GEMINI_MISC_USB1_VBUS_ON;
|
||||
+ else
|
||||
+ val = GEMINI_MISC_USB1_MINI_B;
|
||||
+ if (wakeup)
|
||||
+ val |= GEMINI_MISC_USB1_WAKEUP;
|
||||
+ } else {
|
||||
+ mask = GEMINI_MISC_USB0_VBUS_ON | GEMINI_MISC_USB0_MINI_B |
|
||||
+ GEMINI_MISC_USB0_WAKEUP;
|
||||
+ if (mode == USB_DR_MODE_HOST)
|
||||
+ val = GEMINI_MISC_USB0_VBUS_ON;
|
||||
+ else
|
||||
+ val = GEMINI_MISC_USB0_MINI_B;
|
||||
+ if (wakeup)
|
||||
+ val |= GEMINI_MISC_USB0_WAKEUP;
|
||||
+ }
|
||||
+
|
||||
+ ret = regmap_update_bits(map, GEMINI_GLOBAL_MISC_CTRL, mask, val);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "failed to initialize Gemini PHY\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ dev_info(dev, "initialized Gemini PHY in %s mode\n",
|
||||
+ (mode == USB_DR_MODE_HOST) ? "host" : "gadget");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int fotg210_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -22,6 +93,15 @@ static int fotg210_probe(struct platform
|
||||
|
||||
mode = usb_get_dr_mode(dev);
|
||||
|
||||
+ if (of_device_is_compatible(dev->of_node, "cortina,gemini-usb")) {
|
||||
+ struct resource *res;
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ ret = fotg210_gemini_init(dev, res, mode);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
if (mode == USB_DR_MODE_PERIPHERAL)
|
||||
ret = fotg210_udc_probe(pdev);
|
||||
else
|
||||
@ -1,51 +0,0 @@
|
||||
From 6e002d41889bc52213a26ff91338d340505e0336 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Fri, 11 Nov 2022 15:48:21 +0100
|
||||
Subject: [PATCH 06/29] usb: fotg210: Fix Kconfig for USB host modules
|
||||
|
||||
The kernel robot reports a link failure when activating the
|
||||
FOTG210 host subdriver with =y on a system where the USB host
|
||||
core is a module (CONFIG_USB=m).
|
||||
|
||||
This is a bit of special case, so mimic the Kconfig incantations
|
||||
from DWC3: let the subdrivers for host or peripheral depend
|
||||
on the host or gadget support being =y or the same as the
|
||||
FOTG210 core itself.
|
||||
|
||||
This should ensure that either:
|
||||
|
||||
- The host (CONFIG_USB) or gadget (CONFIG_GADGET) is compiled
|
||||
in and then the FOTG210 can be either module or compiled
|
||||
in.
|
||||
|
||||
- The host or gadget is modular, and then the FOTG210 module
|
||||
must be a module too, or we cannot resolve the symbols
|
||||
at link time.
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Link: https://lore.kernel.org/linux-usb/202211112132.0BUPGKCd-lkp@intel.com/
|
||||
Cc: Arnd Bergmann <arnd@arndb.de>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221111144821.113665-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/Kconfig
|
||||
+++ b/drivers/usb/fotg210/Kconfig
|
||||
@@ -14,7 +14,7 @@ if USB_FOTG210
|
||||
|
||||
config USB_FOTG210_HCD
|
||||
bool "Faraday FOTG210 USB Host Controller support"
|
||||
- depends on USB
|
||||
+ depends on USB=y || USB=USB_FOTG210
|
||||
help
|
||||
Faraday FOTG210 is an OTG controller which can be configured as
|
||||
an USB2.0 host. It is designed to meet USB2.0 EHCI specification
|
||||
@@ -24,7 +24,7 @@ config USB_FOTG210_HCD
|
||||
module will be called fotg210-hcd.
|
||||
|
||||
config USB_FOTG210_UDC
|
||||
- depends on USB_GADGET
|
||||
+ depends on USB_GADGET=y || USB_GADGET=USB_FOTG210
|
||||
bool "Faraday FOTG210 USB Peripheral Controller support"
|
||||
help
|
||||
Faraday USB2.0 OTG controller which can be configured as
|
||||
@ -1,26 +0,0 @@
|
||||
From 466b10510add46afd21ca19505b29d35ad853370 Mon Sep 17 00:00:00 2001
|
||||
From: Geert Uytterhoeven <geert+renesas@glider.be>
|
||||
Date: Mon, 21 Nov 2022 16:22:19 +0100
|
||||
Subject: [PATCH 07/29] usb: USB_FOTG210 should depend on ARCH_GEMINI
|
||||
|
||||
The Faraday Technology FOTG210 USB2 Dual Role Controller is only present
|
||||
on Cortina Systems Gemini SoCs. Hence add a dependency on ARCH_GEMINI,
|
||||
to prevent asking the user about its drivers when configuring a kernel
|
||||
without Cortina Systems Gemini SoC support.
|
||||
|
||||
Fixes: 1dd33a9f1b95ab59 ("usb: fotg210: Collect pieces of dual mode controller")
|
||||
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/a989b3b798ecaf3b45f35160e30e605636d66a77.1669044086.git.geert+renesas@glider.be
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/Kconfig
|
||||
+++ b/drivers/usb/fotg210/Kconfig
|
||||
@@ -4,6 +4,7 @@ config USB_FOTG210
|
||||
tristate "Faraday FOTG210 USB2 Dual Role controller"
|
||||
depends on USB || USB_GADGET
|
||||
depends on HAS_DMA && HAS_IOMEM
|
||||
+ depends on ARCH_GEMINI || COMPILE_TEST
|
||||
default ARCH_GEMINI
|
||||
select MFD_SYSCON
|
||||
help
|
||||
@ -1,61 +0,0 @@
|
||||
From 27cd321a365fecac857e41ad1681062994142e4a Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 14 Nov 2022 12:51:58 +0100
|
||||
Subject: [PATCH 08/29] fotg210-udc: Use dev pointer in probe and dev_messages
|
||||
|
||||
Add a local struct device *dev pointer and use dev_err()
|
||||
etc to report status.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221114115201.302887-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1104,6 +1104,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
struct resource *res, *ires;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
struct fotg210_ep *_ep[FOTG210_MAX_NUM_EP];
|
||||
+ struct device *dev = &pdev->dev;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
@@ -1135,7 +1136,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
|
||||
fotg210->reg = ioremap(res->start, resource_size(res));
|
||||
if (fotg210->reg == NULL) {
|
||||
- pr_err("ioremap error.\n");
|
||||
+ dev_err(dev, "ioremap error\n");
|
||||
goto err_alloc;
|
||||
}
|
||||
|
||||
@@ -1146,8 +1147,8 @@ int fotg210_udc_probe(struct platform_de
|
||||
fotg210->gadget.ops = &fotg210_gadget_ops;
|
||||
|
||||
fotg210->gadget.max_speed = USB_SPEED_HIGH;
|
||||
- fotg210->gadget.dev.parent = &pdev->dev;
|
||||
- fotg210->gadget.dev.dma_mask = pdev->dev.dma_mask;
|
||||
+ fotg210->gadget.dev.parent = dev;
|
||||
+ fotg210->gadget.dev.dma_mask = dev->dma_mask;
|
||||
fotg210->gadget.name = udc_name;
|
||||
|
||||
INIT_LIST_HEAD(&fotg210->gadget.ep_list);
|
||||
@@ -1195,15 +1196,15 @@ int fotg210_udc_probe(struct platform_de
|
||||
ret = request_irq(ires->start, fotg210_irq, IRQF_SHARED,
|
||||
udc_name, fotg210);
|
||||
if (ret < 0) {
|
||||
- pr_err("request_irq error (%d)\n", ret);
|
||||
+ dev_err(dev, "request_irq error (%d)\n", ret);
|
||||
goto err_req;
|
||||
}
|
||||
|
||||
- ret = usb_add_gadget_udc(&pdev->dev, &fotg210->gadget);
|
||||
+ ret = usb_add_gadget_udc(dev, &fotg210->gadget);
|
||||
if (ret)
|
||||
goto err_add_udc;
|
||||
|
||||
- dev_info(&pdev->dev, "version %s\n", DRIVER_VERSION);
|
||||
+ dev_info(dev, "version %s\n", DRIVER_VERSION);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -1,158 +0,0 @@
|
||||
From 03e4b585ac947e2d422bedf03179bbfec3aca3cf Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 14 Nov 2022 12:51:59 +0100
|
||||
Subject: [PATCH 09/29] fotg210-udc: Support optional external PHY
|
||||
|
||||
This adds support for an optional external PHY to the FOTG210
|
||||
UDC driver.
|
||||
|
||||
Tested with the GPIO VBUS PHY driver on the Gemini SoC.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221114115201.302887-2-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
+#include <linux/usb/otg.h>
|
||||
+#include <linux/usb/phy.h>
|
||||
|
||||
#include "fotg210.h"
|
||||
#include "fotg210-udc.h"
|
||||
@@ -1022,10 +1024,18 @@ static int fotg210_udc_start(struct usb_
|
||||
{
|
||||
struct fotg210_udc *fotg210 = gadget_to_fotg210(g);
|
||||
u32 value;
|
||||
+ int ret;
|
||||
|
||||
/* hook up the driver */
|
||||
fotg210->driver = driver;
|
||||
|
||||
+ if (!IS_ERR_OR_NULL(fotg210->phy)) {
|
||||
+ ret = otg_set_peripheral(fotg210->phy->otg,
|
||||
+ &fotg210->gadget);
|
||||
+ if (ret)
|
||||
+ dev_err(fotg210->dev, "can't bind to phy\n");
|
||||
+ }
|
||||
+
|
||||
/* enable device global interrupt */
|
||||
value = ioread32(fotg210->reg + FOTG210_DMCR);
|
||||
value |= DMCR_GLINT_EN;
|
||||
@@ -1067,6 +1077,9 @@ static int fotg210_udc_stop(struct usb_g
|
||||
struct fotg210_udc *fotg210 = gadget_to_fotg210(g);
|
||||
unsigned long flags;
|
||||
|
||||
+ if (!IS_ERR_OR_NULL(fotg210->phy))
|
||||
+ return otg_set_peripheral(fotg210->phy->otg, NULL);
|
||||
+
|
||||
spin_lock_irqsave(&fotg210->lock, flags);
|
||||
|
||||
fotg210_init(fotg210);
|
||||
@@ -1082,12 +1095,50 @@ static const struct usb_gadget_ops fotg2
|
||||
.udc_stop = fotg210_udc_stop,
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * fotg210_phy_event - Called by phy upon VBus event
|
||||
+ * @nb: notifier block
|
||||
+ * @action: phy action, is vbus connect or disconnect
|
||||
+ * @data: the usb_gadget structure in fotg210
|
||||
+ *
|
||||
+ * Called by the USB Phy when a cable connect or disconnect is sensed.
|
||||
+ *
|
||||
+ * Returns NOTIFY_OK or NOTIFY_DONE
|
||||
+ */
|
||||
+static int fotg210_phy_event(struct notifier_block *nb, unsigned long action,
|
||||
+ void *data)
|
||||
+{
|
||||
+ struct usb_gadget *gadget = data;
|
||||
+
|
||||
+ if (!gadget)
|
||||
+ return NOTIFY_DONE;
|
||||
+
|
||||
+ switch (action) {
|
||||
+ case USB_EVENT_VBUS:
|
||||
+ usb_gadget_vbus_connect(gadget);
|
||||
+ return NOTIFY_OK;
|
||||
+ case USB_EVENT_NONE:
|
||||
+ usb_gadget_vbus_disconnect(gadget);
|
||||
+ return NOTIFY_OK;
|
||||
+ default:
|
||||
+ return NOTIFY_DONE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block fotg210_phy_notifier = {
|
||||
+ .notifier_call = fotg210_phy_event,
|
||||
+};
|
||||
+
|
||||
int fotg210_udc_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct fotg210_udc *fotg210 = platform_get_drvdata(pdev);
|
||||
int i;
|
||||
|
||||
usb_del_gadget_udc(&fotg210->gadget);
|
||||
+ if (!IS_ERR_OR_NULL(fotg210->phy)) {
|
||||
+ usb_unregister_notifier(fotg210->phy, &fotg210_phy_notifier);
|
||||
+ usb_put_phy(fotg210->phy);
|
||||
+ }
|
||||
iounmap(fotg210->reg);
|
||||
free_irq(platform_get_irq(pdev, 0), fotg210);
|
||||
|
||||
@@ -1127,6 +1178,22 @@ int fotg210_udc_probe(struct platform_de
|
||||
if (fotg210 == NULL)
|
||||
goto err;
|
||||
|
||||
+ fotg210->dev = dev;
|
||||
+
|
||||
+ fotg210->phy = devm_usb_get_phy_by_phandle(dev->parent, "usb-phy", 0);
|
||||
+ if (IS_ERR(fotg210->phy)) {
|
||||
+ ret = PTR_ERR(fotg210->phy);
|
||||
+ if (ret == -EPROBE_DEFER)
|
||||
+ goto err;
|
||||
+ dev_info(dev, "no PHY found\n");
|
||||
+ fotg210->phy = NULL;
|
||||
+ } else {
|
||||
+ ret = usb_phy_init(fotg210->phy);
|
||||
+ if (ret)
|
||||
+ goto err;
|
||||
+ dev_info(dev, "found and initialized PHY\n");
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
|
||||
_ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
|
||||
if (_ep[i] == NULL)
|
||||
@@ -1200,6 +1267,9 @@ int fotg210_udc_probe(struct platform_de
|
||||
goto err_req;
|
||||
}
|
||||
|
||||
+ if (!IS_ERR_OR_NULL(fotg210->phy))
|
||||
+ usb_register_notifier(fotg210->phy, &fotg210_phy_notifier);
|
||||
+
|
||||
ret = usb_add_gadget_udc(dev, &fotg210->gadget);
|
||||
if (ret)
|
||||
goto err_add_udc;
|
||||
@@ -1209,6 +1279,8 @@ int fotg210_udc_probe(struct platform_de
|
||||
return 0;
|
||||
|
||||
err_add_udc:
|
||||
+ if (!IS_ERR_OR_NULL(fotg210->phy))
|
||||
+ usb_unregister_notifier(fotg210->phy, &fotg210_phy_notifier);
|
||||
free_irq(ires->start, fotg210);
|
||||
|
||||
err_req:
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.h
|
||||
@@ -234,6 +234,8 @@ struct fotg210_udc {
|
||||
|
||||
unsigned long irq_trigger;
|
||||
|
||||
+ struct device *dev;
|
||||
+ struct usb_phy *phy;
|
||||
struct usb_gadget gadget;
|
||||
struct usb_gadget_driver *driver;
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
From 772ea3ec2b9363b45ef9a4768ea205f758c3debc Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 14 Nov 2022 12:52:00 +0100
|
||||
Subject: [PATCH 10/29] fotg210-udc: Handle PCLK
|
||||
|
||||
This adds optional handling of the peripheral clock PCLK.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221114115201.302887-3-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/phy.h>
|
||||
|
||||
@@ -1145,6 +1146,10 @@ int fotg210_udc_remove(struct platform_d
|
||||
fotg210_ep_free_request(&fotg210->ep[0]->ep, fotg210->ep0_req);
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++)
|
||||
kfree(fotg210->ep[i]);
|
||||
+
|
||||
+ if (!IS_ERR(fotg210->pclk))
|
||||
+ clk_disable_unprepare(fotg210->pclk);
|
||||
+
|
||||
kfree(fotg210);
|
||||
|
||||
return 0;
|
||||
@@ -1180,17 +1185,34 @@ int fotg210_udc_probe(struct platform_de
|
||||
|
||||
fotg210->dev = dev;
|
||||
|
||||
+ /* It's OK not to supply this clock */
|
||||
+ fotg210->pclk = devm_clk_get(dev, "PCLK");
|
||||
+ if (!IS_ERR(fotg210->pclk)) {
|
||||
+ ret = clk_prepare_enable(fotg210->pclk);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "failed to enable PCLK\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ } else if (PTR_ERR(fotg210->pclk) == -EPROBE_DEFER) {
|
||||
+ /*
|
||||
+ * Percolate deferrals, for anything else,
|
||||
+ * just live without the clocking.
|
||||
+ */
|
||||
+ ret = -EPROBE_DEFER;
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
fotg210->phy = devm_usb_get_phy_by_phandle(dev->parent, "usb-phy", 0);
|
||||
if (IS_ERR(fotg210->phy)) {
|
||||
ret = PTR_ERR(fotg210->phy);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
- goto err;
|
||||
+ goto err_pclk;
|
||||
dev_info(dev, "no PHY found\n");
|
||||
fotg210->phy = NULL;
|
||||
} else {
|
||||
ret = usb_phy_init(fotg210->phy);
|
||||
if (ret)
|
||||
- goto err;
|
||||
+ goto err_pclk;
|
||||
dev_info(dev, "found and initialized PHY\n");
|
||||
}
|
||||
|
||||
@@ -1292,6 +1314,10 @@ err_map:
|
||||
err_alloc:
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++)
|
||||
kfree(fotg210->ep[i]);
|
||||
+err_pclk:
|
||||
+ if (!IS_ERR(fotg210->pclk))
|
||||
+ clk_disable_unprepare(fotg210->pclk);
|
||||
+
|
||||
kfree(fotg210);
|
||||
|
||||
err:
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.h
|
||||
@@ -231,6 +231,7 @@ struct fotg210_ep {
|
||||
struct fotg210_udc {
|
||||
spinlock_t lock; /* protect the struct */
|
||||
void __iomem *reg;
|
||||
+ struct clk *pclk;
|
||||
|
||||
unsigned long irq_trigger;
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
From eda686d41e298a9d16708d2ec8d12d8e682dd7ca Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 14 Nov 2022 12:52:01 +0100
|
||||
Subject: [PATCH 11/29] fotg210-udc: Get IRQ using platform_get_irq()
|
||||
|
||||
The platform_get_irq() is necessary to use to get dynamic
|
||||
IRQ resolution when instantiating the device from the
|
||||
device tree. IRQs are not passed as resources in that
|
||||
case.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221114115201.302887-4-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1157,10 +1157,11 @@ int fotg210_udc_remove(struct platform_d
|
||||
|
||||
int fotg210_udc_probe(struct platform_device *pdev)
|
||||
{
|
||||
- struct resource *res, *ires;
|
||||
+ struct resource *res;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
struct fotg210_ep *_ep[FOTG210_MAX_NUM_EP];
|
||||
struct device *dev = &pdev->dev;
|
||||
+ int irq;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
@@ -1170,9 +1171,9 @@ int fotg210_udc_probe(struct platform_de
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
- if (!ires) {
|
||||
- pr_err("platform_get_resource IORESOURCE_IRQ error.\n");
|
||||
+ irq = platform_get_irq(pdev, 0);
|
||||
+ if (irq < 0) {
|
||||
+ pr_err("could not get irq\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1202,7 +1203,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
goto err;
|
||||
}
|
||||
|
||||
- fotg210->phy = devm_usb_get_phy_by_phandle(dev->parent, "usb-phy", 0);
|
||||
+ fotg210->phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 0);
|
||||
if (IS_ERR(fotg210->phy)) {
|
||||
ret = PTR_ERR(fotg210->phy);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
@@ -1282,7 +1283,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
|
||||
fotg210_disable_unplug(fotg210);
|
||||
|
||||
- ret = request_irq(ires->start, fotg210_irq, IRQF_SHARED,
|
||||
+ ret = request_irq(irq, fotg210_irq, IRQF_SHARED,
|
||||
udc_name, fotg210);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "request_irq error (%d)\n", ret);
|
||||
@@ -1303,7 +1304,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
err_add_udc:
|
||||
if (!IS_ERR_OR_NULL(fotg210->phy))
|
||||
usb_unregister_notifier(fotg210->phy, &fotg210_phy_notifier);
|
||||
- free_irq(ires->start, fotg210);
|
||||
+ free_irq(irq, fotg210);
|
||||
|
||||
err_req:
|
||||
fotg210_ep_free_request(&fotg210->ep[0]->ep, fotg210->ep0_req);
|
||||
@ -1,39 +0,0 @@
|
||||
From 7889a2f0256c55e0184dffd0001d0782f9e4cb83 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
|
||||
Date: Mon, 14 Nov 2022 21:38:04 +0100
|
||||
Subject: [PATCH 12/29] usb: fotg210-udc: Remove a useless assignment
|
||||
|
||||
There is no need to use an intermediate array for these memory allocations,
|
||||
so, axe it.
|
||||
|
||||
While at it, turn a '== NULL' into a shorter '!' when testing memory
|
||||
allocation failure.
|
||||
|
||||
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/deab9696fc4000499470e7ccbca7c36fca17bd4e.1668458274.git.christophe.jaillet@wanadoo.fr
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1159,7 +1159,6 @@ int fotg210_udc_probe(struct platform_de
|
||||
{
|
||||
struct resource *res;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
- struct fotg210_ep *_ep[FOTG210_MAX_NUM_EP];
|
||||
struct device *dev = &pdev->dev;
|
||||
int irq;
|
||||
int ret = 0;
|
||||
@@ -1218,10 +1217,9 @@ int fotg210_udc_probe(struct platform_de
|
||||
}
|
||||
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
|
||||
- _ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
|
||||
- if (_ep[i] == NULL)
|
||||
+ fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
|
||||
+ if (!fotg210->ep[i])
|
||||
goto err_alloc;
|
||||
- fotg210->ep[i] = _ep[i];
|
||||
}
|
||||
|
||||
fotg210->reg = ioremap(res->start, resource_size(res));
|
||||
@ -1,58 +0,0 @@
|
||||
From 7b95ade85ac18eec63e81ac58a482b3e88361ffd Mon Sep 17 00:00:00 2001
|
||||
From: Yi Yang <yiyang13@huawei.com>
|
||||
Date: Fri, 2 Dec 2022 09:21:26 +0800
|
||||
Subject: [PATCH 13/29] usb: fotg210-udc: fix potential memory leak in
|
||||
fotg210_udc_probe()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In fotg210_udc_probe(), if devm_clk_get() or clk_prepare_enable()
|
||||
fails, 'fotg210' will not be freed, which will lead to a memory leak.
|
||||
Fix it by moving kfree() to a proper location.
|
||||
|
||||
In addition,we can use "return -ENOMEM" instead of "goto err"
|
||||
to simplify the code.
|
||||
|
||||
Fixes: 718a38d092ec ("fotg210-udc: Handle PCLK")
|
||||
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Signed-off-by: Yi Yang <yiyang13@huawei.com>
|
||||
Link: https://lore.kernel.org/r/20221202012126.246953-1-yiyang13@huawei.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1176,12 +1176,10 @@ int fotg210_udc_probe(struct platform_de
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- ret = -ENOMEM;
|
||||
-
|
||||
/* initialize udc */
|
||||
fotg210 = kzalloc(sizeof(struct fotg210_udc), GFP_KERNEL);
|
||||
if (fotg210 == NULL)
|
||||
- goto err;
|
||||
+ return -ENOMEM;
|
||||
|
||||
fotg210->dev = dev;
|
||||
|
||||
@@ -1191,7 +1189,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
ret = clk_prepare_enable(fotg210->pclk);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to enable PCLK\n");
|
||||
- return ret;
|
||||
+ goto err;
|
||||
}
|
||||
} else if (PTR_ERR(fotg210->pclk) == -EPROBE_DEFER) {
|
||||
/*
|
||||
@@ -1317,8 +1315,7 @@ err_pclk:
|
||||
if (!IS_ERR(fotg210->pclk))
|
||||
clk_disable_unprepare(fotg210->pclk);
|
||||
|
||||
- kfree(fotg210);
|
||||
-
|
||||
err:
|
||||
+ kfree(fotg210);
|
||||
return ret;
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
From d8eed400495029ba551704ff0fae1dad87332291 Mon Sep 17 00:00:00 2001
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Thu, 15 Dec 2022 17:57:20 +0100
|
||||
Subject: [PATCH 14/29] usb: fotg210: fix OTG-only build
|
||||
|
||||
The fotg210 module combines the HCD and OTG drivers, which then
|
||||
fails to build when only the USB gadget support is enabled
|
||||
in the kernel but host support is not:
|
||||
|
||||
aarch64-linux-ld: drivers/usb/fotg210/fotg210-core.o: in function `fotg210_init':
|
||||
fotg210-core.c:(.init.text+0xc): undefined reference to `usb_disabled'
|
||||
|
||||
Move the check for usb_disabled() after the check for the HCD module,
|
||||
and let the OTG driver still be probed in this configuration.
|
||||
|
||||
A nicer approach might be to have the common portion built as a
|
||||
library module, with the two platform other files registering
|
||||
their own platform_driver instances separately.
|
||||
|
||||
Fixes: ddacd6ef44ca ("usb: fotg210: Fix Kconfig for USB host modules")
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
Link: https://lore.kernel.org/r/20221215165728.2062984-1-arnd@kernel.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -144,10 +144,7 @@ static struct platform_driver fotg210_dr
|
||||
|
||||
static int __init fotg210_init(void)
|
||||
{
|
||||
- if (usb_disabled())
|
||||
- return -ENODEV;
|
||||
-
|
||||
- if (IS_ENABLED(CONFIG_USB_FOTG210_HCD))
|
||||
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD) && !usb_disabled())
|
||||
fotg210_hcd_init();
|
||||
return platform_driver_register(&fotg210_driver);
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
From eaaa85d907fe27852dd960b2bc5d7bcf11bc3ebd Mon Sep 17 00:00:00 2001
|
||||
From: Yang Yingliang <yangyingliang@huawei.com>
|
||||
Date: Fri, 30 Dec 2022 14:54:27 +0800
|
||||
Subject: [PATCH 15/29] usb: fotg210-udc: fix error return code in
|
||||
fotg210_udc_probe()
|
||||
|
||||
After commit 5f217ccd520f ("fotg210-udc: Support optional external PHY"),
|
||||
the error code is re-assigned to 0 in fotg210_udc_probe(), if allocate or
|
||||
map memory fails after the assignment, it can't return an error code. Set
|
||||
the error code to -ENOMEM to fix this problem.
|
||||
|
||||
Fixes: 5f217ccd520f ("fotg210-udc: Support optional external PHY")
|
||||
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
|
||||
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20221230065427.944586-1-yangyingliang@huawei.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1214,6 +1214,8 @@ int fotg210_udc_probe(struct platform_de
|
||||
dev_info(dev, "found and initialized PHY\n");
|
||||
}
|
||||
|
||||
+ ret = -ENOMEM;
|
||||
+
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++) {
|
||||
fotg210->ep[i] = kzalloc(sizeof(struct fotg210_ep), GFP_KERNEL);
|
||||
if (!fotg210->ep[i])
|
||||
@ -1,25 +0,0 @@
|
||||
From 407577548b2fcd41cc72ee05df1f05a430ed30a0 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:16 +0100
|
||||
Subject: [PATCH 16/29] usb: fotg210: List different variants
|
||||
|
||||
There are at least two variants of the FOTG: FOTG200 and
|
||||
FOTG210. Handle them in this driver and let's add
|
||||
more quirks as we go along.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-2-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -127,7 +127,9 @@ static int fotg210_remove(struct platfor
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id fotg210_of_match[] = {
|
||||
+ { .compatible = "faraday,fotg200" },
|
||||
{ .compatible = "faraday,fotg210" },
|
||||
+ /* TODO: can we also handle FUSB220? */
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fotg210_of_match);
|
||||
@ -1,245 +0,0 @@
|
||||
From fa735ad1afeb5791d5562617b9bbed74574d3e81 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:17 +0100
|
||||
Subject: [PATCH 17/29] usb: fotg210: Acquire memory resource in core
|
||||
|
||||
The subdrivers are obtaining and mapping the memory resource
|
||||
separately. Create a common state container for the shared
|
||||
resources and start populating this by acquiring the IO
|
||||
memory resource and remap it and pass this to the subdrivers
|
||||
for host and peripheral.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-3-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -33,9 +33,10 @@
|
||||
#define GEMINI_MISC_USB0_MINI_B BIT(29)
|
||||
#define GEMINI_MISC_USB1_MINI_B BIT(30)
|
||||
|
||||
-static int fotg210_gemini_init(struct device *dev, struct resource *res,
|
||||
+static int fotg210_gemini_init(struct fotg210 *fotg, struct resource *res,
|
||||
enum usb_dr_mode mode)
|
||||
{
|
||||
+ struct device *dev = fotg->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct regmap *map;
|
||||
bool wakeup;
|
||||
@@ -47,6 +48,7 @@ static int fotg210_gemini_init(struct de
|
||||
dev_err(dev, "no syscon\n");
|
||||
return PTR_ERR(map);
|
||||
}
|
||||
+ fotg->map = map;
|
||||
wakeup = of_property_read_bool(np, "wakeup-source");
|
||||
|
||||
/*
|
||||
@@ -55,6 +57,7 @@ static int fotg210_gemini_init(struct de
|
||||
*/
|
||||
mask = 0;
|
||||
if (res->start == 0x69000000) {
|
||||
+ fotg->port = GEMINI_PORT_1;
|
||||
mask = GEMINI_MISC_USB1_VBUS_ON | GEMINI_MISC_USB1_MINI_B |
|
||||
GEMINI_MISC_USB1_WAKEUP;
|
||||
if (mode == USB_DR_MODE_HOST)
|
||||
@@ -64,6 +67,7 @@ static int fotg210_gemini_init(struct de
|
||||
if (wakeup)
|
||||
val |= GEMINI_MISC_USB1_WAKEUP;
|
||||
} else {
|
||||
+ fotg->port = GEMINI_PORT_0;
|
||||
mask = GEMINI_MISC_USB0_VBUS_ON | GEMINI_MISC_USB0_MINI_B |
|
||||
GEMINI_MISC_USB0_WAKEUP;
|
||||
if (mode == USB_DR_MODE_HOST)
|
||||
@@ -89,23 +93,34 @@ static int fotg210_probe(struct platform
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
enum usb_dr_mode mode;
|
||||
+ struct fotg210 *fotg;
|
||||
int ret;
|
||||
|
||||
+ fotg = devm_kzalloc(dev, sizeof(*fotg), GFP_KERNEL);
|
||||
+ if (!fotg)
|
||||
+ return -ENOMEM;
|
||||
+ fotg->dev = dev;
|
||||
+
|
||||
+ fotg->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (!fotg->res)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ fotg->base = devm_ioremap_resource(dev, fotg->res);
|
||||
+ if (!fotg->base)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
mode = usb_get_dr_mode(dev);
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "cortina,gemini-usb")) {
|
||||
- struct resource *res;
|
||||
-
|
||||
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- ret = fotg210_gemini_init(dev, res, mode);
|
||||
+ ret = fotg210_gemini_init(fotg, fotg->res, mode);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (mode == USB_DR_MODE_PERIPHERAL)
|
||||
- ret = fotg210_udc_probe(pdev);
|
||||
+ ret = fotg210_udc_probe(pdev, fotg);
|
||||
else
|
||||
- ret = fotg210_hcd_probe(pdev);
|
||||
+ ret = fotg210_hcd_probe(pdev, fotg);
|
||||
|
||||
return ret;
|
||||
}
|
||||
--- a/drivers/usb/fotg210/fotg210-hcd.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-hcd.c
|
||||
@@ -5557,11 +5557,10 @@ static void fotg210_init(struct fotg210_
|
||||
* then invokes the start() method for the HCD associated with it
|
||||
* through the hotplug entry's driver_data.
|
||||
*/
|
||||
-int fotg210_hcd_probe(struct platform_device *pdev)
|
||||
+int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct usb_hcd *hcd;
|
||||
- struct resource *res;
|
||||
int irq;
|
||||
int retval;
|
||||
struct fotg210_hcd *fotg210;
|
||||
@@ -5585,18 +5584,14 @@ int fotg210_hcd_probe(struct platform_de
|
||||
|
||||
hcd->has_tt = 1;
|
||||
|
||||
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- hcd->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
- if (IS_ERR(hcd->regs)) {
|
||||
- retval = PTR_ERR(hcd->regs);
|
||||
- goto failed_put_hcd;
|
||||
- }
|
||||
+ hcd->regs = fotg->base;
|
||||
|
||||
- hcd->rsrc_start = res->start;
|
||||
- hcd->rsrc_len = resource_size(res);
|
||||
+ hcd->rsrc_start = fotg->res->start;
|
||||
+ hcd->rsrc_len = resource_size(fotg->res);
|
||||
|
||||
fotg210 = hcd_to_fotg210(hcd);
|
||||
|
||||
+ fotg210->fotg = fotg;
|
||||
fotg210->caps = hcd->regs;
|
||||
|
||||
/* It's OK not to supply this clock */
|
||||
--- a/drivers/usb/fotg210/fotg210-hcd.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-hcd.h
|
||||
@@ -182,6 +182,7 @@ struct fotg210_hcd { /* one per contro
|
||||
# define INCR(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
+ struct fotg210 *fotg; /* Overarching FOTG210 device */
|
||||
/* silicon clock */
|
||||
struct clk *pclk;
|
||||
};
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1155,21 +1155,14 @@ int fotg210_udc_remove(struct platform_d
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int fotg210_udc_probe(struct platform_device *pdev)
|
||||
+int fotg210_udc_probe(struct platform_device *pdev, struct fotg210 *fotg)
|
||||
{
|
||||
- struct resource *res;
|
||||
struct fotg210_udc *fotg210 = NULL;
|
||||
struct device *dev = &pdev->dev;
|
||||
int irq;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
- if (!res) {
|
||||
- pr_err("platform_get_resource error.\n");
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
pr_err("could not get irq\n");
|
||||
@@ -1182,6 +1175,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
return -ENOMEM;
|
||||
|
||||
fotg210->dev = dev;
|
||||
+ fotg210->fotg = fotg;
|
||||
|
||||
/* It's OK not to supply this clock */
|
||||
fotg210->pclk = devm_clk_get(dev, "PCLK");
|
||||
@@ -1222,11 +1216,7 @@ int fotg210_udc_probe(struct platform_de
|
||||
goto err_alloc;
|
||||
}
|
||||
|
||||
- fotg210->reg = ioremap(res->start, resource_size(res));
|
||||
- if (fotg210->reg == NULL) {
|
||||
- dev_err(dev, "ioremap error\n");
|
||||
- goto err_alloc;
|
||||
- }
|
||||
+ fotg210->reg = fotg->base;
|
||||
|
||||
spin_lock_init(&fotg210->lock);
|
||||
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.h
|
||||
@@ -236,6 +236,7 @@ struct fotg210_udc {
|
||||
unsigned long irq_trigger;
|
||||
|
||||
struct device *dev;
|
||||
+ struct fotg210 *fotg;
|
||||
struct usb_phy *phy;
|
||||
struct usb_gadget gadget;
|
||||
struct usb_gadget_driver *driver;
|
||||
--- a/drivers/usb/fotg210/fotg210.h
|
||||
+++ b/drivers/usb/fotg210/fotg210.h
|
||||
@@ -2,13 +2,28 @@
|
||||
#ifndef __FOTG210_H
|
||||
#define __FOTG210_H
|
||||
|
||||
+enum gemini_port {
|
||||
+ GEMINI_PORT_NONE = 0,
|
||||
+ GEMINI_PORT_0,
|
||||
+ GEMINI_PORT_1,
|
||||
+};
|
||||
+
|
||||
+struct fotg210 {
|
||||
+ struct device *dev;
|
||||
+ struct resource *res;
|
||||
+ void __iomem *base;
|
||||
+ struct regmap *map;
|
||||
+ enum gemini_port port;
|
||||
+};
|
||||
+
|
||||
#ifdef CONFIG_USB_FOTG210_HCD
|
||||
-int fotg210_hcd_probe(struct platform_device *pdev);
|
||||
+int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg);
|
||||
int fotg210_hcd_remove(struct platform_device *pdev);
|
||||
int fotg210_hcd_init(void);
|
||||
void fotg210_hcd_cleanup(void);
|
||||
#else
|
||||
-static inline int fotg210_hcd_probe(struct platform_device *pdev)
|
||||
+static inline int fotg210_hcd_probe(struct platform_device *pdev,
|
||||
+ struct fotg210 *fotg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -26,10 +41,11 @@ static inline void fotg210_hcd_cleanup(v
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_FOTG210_UDC
|
||||
-int fotg210_udc_probe(struct platform_device *pdev);
|
||||
+int fotg210_udc_probe(struct platform_device *pdev, struct fotg210 *fotg);
|
||||
int fotg210_udc_remove(struct platform_device *pdev);
|
||||
#else
|
||||
-static inline int fotg210_udc_probe(struct platform_device *pdev)
|
||||
+static inline int fotg210_udc_probe(struct platform_device *pdev,
|
||||
+ struct fotg210 *fotg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1,196 +0,0 @@
|
||||
From fb8e1e8dbc47e7aff7624b47adaa0a84d2983802 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:18 +0100
|
||||
Subject: [PATCH 18/29] usb: fotg210: Move clock handling to core
|
||||
|
||||
Grab the optional silicon block clock, prepare and enable it in
|
||||
the core before proceeding to prepare the host or peripheral
|
||||
driver. This saves duplicate code and also uses the simple
|
||||
devm_clk_get_optional_enabled() to do everything we really
|
||||
want to do.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-4-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -6,6 +6,7 @@
|
||||
* driver.
|
||||
*/
|
||||
#include <linux/bitops.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
@@ -109,6 +110,10 @@ static int fotg210_probe(struct platform
|
||||
if (!fotg->base)
|
||||
return -ENOMEM;
|
||||
|
||||
+ fotg->pclk = devm_clk_get_optional_enabled(dev, "PCLK");
|
||||
+ if (IS_ERR(fotg->pclk))
|
||||
+ return PTR_ERR(fotg->pclk);
|
||||
+
|
||||
mode = usb_get_dr_mode(dev);
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "cortina,gemini-usb")) {
|
||||
--- a/drivers/usb/fotg210/fotg210-hcd.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-hcd.c
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
-#include <linux/clk.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/irq.h>
|
||||
@@ -5594,44 +5593,22 @@ int fotg210_hcd_probe(struct platform_de
|
||||
fotg210->fotg = fotg;
|
||||
fotg210->caps = hcd->regs;
|
||||
|
||||
- /* It's OK not to supply this clock */
|
||||
- fotg210->pclk = clk_get(dev, "PCLK");
|
||||
- if (!IS_ERR(fotg210->pclk)) {
|
||||
- retval = clk_prepare_enable(fotg210->pclk);
|
||||
- if (retval) {
|
||||
- dev_err(dev, "failed to enable PCLK\n");
|
||||
- goto failed_put_hcd;
|
||||
- }
|
||||
- } else if (PTR_ERR(fotg210->pclk) == -EPROBE_DEFER) {
|
||||
- /*
|
||||
- * Percolate deferrals, for anything else,
|
||||
- * just live without the clocking.
|
||||
- */
|
||||
- retval = PTR_ERR(fotg210->pclk);
|
||||
- goto failed_dis_clk;
|
||||
- }
|
||||
-
|
||||
retval = fotg210_setup(hcd);
|
||||
if (retval)
|
||||
- goto failed_dis_clk;
|
||||
+ goto failed_put_hcd;
|
||||
|
||||
fotg210_init(fotg210);
|
||||
|
||||
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||
if (retval) {
|
||||
dev_err(dev, "failed to add hcd with err %d\n", retval);
|
||||
- goto failed_dis_clk;
|
||||
+ goto failed_put_hcd;
|
||||
}
|
||||
device_wakeup_enable(hcd->self.controller);
|
||||
platform_set_drvdata(pdev, hcd);
|
||||
|
||||
return retval;
|
||||
|
||||
-failed_dis_clk:
|
||||
- if (!IS_ERR(fotg210->pclk)) {
|
||||
- clk_disable_unprepare(fotg210->pclk);
|
||||
- clk_put(fotg210->pclk);
|
||||
- }
|
||||
failed_put_hcd:
|
||||
usb_put_hcd(hcd);
|
||||
fail_create_hcd:
|
||||
@@ -5647,12 +5624,6 @@ fail_create_hcd:
|
||||
int fotg210_hcd_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct usb_hcd *hcd = platform_get_drvdata(pdev);
|
||||
- struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd);
|
||||
-
|
||||
- if (!IS_ERR(fotg210->pclk)) {
|
||||
- clk_disable_unprepare(fotg210->pclk);
|
||||
- clk_put(fotg210->pclk);
|
||||
- }
|
||||
|
||||
usb_remove_hcd(hcd);
|
||||
usb_put_hcd(hcd);
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb/ch9.h>
|
||||
#include <linux/usb/gadget.h>
|
||||
-#include <linux/clk.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/usb/phy.h>
|
||||
|
||||
@@ -1147,9 +1146,6 @@ int fotg210_udc_remove(struct platform_d
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++)
|
||||
kfree(fotg210->ep[i]);
|
||||
|
||||
- if (!IS_ERR(fotg210->pclk))
|
||||
- clk_disable_unprepare(fotg210->pclk);
|
||||
-
|
||||
kfree(fotg210);
|
||||
|
||||
return 0;
|
||||
@@ -1177,34 +1173,17 @@ int fotg210_udc_probe(struct platform_de
|
||||
fotg210->dev = dev;
|
||||
fotg210->fotg = fotg;
|
||||
|
||||
- /* It's OK not to supply this clock */
|
||||
- fotg210->pclk = devm_clk_get(dev, "PCLK");
|
||||
- if (!IS_ERR(fotg210->pclk)) {
|
||||
- ret = clk_prepare_enable(fotg210->pclk);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "failed to enable PCLK\n");
|
||||
- goto err;
|
||||
- }
|
||||
- } else if (PTR_ERR(fotg210->pclk) == -EPROBE_DEFER) {
|
||||
- /*
|
||||
- * Percolate deferrals, for anything else,
|
||||
- * just live without the clocking.
|
||||
- */
|
||||
- ret = -EPROBE_DEFER;
|
||||
- goto err;
|
||||
- }
|
||||
-
|
||||
fotg210->phy = devm_usb_get_phy_by_phandle(dev, "usb-phy", 0);
|
||||
if (IS_ERR(fotg210->phy)) {
|
||||
ret = PTR_ERR(fotg210->phy);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
- goto err_pclk;
|
||||
+ goto err_free;
|
||||
dev_info(dev, "no PHY found\n");
|
||||
fotg210->phy = NULL;
|
||||
} else {
|
||||
ret = usb_phy_init(fotg210->phy);
|
||||
if (ret)
|
||||
- goto err_pclk;
|
||||
+ goto err_free;
|
||||
dev_info(dev, "found and initialized PHY\n");
|
||||
}
|
||||
|
||||
@@ -1303,11 +1282,8 @@ err_map:
|
||||
err_alloc:
|
||||
for (i = 0; i < FOTG210_MAX_NUM_EP; i++)
|
||||
kfree(fotg210->ep[i]);
|
||||
-err_pclk:
|
||||
- if (!IS_ERR(fotg210->pclk))
|
||||
- clk_disable_unprepare(fotg210->pclk);
|
||||
|
||||
-err:
|
||||
+err_free:
|
||||
kfree(fotg210);
|
||||
return ret;
|
||||
}
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.h
|
||||
@@ -231,7 +231,6 @@ struct fotg210_ep {
|
||||
struct fotg210_udc {
|
||||
spinlock_t lock; /* protect the struct */
|
||||
void __iomem *reg;
|
||||
- struct clk *pclk;
|
||||
|
||||
unsigned long irq_trigger;
|
||||
|
||||
--- a/drivers/usb/fotg210/fotg210.h
|
||||
+++ b/drivers/usb/fotg210/fotg210.h
|
||||
@@ -12,6 +12,7 @@ struct fotg210 {
|
||||
struct device *dev;
|
||||
struct resource *res;
|
||||
void __iomem *base;
|
||||
+ struct clk *pclk;
|
||||
struct regmap *map;
|
||||
enum gemini_port port;
|
||||
};
|
||||
@ -1,54 +0,0 @@
|
||||
From b1b07abb598211de3ce7f52abdf8dcb24384341e Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:19 +0100
|
||||
Subject: [PATCH 19/29] usb: fotg210: Check role register in core
|
||||
|
||||
Read the role register and check that we are in host/peripheral
|
||||
mode and issue warnings if we're not in the right role when
|
||||
probing respective driver.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-5-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -18,6 +18,11 @@
|
||||
|
||||
#include "fotg210.h"
|
||||
|
||||
+/* Role Register 0x80 */
|
||||
+#define FOTG210_RR 0x80
|
||||
+#define FOTG210_RR_ID BIT(21) /* 1 = B-device, 0 = A-device */
|
||||
+#define FOTG210_RR_CROLE BIT(20) /* 1 = device, 0 = host */
|
||||
+
|
||||
/*
|
||||
* Gemini-specific initialization function, only executed on the
|
||||
* Gemini SoC using the global misc control register.
|
||||
@@ -95,6 +100,7 @@ static int fotg210_probe(struct platform
|
||||
struct device *dev = &pdev->dev;
|
||||
enum usb_dr_mode mode;
|
||||
struct fotg210 *fotg;
|
||||
+ u32 val;
|
||||
int ret;
|
||||
|
||||
fotg = devm_kzalloc(dev, sizeof(*fotg), GFP_KERNEL);
|
||||
@@ -122,10 +128,16 @@ static int fotg210_probe(struct platform
|
||||
return ret;
|
||||
}
|
||||
|
||||
- if (mode == USB_DR_MODE_PERIPHERAL)
|
||||
+ val = readl(fotg->base + FOTG210_RR);
|
||||
+ if (mode == USB_DR_MODE_PERIPHERAL) {
|
||||
+ if (!(val & FOTG210_RR_CROLE))
|
||||
+ dev_err(dev, "block not in device role\n");
|
||||
ret = fotg210_udc_probe(pdev, fotg);
|
||||
- else
|
||||
+ } else {
|
||||
+ if (val & FOTG210_RR_CROLE)
|
||||
+ dev_err(dev, "block not in host role\n");
|
||||
ret = fotg210_hcd_probe(pdev, fotg);
|
||||
+ }
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
From d7c2b0b6da75b86cf5ddbcd51a74d74e19bbf178 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:20 +0100
|
||||
Subject: [PATCH 20/29] usb: fotg210-udc: Assign of_node and speed on start
|
||||
|
||||
Follow the example set by other drivers to assign of_node
|
||||
and speed to the driver when binding, also print bound
|
||||
info akin to other UDC drivers.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-6-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1028,6 +1028,10 @@ static int fotg210_udc_start(struct usb_
|
||||
|
||||
/* hook up the driver */
|
||||
fotg210->driver = driver;
|
||||
+ fotg210->gadget.dev.of_node = fotg210->dev->of_node;
|
||||
+ fotg210->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
+
|
||||
+ dev_info(fotg210->dev, "bound driver %s\n", driver->driver.name);
|
||||
|
||||
if (!IS_ERR_OR_NULL(fotg210->phy)) {
|
||||
ret = otg_set_peripheral(fotg210->phy->otg,
|
||||
@@ -1084,6 +1088,7 @@ static int fotg210_udc_stop(struct usb_g
|
||||
|
||||
fotg210_init(fotg210);
|
||||
fotg210->driver = NULL;
|
||||
+ fotg210->gadget.speed = USB_SPEED_UNKNOWN;
|
||||
|
||||
spin_unlock_irqrestore(&fotg210->lock, flags);
|
||||
|
||||
@ -1,96 +0,0 @@
|
||||
From 2fbbfb2c556944945639b17b13fcb1e05272b646 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 18 Jan 2023 08:09:21 +0100
|
||||
Subject: [PATCH 21/29] usb: fotg210-udc: Implement VBUS session
|
||||
|
||||
Implement VBUS session handling for FOTG210. This is
|
||||
mainly used by the UDC driver which needs to call down to
|
||||
the FOTG210 core and enable/disable VBUS, as this needs to be
|
||||
handled outside of the HCD and UDC drivers, by platform
|
||||
specific glue code.
|
||||
|
||||
The Gemini has a special bit in a system register to turn
|
||||
VBUS on and off so we implement this in the FOTG210 core.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-7-100388af9810@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-core.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-core.c
|
||||
@@ -95,6 +95,35 @@ static int fotg210_gemini_init(struct fo
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * fotg210_vbus() - Called by gadget driver to enable/disable VBUS
|
||||
+ * @enable: true to enable VBUS, false to disable VBUS
|
||||
+ */
|
||||
+void fotg210_vbus(struct fotg210 *fotg, bool enable)
|
||||
+{
|
||||
+ u32 mask;
|
||||
+ u32 val;
|
||||
+ int ret;
|
||||
+
|
||||
+ switch (fotg->port) {
|
||||
+ case GEMINI_PORT_0:
|
||||
+ mask = GEMINI_MISC_USB0_VBUS_ON;
|
||||
+ val = enable ? GEMINI_MISC_USB0_VBUS_ON : 0;
|
||||
+ break;
|
||||
+ case GEMINI_PORT_1:
|
||||
+ mask = GEMINI_MISC_USB1_VBUS_ON;
|
||||
+ val = enable ? GEMINI_MISC_USB1_VBUS_ON : 0;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return;
|
||||
+ }
|
||||
+ ret = regmap_update_bits(fotg->map, GEMINI_GLOBAL_MISC_CTRL, mask, val);
|
||||
+ if (ret)
|
||||
+ dev_err(fotg->dev, "failed to %s VBUS\n",
|
||||
+ enable ? "enable" : "disable");
|
||||
+ dev_info(fotg->dev, "%s: %s VBUS\n", __func__, enable ? "enable" : "disable");
|
||||
+}
|
||||
+
|
||||
static int fotg210_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -1095,9 +1095,26 @@ static int fotg210_udc_stop(struct usb_g
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * fotg210_vbus_session - Called by external transceiver to enable/disable udc
|
||||
+ * @_gadget: usb gadget
|
||||
+ * @is_active: 0 if should disable UDC VBUS, 1 if should enable
|
||||
+ *
|
||||
+ * Returns 0
|
||||
+ */
|
||||
+static int fotg210_vbus_session(struct usb_gadget *g, int is_active)
|
||||
+{
|
||||
+ struct fotg210_udc *fotg210 = gadget_to_fotg210(g);
|
||||
+
|
||||
+ /* Call down to core integration layer to drive or disable VBUS */
|
||||
+ fotg210_vbus(fotg210->fotg, is_active);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static const struct usb_gadget_ops fotg210_gadget_ops = {
|
||||
.udc_start = fotg210_udc_start,
|
||||
.udc_stop = fotg210_udc_stop,
|
||||
+ .vbus_session = fotg210_vbus_session,
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/drivers/usb/fotg210/fotg210.h
|
||||
+++ b/drivers/usb/fotg210/fotg210.h
|
||||
@@ -17,6 +17,8 @@ struct fotg210 {
|
||||
enum gemini_port port;
|
||||
};
|
||||
|
||||
+void fotg210_vbus(struct fotg210 *fotg, bool enable);
|
||||
+
|
||||
#ifdef CONFIG_USB_FOTG210_HCD
|
||||
int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg);
|
||||
int fotg210_hcd_remove(struct platform_device *pdev);
|
||||
@ -1,134 +0,0 @@
|
||||
From f011d1eab23f4c063c5441c0d5a22898adf9145c Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Mon, 23 Jan 2023 08:35:07 +0100
|
||||
Subject: [PATCH 22/29] fotg210-udc: Introduce and use a fotg210_ack_int
|
||||
function
|
||||
|
||||
This is in preparation of support for devices where interrupts are acked
|
||||
differently.
|
||||
|
||||
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230123073508.2350402-3-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -28,6 +28,14 @@ static const char udc_name[] = "fotg210_
|
||||
static const char * const fotg210_ep_name[] = {
|
||||
"ep0", "ep1", "ep2", "ep3", "ep4"};
|
||||
|
||||
+static void fotg210_ack_int(struct fotg210_udc *fotg210, u32 offset, u32 mask)
|
||||
+{
|
||||
+ u32 value = ioread32(fotg210->reg + offset);
|
||||
+
|
||||
+ value &= ~mask;
|
||||
+ iowrite32(value, fotg210->reg + offset);
|
||||
+}
|
||||
+
|
||||
static void fotg210_disable_fifo_int(struct fotg210_ep *ep)
|
||||
{
|
||||
u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR1);
|
||||
@@ -303,8 +311,7 @@ static void fotg210_wait_dma_done(struct
|
||||
goto dma_reset;
|
||||
} while (!(value & DISGR2_DMA_CMPLT));
|
||||
|
||||
- value &= ~DISGR2_DMA_CMPLT;
|
||||
- iowrite32(value, ep->fotg210->reg + FOTG210_DISGR2);
|
||||
+ fotg210_ack_int(ep->fotg210, FOTG210_DISGR2, DISGR2_DMA_CMPLT);
|
||||
return;
|
||||
|
||||
dma_reset:
|
||||
@@ -844,14 +851,6 @@ static void fotg210_ep0in(struct fotg210
|
||||
}
|
||||
}
|
||||
|
||||
-static void fotg210_clear_comabt_int(struct fotg210_udc *fotg210)
|
||||
-{
|
||||
- u32 value = ioread32(fotg210->reg + FOTG210_DISGR0);
|
||||
-
|
||||
- value &= ~DISGR0_CX_COMABT_INT;
|
||||
- iowrite32(value, fotg210->reg + FOTG210_DISGR0);
|
||||
-}
|
||||
-
|
||||
static void fotg210_in_fifo_handler(struct fotg210_ep *ep)
|
||||
{
|
||||
struct fotg210_request *req = list_entry(ep->queue.next,
|
||||
@@ -893,60 +892,43 @@ static irqreturn_t fotg210_irq(int irq,
|
||||
void __iomem *reg = fotg210->reg + FOTG210_DISGR2;
|
||||
u32 int_grp2 = ioread32(reg);
|
||||
u32 int_msk2 = ioread32(fotg210->reg + FOTG210_DMISGR2);
|
||||
- u32 value;
|
||||
|
||||
int_grp2 &= ~int_msk2;
|
||||
|
||||
if (int_grp2 & DISGR2_USBRST_INT) {
|
||||
usb_gadget_udc_reset(&fotg210->gadget,
|
||||
fotg210->driver);
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_USBRST_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_USBRST_INT);
|
||||
pr_info("fotg210 udc reset\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_SUSP_INT) {
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_SUSP_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_SUSP_INT);
|
||||
pr_info("fotg210 udc suspend\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_RESM_INT) {
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_RESM_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_RESM_INT);
|
||||
pr_info("fotg210 udc resume\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_ISO_SEQ_ERR_INT) {
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_ISO_SEQ_ERR_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_ISO_SEQ_ERR_INT);
|
||||
pr_info("fotg210 iso sequence error\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_ISO_SEQ_ABORT_INT) {
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_ISO_SEQ_ABORT_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_ISO_SEQ_ABORT_INT);
|
||||
pr_info("fotg210 iso sequence abort\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_TX0BYTE_INT) {
|
||||
fotg210_clear_tx0byte(fotg210);
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_TX0BYTE_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_TX0BYTE_INT);
|
||||
pr_info("fotg210 transferred 0 byte\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_RX0BYTE_INT) {
|
||||
fotg210_clear_rx0byte(fotg210);
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_RX0BYTE_INT;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_RX0BYTE_INT);
|
||||
pr_info("fotg210 received 0 byte\n");
|
||||
}
|
||||
if (int_grp2 & DISGR2_DMA_ERROR) {
|
||||
- value = ioread32(reg);
|
||||
- value &= ~DISGR2_DMA_ERROR;
|
||||
- iowrite32(value, reg);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR2, DISGR2_DMA_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -960,7 +942,7 @@ static irqreturn_t fotg210_irq(int irq,
|
||||
|
||||
/* the highest priority in this source register */
|
||||
if (int_grp0 & DISGR0_CX_COMABT_INT) {
|
||||
- fotg210_clear_comabt_int(fotg210);
|
||||
+ fotg210_ack_int(fotg210, FOTG210_DISGR0, DISGR0_CX_COMABT_INT);
|
||||
pr_info("fotg210 CX command abort\n");
|
||||
}
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
From 367747c7813cecf19b46ef7134691f903ab76dc9 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Mon, 23 Jan 2023 08:35:08 +0100
|
||||
Subject: [PATCH 23/29] fotg210-udc: Improve device initialization
|
||||
|
||||
Reset the device explicitly to get into a known state and also set the chip
|
||||
enable bit. Additionally, mask interrupts which aren't handled.
|
||||
|
||||
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230123073508.2350402-4-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.c
|
||||
@@ -7,6 +7,7 @@
|
||||
* Author : Yuan-Hsin Chen <yhchen@faraday-tech.com>
|
||||
*/
|
||||
|
||||
+#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -1022,6 +1023,11 @@ static int fotg210_udc_start(struct usb_
|
||||
dev_err(fotg210->dev, "can't bind to phy\n");
|
||||
}
|
||||
|
||||
+ /* chip enable */
|
||||
+ value = ioread32(fotg210->reg + FOTG210_DMCR);
|
||||
+ value |= DMCR_CHIP_EN;
|
||||
+ iowrite32(value, fotg210->reg + FOTG210_DMCR);
|
||||
+
|
||||
/* enable device global interrupt */
|
||||
value = ioread32(fotg210->reg + FOTG210_DMCR);
|
||||
value |= DMCR_GLINT_EN;
|
||||
@@ -1038,6 +1044,15 @@ static void fotg210_init(struct fotg210_
|
||||
iowrite32(GMIR_MHC_INT | GMIR_MOTG_INT | GMIR_INT_POLARITY,
|
||||
fotg210->reg + FOTG210_GMIR);
|
||||
|
||||
+ /* mask interrupts for groups other than 0-2 */
|
||||
+ iowrite32(~(DMIGR_MINT_G0 | DMIGR_MINT_G1 | DMIGR_MINT_G2),
|
||||
+ fotg210->reg + FOTG210_DMIGR);
|
||||
+
|
||||
+ /* udc software reset */
|
||||
+ iowrite32(DMCR_SFRST, fotg210->reg + FOTG210_DMCR);
|
||||
+ /* Better wait a bit, but without a datasheet, no idea how long. */
|
||||
+ usleep_range(100, 200);
|
||||
+
|
||||
/* disable device global interrupt */
|
||||
value = ioread32(fotg210->reg + FOTG210_DMCR);
|
||||
value &= ~DMCR_GLINT_EN;
|
||||
--- a/drivers/usb/fotg210/fotg210-udc.h
|
||||
+++ b/drivers/usb/fotg210/fotg210-udc.h
|
||||
@@ -58,6 +58,8 @@
|
||||
|
||||
/* Device Mask of Interrupt Group Register (0x130) */
|
||||
#define FOTG210_DMIGR 0x130
|
||||
+#define DMIGR_MINT_G2 (1 << 2)
|
||||
+#define DMIGR_MINT_G1 (1 << 1)
|
||||
#define DMIGR_MINT_G0 (1 << 0)
|
||||
|
||||
/* Device Mask of Interrupt Source Group 0(0x134) */
|
||||
@ -1,32 +0,0 @@
|
||||
From 482830a70408a5d30af264b3d6706f818c78b2b2 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Date: Fri, 20 Jan 2023 17:44:33 +0200
|
||||
Subject: [PATCH 24/29] usb: fotg210-hcd: use sysfs_emit() to instead of
|
||||
scnprintf()
|
||||
|
||||
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
|
||||
should only use sysfs_emit() or sysfs_emit_at() when formatting the
|
||||
value to be returned to user space.
|
||||
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Link: https://lore.kernel.org/r/20230120154437.22025-1-andriy.shevchenko@linux.intel.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
--- a/drivers/usb/fotg210/fotg210-hcd.c
|
||||
+++ b/drivers/usb/fotg210/fotg210-hcd.c
|
||||
@@ -4686,14 +4686,11 @@ static ssize_t uframe_periodic_max_show(
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct fotg210_hcd *fotg210;
|
||||
- int n;
|
||||
|
||||
fotg210 = hcd_to_fotg210(bus_to_hcd(dev_get_drvdata(dev)));
|
||||
- n = scnprintf(buf, PAGE_SIZE, "%d\n", fotg210->uframe_periodic_max);
|
||||
- return n;
|
||||
+ return sysfs_emit(buf, "%d\n", fotg210->uframe_periodic_max);
|
||||
}
|
||||
|
||||
-
|
||||
static ssize_t uframe_periodic_max_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
@ -1,62 +0,0 @@
|
||||
From 6b84aa39a063eec883d410a9893cec70fce56163 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 4 Dec 2022 20:02:28 +0100
|
||||
Subject: [PATCH 25/29] ARM: dts: gemini: Push down flash address/size cells
|
||||
|
||||
The platforms not defining any OF partions complain like
|
||||
this:
|
||||
|
||||
../arch/arm/boot/dts/gemini.dtsi:19.25-28.5: Warning
|
||||
(avoid_unnecessary_addr_size): /soc/flash@30000000: unnecessary
|
||||
#address-cells/#size-cells without "ranges" or child "reg" property
|
||||
|
||||
Get rid of this by only defining the address-cells and
|
||||
size-cells where it is actually used by OF partitions.
|
||||
|
||||
Link: https://lore.kernel.org/r/20221204190230.3345590-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
|
||||
@@ -164,6 +164,8 @@
|
||||
compatible = "cortina,gemini-flash", "jedec-flash";
|
||||
status = "okay";
|
||||
reg = <0x30000000 0x00080000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
|
||||
/*
|
||||
* This "RedBoot" is the Storlink derivative.
|
||||
--- a/arch/arm/boot/dts/gemini-wbd111.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-wbd111.dts
|
||||
@@ -86,6 +86,8 @@
|
||||
status = "okay";
|
||||
/* 8MB of flash */
|
||||
reg = <0x30000000 0x00800000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "RedBoot";
|
||||
--- a/arch/arm/boot/dts/gemini-wbd222.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-wbd222.dts
|
||||
@@ -90,6 +90,8 @@
|
||||
status = "okay";
|
||||
/* 8MB of flash */
|
||||
reg = <0x30000000 0x00800000>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "RedBoot";
|
||||
--- a/arch/arm/boot/dts/gemini.dtsi
|
||||
+++ b/arch/arm/boot/dts/gemini.dtsi
|
||||
@@ -22,8 +22,6 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pflash_default_pins>;
|
||||
bank-width = <2>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
From 0e733f5af628210f372585e431504a7024e7b571 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 4 Dec 2022 20:02:29 +0100
|
||||
Subject: [PATCH 26/29] ARM: dts: gemini: wbd111: Use RedBoot partion parser
|
||||
|
||||
This is clearly a RedBoot partitioned device with 0x20000
|
||||
sized erase blocks.
|
||||
|
||||
Link: https://lore.kernel.org/r/20221204190230.3345590-2-linus.walleij@linaro.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini-wbd111.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-wbd111.dts
|
||||
@@ -86,36 +86,11 @@
|
||||
status = "okay";
|
||||
/* 8MB of flash */
|
||||
reg = <0x30000000 0x00800000>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
|
||||
- partition@0 {
|
||||
- label = "RedBoot";
|
||||
- reg = <0x00000000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@20000 {
|
||||
- label = "kernel";
|
||||
- reg = <0x00020000 0x00100000>;
|
||||
- };
|
||||
- partition@120000 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x00120000 0x006a0000>;
|
||||
- };
|
||||
- partition@7c0000 {
|
||||
- label = "VCTL";
|
||||
- reg = <0x007c0000 0x00010000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@7d0000 {
|
||||
- label = "cfg";
|
||||
- reg = <0x007d0000 0x00010000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@7e0000 {
|
||||
- label = "FIS";
|
||||
- reg = <0x007e0000 0x00010000>;
|
||||
- read-only;
|
||||
+ partitions {
|
||||
+ compatible = "redboot-fis";
|
||||
+ /* Eraseblock at 0x7e0000 */
|
||||
+ fis-index-block = <0x3f>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
From 8558e2e1110a5daa4ac9e1c5b5c15e1651a8fb94 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 4 Dec 2022 20:02:30 +0100
|
||||
Subject: [PATCH 27/29] ARM: dts: gemini: wbd222: Use RedBoot partion parser
|
||||
|
||||
This is clearly a RedBoot partitioned device with 0x20000
|
||||
sized erase blocks.
|
||||
|
||||
Link: https://lore.kernel.org/r/20221204190230.3345590-3-linus.walleij@linaro.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini-wbd222.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-wbd222.dts
|
||||
@@ -90,36 +90,11 @@
|
||||
status = "okay";
|
||||
/* 8MB of flash */
|
||||
reg = <0x30000000 0x00800000>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
|
||||
- partition@0 {
|
||||
- label = "RedBoot";
|
||||
- reg = <0x00000000 0x00020000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@20000 {
|
||||
- label = "kernel";
|
||||
- reg = <0x00020000 0x00100000>;
|
||||
- };
|
||||
- partition@120000 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x00120000 0x006a0000>;
|
||||
- };
|
||||
- partition@7c0000 {
|
||||
- label = "VCTL";
|
||||
- reg = <0x007c0000 0x00010000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@7d0000 {
|
||||
- label = "cfg";
|
||||
- reg = <0x007d0000 0x00010000>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@7e0000 {
|
||||
- label = "FIS";
|
||||
- reg = <0x007e0000 0x00010000>;
|
||||
- read-only;
|
||||
+ partitions {
|
||||
+ compatible = "redboot-fis";
|
||||
+ /* Eraseblock at 0x7e0000 */
|
||||
+ fis-index-block = <0x3f>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
From d5c01ce4a1016507c69682894cf6b66301abca3d Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 23 Jan 2023 08:39:15 +0100
|
||||
Subject: [PATCH 28/29] ARM: dts: gemini: Fix USB block version
|
||||
|
||||
The FOTG version in the Gemini is the FOTG200, fix this
|
||||
up.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230123073916.2350839-1-linus.walleij@linaro.org
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini.dtsi
|
||||
+++ b/arch/arm/boot/dts/gemini.dtsi
|
||||
@@ -439,7 +439,7 @@
|
||||
};
|
||||
|
||||
usb0: usb@68000000 {
|
||||
- compatible = "cortina,gemini-usb", "faraday,fotg210";
|
||||
+ compatible = "cortina,gemini-usb", "faraday,fotg200";
|
||||
reg = <0x68000000 0x1000>;
|
||||
interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
|
||||
resets = <&syscon GEMINI_RESET_USB0>;
|
||||
@@ -460,7 +460,7 @@
|
||||
};
|
||||
|
||||
usb1: usb@69000000 {
|
||||
- compatible = "cortina,gemini-usb", "faraday,fotg210";
|
||||
+ compatible = "cortina,gemini-usb", "faraday,fotg200";
|
||||
reg = <0x69000000 0x1000>;
|
||||
interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
resets = <&syscon GEMINI_RESET_USB1>;
|
||||
@ -1,54 +0,0 @@
|
||||
From 296184694ae7a4e388603c95499e98d30b21cc09 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 23 Jan 2023 08:39:16 +0100
|
||||
Subject: [PATCH 29/29] ARM: dts: gemini: Enable DNS313 FOTG210 as periph
|
||||
|
||||
Add the GPIO-based VBUS phy, and enable the FOTG210
|
||||
USB1 block for use as peripheral.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20230123073916.2350839-2-linus.walleij@linaro.org
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
|
||||
@@ -80,6 +80,15 @@
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * This is the type B USB connector on the device,
|
||||
+ * a GPIO-controlled USB VBUS detect
|
||||
+ */
|
||||
+ usb1_phy: phy {
|
||||
+ compatible = "gpio-usb-b-connector", "usb-b-connector";
|
||||
+ #phy-cells = <0>;
|
||||
+ vbus-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
|
||||
/* Global Mixed-Mode Technology G751 mounted on GPIO I2C */
|
||||
i2c {
|
||||
@@ -302,5 +311,13 @@
|
||||
ide@63000000 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ usb@69000000 {
|
||||
+ status = "okay";
|
||||
+ dr_mode = "peripheral";
|
||||
+ usb-phy = <&usb1_phy>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&usb_default_pins>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/gemini.dtsi
|
||||
+++ b/arch/arm/boot/dts/gemini.dtsi
|
||||
@@ -455,6 +455,8 @@
|
||||
*/
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb_default_pins>;
|
||||
+ /* Default to host mode */
|
||||
+ dr_mode = "host";
|
||||
syscon = <&syscon>;
|
||||
status = "disabled";
|
||||
};
|
||||
@ -0,0 +1,78 @@
|
||||
From f8001196455311eb128fcafd98cb2050a70218df Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sat, 6 Jan 2024 01:12:22 +0100
|
||||
Subject: [PATCH 4/4] net: ethernet: cortina: Drop TSO support
|
||||
|
||||
The recent change to allow large frames without hardware checksumming
|
||||
slotted in software checksumming in the driver if hardware could not
|
||||
do it.
|
||||
|
||||
This will however upset TSO (TCP Segment Offloading). Typical
|
||||
error dumps includes this:
|
||||
|
||||
skb len=2961 headroom=222 headlen=66 tailroom=0
|
||||
(...)
|
||||
WARNING: CPU: 0 PID: 956 at net/core/dev.c:3259 skb_warn_bad_offload+0x7c/0x108
|
||||
gemini-ethernet-port: caps=(0x0000010000154813, 0x00002007ffdd7889)
|
||||
|
||||
And the packets do not go through.
|
||||
|
||||
The TSO implementation is bogus: a TSO enabled driver must propagate
|
||||
the skb_shinfo(skb)->gso_size value to the TSO engine on the NIC.
|
||||
|
||||
Drop the size check and TSO offloading features for now: this
|
||||
needs to be fixed up properly.
|
||||
|
||||
After this ethernet works fine on Gemini devices with a direct connected
|
||||
PHY such as D-Link DNS-313.
|
||||
|
||||
Also tested to still be working with a DSA switch using the Gemini
|
||||
ethernet as conduit interface.
|
||||
|
||||
Link: https://lore.kernel.org/netdev/CANn89iJLfxng1sYL5Zk0mknXpyYQPCp83m3KgD2KJ2_hKCpEUg@mail.gmail.com/
|
||||
Suggested-by: Eric Dumazet <edumazet@google.com>
|
||||
Fixes: d4d0c5b4d279 ("net: ethernet: cortina: Handle large frames")
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/cortina/gemini.c | 15 ++-------------
|
||||
1 file changed, 2 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/cortina/gemini.c
|
||||
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||||
@@ -79,8 +79,7 @@ MODULE_PARM_DESC(debug, "Debug level (0=
|
||||
#define GMAC0_IRQ4_8 (GMAC0_MIB_INT_BIT | GMAC0_RX_OVERRUN_INT_BIT)
|
||||
|
||||
#define GMAC_OFFLOAD_FEATURES (NETIF_F_SG | NETIF_F_IP_CSUM | \
|
||||
- NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM | \
|
||||
- NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
|
||||
+ NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM)
|
||||
|
||||
/**
|
||||
* struct gmac_queue_page - page buffer per-page info
|
||||
@@ -1143,23 +1142,13 @@ static int gmac_map_tx_bufs(struct net_d
|
||||
struct gmac_txdesc *txd;
|
||||
skb_frag_t *skb_frag;
|
||||
dma_addr_t mapping;
|
||||
- unsigned short mtu;
|
||||
void *buffer;
|
||||
int ret;
|
||||
|
||||
- mtu = ETH_HLEN;
|
||||
- mtu += netdev->mtu;
|
||||
- if (skb->protocol == htons(ETH_P_8021Q))
|
||||
- mtu += VLAN_HLEN;
|
||||
-
|
||||
+ /* TODO: implement proper TSO using MTU in word3 */
|
||||
word1 = skb->len;
|
||||
word3 = SOF_BIT;
|
||||
|
||||
- if (word1 > mtu) {
|
||||
- word1 |= TSS_MTU_ENABLE_BIT;
|
||||
- word3 |= mtu;
|
||||
- }
|
||||
-
|
||||
if (skb->len >= ETH_FRAME_LEN) {
|
||||
/* Hardware offloaded checksumming isn't working on frames
|
||||
* bigger than 1514 bytes. A hypothesis about this is that the
|
||||
@ -0,0 +1,103 @@
|
||||
From 091cde88b5ff2a2ca5739ce41f9cf5640a95222f Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Sun, 11 Feb 2024 22:24:25 +0100
|
||||
Subject: [PATCH] ARM: dts: gemini: Map reset keys to KEY_RESTART
|
||||
|
||||
This maps the misc "reset", "setup" and "facory reset" keys to the
|
||||
only key a standard userspace is likely to understand: KEY_RESTART.
|
||||
On OpenWrt this will simply restart the system under controlled
|
||||
forms.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20240211-gemini-dts-v1-3-6c09adeb4c2e@linaro.org
|
||||
---
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-sl93512r.dts | 2 +-
|
||||
arch/arm/boot/dts/gemini/gemini-sq201.dts | 2 +-
|
||||
arch/arm/boot/dts/gemini/gemini-wbd111.dts | 4 ++--
|
||||
arch/arm/boot/dts/gemini/gemini-wbd222.dts | 4 ++--
|
||||
6 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
@@ -27,10 +27,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-esc {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_ESC>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
|
||||
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts
|
||||
@@ -33,10 +33,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-esc {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_ESC>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-sl93512r.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-sl93512r.dts
|
||||
@@ -43,7 +43,7 @@
|
||||
button-setup {
|
||||
debounce-interval = <50>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "factory reset";
|
||||
/* Conflict with NAND flash */
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-sq201.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-sq201.dts
|
||||
@@ -30,7 +30,7 @@
|
||||
button-setup {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "factory reset";
|
||||
/* Conflict with NAND flash */
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-wbd111.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-wbd111.dts
|
||||
@@ -28,10 +28,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-setup {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Conflict with ICE */
|
||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-wbd222.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-wbd222.dts
|
||||
@@ -27,10 +27,10 @@
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
- button-setup {
|
||||
+ button-reset {
|
||||
debounce-interval = <100>;
|
||||
wakeup-source;
|
||||
- linux,code = <KEY_SETUP>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
label = "reset";
|
||||
/* Conflict with ICE */
|
||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
@ -1,7 +1,7 @@
|
||||
From 36ee838bf83c01cff7cb47c7b07be278d2950ac0 Mon Sep 17 00:00:00 2001
|
||||
From c1aa34cd568bc7b86b82353034070c32b6ebe6db Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Mon, 11 Mar 2019 15:44:29 +0100
|
||||
Subject: [PATCH 2/2] ARM: dts: Augment DIR-685 partition table for OpenWrt
|
||||
Subject: [PATCH] ARM: dts: Augment DIR-685 partition table for OpenWrt
|
||||
|
||||
Rename the firmware partition so that the firmware MTD
|
||||
splitter will do its job, drop the rootfs arguments as
|
||||
@ -9,8 +9,11 @@ the MTD splitter will set this up automatically.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
|
||||
@@ -20,7 +20,7 @@
|
||||
};
|
||||
|
||||
@ -0,0 +1,161 @@
|
||||
From 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f Mon Sep 17 00:00:00 2001
|
||||
From: Tanzir Hasan <tanzirh@google.com>
|
||||
Date: Tue, 26 Dec 2023 18:00:00 +0000
|
||||
Subject: [PATCH] kernel.h: removed REPEAT_BYTE from kernel.h
|
||||
|
||||
This patch creates wordpart.h and includes it in asm/word-at-a-time.h
|
||||
for all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h
|
||||
because of REPEAT_BYTE. Moving this to another header and including it
|
||||
where necessary allows us to not include the bloated kernel.h. Making
|
||||
this implicit dependency on REPEAT_BYTE explicit allows for later
|
||||
improvements in the lib/string.c inclusion list.
|
||||
|
||||
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
|
||||
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
|
||||
Signed-off-by: Tanzir Hasan <tanzirh@google.com>
|
||||
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231226-libstringheader-v6-1-80aa08c7652c@google.com
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
---
|
||||
arch/arm/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/arm64/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/powerpc/include/asm/word-at-a-time.h | 4 ++--
|
||||
arch/riscv/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/s390/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/sh/include/asm/word-at-a-time.h | 2 ++
|
||||
arch/x86/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/x86/kvm/mmu/mmu.c | 1 +
|
||||
fs/namei.c | 2 +-
|
||||
include/asm-generic/word-at-a-time.h | 3 ++-
|
||||
include/linux/kernel.h | 8 --------
|
||||
include/linux/wordpart.h | 13 +++++++++++++
|
||||
12 files changed, 31 insertions(+), 17 deletions(-)
|
||||
create mode 100644 include/linux/wordpart.h
|
||||
|
||||
--- a/arch/arm/include/asm/word-at-a-time.h
|
||||
+++ b/arch/arm/include/asm/word-at-a-time.h
|
||||
@@ -8,7 +8,8 @@
|
||||
* Little-endian word-at-a-time zero byte handling.
|
||||
* Heavily based on the x86 algorithm.
|
||||
*/
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
struct word_at_a_time {
|
||||
const unsigned long one_bits, high_bits;
|
||||
--- a/arch/arm64/include/asm/word-at-a-time.h
|
||||
+++ b/arch/arm64/include/asm/word-at-a-time.h
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
#ifndef __AARCH64EB__
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
struct word_at_a_time {
|
||||
const unsigned long one_bits, high_bits;
|
||||
--- a/arch/powerpc/include/asm/word-at-a-time.h
|
||||
+++ b/arch/powerpc/include/asm/word-at-a-time.h
|
||||
@@ -4,8 +4,8 @@
|
||||
/*
|
||||
* Word-at-a-time interfaces for PowerPC.
|
||||
*/
|
||||
-
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/extable.h>
|
||||
|
||||
--- a/arch/sh/include/asm/word-at-a-time.h
|
||||
+++ b/arch/sh/include/asm/word-at-a-time.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
# include <asm-generic/word-at-a-time.h>
|
||||
#else
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
/*
|
||||
* Little-endian version cribbed from x86.
|
||||
*/
|
||||
--- a/arch/x86/include/asm/word-at-a-time.h
|
||||
+++ b/arch/x86/include/asm/word-at-a-time.h
|
||||
@@ -2,7 +2,8 @@
|
||||
#ifndef _ASM_WORD_AT_A_TIME_H
|
||||
#define _ASM_WORD_AT_A_TIME_H
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
/*
|
||||
* This is largely generic for little-endian machines, but the
|
||||
--- a/arch/x86/kvm/mmu/mmu.c
|
||||
+++ b/arch/x86/kvm/mmu/mmu.c
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <linux/kern_levels.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/kthread.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/memtype.h>
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/export.h>
|
||||
-#include <linux/kernel.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/pagemap.h>
|
||||
--- a/include/asm-generic/word-at-a-time.h
|
||||
+++ b/include/asm-generic/word-at-a-time.h
|
||||
@@ -2,7 +2,8 @@
|
||||
#ifndef _ASM_WORD_AT_A_TIME_H
|
||||
#define _ASM_WORD_AT_A_TIME_H
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -36,14 +36,6 @@
|
||||
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
-/**
|
||||
- * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
- * @x: value to repeat
|
||||
- *
|
||||
- * NOTE: @x is not checked for > 0xff; larger values produce odd results.
|
||||
- */
|
||||
-#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
-
|
||||
/* generic data direction definitions */
|
||||
#define READ 0
|
||||
#define WRITE 1
|
||||
--- /dev/null
|
||||
+++ b/include/linux/wordpart.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+
|
||||
+#ifndef _LINUX_WORDPART_H
|
||||
+#define _LINUX_WORDPART_H
|
||||
+/**
|
||||
+ * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
+ * @x: value to repeat
|
||||
+ *
|
||||
+ * NOTE: @x is not checked for > 0xff; larger values produce odd results.
|
||||
+ */
|
||||
+#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
+
|
||||
+#endif // _LINUX_WORDPART_H
|
||||
@ -0,0 +1,107 @@
|
||||
From adeb04362d74188c1e22ccb824b15a0a7b3de2f4 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Date: Wed, 14 Feb 2024 19:26:32 +0200
|
||||
Subject: [PATCH] kernel.h: Move upper_*_bits() and lower_*_bits() to
|
||||
wordpart.h
|
||||
|
||||
The wordpart.h header is collecting APIs related to the handling
|
||||
parts of the word (usually in byte granularity). The upper_*_bits()
|
||||
and lower_*_bits() are good candidates to be moved to there.
|
||||
|
||||
This helps to clean up header dependency hell with regard to kernel.h
|
||||
as the latter gathers completely unrelated stuff together and slows
|
||||
down compilation (especially when it's included into other header).
|
||||
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Link: https://lore.kernel.org/r/20240214172752.3605073-1-andriy.shevchenko@linux.intel.com
|
||||
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
---
|
||||
include/linux/kernel.h | 30 ++----------------------------
|
||||
include/linux/wordpart.h | 29 +++++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <linux/build_bug.h>
|
||||
#include <linux/static_call_types.h>
|
||||
#include <linux/instruction_pointer.h>
|
||||
+#include <linux/wordpart.h>
|
||||
+
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include <uapi/linux/kernel.h>
|
||||
@@ -55,34 +57,6 @@
|
||||
} \
|
||||
)
|
||||
|
||||
-/**
|
||||
- * upper_32_bits - return bits 32-63 of a number
|
||||
- * @n: the number we're accessing
|
||||
- *
|
||||
- * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
|
||||
- * the "right shift count >= width of type" warning when that quantity is
|
||||
- * 32-bits.
|
||||
- */
|
||||
-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
-
|
||||
-/**
|
||||
- * lower_32_bits - return bits 0-31 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
|
||||
-
|
||||
-/**
|
||||
- * upper_16_bits - return bits 16-31 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define upper_16_bits(n) ((u16)((n) >> 16))
|
||||
-
|
||||
-/**
|
||||
- * lower_16_bits - return bits 0-15 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define lower_16_bits(n) ((u16)((n) & 0xffff))
|
||||
-
|
||||
struct completion;
|
||||
struct user;
|
||||
|
||||
--- a/include/linux/wordpart.h
|
||||
+++ b/include/linux/wordpart.h
|
||||
@@ -2,6 +2,35 @@
|
||||
|
||||
#ifndef _LINUX_WORDPART_H
|
||||
#define _LINUX_WORDPART_H
|
||||
+
|
||||
+/**
|
||||
+ * upper_32_bits - return bits 32-63 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ *
|
||||
+ * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
|
||||
+ * the "right shift count >= width of type" warning when that quantity is
|
||||
+ * 32-bits.
|
||||
+ */
|
||||
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
+
|
||||
+/**
|
||||
+ * lower_32_bits - return bits 0-31 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
|
||||
+
|
||||
+/**
|
||||
+ * upper_16_bits - return bits 16-31 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define upper_16_bits(n) ((u16)((n) >> 16))
|
||||
+
|
||||
+/**
|
||||
+ * lower_16_bits - return bits 0-15 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define lower_16_bits(n) ((u16)((n) & 0xffff))
|
||||
+
|
||||
/**
|
||||
* REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
* @x: value to repeat
|
||||
@ -0,0 +1,45 @@
|
||||
From 16e6592cd5c5bd74d8890973489f60176c692614 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Sun, 28 Apr 2024 12:19:58 +0300
|
||||
Subject: [PATCH] net: dsa: mt7530: do not set MT7530_P5_DIS when PHY muxing is
|
||||
being used
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
DSA initalises the ds->num_ports amount of ports in
|
||||
dsa_switch_touch_ports(). When the PHY muxing feature is in use, port 5
|
||||
won't be defined in the device tree. Because of this, the type member of
|
||||
the dsa_port structure for this port will be assigned DSA_PORT_TYPE_UNUSED.
|
||||
The dsa_port_setup() function calls ds->ops->port_disable() when the port
|
||||
type is DSA_PORT_TYPE_UNUSED.
|
||||
|
||||
The MT7530_P5_DIS bit is unset in mt7530_setup() when PHY muxing is being
|
||||
used. mt7530_port_disable() which is assigned to ds->ops->port_disable() is
|
||||
called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
|
||||
which breaks network connectivity when PHY muxing is being used.
|
||||
|
||||
Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
|
||||
|
||||
Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
|
||||
Reported-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://lore.kernel.org/r/20240428-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v2-1-bb7c37d293f8@arinc9.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1227,7 +1227,8 @@ mt7530_port_disable(struct dsa_switch *d
|
||||
if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
|
||||
return;
|
||||
|
||||
- if (port == 5)
|
||||
+ /* Do not set MT7530_P5_DIS when port 5 is being used for PHY muxing. */
|
||||
+ if (port == 5 && priv->p5_mode == GMAC5)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
|
||||
else if (port == 6)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
|
||||
@ -0,0 +1,45 @@
|
||||
From d8dcf5bd6d0eace9f7c1daa14b63b3925b09d033 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Tue, 30 Apr 2024 08:01:33 +0300
|
||||
Subject: [PATCH] net: dsa: mt7530: detect PHY muxing when PHY is defined on
|
||||
switch MDIO bus
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
|
||||
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
|
||||
bus the switch listens on. The PHY muxing feature makes use of this.
|
||||
|
||||
This is problematic as the PHY may be attached before the switch is
|
||||
initialised, in which case, the PHY will fail to be attached.
|
||||
|
||||
Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
|
||||
of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
|
||||
the switch on the device tree. Extend the check to detect PHY muxing when
|
||||
the PHY is defined on the MDIO bus of the switch on the device tree.
|
||||
|
||||
When the PHY is described this way, the switch will be initialised first,
|
||||
then the switch MDIO bus will be registered. Only after these steps, the
|
||||
PHY will be attached.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Link: https://lore.kernel.org/r/20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2489,7 +2489,8 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
if (!phy_node)
|
||||
continue;
|
||||
|
||||
- if (phy_node->parent == priv->dev->of_node->parent) {
|
||||
+ if (phy_node->parent == priv->dev->of_node->parent ||
|
||||
+ phy_node->parent->parent == priv->dev->of_node) {
|
||||
ret = of_get_phy_mode(mac_np, &interface);
|
||||
if (ret && ret != -ENODEV) {
|
||||
of_node_put(mac_np);
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
From 87c33315af380ca12a2e59ac94edad4fe0481b4c Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <dan.carpenter@linaro.org>
|
||||
Date: Fri, 5 Apr 2024 13:08:59 +0300
|
||||
Subject: [PATCH] net: phy: air_en8811h: fix some error codes
|
||||
|
||||
These error paths accidentally return "ret" which is zero/success
|
||||
instead of the correct error code.
|
||||
|
||||
Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Link: https://lore.kernel.org/r/7ef2e230-dfb7-4a77-8973-9e5be1a99fc2@moroto.mountain
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/phy/air_en8811h.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/air_en8811h.c
|
||||
+++ b/drivers/net/phy/air_en8811h.c
|
||||
@@ -272,11 +272,11 @@ static int __air_buckpbus_reg_read(struc
|
||||
|
||||
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
|
||||
if (pbus_data_high < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_high;
|
||||
|
||||
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
|
||||
if (pbus_data_low < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_low;
|
||||
|
||||
*pbus_data = pbus_data_low | (pbus_data_high << 16);
|
||||
return 0;
|
||||
@@ -323,11 +323,11 @@ static int __air_buckpbus_reg_modify(str
|
||||
|
||||
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
|
||||
if (pbus_data_high < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_high;
|
||||
|
||||
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
|
||||
if (pbus_data_low < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_low;
|
||||
|
||||
pbus_data_old = pbus_data_low | (pbus_data_high << 16);
|
||||
pbus_data_new = (pbus_data_old & ~mask) | set;
|
||||
@ -16,8 +16,8 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -72,9 +72,9 @@ config SFP
|
||||
comment "MII PHY device drivers"
|
||||
@@ -77,9 +77,9 @@ config AIR_EN8811H_PHY
|
||||
Currently supports the Airoha EN8811H PHY.
|
||||
|
||||
config AMD_PHY
|
||||
- tristate "AMD PHYs"
|
||||
|
||||
@ -0,0 +1,161 @@
|
||||
From 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f Mon Sep 17 00:00:00 2001
|
||||
From: Tanzir Hasan <tanzirh@google.com>
|
||||
Date: Tue, 26 Dec 2023 18:00:00 +0000
|
||||
Subject: [PATCH] kernel.h: removed REPEAT_BYTE from kernel.h
|
||||
|
||||
This patch creates wordpart.h and includes it in asm/word-at-a-time.h
|
||||
for all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h
|
||||
because of REPEAT_BYTE. Moving this to another header and including it
|
||||
where necessary allows us to not include the bloated kernel.h. Making
|
||||
this implicit dependency on REPEAT_BYTE explicit allows for later
|
||||
improvements in the lib/string.c inclusion list.
|
||||
|
||||
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
|
||||
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
|
||||
Signed-off-by: Tanzir Hasan <tanzirh@google.com>
|
||||
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20231226-libstringheader-v6-1-80aa08c7652c@google.com
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
---
|
||||
arch/arm/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/arm64/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/powerpc/include/asm/word-at-a-time.h | 4 ++--
|
||||
arch/riscv/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/s390/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/sh/include/asm/word-at-a-time.h | 2 ++
|
||||
arch/x86/include/asm/word-at-a-time.h | 3 ++-
|
||||
arch/x86/kvm/mmu/mmu.c | 1 +
|
||||
fs/namei.c | 2 +-
|
||||
include/asm-generic/word-at-a-time.h | 3 ++-
|
||||
include/linux/kernel.h | 8 --------
|
||||
include/linux/wordpart.h | 13 +++++++++++++
|
||||
12 files changed, 31 insertions(+), 17 deletions(-)
|
||||
create mode 100644 include/linux/wordpart.h
|
||||
|
||||
--- a/arch/arm/include/asm/word-at-a-time.h
|
||||
+++ b/arch/arm/include/asm/word-at-a-time.h
|
||||
@@ -8,7 +8,8 @@
|
||||
* Little-endian word-at-a-time zero byte handling.
|
||||
* Heavily based on the x86 algorithm.
|
||||
*/
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
struct word_at_a_time {
|
||||
const unsigned long one_bits, high_bits;
|
||||
--- a/arch/arm64/include/asm/word-at-a-time.h
|
||||
+++ b/arch/arm64/include/asm/word-at-a-time.h
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
#ifndef __AARCH64EB__
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
struct word_at_a_time {
|
||||
const unsigned long one_bits, high_bits;
|
||||
--- a/arch/powerpc/include/asm/word-at-a-time.h
|
||||
+++ b/arch/powerpc/include/asm/word-at-a-time.h
|
||||
@@ -4,8 +4,8 @@
|
||||
/*
|
||||
* Word-at-a-time interfaces for PowerPC.
|
||||
*/
|
||||
-
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/extable.h>
|
||||
|
||||
--- a/arch/sh/include/asm/word-at-a-time.h
|
||||
+++ b/arch/sh/include/asm/word-at-a-time.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
# include <asm-generic/word-at-a-time.h>
|
||||
#else
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
/*
|
||||
* Little-endian version cribbed from x86.
|
||||
*/
|
||||
--- a/arch/x86/include/asm/word-at-a-time.h
|
||||
+++ b/arch/x86/include/asm/word-at-a-time.h
|
||||
@@ -2,7 +2,8 @@
|
||||
#ifndef _ASM_WORD_AT_A_TIME_H
|
||||
#define _ASM_WORD_AT_A_TIME_H
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
/*
|
||||
* This is largely generic for little-endian machines, but the
|
||||
--- a/arch/x86/kvm/mmu/mmu.c
|
||||
+++ b/arch/x86/kvm/mmu/mmu.c
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <linux/kern_levels.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/kthread.h>
|
||||
+#include <linux/wordpart.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/memtype.h>
|
||||
--- a/fs/namei.c
|
||||
+++ b/fs/namei.c
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/export.h>
|
||||
-#include <linux/kernel.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/filelock.h>
|
||||
#include <linux/namei.h>
|
||||
--- a/include/asm-generic/word-at-a-time.h
|
||||
+++ b/include/asm-generic/word-at-a-time.h
|
||||
@@ -2,7 +2,8 @@
|
||||
#ifndef _ASM_WORD_AT_A_TIME_H
|
||||
#define _ASM_WORD_AT_A_TIME_H
|
||||
|
||||
-#include <linux/kernel.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <linux/wordpart.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -38,14 +38,6 @@
|
||||
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
-/**
|
||||
- * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
- * @x: value to repeat
|
||||
- *
|
||||
- * NOTE: @x is not checked for > 0xff; larger values produce odd results.
|
||||
- */
|
||||
-#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
-
|
||||
/* generic data direction definitions */
|
||||
#define READ 0
|
||||
#define WRITE 1
|
||||
--- /dev/null
|
||||
+++ b/include/linux/wordpart.h
|
||||
@@ -0,0 +1,13 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+
|
||||
+#ifndef _LINUX_WORDPART_H
|
||||
+#define _LINUX_WORDPART_H
|
||||
+/**
|
||||
+ * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
+ * @x: value to repeat
|
||||
+ *
|
||||
+ * NOTE: @x is not checked for > 0xff; larger values produce odd results.
|
||||
+ */
|
||||
+#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
+
|
||||
+#endif // _LINUX_WORDPART_H
|
||||
@ -0,0 +1,107 @@
|
||||
From adeb04362d74188c1e22ccb824b15a0a7b3de2f4 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Date: Wed, 14 Feb 2024 19:26:32 +0200
|
||||
Subject: [PATCH] kernel.h: Move upper_*_bits() and lower_*_bits() to
|
||||
wordpart.h
|
||||
|
||||
The wordpart.h header is collecting APIs related to the handling
|
||||
parts of the word (usually in byte granularity). The upper_*_bits()
|
||||
and lower_*_bits() are good candidates to be moved to there.
|
||||
|
||||
This helps to clean up header dependency hell with regard to kernel.h
|
||||
as the latter gathers completely unrelated stuff together and slows
|
||||
down compilation (especially when it's included into other header).
|
||||
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Link: https://lore.kernel.org/r/20240214172752.3605073-1-andriy.shevchenko@linux.intel.com
|
||||
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
|
||||
Signed-off-by: Kees Cook <keescook@chromium.org>
|
||||
---
|
||||
include/linux/kernel.h | 30 ++----------------------------
|
||||
include/linux/wordpart.h | 29 +++++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <linux/sprintf.h>
|
||||
#include <linux/static_call_types.h>
|
||||
#include <linux/instruction_pointer.h>
|
||||
+#include <linux/wordpart.h>
|
||||
+
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#include <uapi/linux/kernel.h>
|
||||
@@ -57,34 +59,6 @@
|
||||
} \
|
||||
)
|
||||
|
||||
-/**
|
||||
- * upper_32_bits - return bits 32-63 of a number
|
||||
- * @n: the number we're accessing
|
||||
- *
|
||||
- * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
|
||||
- * the "right shift count >= width of type" warning when that quantity is
|
||||
- * 32-bits.
|
||||
- */
|
||||
-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
-
|
||||
-/**
|
||||
- * lower_32_bits - return bits 0-31 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
|
||||
-
|
||||
-/**
|
||||
- * upper_16_bits - return bits 16-31 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define upper_16_bits(n) ((u16)((n) >> 16))
|
||||
-
|
||||
-/**
|
||||
- * lower_16_bits - return bits 0-15 of a number
|
||||
- * @n: the number we're accessing
|
||||
- */
|
||||
-#define lower_16_bits(n) ((u16)((n) & 0xffff))
|
||||
-
|
||||
struct completion;
|
||||
struct user;
|
||||
|
||||
--- a/include/linux/wordpart.h
|
||||
+++ b/include/linux/wordpart.h
|
||||
@@ -2,6 +2,35 @@
|
||||
|
||||
#ifndef _LINUX_WORDPART_H
|
||||
#define _LINUX_WORDPART_H
|
||||
+
|
||||
+/**
|
||||
+ * upper_32_bits - return bits 32-63 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ *
|
||||
+ * A basic shift-right of a 64- or 32-bit quantity. Use this to suppress
|
||||
+ * the "right shift count >= width of type" warning when that quantity is
|
||||
+ * 32-bits.
|
||||
+ */
|
||||
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
|
||||
+
|
||||
+/**
|
||||
+ * lower_32_bits - return bits 0-31 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
|
||||
+
|
||||
+/**
|
||||
+ * upper_16_bits - return bits 16-31 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define upper_16_bits(n) ((u16)((n) >> 16))
|
||||
+
|
||||
+/**
|
||||
+ * lower_16_bits - return bits 0-15 of a number
|
||||
+ * @n: the number we're accessing
|
||||
+ */
|
||||
+#define lower_16_bits(n) ((u16)((n) & 0xffff))
|
||||
+
|
||||
/**
|
||||
* REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
|
||||
* @x: value to repeat
|
||||
@ -0,0 +1,45 @@
|
||||
From 16e6592cd5c5bd74d8890973489f60176c692614 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Sun, 28 Apr 2024 12:19:58 +0300
|
||||
Subject: [PATCH] net: dsa: mt7530: do not set MT7530_P5_DIS when PHY muxing is
|
||||
being used
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
DSA initalises the ds->num_ports amount of ports in
|
||||
dsa_switch_touch_ports(). When the PHY muxing feature is in use, port 5
|
||||
won't be defined in the device tree. Because of this, the type member of
|
||||
the dsa_port structure for this port will be assigned DSA_PORT_TYPE_UNUSED.
|
||||
The dsa_port_setup() function calls ds->ops->port_disable() when the port
|
||||
type is DSA_PORT_TYPE_UNUSED.
|
||||
|
||||
The MT7530_P5_DIS bit is unset in mt7530_setup() when PHY muxing is being
|
||||
used. mt7530_port_disable() which is assigned to ds->ops->port_disable() is
|
||||
called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
|
||||
which breaks network connectivity when PHY muxing is being used.
|
||||
|
||||
Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
|
||||
|
||||
Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
|
||||
Reported-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Link: https://lore.kernel.org/r/20240428-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v2-1-bb7c37d293f8@arinc9.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1220,7 +1220,8 @@ mt7530_port_disable(struct dsa_switch *d
|
||||
if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
|
||||
return;
|
||||
|
||||
- if (port == 5)
|
||||
+ /* Do not set MT7530_P5_DIS when port 5 is being used for PHY muxing. */
|
||||
+ if (port == 5 && priv->p5_mode == GMAC5)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
|
||||
else if (port == 6)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
|
||||
@ -0,0 +1,45 @@
|
||||
From d8dcf5bd6d0eace9f7c1daa14b63b3925b09d033 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal@arinc9.com>
|
||||
Date: Tue, 30 Apr 2024 08:01:33 +0300
|
||||
Subject: [PATCH] net: dsa: mt7530: detect PHY muxing when PHY is defined on
|
||||
switch MDIO bus
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
|
||||
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
|
||||
bus the switch listens on. The PHY muxing feature makes use of this.
|
||||
|
||||
This is problematic as the PHY may be attached before the switch is
|
||||
initialised, in which case, the PHY will fail to be attached.
|
||||
|
||||
Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
|
||||
of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
|
||||
the switch on the device tree. Extend the check to detect PHY muxing when
|
||||
the PHY is defined on the MDIO bus of the switch on the device tree.
|
||||
|
||||
When the PHY is described this way, the switch will be initialised first,
|
||||
then the switch MDIO bus will be registered. Only after these steps, the
|
||||
PHY will be attached.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Link: https://lore.kernel.org/r/20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2484,7 +2484,8 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
if (!phy_node)
|
||||
continue;
|
||||
|
||||
- if (phy_node->parent == priv->dev->of_node->parent) {
|
||||
+ if (phy_node->parent == priv->dev->of_node->parent ||
|
||||
+ phy_node->parent->parent == priv->dev->of_node) {
|
||||
ret = of_get_phy_mode(mac_np, &interface);
|
||||
if (ret && ret != -ENODEV) {
|
||||
of_node_put(mac_np);
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
From 87c33315af380ca12a2e59ac94edad4fe0481b4c Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <dan.carpenter@linaro.org>
|
||||
Date: Fri, 5 Apr 2024 13:08:59 +0300
|
||||
Subject: [PATCH] net: phy: air_en8811h: fix some error codes
|
||||
|
||||
These error paths accidentally return "ret" which is zero/success
|
||||
instead of the correct error code.
|
||||
|
||||
Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Link: https://lore.kernel.org/r/7ef2e230-dfb7-4a77-8973-9e5be1a99fc2@moroto.mountain
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/phy/air_en8811h.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/net/phy/air_en8811h.c
|
||||
+++ b/drivers/net/phy/air_en8811h.c
|
||||
@@ -272,11 +272,11 @@ static int __air_buckpbus_reg_read(struc
|
||||
|
||||
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
|
||||
if (pbus_data_high < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_high;
|
||||
|
||||
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
|
||||
if (pbus_data_low < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_low;
|
||||
|
||||
*pbus_data = pbus_data_low | (pbus_data_high << 16);
|
||||
return 0;
|
||||
@@ -323,11 +323,11 @@ static int __air_buckpbus_reg_modify(str
|
||||
|
||||
pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
|
||||
if (pbus_data_high < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_high;
|
||||
|
||||
pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
|
||||
if (pbus_data_low < 0)
|
||||
- return ret;
|
||||
+ return pbus_data_low;
|
||||
|
||||
pbus_data_old = pbus_data_low | (pbus_data_high << 16);
|
||||
pbus_data_new = (pbus_data_old & ~mask) | set;
|
||||
@ -16,8 +16,8 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
|
||||
--- a/drivers/net/phy/Kconfig
|
||||
+++ b/drivers/net/phy/Kconfig
|
||||
@@ -69,9 +69,9 @@ config SFP
|
||||
comment "MII PHY device drivers"
|
||||
@@ -74,9 +74,9 @@ config AIR_EN8811H_PHY
|
||||
Currently supports the Airoha EN8811H PHY.
|
||||
|
||||
config AMD_PHY
|
||||
- tristate "AMD PHYs"
|
||||
|
||||
@ -414,6 +414,7 @@ CONFIG_ARM64_SW_TTBR0_PAN=y
|
||||
# CONFIG_ARM_CCI_PMU is not set
|
||||
# CONFIG_ARM_CCN is not set
|
||||
# CONFIG_ARM_CMN is not set
|
||||
# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
|
||||
# CONFIG_ARM_CPUIDLE is not set
|
||||
CONFIG_ARM_CPU_TOPOLOGY=y
|
||||
# CONFIG_ARM_CRYPTO is not set
|
||||
@ -465,6 +466,7 @@ CONFIG_ARM_MODULE_PLTS=y
|
||||
# CONFIG_ARM_SDE_INTERFACE is not set
|
||||
# CONFIG_ARM_SMCCC_SOC_ID is not set
|
||||
# CONFIG_ARM_SMC_WATCHDOG is not set
|
||||
# CONFIG_ARM_SMMU_V3_PMU is not set
|
||||
# CONFIG_ARM_SP805_WATCHDOG is not set
|
||||
# CONFIG_ARM_SPE_PMU is not set
|
||||
# CONFIG_ARM_THUMBEE is not set
|
||||
|
||||
90
target/linux/generic/hack-6.6/200-tools_portability.patch
Normal file
90
target/linux/generic/hack-6.6/200-tools_portability.patch
Normal file
@ -0,0 +1,90 @@
|
||||
--- a/tools/scripts/Makefile.include
|
||||
+++ b/tools/scripts/Makefile.include
|
||||
@@ -72,8 +72,6 @@ $(call allow-override,CXX,$(CROSS_COMPIL
|
||||
$(call allow-override,STRIP,$(CROSS_COMPILE)strip)
|
||||
endif
|
||||
|
||||
-CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
|
||||
-
|
||||
ifneq ($(LLVM),)
|
||||
HOSTAR ?= $(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)
|
||||
HOSTCC ?= $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
|
||||
@@ -84,6 +82,9 @@ HOSTCC ?= gcc
|
||||
HOSTLD ?= ld
|
||||
endif
|
||||
|
||||
+CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
|
||||
+HOSTCC_NO_CLANG := $(shell $(HOSTCC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
|
||||
+
|
||||
# Some tools require Clang, LLC and/or LLVM utils
|
||||
CLANG ?= clang
|
||||
LLC ?= llc
|
||||
@@ -92,8 +93,9 @@ LLVM_OBJCOPY ?= llvm-objcopy
|
||||
LLVM_STRIP ?= llvm-strip
|
||||
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
-EXTRA_WARNINGS += -Wstrict-aliasing=3
|
||||
-
|
||||
+ ifeq ($(HOSTCC_NO_CLANG), 1)
|
||||
+ EXTRA_WARNINGS += -Wstrict-aliasing=3
|
||||
+ endif
|
||||
else ifneq ($(CROSS_COMPILE),)
|
||||
# Allow userspace to override CLANG_CROSS_FLAGS to specify their own
|
||||
# sysroots and flags or to avoid the GCC call in pure Clang builds.
|
||||
--- a/tools/include/linux/types.h
|
||||
+++ b/tools/include/linux/types.h
|
||||
@@ -56,6 +56,7 @@ typedef __s8 s8;
|
||||
#define __user
|
||||
#endif
|
||||
#define __must_check
|
||||
+#undef __cold
|
||||
#define __cold
|
||||
|
||||
typedef __u16 __bitwise __le16;
|
||||
--- a/tools/objtool/include/objtool/objtool.h
|
||||
+++ b/tools/objtool/include/objtool/objtool.h
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <objtool/elf.h>
|
||||
|
||||
+#undef __weak
|
||||
#define __weak __attribute__((weak))
|
||||
|
||||
struct pv_state {
|
||||
--- a/tools/include/asm-generic/bitops/fls.h
|
||||
+++ b/tools/include/asm-generic/bitops/fls.h
|
||||
@@ -2,6 +2,8 @@
|
||||
#ifndef _ASM_GENERIC_BITOPS_FLS_H_
|
||||
#define _ASM_GENERIC_BITOPS_FLS_H_
|
||||
|
||||
+#include <string.h>
|
||||
+
|
||||
/**
|
||||
* fls - find last (most-significant) bit set
|
||||
* @x: the word to search
|
||||
@@ -10,6 +12,7 @@
|
||||
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
||||
*/
|
||||
|
||||
+#define fls __linux_fls
|
||||
static __always_inline int fls(unsigned int x)
|
||||
{
|
||||
int r = 32;
|
||||
--- a/tools/lib/string.c
|
||||
+++ b/tools/lib/string.c
|
||||
@@ -96,6 +96,7 @@ int strtobool(const char *s, bool *res)
|
||||
* If libc has strlcpy() then that version will override this
|
||||
* implementation:
|
||||
*/
|
||||
+#ifndef __APPLE__
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wignored-attributes"
|
||||
@@ -114,6 +115,7 @@ size_t __weak strlcpy(char *dest, const
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* skip_spaces - Removes leading whitespace from @str.
|
||||
@ -0,0 +1,45 @@
|
||||
From 9be9a00adfac8118b6d685e71696f83187308c66 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <9be9a00adfac8118b6d685e71696f83187308c66.1715125851.git.daniel@makrotopia.org>
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Tue, 7 May 2024 22:43:30 +0100
|
||||
Subject: [PATCH net] net: phy: air_en8811h: reset netdev rules when LED is set
|
||||
manually
|
||||
To: Andrew Lunn <andrew@lunn.ch>,
|
||||
Heiner Kallweit <hkallweit1@gmail.com>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
David S. Miller <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
SkyLake Huang <skylake.huang@mediatek.com>,
|
||||
Eric Woudstra <ericwouds@gmail.com>,
|
||||
netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
|
||||
Setting LED_OFF via the brightness_set should deactivate hw control,
|
||||
so make sure netdev trigger rules also get cleared in that case.
|
||||
|
||||
Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
This is basically a stop-gap measure until unified LED handling has
|
||||
been implemented accross all MediaTek and Airoha PHYs.
|
||||
See also
|
||||
https://patchwork.kernel.org/project/netdevbpf/patch/20240425023325.15586-3-SkyLake.Huang@mediatek.com/
|
||||
|
||||
drivers/net/phy/air_en8811h.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/air_en8811h.c
|
||||
+++ b/drivers/net/phy/air_en8811h.c
|
||||
@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_
|
||||
|
||||
changed |= (priv->led[index].rules != 0);
|
||||
|
||||
+ /* clear netdev trigger rules in case LED_OFF has been set */
|
||||
+ if (!on)
|
||||
+ priv->led[index].rules = 0;
|
||||
+
|
||||
if (changed)
|
||||
return phy_modify_mmd(phydev, MDIO_MMD_VEND2,
|
||||
AIR_PHY_LED_ON(index),
|
||||
@ -1,79 +0,0 @@
|
||||
From patchwork Sat Apr 27 11:24:42 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
X-Patchwork-Id: 13645655
|
||||
From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
Date: Sat, 27 Apr 2024 14:24:42 +0300
|
||||
Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
|
||||
PHY muxing is being used
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Message-Id:
|
||||
<20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707@arinc9.com>
|
||||
To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>,
|
||||
Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Vladimir Oltean <olteanv@gmail.com>,
|
||||
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org,
|
||||
=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
X-Mailer: b4 0.13.0
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
From: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
|
||||
When the PHY muxing feature is in use, port 5 won't be defined in the
|
||||
device tree. Because of this, the type member of the dsa_port structure for
|
||||
this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
|
||||
function calls ds->ops->port_disable() when the port type is
|
||||
DSA_PORT_TYPE_UNUSED.
|
||||
|
||||
The MT7530_P5_DIS bit is unset when PHY muxing is being used.
|
||||
mt7530_port_disable() which is assigned to ds->ops->port_disable() is
|
||||
called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
|
||||
which breaks network connectivity when PHY muxing is being used.
|
||||
|
||||
Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
|
||||
|
||||
Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
|
||||
Reported-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
---
|
||||
Hello.
|
||||
|
||||
I've sent this to net-next as the patch it fixes is on the current
|
||||
development cycle.
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
|
||||
---
|
||||
base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
|
||||
change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
|
||||
|
||||
Best regards,
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1227,7 +1227,7 @@ mt7530_port_disable(struct dsa_switch *d
|
||||
if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
|
||||
return;
|
||||
|
||||
- if (port == 5)
|
||||
+ if (port == 5 && priv->p5_mode == GMAC5)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
|
||||
else if (port == 6)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
|
||||
@ -1,136 +0,0 @@
|
||||
From patchwork Tue Apr 30 05:01:33 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
X-Patchwork-Id: 13648264
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
|
||||
[10.30.226.201])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=10.30.226.201
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1714453299; cv=none;
|
||||
b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1714453299; c=relaxed/simple;
|
||||
bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
|
||||
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
|
||||
b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
|
||||
header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
|
||||
header.b="LTwGL2cB"
|
||||
Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
|
||||
s=k20201202; t=1714453299;
|
||||
bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
|
||||
h=From:Date:Subject:To:Cc:Reply-To:From;
|
||||
b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
|
||||
FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
|
||||
jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
|
||||
yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
|
||||
QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
|
||||
aa8XczXBSlBVw==
|
||||
Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
(localhost.localdomain [127.0.0.1])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
Date: Tue, 30 Apr 2024 08:01:33 +0300
|
||||
Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
|
||||
is defined on switch MDIO bus
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Message-Id:
|
||||
<20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com>
|
||||
X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
|
||||
e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
|
||||
O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
|
||||
ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
|
||||
To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>,
|
||||
Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Vladimir Oltean <olteanv@gmail.com>,
|
||||
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
Cc: Bartel Eerdekens <bartel.eerdekens@constell8.be>,
|
||||
mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
linux-mediatek@lists.infradead.org,
|
||||
=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
X-Mailer: b4 0.13.0
|
||||
X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
|
||||
i=arinc.unal@arinc9.com; s=arinc9-PC; h=from:subject:message-id;
|
||||
bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
|
||||
b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
|
||||
lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
|
||||
X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519;
|
||||
pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
|
||||
X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-PC with
|
||||
auth_id=158
|
||||
X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
Reply-To: arinc.unal@arinc9.com
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
From: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
|
||||
Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
|
||||
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
|
||||
bus the switch listens on. The PHY muxing feature makes use of this.
|
||||
|
||||
This is problematic as the PHY may be attached before the switch is
|
||||
initialised, in which case, the PHY will fail to be attached.
|
||||
|
||||
Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
|
||||
of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
|
||||
the switch on the device tree. Extend the check to detect PHY muxing when
|
||||
the PHY is defined on the MDIO bus of the switch on the device tree.
|
||||
|
||||
When the PHY is described this way, the switch will be initialised first,
|
||||
then the switch MDIO bus will be registered. Only after these steps, the
|
||||
PHY will be attached.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
---
|
||||
Changes in v2:
|
||||
- Address the terminology on the patch log.
|
||||
- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155@arinc9.com
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
|
||||
---
|
||||
base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
|
||||
change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
|
||||
|
||||
Best regards,
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2488,7 +2488,8 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
if (!phy_node)
|
||||
continue;
|
||||
|
||||
- if (phy_node->parent == priv->dev->of_node->parent) {
|
||||
+ if (phy_node->parent == priv->dev->of_node->parent ||
|
||||
+ phy_node->parent->parent == priv->dev->of_node) {
|
||||
ret = of_get_phy_mode(mac_np, &interface);
|
||||
if (ret && ret != -ENODEV) {
|
||||
of_node_put(mac_np);
|
||||
@ -0,0 +1,26 @@
|
||||
From ecb8f9a7d69698ce20fc6f4d107718d56fa861df Mon Sep 17 00:00:00 2001
|
||||
From: Tony Ambardar <Tony.Ambardar@gmail.com>
|
||||
Date: Sat, 9 Mar 2024 16:44:53 -0800
|
||||
Subject: [PATCH] selftests/bpf: Improve portability of unprivileged tests
|
||||
|
||||
The addition of general support for unprivileged tests in test_loader.c
|
||||
breaks building test_verifier on non-glibc (e.g. musl) systems, due to the
|
||||
inclusion of glibc extension '<error.h>' in 'unpriv_helpers.c'. However,
|
||||
the header is actually not needed, so remove it to restore building.
|
||||
|
||||
Fixes: 1d56ade032a4 ("selftests/bpf: Unprivileged tests for test_loader.c")
|
||||
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
|
||||
---
|
||||
tools/testing/selftests/bpf/unpriv_helpers.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/tools/testing/selftests/bpf/unpriv_helpers.c
|
||||
+++ b/tools/testing/selftests/bpf/unpriv_helpers.c
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
-#include <error.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "unpriv_helpers.h"
|
||||
@ -0,0 +1,45 @@
|
||||
From 9be9a00adfac8118b6d685e71696f83187308c66 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <9be9a00adfac8118b6d685e71696f83187308c66.1715125851.git.daniel@makrotopia.org>
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Tue, 7 May 2024 22:43:30 +0100
|
||||
Subject: [PATCH net] net: phy: air_en8811h: reset netdev rules when LED is set
|
||||
manually
|
||||
To: Andrew Lunn <andrew@lunn.ch>,
|
||||
Heiner Kallweit <hkallweit1@gmail.com>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
David S. Miller <davem@davemloft.net>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Paolo Abeni <pabeni@redhat.com>,
|
||||
SkyLake Huang <skylake.huang@mediatek.com>,
|
||||
Eric Woudstra <ericwouds@gmail.com>,
|
||||
netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org
|
||||
|
||||
Setting LED_OFF via the brightness_set should deactivate hw control,
|
||||
so make sure netdev trigger rules also get cleared in that case.
|
||||
|
||||
Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
This is basically a stop-gap measure until unified LED handling has
|
||||
been implemented accross all MediaTek and Airoha PHYs.
|
||||
See also
|
||||
https://patchwork.kernel.org/project/netdevbpf/patch/20240425023325.15586-3-SkyLake.Huang@mediatek.com/
|
||||
|
||||
drivers/net/phy/air_en8811h.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/net/phy/air_en8811h.c
|
||||
+++ b/drivers/net/phy/air_en8811h.c
|
||||
@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_
|
||||
|
||||
changed |= (priv->led[index].rules != 0);
|
||||
|
||||
+ /* clear netdev trigger rules in case LED_OFF has been set */
|
||||
+ if (!on)
|
||||
+ priv->led[index].rules = 0;
|
||||
+
|
||||
if (changed)
|
||||
return phy_modify_mmd(phydev, MDIO_MMD_VEND2,
|
||||
AIR_PHY_LED_ON(index),
|
||||
@ -1,79 +0,0 @@
|
||||
From patchwork Sat Apr 27 11:24:42 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
X-Patchwork-Id: 13645655
|
||||
From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
Date: Sat, 27 Apr 2024 14:24:42 +0300
|
||||
Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
|
||||
PHY muxing is being used
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Message-Id:
|
||||
<20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707@arinc9.com>
|
||||
To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>,
|
||||
Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Vladimir Oltean <olteanv@gmail.com>,
|
||||
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org,
|
||||
=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
X-Mailer: b4 0.13.0
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
From: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
|
||||
When the PHY muxing feature is in use, port 5 won't be defined in the
|
||||
device tree. Because of this, the type member of the dsa_port structure for
|
||||
this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
|
||||
function calls ds->ops->port_disable() when the port type is
|
||||
DSA_PORT_TYPE_UNUSED.
|
||||
|
||||
The MT7530_P5_DIS bit is unset when PHY muxing is being used.
|
||||
mt7530_port_disable() which is assigned to ds->ops->port_disable() is
|
||||
called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
|
||||
which breaks network connectivity when PHY muxing is being used.
|
||||
|
||||
Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
|
||||
|
||||
Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
|
||||
Reported-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
---
|
||||
Hello.
|
||||
|
||||
I've sent this to net-next as the patch it fixes is on the current
|
||||
development cycle.
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
|
||||
---
|
||||
base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
|
||||
change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
|
||||
|
||||
Best regards,
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1220,7 +1220,7 @@ mt7530_port_disable(struct dsa_switch *d
|
||||
if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
|
||||
return;
|
||||
|
||||
- if (port == 5)
|
||||
+ if (port == 5 && priv->p5_mode == GMAC5)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
|
||||
else if (port == 6)
|
||||
mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
|
||||
@ -1,136 +0,0 @@
|
||||
From patchwork Tue Apr 30 05:01:33 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
X-Patchwork-Id: 13648264
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
|
||||
[10.30.226.201])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
arc=none smtp.client-ip=10.30.226.201
|
||||
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
|
||||
t=1714453299; cv=none;
|
||||
b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
|
||||
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
|
||||
s=arc-20240116; t=1714453299; c=relaxed/simple;
|
||||
bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
|
||||
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
|
||||
b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
|
||||
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
|
||||
header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
|
||||
Authentication-Results: smtp.subspace.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
|
||||
header.b="LTwGL2cB"
|
||||
Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
|
||||
s=k20201202; t=1714453299;
|
||||
bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
|
||||
h=From:Date:Subject:To:Cc:Reply-To:From;
|
||||
b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
|
||||
FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
|
||||
jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
|
||||
yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
|
||||
QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
|
||||
aa8XczXBSlBVw==
|
||||
Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
(localhost.localdomain [127.0.0.1])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
|
||||
Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
|
||||
From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
|
||||
<devnull+arinc.unal.arinc9.com@kernel.org>
|
||||
Date: Tue, 30 Apr 2024 08:01:33 +0300
|
||||
Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
|
||||
is defined on switch MDIO bus
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Message-Id:
|
||||
<20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db@arinc9.com>
|
||||
X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
|
||||
e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
|
||||
O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
|
||||
ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
|
||||
To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>,
|
||||
Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Florian Fainelli <f.fainelli@gmail.com>,
|
||||
Vladimir Oltean <olteanv@gmail.com>,
|
||||
"David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>,
|
||||
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
|
||||
Cc: Bartel Eerdekens <bartel.eerdekens@constell8.be>,
|
||||
mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
linux-mediatek@lists.infradead.org,
|
||||
=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
X-Mailer: b4 0.13.0
|
||||
X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
|
||||
i=arinc.unal@arinc9.com; s=arinc9-PC; h=from:subject:message-id;
|
||||
bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
|
||||
b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
|
||||
lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
|
||||
X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519;
|
||||
pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
|
||||
X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-PC with
|
||||
auth_id=158
|
||||
X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>
|
||||
Reply-To: arinc.unal@arinc9.com
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
From: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
|
||||
Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
|
||||
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
|
||||
bus the switch listens on. The PHY muxing feature makes use of this.
|
||||
|
||||
This is problematic as the PHY may be attached before the switch is
|
||||
initialised, in which case, the PHY will fail to be attached.
|
||||
|
||||
Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
|
||||
of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
|
||||
the switch on the device tree. Extend the check to detect PHY muxing when
|
||||
the PHY is defined on the MDIO bus of the switch on the device tree.
|
||||
|
||||
When the PHY is described this way, the switch will be initialised first,
|
||||
then the switch MDIO bus will be registered. Only after these steps, the
|
||||
PHY will be attached.
|
||||
|
||||
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
---
|
||||
Changes in v2:
|
||||
- Address the terminology on the patch log.
|
||||
- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155@arinc9.com
|
||||
---
|
||||
drivers/net/dsa/mt7530.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
|
||||
---
|
||||
base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
|
||||
change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
|
||||
|
||||
Best regards,
|
||||
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -2483,7 +2483,8 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
if (!phy_node)
|
||||
continue;
|
||||
|
||||
- if (phy_node->parent == priv->dev->of_node->parent) {
|
||||
+ if (phy_node->parent == priv->dev->of_node->parent ||
|
||||
+ phy_node->parent->parent == priv->dev->of_node) {
|
||||
ret = of_get_phy_mode(mac_np, &interface);
|
||||
if (ret && ret != -ENODEV) {
|
||||
of_node_put(mac_np);
|
||||
@ -52,6 +52,7 @@ ipq40xx_setup_interfaces()
|
||||
aruba,ap-365|\
|
||||
avm,fritzrepeater-1200|\
|
||||
dlink,dap-2610|\
|
||||
engenius,eap1300|\
|
||||
extreme-networks,ws-ap3915i|\
|
||||
meraki,mr33|\
|
||||
meraki,mr74|\
|
||||
|
||||
@ -330,6 +330,7 @@ CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_QCOM_QFPROM=y
|
||||
# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
|
||||
# CONFIG_NVMEM_SPMI_SDAM is not set
|
||||
CONFIG_NVMEM_U_BOOT_ENV=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
|
||||
@ -98,19 +98,6 @@
|
||||
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||
};
|
||||
|
||||
usb2@60f8800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb3@8af8800 {
|
||||
status = "okay";
|
||||
|
||||
dwc3@8a00000 {
|
||||
phys = <&usb3_hs_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
};
|
||||
};
|
||||
|
||||
crypto@8e3a000 {
|
||||
status = "okay";
|
||||
};
|
||||
@ -323,10 +310,23 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_dwc {
|
||||
phys = <&usb3_hs_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user