Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -320,6 +320,22 @@ menu "Target Images"
|
||||
select PACKAGE_kmod-e1000
|
||||
default y if BUILDBOT
|
||||
|
||||
config ONIE_INSTALLER_IMAGES
|
||||
bool "Build ONIE installer image (self-extracting .bin)"
|
||||
depends on TARGET_x86
|
||||
depends on GRUB_EFI_IMAGES
|
||||
select PACKAGE_grub2-editenv
|
||||
help
|
||||
Build a self-extracting ONIE installer .bin for installing
|
||||
OpenWrt on switches that ship with the Open Network Install
|
||||
Environment (e.g. Mellanox/NVIDIA Spectrum-based SN series).
|
||||
|
||||
The resulting .bin wraps a tar payload (rootfs + kernel) in a
|
||||
shell script that follows the ONIE demo installer pattern:
|
||||
a new GPT partition labelled OPENWRT-ROOT is created for
|
||||
OpenWrt, and the existing ONIE-BOOT partition is preserved so
|
||||
ONIE rescue remains bootable.
|
||||
|
||||
config TARGET_SERIAL
|
||||
string "Serial port device"
|
||||
depends on TARGET_x86 || TARGET_armsr || TARGET_loongarch64
|
||||
|
||||
@@ -457,6 +457,18 @@ define U-Boot/mt7981_glinet_gl-xe3000
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_globitel_bt-r320
|
||||
NAME:=Globitel BT-R320
|
||||
BUILD_SUBTARGET:=filogic
|
||||
BUILD_DEVICES:=globitel_bt-r320
|
||||
UBOOT_CONFIG:=mt7981_globitel_bt-r320
|
||||
UBOOT_IMAGE:=u-boot.fip
|
||||
BL2_BOOTDEV:=emmc
|
||||
BL2_SOC:=mt7981
|
||||
BL2_DDRTYPE:=ddr4
|
||||
DEPENDS:=+trusted-firmware-a-mt7981-emmc-ddr4
|
||||
endef
|
||||
|
||||
define U-Boot/mt7981_h3c_magic-nx30-pro
|
||||
NAME:=H3C Magic NX30 Pro
|
||||
BUILD_SUBTARGET:=filogic
|
||||
@@ -1343,6 +1355,7 @@ UBOOT_TARGETS := \
|
||||
mt7981_glinet_gl-mt2500 \
|
||||
mt7981_glinet_gl-x3000 \
|
||||
mt7981_glinet_gl-xe3000 \
|
||||
mt7981_globitel_bt-r320 \
|
||||
mt7981_h3c_magic-nx30-pro \
|
||||
mt7981_imou_hx21 \
|
||||
mt7981_jcg_q30-pro \
|
||||
|
||||
@@ -0,0 +1,348 @@
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/mt7981-globitel-bt-r320.dts
|
||||
@@ -0,0 +1,160 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+
|
||||
+/ {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "Globitel BT-R320";
|
||||
+ compatible = "globitel,bt-r320", "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = &uart0;
|
||||
+ tick-timer = &timer0;
|
||||
+ };
|
||||
+
|
||||
+ memory@40000000 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fixed-3.3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wps {
|
||||
+ label = "wps";
|
||||
+ linux,code = <KEY_WPS_BUTTON>;
|
||||
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart1_pins>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+ð {
|
||||
+ status = "okay";
|
||||
+ mediatek,gmac-id = <0>;
|
||||
+ phy-mode = "sgmii";
|
||||
+ mediatek,switch = "mt7531";
|
||||
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ spic_pins: spi1-pins-func-1 {
|
||||
+ mux {
|
||||
+ function = "spi";
|
||||
+ groups = "spi1_1";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ uart1_pins: spi1-pins-func-3 {
|
||||
+ mux {
|
||||
+ function = "uart";
|
||||
+ groups = "uart1_2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ one_pwm_pins: one-pwm-pins {
|
||||
+ mux {
|
||||
+ function = "pwm";
|
||||
+ groups = "pwm0_1";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ two_pwm_pins: two-pwm-pins {
|
||||
+ mux {
|
||||
+ function = "pwm";
|
||||
+ groups = "pwm0_1", "pwm1_0";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ three_pwm_pins: three-pwm-pins {
|
||||
+ mux {
|
||||
+ function = "pwm";
|
||||
+ groups = "pwm0_1", "pwm1_0", "pwm2";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ mmc0_pins_default: mmc0default {
|
||||
+ mux {
|
||||
+ function = "flash";
|
||||
+ groups = "emmc_45";
|
||||
+ };
|
||||
+
|
||||
+ conf-cmd-dat {
|
||||
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO",
|
||||
+ "SPI0_CS", "SPI0_HOLD", "SPI0_WP",
|
||||
+ "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
|
||||
+ input-enable;
|
||||
+ drive-strength = <MTK_DRIVE_4mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
+ };
|
||||
+
|
||||
+ conf-clk {
|
||||
+ pins = "SPI1_CS";
|
||||
+ drive-strength = <MTK_DRIVE_6mA>;
|
||||
+ bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
|
||||
+ };
|
||||
+
|
||||
+ conf-rst {
|
||||
+ pins = "PWM0";
|
||||
+ drive-strength = <MTK_DRIVE_4mA>;
|
||||
+ bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pwm {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&two_pwm_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&watchdog {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins_default>;
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <52000000>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/defenvs/mt7981_globitel_bt-r320_env
|
||||
@@ -0,0 +1,52 @@
|
||||
+ipaddr=192.168.1.1
|
||||
+serverip=192.168.1.254
|
||||
+loadaddr=0x46000000
|
||||
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||
+bootargs=root=/dev/fit0 rootwait
|
||||
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
|
||||
+bootconf=config-1#mt7981b-globitel-bt-r320
|
||||
+bootdelay=0
|
||||
+bootfile=immortalwrt-mediatek-filogic-globitel_bt-r320-initramfs-recovery.itb
|
||||
+bootfile_bl2=immortalwrt-mediatek-filogic-globitel_bt-r320-emmc-preloader.bin
|
||||
+bootfile_fip=immortalwrt-mediatek-filogic-globitel_bt-r320-emmc-bl31-uboot.fip
|
||||
+bootfile_upg=immortalwrt-mediatek-filogic-globitel_bt-r320-squashfs-sysupgrade.itb
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) ) [0;36m[eMMC][0m
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run boot_default
|
||||
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||
+bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
|
||||
+bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
|
||||
+bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to eMMC.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to eMMC.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||
+bootmenu_8=Reboot.=reset
|
||||
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||
+boot_first=if button reset ; then run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||
+boot_production=run emmc_read_production && bootm $loadaddr#$bootconf
|
||||
+boot_recovery=run emmc_read_recovery && bootm $loadaddr#$bootconf
|
||||
+boot_emmc=run boot_production ; run boot_recovery
|
||||
+boot_tftp_forever=while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
|
||||
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
|
||||
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||
+mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
|
||||
+mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
|
||||
+part_default=production
|
||||
+part_recovery=recovery
|
||||
+reset_factory=eraseenv && reset
|
||||
+emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
|
||||
+emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
|
||||
+emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
|
||||
+emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
|
||||
+emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
|
||||
+emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
|
||||
+_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
|
||||
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||
+_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"
|
||||
--- /dev/null
|
||||
+++ b/configs/mt7981_globitel_bt-r320_defconfig
|
||||
@@ -0,0 +1,126 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARM_SMCCC=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_POSITION_INDEPENDENT=y
|
||||
+CONFIG_ARCH_MEDIATEK=y
|
||||
+CONFIG_TEXT_BASE=0x41e00000
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+CONFIG_ENV_SIZE=0x40000
|
||||
+CONFIG_ENV_OFFSET=0x400000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-globitel-bt-r320"
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+CONFIG_TARGET_MT7981=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||
+CONFIG_ENV_OFFSET_REDUND=0x440000
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_BOOTDELAY=30
|
||||
+CONFIG_AUTOBOOT_KEYED=y
|
||||
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-globitel-bt-r320.dtb"
|
||||
+CONFIG_LOGLEVEL=7
|
||||
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
+CONFIG_LOG=y
|
||||
+# CONFIG_BOARD_INIT is not set
|
||||
+CONFIG_BOARD_LATE_INIT=y
|
||||
+CONFIG_HUSH_PARSER=y
|
||||
+CONFIG_SYS_PROMPT="MT7981> "
|
||||
+CONFIG_CMD_CPU=y
|
||||
+CONFIG_CMD_LICENSE=y
|
||||
+# CONFIG_CMD_BOOTEFI_BOOTMGR is not set
|
||||
+CONFIG_CMD_BOOTMENU=y
|
||||
+CONFIG_CMD_ASKENV=y
|
||||
+CONFIG_CMD_ERASEENV=y
|
||||
+CONFIG_CMD_ENV_FLAGS=y
|
||||
+CONFIG_CMD_RNG=y
|
||||
+CONFIG_CMD_STRINGS=y
|
||||
+CONFIG_CMD_DM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_PWM=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PART=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_TFTPSRV=y
|
||||
+CONFIG_CMD_RARP=y
|
||||
+CONFIG_CMD_CDP=y
|
||||
+CONFIG_CMD_SNTP=y
|
||||
+CONFIG_CMD_LINK_LOCAL=y
|
||||
+CONFIG_CMD_DHCP=y
|
||||
+CONFIG_CMD_DNS=y
|
||||
+CONFIG_CMD_PING=y
|
||||
+CONFIG_CMD_PXE=y
|
||||
+CONFIG_CMD_CACHE=y
|
||||
+CONFIG_CMD_PSTORE=y
|
||||
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||
+CONFIG_CMD_UUID=y
|
||||
+CONFIG_CMD_HASH=y
|
||||
+CONFIG_CMD_SMC=y
|
||||
+CONFIG_CMD_EXT4=y
|
||||
+CONFIG_CMD_FAT=y
|
||||
+CONFIG_CMD_FS_GENERIC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_OF_EMBED=y
|
||||
+CONFIG_ENV_OVERWRITE=y
|
||||
+CONFIG_ENV_IS_IN_MMC=y
|
||||
+CONFIG_ENV_REDUNDANT=y
|
||||
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
|
||||
+CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y
|
||||
+CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="defenvs/mt7981_globitel_bt-r320_env"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_VERSION_VARIABLE=y
|
||||
+CONFIG_NETCONSOLE=y
|
||||
+CONFIG_USE_IPADDR=y
|
||||
+CONFIG_IPADDR="192.168.1.1"
|
||||
+CONFIG_USE_SERVERIP=y
|
||||
+CONFIG_SERVERIP="192.168.1.254"
|
||||
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||
+CONFIG_SCSI_AHCI=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_MTK_AHCI=y
|
||||
+CONFIG_BUTTON=y
|
||||
+CONFIG_BUTTON_GPIO=y
|
||||
+CONFIG_CLK=y
|
||||
+CONFIG_GPIO_HOG=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_SUPPORT_EMMC_BOOT=y
|
||||
+CONFIG_MMC_HS200_SUPPORT=y
|
||||
+CONFIG_MMC_MTK=y
|
||||
+CONFIG_PHY_FIXED=y
|
||||
+CONFIG_MEDIATEK_ETH=y
|
||||
+CONFIG_PCIE_MEDIATEK=y
|
||||
+CONFIG_PHY=y
|
||||
+CONFIG_PHY_MTK_TPHY=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+CONFIG_PINCONF=y
|
||||
+CONFIG_PINCTRL_MT7622=y
|
||||
+CONFIG_PINCTRL_MT7981=y
|
||||
+CONFIG_POWER_DOMAIN=y
|
||||
+CONFIG_MTK_POWER_DOMAIN=y
|
||||
+CONFIG_DM_REGULATOR=y
|
||||
+CONFIG_DM_REGULATOR_FIXED=y
|
||||
+CONFIG_DM_REGULATOR_GPIO=y
|
||||
+CONFIG_DM_PWM=y
|
||||
+CONFIG_PWM_MTK=y
|
||||
+CONFIG_RAM=y
|
||||
+CONFIG_DM_RNG=y
|
||||
+CONFIG_RNG_MTK_V2=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_DM_SERIAL=y
|
||||
+CONFIG_SERIAL_RX_BUFFER=y
|
||||
+CONFIG_MTK_SERIAL=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_MTK=y
|
||||
+CONFIG_USB_STORAGE=y
|
||||
+CONFIG_LZO=y
|
||||
+CONFIG_ZSTD=y
|
||||
+CONFIG_HEXDUMP=y
|
||||
+4
-2
@@ -88,7 +88,7 @@
|
||||
+};
|
||||
--- /dev/null
|
||||
+++ b/configs/myir_myd_t113x-emmc_defconfig
|
||||
@@ -0,0 +1,29 @@
|
||||
@@ -0,0 +1,30 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-t113s-myir-myd-yt113x-emmc"
|
||||
@@ -118,9 +118,10 @@
|
||||
+CONFIG_SPL_MMC_IO_VOLTAGE=y
|
||||
+CONFIG_MMC_HS200_SUPPORT=y
|
||||
+CONFIG_SPL_MMC_HS200_SUPPORT=y
|
||||
+# CONFIG_OF_UPSTREAM is not set
|
||||
--- /dev/null
|
||||
+++ b/configs/myir_myd_t113x-spi_defconfig
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -0,0 +1,40 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-t113s-myir-myd-yt113x-spi"
|
||||
@@ -160,6 +161,7 @@
|
||||
+CONFIG_SPI_FLASH_MTD=y
|
||||
+CONFIG_SPI=y
|
||||
+CONFIG_MTD_UBI_FASTMAP=y
|
||||
+# CONFIG_OF_UPSTREAM is not set
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun8i-t113s-myir-myd-yt113x.dtsi
|
||||
@@ -0,0 +1,144 @@
|
||||
|
||||
@@ -72,6 +72,7 @@ glinet,gl-mt2500-airoha|\
|
||||
glinet,gl-mt6000|\
|
||||
glinet,gl-x3000|\
|
||||
glinet,gl-xe3000|\
|
||||
globitel,bt-r320|\
|
||||
huasifei,wh3000-emmc|\
|
||||
nradio,c8-668gl)
|
||||
ubootenv_add_mmc "u-boot-env" "" "0x0" "0x80000"
|
||||
@@ -156,7 +157,8 @@ smartrg,sdg-8733a|\
|
||||
smartrg,sdg-8734)
|
||||
ubootenv_add_mmc "u-boot-env" "mmcblk0" "0x0" "0x8000" "0x8000"
|
||||
;;
|
||||
teltonika,rutc50)
|
||||
teltonika,rutc50|\
|
||||
alwaylink,m01k43)
|
||||
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
|
||||
;;
|
||||
tplink,archer-ax80-v1|\
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/version.h>
|
||||
#include <generated/utsrelease.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
@@ -2777,11 +2776,7 @@ static int ltq_mei_probe(struct platform_device *pdev)
|
||||
IFX_MEI_DMSG("Start loopback test...\n");
|
||||
DFE_Loopback_Test ();
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
dsl_class = class_create(THIS_MODULE, "ifx_mei");
|
||||
#else
|
||||
dsl_class = class_create("ifx_mei");
|
||||
#endif
|
||||
device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -34,19 +34,16 @@
|
||||
static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
|
||||
|
||||
static int DSL_DRV_Release(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
|
||||
@@ -72,7 +77,11 @@ static struct file_operations dslCpeApiO
|
||||
@@ -72,7 +77,7 @@ static struct file_operations dslCpeApiO
|
||||
open: DSL_DRV_Open,
|
||||
release: DSL_DRV_Release,
|
||||
write: DSL_DRV_Write,
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
|
||||
ioctl: DSL_DRV_Ioctls,
|
||||
+#else
|
||||
- ioctl: DSL_DRV_Ioctls,
|
||||
+ unlocked_ioctl: DSL_DRV_Ioctls,
|
||||
+#endif
|
||||
poll: DSL_DRV_Poll
|
||||
};
|
||||
#else
|
||||
@@ -168,10 +177,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
|
||||
@@ -168,10 +173,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
|
||||
\return Success or failure.
|
||||
\ingroup Internal
|
||||
*/
|
||||
@@ -64,7 +61,7 @@
|
||||
{
|
||||
DSL_int_t nErr=0;
|
||||
DSL_boolean_t bIsInKernel;
|
||||
@@ -216,16 +232,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
|
||||
@@ -216,16 +228,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,28 +79,23 @@
|
||||
if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
|
||||
(_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
|
||||
(_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) ||
|
||||
@@ -828,12 +835,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
|
||||
@@ -828,12 +831,11 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
|
||||
|
||||
DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset)
|
||||
{
|
||||
- struct timeval tv;
|
||||
DSL_uint32_t nTime = 0;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
|
||||
+ struct timeval tv;
|
||||
|
||||
memset(&tv, 0, sizeof(tv));
|
||||
do_gettimeofday(&tv);
|
||||
nTime = (DSL_uint32_t)tv.tv_sec;
|
||||
+#else
|
||||
+ struct timespec64 now;
|
||||
+
|
||||
DSL_uint32_t nTime = 0;
|
||||
|
||||
- memset(&tv, 0, sizeof(tv));
|
||||
- do_gettimeofday(&tv);
|
||||
- nTime = (DSL_uint32_t)tv.tv_sec;
|
||||
+ ktime_get_real_ts64(&now);
|
||||
+ nTime = (DSL_uint32_t)now.tv_sec;
|
||||
+#endif
|
||||
|
||||
if ( (nOffset == 0) || (nOffset > nTime) )
|
||||
{
|
||||
@@ -1058,6 +1072,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
@@ -1058,6 +1060,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
/* Entry point of driver */
|
||||
int __init DSL_ModuleInit(void)
|
||||
{
|
||||
@@ -111,23 +103,19 @@
|
||||
DSL_int_t i;
|
||||
|
||||
printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
|
||||
@@ -1104,7 +1119,12 @@ int __init DSL_ModuleInit(void)
|
||||
@@ -1104,7 +1107,8 @@ int __init DSL_ModuleInit(void)
|
||||
}
|
||||
|
||||
DSL_DRV_DevNodeInit();
|
||||
-
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
+ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api");
|
||||
+#else
|
||||
+ dsl_class = class_create("dsl_cpe_api");
|
||||
+#endif
|
||||
+ device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api");
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- a/src/include/drv_dsl_cpe_os_linux.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_linux.h
|
||||
@@ -16,18 +16,18 @@
|
||||
@@ -16,19 +16,15 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -144,14 +132,12 @@
|
||||
-
|
||||
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
|
||||
- #include <linux/utsrelease.h>
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
+#include <linux/utsrelease.h>
|
||||
+#else
|
||||
-#endif
|
||||
+#include <generated/utsrelease.h>
|
||||
#endif
|
||||
|
||||
#include <linux/types.h>
|
||||
@@ -39,7 +39,8 @@
|
||||
#include <linux/fs.h>
|
||||
@@ -39,7 +35,8 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/poll.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "drv_dsl_cpe_api.h"
|
||||
#include "drv_dsl_cpe_api_ioctl.h"
|
||||
@@ -1070,7 +1071,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
@@ -1058,7 +1059,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
#endif
|
||||
|
||||
/* Entry point of driver */
|
||||
@@ -19,7 +19,7 @@
|
||||
{
|
||||
struct class *dsl_class;
|
||||
DSL_int_t i;
|
||||
@@ -1128,7 +1129,7 @@ int __init DSL_ModuleInit(void)
|
||||
@@ -1112,7 +1113,7 @@ int __init DSL_ModuleInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
@@ -1142,8 +1143,6 @@ void __exit DSL_ModuleCleanup(void)
|
||||
@@ -1126,8 +1127,6 @@ void __exit DSL_ModuleCleanup(void)
|
||||
DSL_FPGA_BND_REGS_SZ_BYTE,
|
||||
(DSL_uint8_t**)&g_BndFpgaBase);
|
||||
#endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
#ifndef _lint
|
||||
@@ -1159,8 +1158,29 @@ module_param(debug_level, byte, 0);
|
||||
@@ -1143,8 +1142,29 @@ module_param(debug_level, byte, 0);
|
||||
MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs");
|
||||
#endif /* #ifndef DSL_DEBUG_DISABLE*/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
DSL_uint_t nCommand, unsigned long nArg);
|
||||
#endif
|
||||
static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
|
||||
@@ -184,7 +185,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
|
||||
@@ -180,7 +181,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
|
||||
DSL_uint_t nCommand,
|
||||
unsigned long nArg)
|
||||
#else
|
||||
@@ -26,7 +26,7 @@
|
||||
DSL_DRV_file_t * pFile,
|
||||
DSL_uint_t nCommand,
|
||||
unsigned long nArg)
|
||||
@@ -521,9 +522,9 @@ DSL_void_t* DSL_IoctlMemCpyTo(
|
||||
@@ -517,9 +518,9 @@ DSL_void_t* DSL_IoctlMemCpyTo(
|
||||
- IFX_SUCCESS on success
|
||||
- IFX_ERROR on error
|
||||
*/
|
||||
@@ -38,7 +38,7 @@
|
||||
DSL_int32_t retVal = -1;
|
||||
#ifndef _lint
|
||||
|
||||
@@ -546,30 +547,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne
|
||||
@@ -542,30 +543,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne
|
||||
(DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
|
||||
pThrCntrl->thrParams.pName));
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
|
||||
|
||||
pThrCntrl->thrParams.bRunning = 1;
|
||||
@@ -639,9 +616,7 @@ DSL_int32_t DSL_DRV_ThreadInit(
|
||||
@@ -635,9 +612,7 @@ DSL_int32_t DSL_DRV_ThreadInit(
|
||||
init_completion(&pThrCntrl->thrCompletion);
|
||||
|
||||
/* start kernel thread via the wrapper function */
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
pThrCntrl->bValid = DSL_TRUE;
|
||||
|
||||
@@ -1076,7 +1051,7 @@ static int ltq_adsl_probe(struct platfor
|
||||
@@ -1064,7 +1039,7 @@ static int ltq_adsl_probe(struct platfor
|
||||
struct class *dsl_class;
|
||||
DSL_int_t i;
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
DSL_int32_t nPriority;
|
||||
--- a/src/include/drv_dsl_cpe_os_linux.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_linux.h
|
||||
@@ -288,7 +288,7 @@ typedef struct
|
||||
@@ -284,7 +284,7 @@ typedef struct
|
||||
DSL_DRV_ThreadFunction_t pThrFct;
|
||||
|
||||
/** Kernel thread process ID */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/include/drv_dsl_cpe_os_linux.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_linux.h
|
||||
@@ -214,12 +214,25 @@ static inline int dsl_mutex_lock(struct
|
||||
@@ -210,12 +210,25 @@ static inline int dsl_mutex_lock(struct
|
||||
#define DSL_DRV_MUTEX_LOCK(id) down_interruptible(&(id))
|
||||
#define DSL_DRV_MUTEX_UNLOCK(id) up(&(id))
|
||||
#endif
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -418,7 +418,11 @@ int DSL_DRV_ErrorToOS(DSL_Error_t nError
|
||||
@@ -414,7 +414,7 @@ int DSL_DRV_ErrorToOS(DSL_Error_t nError
|
||||
DSL_void_t* DSL_DRV_VMalloc(
|
||||
DSL_DRV_size_t nSize)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL);
|
||||
+#else
|
||||
- return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL);
|
||||
+ return __vmalloc((unsigned long)nSize, GFP_KERNEL);
|
||||
+#endif
|
||||
/* return vmalloc(nSize);*/
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -557,7 +557,11 @@ static int DSL_DRV_KernelThreadStartup(v
|
||||
@@ -549,7 +549,7 @@ static int DSL_DRV_KernelThreadStartup(v
|
||||
retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
|
||||
pThrCntrl->thrParams.bRunning = 0;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
|
||||
complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#else
|
||||
- complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#endif
|
||||
|
||||
DSL_DEBUG( DSL_DBG_MSG,
|
||||
(DSL_NULL, "EXIT - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
@@ -42,7 +41,6 @@
|
||||
#include <linux/atm.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/version.h>
|
||||
#ifdef CONFIG_XFRM
|
||||
#include <net/xfrm.h>
|
||||
#endif
|
||||
@@ -201,11 +199,7 @@ static inline void mailbox_aal_rx_handler(void);
|
||||
static irqreturn_t mailbox_irq_handler(int, void *);
|
||||
static inline void mailbox_signal(unsigned int, int);
|
||||
static void do_ppe_tasklet(unsigned long);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0);
|
||||
#else
|
||||
DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* QSB & HTU setting functions
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include <linux/modeversions>
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
*/
|
||||
|
||||
/* Project header */
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
*/
|
||||
|
||||
/* Project Header Files */
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
*/
|
||||
|
||||
/* Project header */
|
||||
#include <linux/version.h>
|
||||
#if defined(CONFIG_MODVERSIONS)
|
||||
#define MODVERSIONS
|
||||
#include <linux/modversions.h>
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#define IFXMIPS_DEU_AR9_H
|
||||
|
||||
/* Project Header Files */
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#define IFXMIPS_DEU_DANUBE_H
|
||||
|
||||
/* Project Header Files */
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
// must match the size of memory block allocated for g_dma_block and g_dma_block2
|
||||
#define DEU_MAX_PACKET_SIZE (PAGE_SIZE >> 1)
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#define IFXMIPS_DEU_VR9_H
|
||||
|
||||
/* Project Header Files */
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -43,12 +43,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
|
||||
#include <crypto/sha.h>
|
||||
#else
|
||||
#include <crypto/sha1.h>
|
||||
#endif
|
||||
#include <crypto/hash.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -44,12 +44,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
|
||||
#include <crypto/sha.h>
|
||||
#else
|
||||
#include <crypto/sha1.h>
|
||||
#endif
|
||||
#include <linux/types.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
@@ -1,106 +1,103 @@
|
||||
--- a/src/linux/ifxos_linux_memory_map_drv.c
|
||||
+++ b/src/linux/ifxos_linux_memory_map_drv.c
|
||||
@@ -25,6 +25,7 @@
|
||||
IFX Linux adaptation - Global Includes - Kernel
|
||||
========================================================================= */
|
||||
|
||||
+#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
@@ -97,8 +98,13 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
||||
@@ -97,8 +97,7 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
||||
}
|
||||
|
||||
/* remap memory (not cache able): physical --> virtual */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr,
|
||||
addrRangeSize_byte );
|
||||
+#else
|
||||
- pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr,
|
||||
- addrRangeSize_byte );
|
||||
+ pVirtAddr = (IFX_uint8_t *)ioremap(physicalAddr, addrRangeSize_byte);
|
||||
+#endif
|
||||
+
|
||||
if (pVirtAddr == IFX_NULL)
|
||||
{
|
||||
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
--- a/src/linux/ifxos_linux_socket_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_drv.c
|
||||
@@ -165,8 +165,12 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
@@ -165,9 +165,7 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
IFXOS_sockAddr_t *pSocAddr)
|
||||
{
|
||||
struct msghdr msg;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
struct iovec iov;
|
||||
mm_segment_t old_fs;
|
||||
+#else
|
||||
- struct iovec iov;
|
||||
- mm_segment_t old_fs;
|
||||
- int ret;
|
||||
+ struct kvec iov;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
@@ -181,6 +185,8 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
||||
@@ -181,26 +179,7 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = 0;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
+
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
@@ -200,6 +206,10 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
||||
#endif
|
||||
set_fs(old_fs);
|
||||
|
||||
+#else
|
||||
+ ret = kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
- msg.msg_iov = &iov;
|
||||
- msg.msg_iovlen = 1;
|
||||
-#else
|
||||
- iov_iter_init(&msg.msg_iter, READ, &iov, 1, bufSize_byte);
|
||||
-#endif
|
||||
-
|
||||
- /* Modify address limitation which is used if user space is calling
|
||||
- kernel space, otherwise sock_recvmsg() will fail.*/
|
||||
- old_fs = get_fs();
|
||||
- set_fs(KERNEL_DS);
|
||||
-
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
|
||||
- ret = sock_recvmsg (socFd, &msg, bufSize_byte, 0);
|
||||
-#else
|
||||
- ret = sock_recvmsg (socFd, &msg, 0);
|
||||
-#endif
|
||||
- set_fs(old_fs);
|
||||
-
|
||||
- return ret;
|
||||
+ return kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0);
|
||||
}
|
||||
|
||||
@@ -229,8 +239,12 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
/**
|
||||
@@ -229,9 +208,7 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
IFXOS_sockAddr_t *pSocAddr)
|
||||
{
|
||||
struct msghdr msg;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
struct iovec iov;
|
||||
mm_segment_t old_fs;
|
||||
+#else
|
||||
- struct iovec iov;
|
||||
- mm_segment_t old_fs;
|
||||
- int ret;
|
||||
+ struct kvec iov;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
@@ -245,6 +259,8 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
||||
@@ -245,26 +222,7 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = MSG_DONTWAIT;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0)
|
||||
+
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
msg.msg_iov = &iov;
|
||||
msg.msg_iovlen = 1;
|
||||
@@ -264,6 +280,10 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
#endif
|
||||
set_fs(old_fs);
|
||||
|
||||
+#else
|
||||
+ ret = kernel_sendmsg(socFd, &msg, &iov, 1, bufSize_byte);
|
||||
+#endif
|
||||
+
|
||||
return ret;
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
||||
- msg.msg_iov = &iov;
|
||||
- msg.msg_iovlen = 1;
|
||||
-#else
|
||||
- iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, bufSize_byte);
|
||||
-#endif
|
||||
-
|
||||
- /* Modify address limitation which is used if user space is calling
|
||||
- kernel space, otherwise sock_sendmsg() will fail.*/
|
||||
- old_fs = get_fs();
|
||||
- set_fs(KERNEL_DS);
|
||||
-
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
|
||||
- ret = sock_sendmsg(socFd, &msg, bufSize_byte);
|
||||
-#else
|
||||
- ret = sock_sendmsg(socFd, &msg);
|
||||
-#endif
|
||||
- set_fs(old_fs);
|
||||
-
|
||||
- return ret;
|
||||
+ return kernel_sendmsg (socFd, &msg, &iov, 1, bufSize_byte);
|
||||
}
|
||||
|
||||
/**
|
||||
--- a/src/linux/ifxos_linux_thread_drv.c
|
||||
+++ b/src/linux/ifxos_linux_thread_drv.c
|
||||
@@ -154,7 +154,11 @@ IFXOS_STATIC int IFXOS_KernelThreadStart
|
||||
@@ -154,7 +154,7 @@ IFXOS_STATIC int IFXOS_KernelThreadStart
|
||||
retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
|
||||
pThrCntrl->thrParams.bRunning = IFX_FALSE;
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||
- complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#else
|
||||
complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#endif
|
||||
|
||||
IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL,
|
||||
("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF,
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
/*
|
||||
* Common Head File
|
||||
*/
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
@@ -130,11 +129,7 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DSL Data LED
|
||||
@@ -291,11 +286,7 @@ static int ptm_setup(struct device_node *np, struct net_device *dev, int ndev)
|
||||
dev->netdev_ops = &g_ptm_netdev_ops;
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
dev->max_mtu = ETH_DATA_LEN + 8;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
|
||||
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
|
||||
#else
|
||||
netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
|
||||
#endif
|
||||
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
|
||||
|
||||
err = of_get_ethdev_address(np, dev);
|
||||
@@ -562,11 +553,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *dat
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
int ndev;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <lantiq_ptm.h>
|
||||
#include "ifxmips_ptm_common.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
** 07 JUL 2009 Xu Liang Init Version
|
||||
*******************************************************************************/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/types.h>
|
||||
@@ -78,11 +77,7 @@ static int ptm_stop(struct net_device *);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
|
||||
#endif
|
||||
|
||||
static inline struct sk_buff* alloc_skb_rx(void);
|
||||
static inline struct sk_buff* alloc_skb_tx(unsigned int);
|
||||
@@ -130,11 +125,7 @@ static char *g_net_dev_name[1] = {"dsl0"};
|
||||
|
||||
static int g_ptm_prio_queue_map[8];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0);
|
||||
#else
|
||||
static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet);
|
||||
#endif
|
||||
|
||||
|
||||
unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
|
||||
@@ -155,11 +146,7 @@ static int ptm_setup(struct device_node *np, struct net_device *dev, int ndev)
|
||||
dev->netdev_ops = &g_ptm_netdev_ops;
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
dev->max_mtu = ETH_DATA_LEN + 8;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
|
||||
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
|
||||
#else
|
||||
netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
|
||||
#endif
|
||||
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
|
||||
|
||||
err = of_get_ethdev_address(np, dev);
|
||||
@@ -497,11 +484,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *dat
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
static void ptm_tx_timeout(struct net_device *dev)
|
||||
#else
|
||||
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
||||
#endif
|
||||
{
|
||||
ASSERT(dev == g_net_dev[0], "incorrect device");
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef IFXMIPS_PTM_VDSL_H
|
||||
#define IFXMIPS_PTM_VDSL_H
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <lantiq_ptm.h>
|
||||
#include "ifxmips_ptm_common.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
@@ -55,28 +55,21 @@
|
||||
#include <asm/io.h>
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
@@ -55,7 +56,11 @@
|
||||
@@ -55,7 +56,7 @@
|
||||
#include <linux/sched.h>
|
||||
#undef CONFIG_DEVFS_FS
|
||||
#ifndef UTS_RELEASE
|
||||
- #include "linux/utsrelease.h"
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
+# include <linux/utsrelease.h>
|
||||
+#else
|
||||
+# include <generated/utsrelease.h>
|
||||
+#endif
|
||||
+ #include <generated/utsrelease.h>
|
||||
#endif /* UTC_RELEASE */
|
||||
#else
|
||||
#include <linux/tqueue.h>
|
||||
@@ -3718,7 +3723,11 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
@@ -3718,7 +3719,7 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
flag and released after the down() call. */
|
||||
lock_kernel();
|
||||
mb();
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
kill_proc(pThrCntrl->tid, SIGKILL, 1);
|
||||
+#else
|
||||
+ kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
|
||||
+#endif
|
||||
- kill_proc(pThrCntrl->tid, SIGKILL, 1);
|
||||
+ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1);
|
||||
/* release the big kernel lock */
|
||||
unlock_kernel();
|
||||
wait_for_completion (&pThrCntrl->thrCompletion);
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -54,6 +54,10 @@
|
||||
@@ -54,6 +54,8 @@
|
||||
#include <linux/workqueue.h> /* LINUX 2.6 We need work_struct */
|
||||
#include <linux/device.h>
|
||||
#include <linux/sched.h>
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
|
||||
+ #include <linux/sched/signal.h>
|
||||
+ #include <uapi/linux/sched/types.h>
|
||||
+#endif
|
||||
#undef CONFIG_DEVFS_FS
|
||||
#ifndef UTS_RELEASE
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
@@ -184,7 +188,7 @@ MODULE_PARM_DESC(block_egress_tasklet, "
|
||||
#include <generated/utsrelease.h>
|
||||
@@ -180,7 +182,7 @@ MODULE_PARM_DESC(block_egress_tasklet, "
|
||||
MODULE_PARM_DESC(block_ingress_tasklet, "block the execution of the ingress tasklet, i.e. force to use the RT kernel thread");
|
||||
|
||||
/** The driver callbacks which will be registered with the kernel*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -556,7 +556,7 @@ static ssize_t ifx_tapi_write (struct fi
|
||||
@@ -550,7 +550,7 @@ static ssize_t ifx_tapi_write (struct fi
|
||||
IFX_uint8_t *pData;
|
||||
IFX_size_t buf_size;
|
||||
#endif /* TAPI_PACKET */
|
||||
|
||||
@@ -1,100 +1,69 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -47,7 +47,9 @@
|
||||
@@ -47,7 +47,6 @@
|
||||
#include <linux/errno.h>
|
||||
#include <asm/uaccess.h> /* copy_from_user(), ... */
|
||||
#include <asm/byteorder.h>
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#include <linux/smp_lock.h> /* lock_kernel() */
|
||||
+#endif
|
||||
-#include <linux/smp_lock.h> /* lock_kernel() */
|
||||
#include <asm/io.h>
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
@@ -69,7 +71,9 @@
|
||||
@@ -63,7 +62,6 @@
|
||||
#else
|
||||
#include <linux/tqueue.h>
|
||||
#include <linux/sched.h>
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#include <linux/smp_lock.h> /* lock_kernel() */
|
||||
+#endif
|
||||
- #include <linux/smp_lock.h> /* lock_kernel() */
|
||||
#endif /* LINUX_2_6 */
|
||||
|
||||
#include "drv_tapi.h"
|
||||
@@ -137,8 +141,13 @@ static ssize_t ifx_tapi_write(struct fil
|
||||
@@ -131,7 +129,7 @@ static ssize_t ifx_tapi_write(struct fil
|
||||
size_t count, loff_t * ppos);
|
||||
static ssize_t ifx_tapi_read(struct file * filp, char *buf,
|
||||
size_t length, loff_t * ppos);
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
|
||||
static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
|
||||
unsigned int nCmd, unsigned long nArgument);
|
||||
+#else
|
||||
-static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
|
||||
+static long ifx_tapi_ioctl(struct file *filp,
|
||||
+ unsigned int nCmd, unsigned long nArgument);
|
||||
+#endif
|
||||
unsigned int nCmd, unsigned long nArgument);
|
||||
static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -222,7 +231,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
@@ -216,7 +214,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
IFX_char_t *pRegDrvName = IFX_NULL;
|
||||
IFX_int32_t ret = 0;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
|
||||
if (tapi_fops.ioctl == IFX_NULL)
|
||||
+#else
|
||||
- if (tapi_fops.ioctl == IFX_NULL)
|
||||
+ if (tapi_fops.unlocked_ioctl == IFX_NULL)
|
||||
+#endif
|
||||
{
|
||||
#ifdef MODULE
|
||||
tapi_fops.owner = THIS_MODULE;
|
||||
@@ -230,7 +243,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
@@ -224,7 +222,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
tapi_fops.read = ifx_tapi_read;
|
||||
tapi_fops.write = ifx_tapi_write;
|
||||
tapi_fops.poll = ifx_tapi_poll;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
|
||||
tapi_fops.ioctl = ifx_tapi_ioctl;
|
||||
+#else
|
||||
- tapi_fops.ioctl = ifx_tapi_ioctl;
|
||||
+ tapi_fops.unlocked_ioctl = ifx_tapi_ioctl;
|
||||
+#endif
|
||||
tapi_fops.open = ifx_tapi_open;
|
||||
tapi_fops.release = ifx_tapi_release;
|
||||
}
|
||||
@@ -885,8 +902,13 @@ static IFX_uint32_t ifx_tapi_poll (struc
|
||||
@@ -879,7 +877,7 @@ static IFX_uint32_t ifx_tapi_poll (struc
|
||||
- 0 and positive values - success
|
||||
- negative value - ioctl failed
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
|
||||
static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
|
||||
unsigned int nCmd, unsigned long nArg)
|
||||
+#else
|
||||
-static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
|
||||
+static long ifx_tapi_ioctl(struct file *filp,
|
||||
+ unsigned int nCmd, unsigned long nArg)
|
||||
+#endif
|
||||
unsigned int nCmd, unsigned long nArg)
|
||||
{
|
||||
TAPI_FD_PRIV_DATA_t *pTapiPriv;
|
||||
IFX_TAPI_ioctlCtx_t ctx;
|
||||
@@ -3725,7 +3747,9 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
@@ -3719,11 +3717,9 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
kernel lock (lock_kernel()). The lock must be
|
||||
grabbed before changing the terminate
|
||||
flag and released after the down() call. */
|
||||
- lock_kernel();
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
+ lock_kernel();
|
||||
+#endif
|
||||
mb();
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
kill_proc(pThrCntrl->tid, SIGKILL, 1);
|
||||
@@ -3733,8 +3757,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
|
||||
#endif
|
||||
kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1);
|
||||
/* release the big kernel lock */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
unlock_kernel();
|
||||
- wait_for_completion (&pThrCntrl->thrCompletion);
|
||||
+#endif
|
||||
+ wait_for_completion (&pThrCntrl->thrCompletion);
|
||||
- unlock_kernel();
|
||||
wait_for_completion (&pThrCntrl->thrCompletion);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
|
||||
/* Now we are sure the thread is in zombie state.
|
||||
--- a/src/lib/lib_fifo/lib_fifo.c
|
||||
+++ b/src/lib/lib_fifo/lib_fifo.c
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -97,6 +97,8 @@
|
||||
@@ -85,6 +85,8 @@
|
||||
#include "drv_tapi_announcements.h"
|
||||
#endif /* TAPI_ANNOUNCEMENTS */
|
||||
|
||||
|
||||
@@ -1,48 +1,36 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -119,7 +119,11 @@ struct _TAPI_FD_PRIV_DATA
|
||||
@@ -107,7 +107,7 @@ struct _TAPI_FD_PRIV_DATA
|
||||
/* ============================= */
|
||||
/* Local Functions */
|
||||
/* ============================= */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
|
||||
static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg);
|
||||
+#else
|
||||
-static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg);
|
||||
+static IFX_void_t TAPI_timer_call_back (struct timer_list *t);
|
||||
+#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
|
||||
static IFX_void_t TAPI_tqueue (IFX_void_t *pWork);
|
||||
#else /* for Kernel newer or equal 2.6.20 */
|
||||
@@ -3384,11 +3388,15 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p
|
||||
@@ -3354,11 +3354,7 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p
|
||||
pTimerData->nArgument = nArgument;
|
||||
pTimerData->bStopped = IFX_FALSE;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
|
||||
init_timer(&(pTimerData->Timer_List));
|
||||
|
||||
/* set timer call back function */
|
||||
pTimerData->Timer_List.function = TAPI_timer_call_back;
|
||||
pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData;
|
||||
+#else
|
||||
- init_timer(&(pTimerData->Timer_List));
|
||||
-
|
||||
- /* set timer call back function */
|
||||
- pTimerData->Timer_List.function = TAPI_timer_call_back;
|
||||
- pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData;
|
||||
+ timer_setup(&(pTimerData->Timer_List), TAPI_timer_call_back, 0);
|
||||
+#endif
|
||||
|
||||
/* Initialize Timer Task */
|
||||
#ifdef LINUX_2_6
|
||||
@@ -3529,9 +3537,17 @@ static IFX_void_t TAPI_tqueue (struct wo
|
||||
@@ -3499,9 +3495,9 @@ static IFX_void_t TAPI_tqueue (struct wo
|
||||
|
||||
\param arg Pointer to corresponding timer ID.
|
||||
*/
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
|
||||
static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg)
|
||||
+#else
|
||||
-static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg)
|
||||
+static IFX_void_t TAPI_timer_call_back (struct timer_list *t)
|
||||
+#endif
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
|
||||
Timer_ID Timer = (Timer_ID) arg;
|
||||
+#else
|
||||
- Timer_ID Timer = (Timer_ID) arg;
|
||||
+ Timer_ID Timer = from_timer(Timer, t, Timer_List);
|
||||
+#endif
|
||||
/* do the operation in process context,
|
||||
not in interrupt context */
|
||||
#ifdef LINUX_2_6
|
||||
|
||||
@@ -1,60 +1,59 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
|
||||
@@ -3253,10 +3253,7 @@ static IFX_void_t proc_EntriesRemove(IFX
|
||||
*/
|
||||
static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
struct sched_param sched_params;
|
||||
- struct sched_param sched_params;
|
||||
-
|
||||
sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
|
||||
sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
||||
+#else
|
||||
- sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
|
||||
- sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
||||
+ sched_set_fifo_low(current);
|
||||
+#endif
|
||||
}
|
||||
#endif /* LINUX_2_6 */
|
||||
|
||||
@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
|
||||
@@ -3677,23 +3674,8 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
|
||||
*/
|
||||
IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
|
||||
struct sched_param sched_params;
|
||||
IFX_int32_t ret;
|
||||
|
||||
@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
|
||||
}
|
||||
|
||||
return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
|
||||
+#else
|
||||
- struct sched_param sched_params;
|
||||
- IFX_int32_t ret;
|
||||
-
|
||||
- sched_params.sched_priority = newPriority;
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
|
||||
- ret = setscheduler(current->pid, SCHED_FIFO, &sched_params);
|
||||
-#else
|
||||
- ret = sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
||||
-#endif
|
||||
-
|
||||
- if (ret < 0)
|
||||
- {
|
||||
- printk(KERN_ERR "Failed to set the thread priority to %d"
|
||||
- " ret=%d\n", newPriority, ret);
|
||||
- }
|
||||
-
|
||||
- return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
|
||||
+ sched_set_fifo_low(current);
|
||||
+ return IFX_SUCCESS;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3800,7 +3808,9 @@ module_exit (ifx_tapi_module_exit);
|
||||
@@ -3740,7 +3722,6 @@ module_exit (ifx_tapi_module_exit);
|
||||
|
||||
MODULE_AUTHOR ("Lantiq Deutschland GmbH");
|
||||
MODULE_DESCRIPTION ("TAPI Driver - www.lantiq.com");
|
||||
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,10,0)
|
||||
MODULE_SUPPORTED_DEVICE ("TAPI DEVICE");
|
||||
+#endif
|
||||
-MODULE_SUPPORTED_DEVICE ("TAPI DEVICE");
|
||||
MODULE_LICENSE ("Dual BSD/GPL");
|
||||
|
||||
EXPORT_SYMBOL (IFX_TAPI_Register_LL_Drv);
|
||||
--- a/src/drv_tapi_kpi.c
|
||||
+++ b/src/drv_tapi_kpi.c
|
||||
@@ -134,7 +134,11 @@ extern IFX_int32_t block_ingre
|
||||
@@ -134,7 +134,7 @@ extern IFX_int32_t block_ingre
|
||||
/* ========================================================================== */
|
||||
static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
|
||||
#ifdef KPI_TASKLET
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
||||
+#else
|
||||
-DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
||||
+DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
|
||||
+#endif
|
||||
#endif /* KPI_TASKLET */
|
||||
static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
|
||||
static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -3779,8 +3779,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
|
||||
mb();
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
kill_proc(pThrCntrl->tid, SIGKILL, 1);
|
||||
-#else
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
|
||||
kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
|
||||
+#else
|
||||
+ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1);
|
||||
#endif
|
||||
/* release the big kernel lock */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -3351,7 +3351,7 @@ static void __exit ifx_tapi_module_exit(
|
||||
@@ -3311,7 +3311,7 @@ static void __exit ifx_tapi_module_exit(
|
||||
/* as we are using work queues to schedule events from the interrupt
|
||||
context to the process context, we use work queues in case of
|
||||
Linux 2.6. they must be flushed on driver unload... */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_tapi_linux.c
|
||||
+++ b/src/drv_tapi_linux.c
|
||||
@@ -274,7 +274,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
@@ -245,7 +245,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
TRACE( TAPI_DRV, DBG_LEVEL_HIGH,
|
||||
("IFX_TAPI_Register_LL_Drv: unable to register chrdev major number "
|
||||
"%d\n", majorNumber));
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -290,7 +290,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
@@ -261,7 +261,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
|
||||
#endif /* LINUX_2_6 */
|
||||
#endif /* 0 */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ IFX_return_t TAPI_OS_UnregisterLLDrv (IF
|
||||
@@ -287,7 +287,7 @@ IFX_return_t TAPI_OS_UnregisterLLDrv (IF
|
||||
{
|
||||
unregister_chrdev (pLLDrvCtx->majorNumber, pHLDrvCtx->registeredDrvName);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -3589,7 +3589,7 @@ static IFX_void_t Deferred_Worker (struc
|
||||
@@ -3533,7 +3533,7 @@ static IFX_void_t Deferred_Worker (struc
|
||||
*/
|
||||
IFX_return_t TAPI_DeferWork (IFX_void_t *pFunc, IFX_void_t *pParam)
|
||||
{
|
||||
@@ -36,7 +36,7 @@
|
||||
IFX_TAPI_EXT_EVENT_PARAM_t *pEvParam = (IFX_TAPI_EXT_EVENT_PARAM_t *) pParam;
|
||||
#ifdef LINUX_2_6
|
||||
struct work_struct *pTapiWs;
|
||||
@@ -3605,7 +3605,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t
|
||||
@@ -3549,7 +3549,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t
|
||||
|
||||
if (queue_work (pTapiWq, pTapiWs) == 0)
|
||||
{
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
#else
|
||||
struct tq_struct *pTapiTq;
|
||||
@@ -3617,7 +3617,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t
|
||||
@@ -3561,7 +3561,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t
|
||||
pTapiTq->sync = 0;
|
||||
if (schedule_task (pTapiTq) == 0)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
#endif
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
@@ -3446,7 +3447,11 @@ IFX_boolean_t TAPI_SetTime_Timer(Timer_I
|
||||
@@ -3398,7 +3399,11 @@ IFX_boolean_t TAPI_SetTime_Timer(Timer_I
|
||||
/* prevent restart of driver */
|
||||
Timer->bPeriodical = IFX_FALSE;
|
||||
/* remove driver from list */
|
||||
@@ -49,7 +49,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
Timer->bPeriodical = bPeriodically;
|
||||
|
||||
@@ -3473,7 +3478,11 @@ IFX_boolean_t TAPI_Stop_Timer(Timer_ID T
|
||||
@@ -3425,7 +3430,11 @@ IFX_boolean_t TAPI_Stop_Timer(Timer_ID T
|
||||
/* prevent restart of driver */
|
||||
Timer->bPeriodical = IFX_FALSE;
|
||||
/* remove driver from list */
|
||||
@@ -61,7 +61,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
return (IFX_TRUE);
|
||||
}
|
||||
|
||||
@@ -3526,7 +3535,11 @@ static IFX_void_t TAPI_tqueue (struct wo
|
||||
@@ -3478,7 +3487,11 @@ static IFX_void_t TAPI_tqueue (struct wo
|
||||
if (Timer->bPeriodical)
|
||||
{
|
||||
/* remove driver from list */
|
||||
@@ -73,15 +73,15 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
/* start new timer, then call function to gain precision */
|
||||
Timer->Timer_List.expires = jiffies + Timer->Periodical_Time;
|
||||
add_timer(&(Timer->Timer_List));
|
||||
@@ -3548,8 +3561,10 @@ static IFX_void_t TAPI_timer_call_back (
|
||||
@@ -3494,7 +3507,11 @@ static IFX_void_t TAPI_tqueue (struct wo
|
||||
*/
|
||||
static IFX_void_t TAPI_timer_call_back (struct timer_list *t)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
|
||||
Timer_ID Timer = (Timer_ID) arg;
|
||||
-#else
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
|
||||
Timer_ID Timer = from_timer(Timer, t, Timer_List);
|
||||
+#else
|
||||
+ Timer_ID Timer = timer_container_of(Timer, t, Timer_List);
|
||||
#endif
|
||||
+#endif
|
||||
/* do the operation in process context,
|
||||
not in interrupt context */
|
||||
#ifdef LINUX_2_6
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -431,7 +431,11 @@ static int DSL_DRV_DevNodeInit(DSL_void_
|
||||
@@ -431,7 +431,7 @@ static int DSL_DRV_DevNodeInit(DSL_void_
|
||||
}
|
||||
|
||||
/* create a device class used for createing /dev/ entries */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
|
||||
+#else
|
||||
- dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
|
||||
+ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME);
|
||||
+#endif
|
||||
if (IS_ERR(dsl_class)) {
|
||||
DSL_DEBUG(DSL_DBG_ERR,
|
||||
(DSL_NULL, SYS_DBG_ERR""DSL_DRV_CRLF DSL_DRV_CRLF
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
{
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -1341,7 +1341,7 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
|
||||
@@ -1337,7 +1337,7 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
|
||||
#endif
|
||||
|
||||
/* Entry point of driver */
|
||||
@@ -111,7 +111,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
{
|
||||
DSL_int_t i;
|
||||
|
||||
@@ -1457,7 +1457,7 @@ void DSL_ModuleCleanup(void)
|
||||
@@ -1453,7 +1453,7 @@ void DSL_ModuleCleanup(void)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
--- a/src/drv_mei_cpe_linux.h
|
||||
+++ b/src/drv_mei_cpe_linux.h
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <linux/sched.h>
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
|
||||
+#include <linux/sched/signal.h>
|
||||
+#endif
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/crc32.h>
|
||||
@@ -121,7 +124,11 @@ typedef int (*MEI_RequestIrq_WrapLinux_t
|
||||
@@ -121,7 +122,7 @@ typedef int (*MEI_RequestIrq_WrapLinux_t
|
||||
/**
|
||||
Function typedef for the Linux free_irq()
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
-typedef void (*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq,
|
||||
+typedef const void *(*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq,
|
||||
+#else
|
||||
typedef void (*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq,
|
||||
+#endif
|
||||
void *usedDevId );
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
--- a/src/drv_mei_cpe_linux.h
|
||||
+++ b/src/drv_mei_cpe_linux.h
|
||||
@@ -60,12 +60,6 @@
|
||||
@@ -58,12 +58,6 @@
|
||||
#include <linux/poll.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -54,19 +54,16 @@
|
||||
|
||||
return (ret < 0) ? -1 : 0;
|
||||
}
|
||||
@@ -1479,7 +1485,11 @@ struct proc_entry {
|
||||
@@ -1479,7 +1485,7 @@ struct proc_entry {
|
||||
char name[32];
|
||||
proc_rd_callback_t rd;
|
||||
proc_wr_callback_t wr;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
|
||||
struct file_operations ops;
|
||||
+#else
|
||||
- struct file_operations ops;
|
||||
+ struct proc_ops ops;
|
||||
+#endif
|
||||
int entity;
|
||||
};
|
||||
|
||||
@@ -1869,6 +1879,7 @@ static int mei_proc_single_open(struct i
|
||||
@@ -1869,6 +1875,7 @@ static int mei_proc_single_open(struct i
|
||||
static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
|
||||
struct proc_entry *proc_entry)
|
||||
{
|
||||
@@ -74,7 +71,7 @@
|
||||
memset(&proc_entry->ops, 0, sizeof(struct file_operations));
|
||||
proc_entry->ops.owner = THIS_MODULE;
|
||||
|
||||
@@ -1879,6 +1890,17 @@ static void mei_proc_entry_create(struct
|
||||
@@ -1879,6 +1886,17 @@ static void mei_proc_entry_create(struct
|
||||
proc_entry->ops.llseek = seq_lseek;
|
||||
if (proc_entry->wr)
|
||||
proc_entry->ops.write = proc_entry->wr;
|
||||
@@ -92,7 +89,7 @@
|
||||
|
||||
proc_create_data(proc_entry->name,
|
||||
(S_IFREG | S_IRUGO),
|
||||
@@ -2174,9 +2196,11 @@ static int MEI_module_init (void)
|
||||
@@ -2174,9 +2192,11 @@ static int MEI_module_init (void)
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -104,7 +101,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2304,6 +2328,10 @@ static void MEI_module_exit (void)
|
||||
@@ -2304,6 +2324,10 @@ static void MEI_module_exit (void)
|
||||
|
||||
#else
|
||||
unregister_chrdev ( major_number , DRV_MEI_NAME );
|
||||
@@ -115,7 +112,7 @@
|
||||
#endif
|
||||
|
||||
#if CONFIG_PROC_FS
|
||||
@@ -2388,9 +2416,11 @@ static void MEI_module_exit (void)
|
||||
@@ -2388,9 +2412,11 @@ static void MEI_module_exit (void)
|
||||
("MEI_DRV: Chipset Basic Exit failed" MEI_DRV_CRLF));
|
||||
}
|
||||
|
||||
@@ -127,18 +124,18 @@
|
||||
|
||||
#if (MEI_SUPPORT_DEBUG_LOGGER == 1)
|
||||
if (nl_debug_sock)
|
||||
@@ -2514,6 +2544,10 @@ static int MEI_InitModuleRegCharDev(cons
|
||||
@@ -2514,6 +2540,10 @@ static int MEI_InitModuleRegCharDev(cons
|
||||
("Using major number %d" MEI_DRV_CRLF, major_number));
|
||||
}
|
||||
|
||||
+ mei_class = class_create(THIS_MODULE, devName);
|
||||
+ mei_class = class_create(devName);
|
||||
+ mei_devt = MKDEV(major_number, 0);
|
||||
+ device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0);
|
||||
+
|
||||
return 0;
|
||||
#endif /* CONFIG_DEVFS_FS */
|
||||
}
|
||||
@@ -2563,21 +2597,32 @@ static int MEI_InitModuleBasics(void)
|
||||
@@ -2563,21 +2593,32 @@ static int MEI_InitModuleBasics(void)
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
|
||||
@@ -171,7 +168,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2905,11 +2950,15 @@ IFX_int32_t MEI_IoctlInitDevice(
|
||||
@@ -2905,11 +2946,15 @@ IFX_int32_t MEI_IoctlInitDevice(
|
||||
pMeiDev->eModePoll = e_MEI_DEV_ACCESS_MODE_IRQ;
|
||||
pMeiDev->intMask = ME_ARC2ME_INTERRUPT_UNMASK_ALL;
|
||||
|
||||
@@ -187,7 +184,7 @@
|
||||
|
||||
pTmpXCntrl = MEI_VrxXDevToIrqListAdd(
|
||||
MEI_DRV_LINENUM_GET(pMeiDev),
|
||||
@@ -3249,9 +3298,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap(
|
||||
@@ -3249,9 +3294,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap(
|
||||
ret = MEI_IoctlMeiDbgAccessWr( pMeiDynCntrl, pLocalArgument);
|
||||
|
||||
/* return arguments - count */
|
||||
@@ -202,7 +199,7 @@
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3278,16 +3329,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap(
|
||||
@@ -3278,16 +3325,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap(
|
||||
if ( pLocalArgument->count )
|
||||
{
|
||||
/* return the buffer */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -1505,8 +1505,8 @@ struct proc_entry {
|
||||
@@ -1501,8 +1501,8 @@ struct proc_entry {
|
||||
static void MEI_GetVersionProc(struct seq_file *s)
|
||||
{
|
||||
seq_printf(s, "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]);
|
||||
@@ -11,13 +11,11 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4233,7 +4233,9 @@ module_exit (MEI_module_exit);
|
||||
@@ -4229,7 +4229,6 @@ module_exit (MEI_module_exit);
|
||||
#ifdef MODULE
|
||||
MODULE_AUTHOR("www.lantiq.com");
|
||||
MODULE_DESCRIPTION("MEI CPE Driver - www.lantiq.com");
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0))
|
||||
MODULE_SUPPORTED_DEVICE("MEI CPE Interface");
|
||||
+#endif
|
||||
-MODULE_SUPPORTED_DEVICE("MEI CPE Interface");
|
||||
MODULE_LICENSE ("GPL");
|
||||
#endif /* #ifdef MODULE*/
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#endif
|
||||
|
||||
/* add MEI CPE debug/printout part */
|
||||
@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(str
|
||||
@@ -1714,8 +1714,8 @@ static void MEI_MeminfoProcPerDevGet(str
|
||||
", CRC = 0x%08X"
|
||||
#endif
|
||||
MEI_DRV_CRLF,
|
||||
|
||||
@@ -1,28 +1,22 @@
|
||||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -1873,7 +1873,11 @@ static int mei_seq_single_show(struct se
|
||||
@@ -1869,7 +1869,7 @@ static int mei_seq_single_show(struct se
|
||||
|
||||
static int mei_proc_single_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
|
||||
return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+#else
|
||||
- return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+ return single_open(file, mei_seq_single_show, pde_data(inode));
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
|
||||
--- a/src/drv_mei_cpe_linux_proc_config.c
|
||||
+++ b/src/drv_mei_cpe_linux_proc_config.c
|
||||
@@ -1036,7 +1036,11 @@ static int mei_seq_single_show(struct se
|
||||
@@ -1036,7 +1036,7 @@ static int mei_seq_single_show(struct se
|
||||
|
||||
static int mei_proc_single_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
|
||||
return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+#else
|
||||
- return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+ return single_open(file, mei_seq_single_show, pde_data(inode));
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
|
||||
|
||||
@@ -16,17 +16,3 @@
|
||||
#if defined(IFXOS_HAVE_VERSION_CHECK)
|
||||
# if (IFXOS_VERSION_CHECK_EG_THAN(1,1,0))
|
||||
# define IFXOS_SUPPORTS_FIFO_PEEK 1
|
||||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -2548,7 +2548,11 @@ static int MEI_InitModuleRegCharDev(cons
|
||||
("Using major number %d" MEI_DRV_CRLF, major_number));
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
mei_class = class_create(THIS_MODULE, devName);
|
||||
+#else
|
||||
+ mei_class = class_create(devName);
|
||||
+#endif
|
||||
mei_devt = MKDEV(major_number, 0);
|
||||
device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0);
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
--- a/src/drv_mei_cpe_linux.c
|
||||
+++ b/src/drv_mei_cpe_linux.c
|
||||
@@ -2048,13 +2048,12 @@ static int MEI_InstallProcEntry(unsigned
|
||||
@@ -2040,13 +2040,12 @@ static int MEI_InstallProcEntry(unsigned
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
--- a/src/include/drv_dsl_cpe_os_linux.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_linux.h
|
||||
@@ -33,6 +33,9 @@
|
||||
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <linux/sched.h>
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
|
||||
+#include <linux/sched/signal.h>
|
||||
+#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
|
||||
|
||||
@@ -35,40 +35,32 @@
|
||||
#endif
|
||||
|
||||
if (pINode == DSL_NULL)
|
||||
@@ -491,7 +485,11 @@ DSL_void_t* DSL_DRV_VMalloc(
|
||||
@@ -491,7 +485,7 @@ DSL_void_t* DSL_DRV_VMalloc(
|
||||
DSL_DRV_size_t nSize)
|
||||
{
|
||||
/* VRX500-BU: Better to use vmalloc or vzmalloc here?! */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
||||
return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL);
|
||||
+#else
|
||||
- return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL);
|
||||
+ return __vmalloc((unsigned long)nSize, GFP_KERNEL);
|
||||
+#endif
|
||||
/* return vmalloc(nSize);*/
|
||||
}
|
||||
|
||||
@@ -917,12 +915,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
|
||||
@@ -917,12 +911,11 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
|
||||
|
||||
DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset)
|
||||
{
|
||||
- struct timeval tv;
|
||||
DSL_uint32_t nTime = 0;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
|
||||
+ struct timeval tv;
|
||||
|
||||
memset(&tv, 0, sizeof(tv));
|
||||
do_gettimeofday(&tv);
|
||||
nTime = (DSL_uint32_t)tv.tv_sec;
|
||||
+#else
|
||||
+ struct timespec64 now;
|
||||
+
|
||||
DSL_uint32_t nTime = 0;
|
||||
|
||||
- memset(&tv, 0, sizeof(tv));
|
||||
- do_gettimeofday(&tv);
|
||||
- nTime = (DSL_uint32_t)tv.tv_sec;
|
||||
+ ktime_get_real_ts64(&now);
|
||||
+ nTime = (DSL_uint32_t)now.tv_sec;
|
||||
+#endif
|
||||
|
||||
if ( (nOffset == 0) || (nOffset > nTime) )
|
||||
{
|
||||
@@ -1203,6 +1208,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
|
||||
@@ -1203,6 +1196,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -78,18 +70,18 @@
|
||||
/* Entry point of driver */
|
||||
int __init DSL_ModuleInit(void)
|
||||
{
|
||||
@@ -1241,6 +1249,10 @@ int __init DSL_ModuleInit(void)
|
||||
@@ -1241,6 +1237,10 @@ int __init DSL_ModuleInit(void)
|
||||
|
||||
DSL_DRV_DevNodeInit();
|
||||
|
||||
+ dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
|
||||
+ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME);
|
||||
+ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
|
||||
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1248,6 +1260,11 @@ void __exit DSL_ModuleCleanup(void)
|
||||
@@ -1248,6 +1248,11 @@ void __exit DSL_ModuleCleanup(void)
|
||||
{
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@
|
||||
DSL_char_t msg[DSL_DBG_MAX_DEBUG_PRINT_CHAR + 1] = "\0";
|
||||
va_list ap; /* points to each unnamed arg in turn */
|
||||
|
||||
@@ -1172,7 +1174,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
@@ -1160,7 +1162,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
static void DSL_DRV_NlSendMsg(DSL_char_t* pMsg)
|
||||
{
|
||||
struct nlmsghdr *pNlMsgHdr;
|
||||
@@ -1261,7 +1263,7 @@ void __exit DSL_ModuleCleanup(void)
|
||||
@@ -1249,7 +1251,7 @@ void __exit DSL_ModuleCleanup(void)
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
device_destroy(dsl_class, dsl_devt);
|
||||
|
||||
@@ -9,20 +9,6 @@
|
||||
DSL_CHECK_ERR_CODE();
|
||||
|
||||
DSL_DEBUG(DSL_DBG_MSG,
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -1251,7 +1251,11 @@ int __init DSL_ModuleInit(void)
|
||||
|
||||
DSL_DRV_DevNodeInit();
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
|
||||
+#else
|
||||
+ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME);
|
||||
+#endif
|
||||
dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
|
||||
device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0");
|
||||
|
||||
--- a/src/device/drv_dsl_cpe_device_vrx.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_vrx.c
|
||||
@@ -2628,7 +2628,7 @@ static DSL_Error_t DSL_DRV_VRX_ChannelSt
|
||||
|
||||
@@ -70,7 +70,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
DSL_boolean_t bIsInKernel,
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -1214,7 +1214,7 @@ static struct class *dsl_class;
|
||||
@@ -1202,7 +1202,7 @@ static struct class *dsl_class;
|
||||
static dev_t dsl_devt;
|
||||
|
||||
/* Entry point of driver */
|
||||
@@ -79,7 +79,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
{
|
||||
DSL_int_t i;
|
||||
|
||||
@@ -1262,7 +1262,7 @@ int __init DSL_ModuleInit(void)
|
||||
@@ -1246,7 +1246,7 @@ int __init DSL_ModuleInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
clean-generic:
|
||||
--- a/src/drv_vmmc_linux.c
|
||||
+++ b/src/drv_vmmc_linux.c
|
||||
@@ -27,11 +27,18 @@
|
||||
@@ -27,11 +27,13 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/vmalloc.h>
|
||||
@@ -35,161 +35,110 @@
|
||||
#ifdef LINUX_2_6
|
||||
#include <linux/version.h>
|
||||
#ifndef UTS_RELEASE
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
+#include <linux/autoconf.h>
|
||||
#include <linux/utsrelease.h>
|
||||
+#else
|
||||
-#include <linux/utsrelease.h>
|
||||
+#include <generated/autoconf.h>
|
||||
+#include <generated/utsrelease.h>
|
||||
+#endif
|
||||
#endif /* UTC_RELEASE */
|
||||
#undef CONFIG_DEVFS_FS
|
||||
#endif /* LINUX_2_6 */
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -19,11 +19,22 @@
|
||||
#include "drv_config.h"
|
||||
|
||||
#include "drv_mps_version.h"
|
||||
+#include <linux/version.h>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifdef CONFIG_DEBUG_MINI_BOOT
|
||||
#define IKOS_MINI_BOOT
|
||||
#endif /* */
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#include <linux/autoconf.h>
|
||||
+#ifndef UTS_RELEASE
|
||||
+#include <linux/utsrelease.h>
|
||||
+#endif
|
||||
+#else
|
||||
-#include <linux/autoconf.h>
|
||||
+#include <generated/autoconf.h>
|
||||
+#ifndef UTS_RELEASE
|
||||
+#include <generated/utsrelease.h>
|
||||
+#endif
|
||||
+#endif
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/poll.h>
|
||||
@@ -34,7 +45,13 @@
|
||||
@@ -34,7 +34,9 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#ifdef LINUX_2_6
|
||||
-#include <linux/utsrelease.h>
|
||||
+#ifndef UTS_RELEASE
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
|
||||
#include <linux/utsrelease.h>
|
||||
+#else
|
||||
+#include <generated/utsrelease.h>
|
||||
+#endif
|
||||
+#endif /* UTC_RELEASE */
|
||||
#else /* */
|
||||
#include <linux/uts.h>
|
||||
#include <linux/moduleparam.h>
|
||||
@@ -94,8 +111,13 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
@@ -94,7 +96,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
#ifndef __KERNEL__
|
||||
IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
|
||||
IFX_int32_t ifx_mps_close (struct inode *inode, struct file *file_p);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
|
||||
IFX_uint32_t nCmd, IFX_ulong_t arg);
|
||||
+#else
|
||||
-IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
|
||||
+long ifx_mps_ioctl (struct file *file_p,
|
||||
+ IFX_uint32_t nCmd, IFX_ulong_t arg);
|
||||
+#endif
|
||||
IFX_uint32_t nCmd, IFX_ulong_t arg);
|
||||
IFX_int32_t ifx_mps_read_mailbox (mps_devices type, mps_message * rw);
|
||||
IFX_int32_t ifx_mps_write_mailbox (mps_devices type, mps_message * rw);
|
||||
IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir,
|
||||
@@ -155,7 +177,11 @@ IFX_char_t voice_channel_int_name[NUM_VO
|
||||
@@ -155,7 +157,7 @@ IFX_char_t voice_channel_int_name[NUM_VO
|
||||
static struct file_operations ifx_mps_fops = {
|
||||
owner:THIS_MODULE,
|
||||
poll:ifx_mps_poll,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ioctl:ifx_mps_ioctl,
|
||||
+#else
|
||||
- ioctl:ifx_mps_ioctl,
|
||||
+ unlocked_ioctl:ifx_mps_ioctl,
|
||||
+#endif
|
||||
open:ifx_mps_open,
|
||||
release:ifx_mps_close
|
||||
};
|
||||
@@ -598,8 +624,13 @@ static IFX_uint32_t ifx_mps_poll (struct
|
||||
@@ -598,7 +600,7 @@ static IFX_uint32_t ifx_mps_poll (struct
|
||||
* \return -ENOIOCTLCMD Invalid command
|
||||
* \ingroup API
|
||||
*/
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p,
|
||||
IFX_uint32_t nCmd, IFX_ulong_t arg)
|
||||
+#else
|
||||
-IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p,
|
||||
+long ifx_mps_ioctl (struct file *file_p,
|
||||
+ IFX_uint32_t nCmd, IFX_ulong_t arg)
|
||||
+#endif
|
||||
IFX_uint32_t nCmd, IFX_ulong_t arg)
|
||||
{
|
||||
IFX_int32_t retvalue = -EINVAL;
|
||||
mps_message rw_struct;
|
||||
@@ -613,17 +644,30 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
@@ -613,17 +615,18 @@ IFX_int32_t ifx_mps_ioctl (struct inode
|
||||
'mps_devices' enum type, which in fact is [0..8]; So, if inode value is
|
||||
[0..NUM_VOICE_CHANNEL+1], then we make sure that we are calling from
|
||||
kernel space. */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
if (((IFX_int32_t) inode >= 0) &&
|
||||
((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1))
|
||||
+#else
|
||||
- if (((IFX_int32_t) inode >= 0) &&
|
||||
- ((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1))
|
||||
+ if (((IFX_int32_t) file_p >= 0) &&
|
||||
+ ((IFX_int32_t) file_p < NUM_VOICE_CHANNEL + 1))
|
||||
+#endif
|
||||
{
|
||||
from_kernel = 1;
|
||||
|
||||
/* Get corresponding mailbox device structure */
|
||||
if ((pMBDev =
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0)
|
||||
+#else
|
||||
- ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0)
|
||||
+ ifx_mps_get_device ((mps_devices) ((IFX_int32_t) file_p))) == 0)
|
||||
+#endif
|
||||
{
|
||||
return (-EINVAL);
|
||||
}
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
+#else
|
||||
+ file_p = NULL;
|
||||
+#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -21,7 +21,11 @@
|
||||
@@ -21,7 +21,7 @@
|
||||
#undef USE_PLAIN_VOICE_FIRMWARE
|
||||
#undef PRINT_ON_ERR_INTERRUPT
|
||||
#undef FAIL_ON_ERR_INTERRUPT
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#include <linux/autoconf.h>
|
||||
+#else
|
||||
-#include <linux/autoconf.h>
|
||||
+#include <generated/autoconf.h>
|
||||
+#endif
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
@@ -92,7 +96,9 @@ extern IFX_uint32_t danube_get_cpu_ver (
|
||||
@@ -92,7 +92,6 @@ extern IFX_uint32_t danube_get_cpu_ver (
|
||||
extern mps_mbx_dev *ifx_mps_get_device (mps_devices type);
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
|
||||
extern IFX_void_t bsp_mask_and_ack_irq (IFX_uint32_t irq_nr);
|
||||
+#endif
|
||||
-extern IFX_void_t bsp_mask_and_ack_irq (IFX_uint32_t irq_nr);
|
||||
|
||||
#else /* */
|
||||
extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr);
|
||||
--- a/src/mps/drv_mps_vmmc_danube.c
|
||||
+++ b/src/mps/drv_mps_vmmc_danube.c
|
||||
@@ -20,7 +20,11 @@
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef SYSTEM_DANUBE /* defined in drv_mps_vmmc_config.h */
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
#include <linux/autoconf.h>
|
||||
+#else
|
||||
-#include <linux/autoconf.h>
|
||||
+#include <generated/autoconf.h>
|
||||
+#endif
|
||||
|
||||
/* lib_ifxos headers */
|
||||
#include "ifx_types.h"
|
||||
@@ -221,67 +170,47 @@
|
||||
cpb2w (&cram_offset, &bbd_cram->pData[0], sizeof (IFX_uint16_t));
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -776,8 +776,13 @@ IFX_int32_t VMMC_TAPI_LL_FW_Start(IFX_TA
|
||||
@@ -776,7 +776,7 @@ IFX_int32_t VMMC_TAPI_LL_FW_Start(IFX_TA
|
||||
dwld.fwDwld.length = IoInit.pram_size;
|
||||
|
||||
/* download firmware */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD,
|
||||
(IFX_uint32_t) &dwld.fwDwld);
|
||||
+#else
|
||||
- ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD,
|
||||
+ ret = ifx_mps_ioctl((IFX_void_t *) command, FIO_MPS_DOWNLOAD,
|
||||
+ (IFX_uint32_t) &dwld.fwDwld);
|
||||
+#endif
|
||||
(IFX_uint32_t) &dwld.fwDwld);
|
||||
}
|
||||
|
||||
if (VMMC_SUCCESS(ret))
|
||||
--- a/src/drv_vmmc_ioctl.c
|
||||
+++ b/src/drv_vmmc_ioctl.c
|
||||
@@ -426,18 +426,31 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP
|
||||
@@ -426,18 +426,18 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP
|
||||
/* MPS driver will do the USR2KERN so just pass on the pointer. */
|
||||
dwnld_struct.data = (IFX_void_t *)IoInit.pPRAMfw;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL,
|
||||
FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct);
|
||||
+#else
|
||||
- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL,
|
||||
+ ret = ifx_mps_ioctl((IFX_void_t *)command,
|
||||
+ FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct);
|
||||
+#endif
|
||||
FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct);
|
||||
break;
|
||||
}
|
||||
case FIO_DEV_RESET:
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0);
|
||||
+#else
|
||||
- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0);
|
||||
+ ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESET, 0);
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case FIO_DEV_RESTART:
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0);
|
||||
+#else
|
||||
- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0);
|
||||
+ ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESTART, 0);
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
case FIO_LASTERR:
|
||||
--- a/src/mps/drv_mps_vmmc.h
|
||||
+++ b/src/mps/drv_mps_vmmc.h
|
||||
@@ -279,8 +279,13 @@ typedef struct
|
||||
@@ -279,7 +279,7 @@ typedef struct
|
||||
#include <linux/fs.h>
|
||||
IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p);
|
||||
IFX_int32_t ifx_mps_close (struct inode *inode, struct file *filp);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
|
||||
IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
|
||||
IFX_uint32_t nCmd, unsigned long arg);
|
||||
+#else
|
||||
-IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p,
|
||||
+long ifx_mps_ioctl (struct file *filp,
|
||||
+ IFX_uint32_t nCmd, unsigned long arg);
|
||||
+#endif
|
||||
IFX_uint32_t nCmd, unsigned long arg);
|
||||
IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir,
|
||||
IFX_void_t (*callback) (mps_devices
|
||||
type));
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
--- a/src/drv_vmmc_access.h
|
||||
+++ b/src/drv_vmmc_access.h
|
||||
@@ -24,6 +24,10 @@
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "drv_mps_vmmc.h"
|
||||
#endif
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS IFXMIPS_MPS_BASE_ADDR
|
||||
+#endif
|
||||
+#define IFX_MPS IFXMIPS_MPS_BASE_ADDR
|
||||
+
|
||||
/* ============================= */
|
||||
/* Global Defines */
|
||||
@@ -87,22 +85,7 @@
|
||||
#endif /* _DRV_VMMC_AMAZON_S_H */
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -52,6 +52,14 @@
|
||||
#include "ifx_pmu.h"
|
||||
#endif /* PMU_SUPPORTED */
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
|
||||
+# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
|
||||
+# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
|
||||
+# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR
|
||||
+# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR
|
||||
+# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
|
||||
+#endif
|
||||
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
@@ -1591,7 +1599,7 @@ IFX_void_t VMMC_DeviceDriverStop(IFX_voi
|
||||
@@ -1586,7 +1586,7 @@ IFX_void_t VMMC_DeviceDriverStop(IFX_voi
|
||||
#ifdef VMMC_DRIVER_UNLOAD_HOOK
|
||||
if (VDevices[0].nDevState & DS_GPIO_RESERVED)
|
||||
{
|
||||
@@ -113,14 +96,12 @@
|
||||
{
|
||||
--- a/src/drv_vmmc_init_cap.c
|
||||
+++ b/src/drv_vmmc_init_cap.c
|
||||
@@ -22,6 +22,11 @@
|
||||
@@ -22,6 +22,9 @@
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_device.h"
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET
|
||||
+# define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID
|
||||
+#endif
|
||||
+#define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET
|
||||
+#define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID
|
||||
+
|
||||
/* ============================= */
|
||||
/* Configuration defintions */
|
||||
@@ -135,42 +116,33 @@
|
||||
|
||||
#undef USE_PLAIN_VOICE_FIRMWARE
|
||||
#undef PRINT_ON_ERR_INTERRUPT
|
||||
@@ -39,8 +40,32 @@
|
||||
@@ -35,8 +36,23 @@
|
||||
#include "ifxos_interrupt.h"
|
||||
#include "ifxos_time.h"
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx/ifx_gptu.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <lantiq.h>
|
||||
+# include <linux/irq.h>
|
||||
+# include <lantiq_timer.h>
|
||||
+#include <lantiq.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <lantiq_timer.h>
|
||||
+
|
||||
+# define ifx_gptu_timer_request lq_request_timer
|
||||
+# define ifx_gptu_timer_start lq_start_timer
|
||||
+# define ifx_gptu_countvalue_get lq_get_count_value
|
||||
+# define ifx_gptu_timer_free lq_free_timer
|
||||
+#define ifx_gptu_timer_request lq_request_timer
|
||||
+#define ifx_gptu_timer_start lq_start_timer
|
||||
+#define ifx_gptu_countvalue_get lq_get_count_value
|
||||
+#define ifx_gptu_timer_free lq_free_timer
|
||||
+
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
|
||||
+# define bsp_mask_and_ack_irq ltq_mask_and_ack_irq
|
||||
+#else
|
||||
+extern void ltq_mask_and_ack_irq(struct irq_data *d);
|
||||
+static void inline bsp_mask_and_ack_irq(int x)
|
||||
+static inline void bsp_mask_and_ack_irq(int x)
|
||||
+{
|
||||
+ struct irq_data d;
|
||||
+ d.hwirq = x;
|
||||
+ ltq_mask_and_ack_irq(&d);
|
||||
+}
|
||||
+#endif
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx/ifx_gptu.h>
|
||||
+#endif
|
||||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -104,6 +129,9 @@ extern IFX_void_t bsp_mask_and_ack_irq (
|
||||
@@ -97,6 +113,9 @@ extern mps_mbx_dev *ifx_mps_get_device (
|
||||
extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr);
|
||||
|
||||
#endif /* */
|
||||
@@ -180,7 +152,7 @@
|
||||
extern IFXOS_event_t fw_ready_evt;
|
||||
/* callback function to free all data buffers currently used by voice FW */
|
||||
IFX_void_t (*ifx_mps_bufman_freeall)(IFX_void_t) = IFX_NULL;
|
||||
@@ -207,7 +235,8 @@ IFX_boolean_t ifx_mps_ext_bufman ()
|
||||
@@ -200,7 +219,8 @@ IFX_boolean_t ifx_mps_ext_bufman ()
|
||||
*/
|
||||
IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority)
|
||||
{
|
||||
@@ -190,7 +162,7 @@
|
||||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
if (fastbuf_initialized == 0)
|
||||
@@ -261,7 +290,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
@@ -254,7 +274,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_
|
||||
*/
|
||||
IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr)
|
||||
{
|
||||
@@ -199,7 +171,7 @@
|
||||
IFX_int32_t index = fastbuf_index;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -457,7 +486,7 @@ static mps_buffer_state_e ifx_mps_bufman
|
||||
@@ -450,7 +470,7 @@ static mps_buffer_state_e ifx_mps_bufman
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_inc_level (IFX_uint32_t value)
|
||||
{
|
||||
@@ -208,7 +180,7 @@
|
||||
|
||||
if (mps_buffer.buf_level + value > MPS_BUFFER_MAX_LEVEL)
|
||||
{
|
||||
@@ -484,7 +513,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le
|
||||
@@ -477,7 +497,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le
|
||||
*/
|
||||
static IFX_int32_t ifx_mps_bufman_dec_level (IFX_uint32_t value)
|
||||
{
|
||||
@@ -217,7 +189,7 @@
|
||||
|
||||
if (mps_buffer.buf_level < value)
|
||||
{
|
||||
@@ -636,7 +665,7 @@ IFX_int32_t ifx_mps_bufman_buf_provide (
|
||||
@@ -629,7 +649,7 @@ IFX_int32_t ifx_mps_bufman_buf_provide (
|
||||
mem_seg_ptr[i] =
|
||||
(IFX_uint32_t *) CPHYSADDR ((IFX_uint32_t) mps_buffer.
|
||||
malloc (segment_size, FASTBUF_FW_OWNED));
|
||||
@@ -226,7 +198,7 @@
|
||||
{
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
("%s(): cannot allocate buffer\n", __FUNCTION__));
|
||||
@@ -952,7 +981,7 @@ IFX_int32_t ifx_mps_common_open (mps_com
|
||||
@@ -945,7 +965,7 @@ IFX_int32_t ifx_mps_common_open (mps_com
|
||||
mps_mbx_dev * pMBDev, IFX_int32_t bcommand,
|
||||
IFX_boolean_t from_kernel)
|
||||
{
|
||||
@@ -235,7 +207,7 @@
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1068,7 +1097,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb
|
||||
@@ -1061,7 +1081,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb
|
||||
IFX_void_t ifx_mps_release_structures (mps_comm_dev * pDev)
|
||||
{
|
||||
IFX_int32_t count;
|
||||
@@ -244,7 +216,7 @@
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
IFXOS_BlockFree (pFW_img_data);
|
||||
@@ -1117,7 +1146,7 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
@@ -1110,7 +1130,7 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
|
||||
/* Initialize MPS main structure */
|
||||
memset ((IFX_void_t *) pDev, 0, sizeof (mps_comm_dev));
|
||||
@@ -253,7 +225,7 @@
|
||||
pDev->flags = 0x00000000;
|
||||
MBX_Memory = pDev->base_global;
|
||||
|
||||
@@ -1125,9 +1154,11 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
@@ -1118,9 +1138,11 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
for MBX communication. These are: mailbox base address, mailbox size, *
|
||||
mailbox read index and mailbox write index. for command and voice
|
||||
mailbox, * upstream and downstream direction. */
|
||||
@@ -268,7 +240,7 @@
|
||||
MBX_Memory->MBX_UPSTR_CMD_BASE =
|
||||
(IFX_uint32_t *) CPHYSADDR ((IFX_uint32_t) MBX_UPSTRM_CMD_FIFO_BASE);
|
||||
MBX_Memory->MBX_UPSTR_CMD_SIZE = MBX_CMD_FIFO_SIZE;
|
||||
@@ -1564,7 +1595,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp
|
||||
@@ -1557,7 +1579,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp
|
||||
IFX_uint32_t * bytes)
|
||||
{
|
||||
IFX_int32_t i, ret;
|
||||
@@ -277,7 +249,7 @@
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
|
||||
@@ -1774,7 +1805,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m
|
||||
@@ -1767,7 +1789,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
IFX_uint32_t i;
|
||||
@@ -286,7 +258,7 @@
|
||||
IFX_int32_t retval = -EAGAIN;
|
||||
IFX_int32_t retries = 0;
|
||||
IFX_uint32_t word = 0;
|
||||
@@ -2169,6 +2200,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m
|
||||
@@ -2162,6 +2184,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
("%s(): Invalid device ID %d !\n", __FUNCTION__, pMBDev->devID));
|
||||
}
|
||||
@@ -294,7 +266,7 @@
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2192,7 +2224,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2185,7 +2208,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
mps_mbx_dev *mbx_dev;
|
||||
MbxMsg_s msg;
|
||||
IFX_uint32_t bytes_read = 0;
|
||||
@@ -303,7 +275,7 @@
|
||||
IFX_int32_t ret;
|
||||
|
||||
/* set pointer to data upstream mailbox, no matter if 0,1,2 or 3 because
|
||||
@@ -2283,7 +2315,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2276,7 +2299,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
{
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
@@ -312,7 +284,7 @@
|
||||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2326,7 +2358,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2319,7 +2342,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
ifx_mps_bufman_dec_level (1);
|
||||
if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
|
||||
@@ -321,7 +293,7 @@
|
||||
{
|
||||
IFXOS_LockRelease (pMPSDev->provide_buffer);
|
||||
}
|
||||
@@ -2356,7 +2388,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
@@ -2349,7 +2372,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF
|
||||
IFX_void_t ifx_mps_mbx_cmd_upstream (IFX_ulong_t dummy)
|
||||
{
|
||||
mps_fifo *mbx;
|
||||
@@ -330,7 +302,7 @@
|
||||
|
||||
/* set pointer to upstream command mailbox */
|
||||
mbx = &(pMPSDev->cmd_upstrm_fifo);
|
||||
@@ -2404,7 +2436,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
@@ -2397,7 +2420,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
mps_event_msg msg;
|
||||
IFX_int32_t length = 0;
|
||||
IFX_int32_t read_length = 0;
|
||||
@@ -339,7 +311,7 @@
|
||||
|
||||
/* set pointer to upstream event mailbox */
|
||||
mbx = &(pMPSDev->event_upstrm_fifo);
|
||||
@@ -2619,6 +2651,7 @@ IFX_void_t ifx_mps_enable_mailbox_int ()
|
||||
@@ -2612,6 +2635,7 @@ IFX_void_t ifx_mps_enable_mailbox_int ()
|
||||
#endif
|
||||
|
||||
*IFX_MPS_AD0ENR = Ad0Reg.val;
|
||||
@@ -347,7 +319,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2647,7 +2680,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
@@ -2640,7 +2664,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_enable (IFX_void_t)
|
||||
{
|
||||
@@ -356,7 +328,7 @@
|
||||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2673,7 +2706,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF
|
||||
@@ -2666,7 +2690,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF
|
||||
*/
|
||||
IFX_void_t ifx_mps_dd_mbx_int_disable (IFX_void_t)
|
||||
{
|
||||
@@ -365,7 +337,7 @@
|
||||
MPS_Ad0Reg_u Ad0Reg;
|
||||
|
||||
IFXOS_LOCKINT (flags);
|
||||
@@ -2738,7 +2771,6 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
@@ -2731,7 +2755,6 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
#else /* */
|
||||
mask_and_ack_danube_irq (irq);
|
||||
#endif /* */
|
||||
@@ -373,7 +345,7 @@
|
||||
/* FW is up and ready to process commands */
|
||||
if (MPS_Ad0StatusReg.fld.dl_end)
|
||||
{
|
||||
@@ -2800,6 +2832,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
@@ -2793,6 +2816,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,7 +353,7 @@
|
||||
if (MPS_Ad0StatusReg.fld.du_mbx)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -2944,12 +2977,12 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
|
||||
@@ -2937,12 +2961,12 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
|
||||
IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val;
|
||||
/* handle only enabled interrupts */
|
||||
MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan];
|
||||
@@ -395,7 +367,7 @@
|
||||
pMPSDev->event.MPS_VCStatReg[chan].val = MPS_VCStatusReg.val;
|
||||
#ifdef PRINT_ON_ERR_INTERRUPT
|
||||
if (MPS_VCStatusReg.fld.rcv_ov)
|
||||
@@ -3093,7 +3126,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
@@ -3086,7 +3110,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
*/
|
||||
IFX_return_t ifx_mps_init_gpt ()
|
||||
{
|
||||
@@ -405,7 +377,7 @@
|
||||
IFX_ulong_t count;
|
||||
#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
|
||||
timer = TIMER1A;
|
||||
@@ -3166,6 +3200,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi
|
||||
@@ -3159,6 +3184,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi
|
||||
#else /* Danube */
|
||||
timer = TIMER1B;
|
||||
#endif /* SYSTEM_AR9 || SYSTEM_VR9 */
|
||||
@@ -423,37 +395,30 @@
|
||||
#include "drv_config.h"
|
||||
|
||||
#ifdef SYSTEM_DANUBE /* defined in drv_mps_vmmc_config.h */
|
||||
@@ -36,9 +37,22 @@
|
||||
@@ -32,9 +33,16 @@
|
||||
#include "ifxos_select.h"
|
||||
#include "ifxos_interrupt.h"
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx/ifx_gpio.h>
|
||||
-#include <asm/ifx/common_routines.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <lantiq.h>
|
||||
+# include <linux/irq.h>
|
||||
+# include <lantiq_timer.h>
|
||||
+# include <linux/dma-mapping.h>
|
||||
+#include <lantiq.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <lantiq_timer.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+
|
||||
+
|
||||
+#define LQ_RCU_BASE_ADDR (KSEG1 + 0x1F203000)
|
||||
+# define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010))
|
||||
+#define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010))
|
||||
+#define IFX_RCU_RST_REQ_CPU1 (1 << 3)
|
||||
+# define IFX_RCU_RST_REQ LQ_RCU_RST
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
+# include <asm/ifx/ifx_gpio.h>
|
||||
+#endif
|
||||
+#define IFX_RCU_RST_REQ LQ_RCU_RST
|
||||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -75,6 +89,20 @@ IFX_void_t ifx_mps_release (IFX_void_t);
|
||||
@@ -71,6 +79,18 @@ IFX_void_t ifx_mps_release (IFX_void_t);
|
||||
/* Local function definition */
|
||||
/* ============================= */
|
||||
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+IFX_uint32_t ifx_get_cp1_size(IFX_void_t)
|
||||
+{
|
||||
+ return 1;
|
||||
@@ -465,12 +430,11 @@
|
||||
+{
|
||||
+ return ltq_get_cp1_base();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/******************************************************************************
|
||||
* DANUBE Specific Routines
|
||||
******************************************************************************/
|
||||
@@ -134,6 +162,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
@@ -130,6 +150,15 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
}
|
||||
|
||||
/* check if FW image fits in available memory space */
|
||||
@@ -486,7 +450,7 @@
|
||||
if (mem > ifx_get_cp1_size())
|
||||
{
|
||||
TRACE (MPS, DBG_LEVEL_HIGH,
|
||||
@@ -141,6 +178,7 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
@@ -137,6 +166,7 @@ IFX_int32_t ifx_mps_download_firmware (m
|
||||
__FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()));
|
||||
return IFX_ERROR;
|
||||
}
|
||||
@@ -494,7 +458,7 @@
|
||||
|
||||
/* reset the driver */
|
||||
ifx_mps_reset ();
|
||||
@@ -361,7 +399,7 @@ IFX_void_t ifx_mps_release (IFX_void_t)
|
||||
@@ -357,7 +387,7 @@ IFX_void_t ifx_mps_release (IFX_void_t)
|
||||
*/
|
||||
IFX_void_t ifx_mps_wdog_expiry()
|
||||
{
|
||||
@@ -505,17 +469,16 @@
|
||||
/* recalculate and compare the firmware checksum */
|
||||
--- a/src/mps/drv_mps_vmmc_device.h
|
||||
+++ b/src/mps/drv_mps_vmmc_device.h
|
||||
@@ -16,8 +16,58 @@
|
||||
@@ -16,8 +16,53 @@
|
||||
declarations.
|
||||
*******************************************************************************/
|
||||
|
||||
-#include <asm/ifx/ifx_regs.h>
|
||||
-#include <asm/ifx_vpe.h>
|
||||
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
+# include <lantiq.h>
|
||||
+# include <linux/irq.h>
|
||||
+# include <lantiq_soc.h>
|
||||
+# include <linux/gpio.h>
|
||||
+#include <lantiq.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <lantiq_soc.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000))
|
||||
+#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1F107000)
|
||||
+#define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
|
||||
@@ -540,10 +503,6 @@
|
||||
+#define IFXMIPS_MPS_CHIPID_PARTNUM_SET(value) ((((1 << 16) - 1) & (value)) << 12)
|
||||
+#define IFXMIPS_MPS_CHIPID_MANID_GET(value) (((value) >> 1) & ((1 << 10) - 1))
|
||||
+#define IFXMIPS_MPS_CHIPID_MANID_SET(value) ((((1 << 10) - 1) & (value)) << 1)
|
||||
+#else
|
||||
+# include <asm/ifx/ifx_regs.h>
|
||||
+# include <asm/ifx_vpe.h>
|
||||
+#endif
|
||||
+/* MPS register */
|
||||
+# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
|
||||
+# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
|
||||
@@ -566,7 +525,7 @@
|
||||
|
||||
/* ============================= */
|
||||
/* MPS Common defines */
|
||||
@@ -26,32 +76,28 @@
|
||||
@@ -26,32 +71,28 @@
|
||||
#define MPS_BASEADDRESS 0xBF107000
|
||||
#define MPS_RAD0SR MPS_BASEADDRESS + 0x0004
|
||||
|
||||
@@ -604,7 +563,7 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
@@ -142,53 +188,9 @@
|
||||
@@ -142,53 +183,9 @@
|
||||
#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
|
||||
/* ***** Amazon-S specific defines ***** */
|
||||
#define IFX_MPS_Base AMAZON_S_MPS
|
||||
@@ -660,7 +619,7 @@
|
||||
{
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -57,10 +57,11 @@
|
||||
@@ -42,10 +42,11 @@
|
||||
#include <linux/moduleparam.h>
|
||||
#endif /* */
|
||||
|
||||
@@ -673,7 +632,7 @@
|
||||
|
||||
/* lib_ifxos headers */
|
||||
#include "ifx_types.h"
|
||||
@@ -959,7 +960,7 @@ long ifx_mps_ioctl (struct file *file_p,
|
||||
@@ -918,7 +919,7 @@ long ifx_mps_ioctl (struct file *file_p,
|
||||
#endif /* MPS_FIFO_BLOCKING_WRITE */
|
||||
case FIO_MPS_GET_STATUS:
|
||||
{
|
||||
@@ -682,7 +641,7 @@
|
||||
|
||||
/* get the status of the channel */
|
||||
if (!from_kernel)
|
||||
@@ -993,7 +994,7 @@ long ifx_mps_ioctl (struct file *file_p,
|
||||
@@ -952,7 +953,7 @@ long ifx_mps_ioctl (struct file *file_p,
|
||||
#if CONFIG_MPS_HISTORY_SIZE > 0
|
||||
case FIO_MPS_GET_CMD_HISTORY:
|
||||
{
|
||||
@@ -691,7 +650,7 @@
|
||||
|
||||
if (from_kernel)
|
||||
{
|
||||
@@ -1685,6 +1686,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
@@ -1644,6 +1645,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX
|
||||
sprintf (buf + len, " minLv: \t %8d\n",
|
||||
ifx_mps_dev.voice_mb[i].upstrm_fifo->min_space);
|
||||
}
|
||||
@@ -699,7 +658,7 @@
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -2291,9 +2293,11 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2250,9 +2252,11 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -712,7 +671,7 @@
|
||||
/* enable mailbox interrupts */
|
||||
ifx_mps_enable_mailbox_int ();
|
||||
/* init FW ready event */
|
||||
@@ -2421,9 +2425,11 @@ ifx_mps_cleanup_module (IFX_void_t)
|
||||
@@ -2380,9 +2384,11 @@ ifx_mps_cleanup_module (IFX_void_t)
|
||||
/* disable mailbox interrupts */
|
||||
ifx_mps_disable_mailbox_int ();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_vmmc_linux.c
|
||||
+++ b/src/drv_vmmc_linux.c
|
||||
@@ -54,6 +54,8 @@
|
||||
@@ -49,6 +49,8 @@
|
||||
#include "drv_vmmc_res.h"
|
||||
#endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_HDLC) */
|
||||
|
||||
@@ -9,19 +9,17 @@
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
/* ============================= */
|
||||
@@ -862,7 +864,9 @@ void vmmc_module_exit(void)
|
||||
@@ -857,7 +859,6 @@ void vmmc_module_exit(void)
|
||||
#ifdef MODULE
|
||||
MODULE_DESCRIPTION("VMMC(VoiceMacroMipsCore) device driver - www.lantiq.com");
|
||||
MODULE_AUTHOR("Lantiq Deutschland GmbH");
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0))
|
||||
MODULE_SUPPORTED_DEVICE("DANUBE, TWINPASS, INCA-IP2, AR9, VR9");
|
||||
+#endif
|
||||
-MODULE_SUPPORTED_DEVICE("DANUBE, TWINPASS, INCA-IP2, AR9, VR9");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -80,11 +80,15 @@
|
||||
@@ -65,11 +65,15 @@
|
||||
/* ============================= */
|
||||
#define IFX_MPS_DEV_NAME "ifx_mps"
|
||||
|
||||
@@ -37,7 +35,7 @@
|
||||
/* ============================= */
|
||||
/* Global variable definition */
|
||||
/* ============================= */
|
||||
@@ -2257,7 +2261,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2216,7 +2220,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
ifx_mps_reset ();
|
||||
result = request_irq (INT_NUM_IM4_IRL18,
|
||||
#ifdef LINUX_2_6
|
||||
@@ -46,7 +44,7 @@
|
||||
#else /* */
|
||||
(irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *))
|
||||
ifx_mps_ad0_irq, SA_INTERRUPT
|
||||
@@ -2267,7 +2271,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2226,7 +2230,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
return result;
|
||||
result = request_irq (INT_NUM_IM4_IRL19,
|
||||
#ifdef LINUX_2_6
|
||||
@@ -55,7 +53,7 @@
|
||||
#else /* */
|
||||
(irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *))
|
||||
ifx_mps_ad1_irq, SA_INTERRUPT
|
||||
@@ -2282,7 +2286,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2241,7 +2245,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i);
|
||||
result = request_irq (INT_NUM_IM4_IRL14 + i,
|
||||
#ifdef LINUX_2_6
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
#define IFX_MPS_PLATFORM_NAME "MIPS24KEc"
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -2229,7 +2229,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2188,7 +2188,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
#if defined(CONFIG_MIPS) && !defined(CONFIG_MIPS_UNCACHED)
|
||||
#if defined(SYSTEM_DANUBE)
|
||||
bDoCacheOps = IFX_TRUE; /* on Danube always perform cache ops */
|
||||
@@ -163,7 +163,7 @@
|
||||
/* on AR9/VR9 cache is configured by BSP;
|
||||
here we check whether the D-cache is shared or partitioned;
|
||||
1) in case of shared D-cache all cache operations are omitted;
|
||||
@@ -2259,7 +2259,8 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2218,7 +2218,8 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
|
||||
/* reset the device before initializing the device driver */
|
||||
ifx_mps_reset ();
|
||||
@@ -173,7 +173,7 @@
|
||||
#ifdef LINUX_2_6
|
||||
ifx_mps_ad0_irq, 0x0
|
||||
#else /* */
|
||||
@@ -2400,7 +2401,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2359,7 +2360,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
if (result = ifx_mps_init_gpt_danube ())
|
||||
return result;
|
||||
#endif /*DANUBE*/
|
||||
@@ -583,18 +583,18 @@
|
||||
+#endif /* SYSTEM_FALCON */
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -66,6 +66,10 @@ static void inline bsp_mask_and_ack_irq(
|
||||
# include <asm/ifx/ifx_regs.h>
|
||||
# include <asm/ifx/ifx_gptu.h>
|
||||
#endif
|
||||
@@ -108,6 +108,10 @@ extern IFX_uint32_t danube_get_cpu_ver (
|
||||
extern mps_mbx_dev *ifx_mps_get_device (mps_devices type);
|
||||
|
||||
#ifdef LINUX_2_6
|
||||
+#if defined(SYSTEM_FALCON)
|
||||
+#include <sys1_reg.h>
|
||||
+#include <sysctrl.h>
|
||||
+#endif
|
||||
|
||||
#include "drv_mps_vmmc.h"
|
||||
#include "drv_mps_vmmc_dbg.h"
|
||||
@@ -1156,7 +1160,12 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
#else /* */
|
||||
extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr);
|
||||
@@ -1140,7 +1144,12 @@ IFX_uint32_t ifx_mps_init_structures (mp
|
||||
mailbox, * upstream and downstream direction. */
|
||||
memset (
|
||||
/* avoid to overwrite CPU boot registers */
|
||||
@@ -607,7 +607,7 @@
|
||||
0,
|
||||
sizeof (mps_mbx_reg) - 2 * sizeof (mps_boot_cfg_reg));
|
||||
MBX_Memory->MBX_UPSTR_CMD_BASE =
|
||||
@@ -2651,7 +2660,6 @@ IFX_void_t ifx_mps_enable_mailbox_int ()
|
||||
@@ -2635,7 +2644,6 @@ IFX_void_t ifx_mps_enable_mailbox_int ()
|
||||
#endif
|
||||
|
||||
*IFX_MPS_AD0ENR = Ad0Reg.val;
|
||||
@@ -615,7 +615,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2669,6 +2677,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
@@ -2653,6 +2661,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
|
||||
Ad0Reg.fld.cu_mbx = 0;
|
||||
Ad0Reg.fld.du_mbx = 0;
|
||||
*IFX_MPS_AD0ENR = Ad0Reg.val;
|
||||
@@ -623,7 +623,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2766,11 +2775,13 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
@@ -2750,11 +2759,13 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
|
||||
/* handle only enabled interrupts */
|
||||
MPS_Ad0StatusReg.val &= *IFX_MPS_AD0ENR;
|
||||
|
||||
@@ -637,7 +637,7 @@
|
||||
/* FW is up and ready to process commands */
|
||||
if (MPS_Ad0StatusReg.fld.dl_end)
|
||||
{
|
||||
@@ -2919,11 +2930,13 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
|
||||
@@ -2903,11 +2914,13 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
|
||||
/* handle only enabled interrupts */
|
||||
MPS_Ad1StatusReg.val &= *IFX_MPS_AD1ENR;
|
||||
|
||||
@@ -651,7 +651,7 @@
|
||||
pMPSDev->event.MPS_Ad1Reg.val = MPS_Ad1StatusReg.val;
|
||||
|
||||
/* use callback function or queue wake up to notify about data reception */
|
||||
@@ -2977,11 +2990,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
|
||||
@@ -2961,11 +2974,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
|
||||
IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val;
|
||||
/* handle only enabled interrupts */
|
||||
MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan];
|
||||
@@ -665,7 +665,7 @@
|
||||
|
||||
pMPSDev->event.MPS_VCStatReg[chan].val = MPS_VCStatusReg.val;
|
||||
#ifdef PRINT_ON_ERR_INTERRUPT
|
||||
@@ -3126,6 +3141,7 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
@@ -3110,6 +3125,7 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
|
||||
*/
|
||||
IFX_return_t ifx_mps_init_gpt ()
|
||||
{
|
||||
@@ -673,7 +673,7 @@
|
||||
unsigned long flags;
|
||||
IFX_uint32_t timer_flags, timer, loops = 0;
|
||||
IFX_ulong_t count;
|
||||
@@ -3134,7 +3150,11 @@ IFX_return_t ifx_mps_init_gpt ()
|
||||
@@ -3118,7 +3134,11 @@ IFX_return_t ifx_mps_init_gpt ()
|
||||
#else /* Danube */
|
||||
timer = TIMER1B;
|
||||
#endif /* SYSTEM_AR9 || SYSTEM_VR9 */
|
||||
@@ -685,7 +685,7 @@
|
||||
/* calibration loop - required to syncronize GPTC interrupt with falling
|
||||
edge of FSC clock */
|
||||
timer_flags =
|
||||
@@ -3179,7 +3199,7 @@ Probably already in use.\r\n", __FILE__,
|
||||
@@ -3163,7 +3183,7 @@ Probably already in use.\r\n", __FILE__,
|
||||
#endif /* DEBUG */
|
||||
|
||||
IFXOS_UNLOCKINT (flags);
|
||||
@@ -694,7 +694,7 @@
|
||||
return IFX_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -3194,6 +3214,9 @@ Probably already in use.\r\n", __FILE__,
|
||||
@@ -3178,6 +3198,9 @@ Probably already in use.\r\n", __FILE__,
|
||||
*/
|
||||
IFX_void_t ifx_mps_shutdown_gpt (IFX_void_t)
|
||||
{
|
||||
@@ -704,7 +704,7 @@
|
||||
IFX_uint32_t timer;
|
||||
#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
|
||||
timer = TIMER1A;
|
||||
@@ -3202,6 +3225,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi
|
||||
@@ -3186,6 +3209,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi
|
||||
#endif /* SYSTEM_AR9 || SYSTEM_VR9 */
|
||||
|
||||
ifx_gptu_timer_free (timer);
|
||||
@@ -714,9 +714,9 @@
|
||||
/**
|
||||
--- a/src/mps/drv_mps_vmmc_device.h
|
||||
+++ b/src/mps/drv_mps_vmmc_device.h
|
||||
@@ -22,7 +22,12 @@
|
||||
# include <lantiq_soc.h>
|
||||
# include <linux/gpio.h>
|
||||
@@ -21,7 +21,12 @@
|
||||
#include <lantiq_soc.h>
|
||||
#include <linux/gpio.h>
|
||||
#define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000))
|
||||
+#if defined(SYSTEM_FALCON)
|
||||
+#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1D004000)
|
||||
@@ -727,7 +727,7 @@
|
||||
#define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
|
||||
#define IFXMIPS_MPS_VC0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0000))
|
||||
#define IFXMIPS_MPS_RVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0010))
|
||||
@@ -73,10 +78,11 @@
|
||||
@@ -68,10 +73,11 @@
|
||||
/* MPS Common defines */
|
||||
/* ============================= */
|
||||
|
||||
@@ -742,7 +742,7 @@
|
||||
#define VCPU_BASEADDRESS 0xBF208000 /* 0xBF108000 */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#if !defined(CONFIG_LANTIQ)
|
||||
@@ -118,7 +124,6 @@
|
||||
@@ -113,7 +119,6 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef CONFIG_MPS_EVENT_MBX
|
||||
@@ -750,7 +750,7 @@
|
||||
#define MBX_CMD_FIFO_SIZE 64 /**< Size of command FIFO in bytes */
|
||||
#define MBX_DATA_UPSTRM_FIFO_SIZE 64
|
||||
#define MBX_DATA_DNSTRM_FIFO_SIZE 128
|
||||
@@ -294,6 +299,10 @@ typedef struct
|
||||
@@ -289,6 +294,10 @@ typedef struct
|
||||
#ifdef CONFIG_MPS_EVENT_MBX
|
||||
typedef struct
|
||||
{
|
||||
@@ -761,7 +761,7 @@
|
||||
volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */
|
||||
volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */
|
||||
volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */
|
||||
@@ -317,13 +326,19 @@ typedef struct
|
||||
@@ -312,13 +321,19 @@ typedef struct
|
||||
volatile IFX_uint32_t MBX_UPSTR_EVENT_WRITE; /**< Upstream Event FIFO Write Index */
|
||||
volatile IFX_uint32_t MBX_EVENT[MBX_EVENT_DATA_WORDS];
|
||||
volatile IFX_uint32_t reserved[4];
|
||||
@@ -781,7 +781,7 @@
|
||||
volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */
|
||||
volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */
|
||||
volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */
|
||||
@@ -341,8 +356,10 @@ typedef struct
|
||||
@@ -336,8 +351,10 @@ typedef struct
|
||||
volatile IFX_uint32_t MBX_DNSTR_DATA_READ; /**< Downstream Data FIFO Read Index */
|
||||
volatile IFX_uint32_t MBX_DNSTR_DATA_WRITE; /**< Downstream Data FIFO Write Index */
|
||||
volatile IFX_uint32_t MBX_DATA[MBX_DATA_WORDS];
|
||||
@@ -845,23 +845,7 @@
|
||||
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -52,15 +52,6 @@
|
||||
#include "ifx_pmu.h"
|
||||
#endif /* PMU_SUPPORTED */
|
||||
|
||||
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
|
||||
-# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
|
||||
-# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
|
||||
-# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
|
||||
-# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR
|
||||
-# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR
|
||||
-# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
|
||||
-#endif
|
||||
-
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
/* ============================= */
|
||||
@@ -820,7 +811,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
@@ -807,7 +807,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
MIN_FW_HOTFIXSTEP};
|
||||
IFX_uint8_t tmp1, tmp2;
|
||||
IFX_TAPI_RESOURCE nResource;
|
||||
@@ -870,7 +854,7 @@
|
||||
IFX_uint8_t nChannels, nFXOChannels;
|
||||
#endif /*SYSTEM_AR9 || SYSTEM_VR9*/
|
||||
IFX_int32_t ret = VMMC_statusOk;
|
||||
@@ -874,7 +865,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
@@ -861,7 +861,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
pDev->bSmartSlic = IFX_FALSE;
|
||||
pDev->bSlicSupportsIdleMode = IFX_FALSE;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -117,8 +117,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
@@ -100,8 +100,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
|
||||
#endif /* CONFIG_MPS_EVENT_MBX */
|
||||
IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority);
|
||||
IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr);
|
||||
@@ -13,7 +13,7 @@
|
||||
extern IFX_uint32_t danube_get_cpu_ver (IFX_void_t);
|
||||
--- a/src/mps/drv_mps_vmmc_device.h
|
||||
+++ b/src/mps/drv_mps_vmmc_device.h
|
||||
@@ -216,8 +216,8 @@ typedef struct /**< mps buffer monitorin
|
||||
@@ -211,8 +211,8 @@ typedef struct /**< mps buffer monitorin
|
||||
mps_buffer_state_e buf_state;
|
||||
IFX_void_t *(*malloc) (IFX_size_t size, IFX_int32_t priority); /**< Buffer alloc function (def. kmalloc) */
|
||||
IFX_void_t (*free) (const IFX_void_t *ptr); /**< Buffer free function (def. kfree) */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -202,11 +202,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t
|
||||
@@ -203,11 +203,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t
|
||||
/**
|
||||
Wrapper for the voice buffer get function that sets the FW as owner.
|
||||
*/
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/**
|
||||
Wrapper for the voice buffer free all function freeing all buffers that
|
||||
@@ -263,10 +272,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV
|
||||
@@ -264,10 +273,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV
|
||||
|
||||
/* Register the buffer handler. */
|
||||
#ifdef USE_BUFFERPOOL
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
--- a/src/mps/drv_mps_vmmc_linux.c
|
||||
+++ b/src/mps/drv_mps_vmmc_linux.c
|
||||
@@ -104,6 +104,10 @@ extern irqreturn_t ifx_mps_vc_irq (IFX_i
|
||||
@@ -89,6 +89,10 @@ extern irqreturn_t ifx_mps_vc_irq (IFX_i
|
||||
extern IFX_void_t ifx_mps_shutdown (IFX_void_t);
|
||||
extern IFX_int32_t ifx_mps_event_activation_poll (mps_devices type,
|
||||
MbxEventRegs_s * act);
|
||||
@@ -11,7 +11,7 @@
|
||||
mps_mbx_dev *ifx_mps_get_device (mps_devices type);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
@@ -2260,7 +2264,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2219,7 +2223,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
/* reset the device before initializing the device driver */
|
||||
ifx_mps_reset ();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifdef LINUX_2_6
|
||||
ifx_mps_ad0_irq, 0x0
|
||||
#else /* */
|
||||
@@ -2270,7 +2274,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2229,7 +2233,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
, "mps_mbx ad0", &ifx_mps_dev);
|
||||
if (result)
|
||||
return result;
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifdef LINUX_2_6
|
||||
ifx_mps_ad1_irq, 0x0
|
||||
#else /* */
|
||||
@@ -2285,7 +2289,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
@@ -2244,7 +2248,7 @@ IFX_int32_t __init ifx_mps_init_module (
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i);
|
||||
@@ -38,7 +38,7 @@
|
||||
#ifdef LINUX_2_6
|
||||
ifx_mps_vc_irq, 0x0
|
||||
#else /* */
|
||||
@@ -2446,13 +2450,13 @@ ifx_mps_cleanup_module (IFX_void_t)
|
||||
@@ -2405,13 +2409,13 @@ ifx_mps_cleanup_module (IFX_void_t)
|
||||
ifx_mps_release_structures (&ifx_mps_dev);
|
||||
|
||||
/* release all interrupts at the system */
|
||||
@@ -57,7 +57,7 @@
|
||||
#if CONFIG_MPS_HISTORY_SIZE > 0
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -134,6 +134,8 @@ extern IFX_void_t mask_and_ack_danube_ir
|
||||
@@ -118,6 +118,8 @@ extern IFX_void_t mask_and_ack_danube_ir
|
||||
|
||||
#endif /* */
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
extern void sys_hw_setup (void);
|
||||
|
||||
extern IFXOS_event_t fw_ready_evt;
|
||||
@@ -2979,7 +2981,7 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
|
||||
@@ -2963,7 +2965,7 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
|
||||
*/
|
||||
irqreturn_t ifx_mps_vc_irq (IFX_int32_t irq, mps_comm_dev * pDev)
|
||||
{
|
||||
@@ -77,7 +77,7 @@
|
||||
MbxEventRegs_s events;
|
||||
--- a/src/mps/drv_mps_vmmc_device.h
|
||||
+++ b/src/mps/drv_mps_vmmc_device.h
|
||||
@@ -69,9 +69,6 @@
|
||||
@@ -64,9 +64,6 @@
|
||||
# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
|
||||
# define IFX_MPS_SAD0SR IFXMIPS_MPS_SAD0SR
|
||||
/* interrupt vectors */
|
||||
|
||||
+6
-6
@@ -32,7 +32,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
--- a/src/drv_vmmc_init.c
|
||||
+++ b/src/drv_vmmc_init.c
|
||||
@@ -88,7 +88,7 @@ CREATE_TRACE_GROUP(VMMC);
|
||||
@@ -89,7 +89,7 @@ CREATE_TRACE_GROUP(VMMC);
|
||||
/** what compatible driver version */
|
||||
#define DRV_VMMC_WHAT_STR "@(#)Lantiq VMMC device driver, version " DRV_VMMC_VER_STR
|
||||
|
||||
@@ -41,7 +41,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
#define MPS_CH_VALID(mpsCh) ((mpsCh >= 1 && mpsCh <= 7) ? 1 : 0)
|
||||
|
||||
@@ -927,17 +927,17 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
@@ -923,17 +923,17 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
|
||||
/* Maximum number of resources, is the maximum of:
|
||||
nALI, nPCM, nCOD, nSIG, nDECT, nLIN and nAudioCnt. */
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
#endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_AUDIO) */
|
||||
|
||||
if (pDev->caps.nMaxRes > VMMC_MAX_CH_NR)
|
||||
@@ -977,7 +977,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
@@ -973,7 +973,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
|
||||
nResource.DTMFRCount = pDev->caps.nDTMFD;
|
||||
nResource.FSKGCount = pDev->caps.nCIDS;
|
||||
nResource.FSKRCount = pDev->caps.nCIDR;
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
--- a/src/drv_vmmc_init_cap.c
|
||||
+++ b/src/drv_vmmc_init_cap.c
|
||||
@@ -39,7 +39,7 @@
|
||||
@@ -37,7 +37,7 @@
|
||||
/* ============================= */
|
||||
/* Local Macros & Definitions */
|
||||
/* ============================= */
|
||||
@@ -85,7 +85,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
/* ============================= */
|
||||
/* Local function declaration */
|
||||
@@ -392,7 +392,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE
|
||||
@@ -390,7 +390,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE
|
||||
/* Read the maximum length of the message that we can interpret but
|
||||
not more than the firmware can provide. */
|
||||
/* BLEN is the length including the header that the fw reports. */
|
||||
@@ -94,7 +94,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
/* Subtract the length of the header. */
|
||||
capCmd.LENGTH -= CMD_HDR_CNT;
|
||||
/* Read capability once more - this time with maximum length. */
|
||||
@@ -479,7 +479,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE
|
||||
@@ -477,7 +477,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE
|
||||
pDev->caps.FEAT = capCmd.FEAT;
|
||||
/* Number of UTG resources per channel (== SIG module), either 1 or 2 */
|
||||
pDev->caps.nUtgPerCh = (capCmd.FEAT & EDSP_CAP_FEAT_UTGUD) ? 2 : 1;
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
From: Shiji Yang <yangshiji66@outlook.com>
|
||||
Date: Fri, 9 May 2025 01:43:41 +0800
|
||||
Subject: [PATCH] fix 'inline' is not at beginning of declaration
|
||||
|
||||
Fix build warning on 6.12 kernel:
|
||||
|
||||
/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:58:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
|
||||
58 | static void inline bsp_mask_and_ack_irq(int x)
|
||||
| ^~~~~~
|
||||
|
||||
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
---
|
||||
src/mps/drv_mps_vmmc_common.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/mps/drv_mps_vmmc_common.c
|
||||
+++ b/src/mps/drv_mps_vmmc_common.c
|
||||
@@ -55,7 +55,7 @@
|
||||
# define bsp_mask_and_ack_irq ltq_mask_and_ack_irq
|
||||
#else
|
||||
extern void ltq_mask_and_ack_irq(struct irq_data *d);
|
||||
-static void inline bsp_mask_and_ack_irq(int x)
|
||||
+static inline void bsp_mask_and_ack_irq(int x)
|
||||
{
|
||||
struct irq_data d;
|
||||
d.hwirq = x;
|
||||
@@ -39,22 +39,18 @@
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -466,8 +467,12 @@ static int dc_ep_msi_enable(struct pci_d
|
||||
@@ -466,8 +467,8 @@ static int dc_ep_msi_enable(struct pci_d
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
- err = pci_enable_msi_exact(pdev, nvec);
|
||||
- if (err) {
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0))
|
||||
+ err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSI | PCI_IRQ_LEGACY);
|
||||
+#else
|
||||
+ err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSI | PCI_IRQ_INTX);
|
||||
+#endif
|
||||
+ if (err < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Failed to enable MSI interrupts error code: %d\n",
|
||||
__func__, err);
|
||||
@@ -589,15 +594,15 @@ static int dc_ep_probe(struct pci_dev *p
|
||||
@@ -589,15 +590,15 @@ static int dc_ep_probe(struct pci_dev *p
|
||||
/* Target structures have a limit of 32 bit DMA pointers.
|
||||
* DMA pointers can be wider than 32 bits by default on some systems.
|
||||
*/
|
||||
@@ -73,7 +69,7 @@
|
||||
goto err_region;
|
||||
}
|
||||
|
||||
@@ -654,7 +659,7 @@ static int dc_ep_probe(struct pci_dev *p
|
||||
@@ -654,7 +655,7 @@ static int dc_ep_probe(struct pci_dev *p
|
||||
goto err_iomap;
|
||||
|
||||
spin_lock(&dc_ep_lock);
|
||||
@@ -82,7 +78,7 @@
|
||||
spin_unlock(&dc_ep_lock);
|
||||
|
||||
#ifndef CONFIG_OF
|
||||
@@ -715,7 +720,7 @@ static void dc_ep_remove(struct pci_dev
|
||||
@@ -715,7 +716,7 @@ static void dc_ep_remove(struct pci_dev
|
||||
dc_ep_icu_disable(priv);
|
||||
pci_iounmap(pdev, priv->mem);
|
||||
pci_release_region(pdev, DC_EP_BAR_NUM);
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -44,9 +44,9 @@
|
||||
@@ -44,9 +44,7 @@
|
||||
#include <linux/atmioc.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include "inc/dsl_tc.h"
|
||||
-#include <net/datapath_proc_api.h>
|
||||
+// #include <net/datapath_proc_api.h>
|
||||
#include <linux/atm.h>
|
||||
-#include <net/datapath_api.h>
|
||||
+// #include <net/datapath_api.h>
|
||||
#include <net/dc_ep.h>
|
||||
#include<linux/sched.h>
|
||||
#include<linux/kthread.h>
|
||||
@@ -730,20 +730,16 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -730,20 +728,16 @@ static void atm_aca_init(struct atm_priv
|
||||
ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1);
|
||||
}
|
||||
|
||||
@@ -35,7 +33,7 @@
|
||||
memset(tmbuf, 0, 64);
|
||||
|
||||
snprintf(tmbuf, sizeof(tmbuf), "%ld-%d-%d %d:%d:%d",
|
||||
@@ -753,7 +749,7 @@ static int print_datetime(char *buffer,
|
||||
@@ -753,7 +747,7 @@ static int print_datetime(char *buffer,
|
||||
nowtm.tm_hour,
|
||||
nowtm.tm_min,
|
||||
nowtm.tm_sec);
|
||||
@@ -44,7 +42,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1313,7 +1309,7 @@ static int ppe_send(struct atm_vcc *vcc,
|
||||
@@ -1313,7 +1307,7 @@ static int ppe_send(struct atm_vcc *vcc,
|
||||
/* assume LLC header + Ethernet ID: 6+2 */
|
||||
if ((priv->conn[conn].mpoa_type == MPOA_TYPE_EOA_WO_FCS) ||
|
||||
(priv->conn[conn].mpoa_type == MPOA_TYPE_EOA_W_FCS)) {
|
||||
@@ -53,27 +51,24 @@
|
||||
goto CHECK_SHOWTIME_FAIL;
|
||||
}
|
||||
|
||||
@@ -1418,7 +1414,7 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
@@ -1418,7 +1412,6 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
struct atm_priv *priv = g_atm_tc;
|
||||
struct sk_buff *skb;
|
||||
unsigned int conn;
|
||||
- dp_subif_t dp_id;
|
||||
+// dp_subif_t dp_id;
|
||||
#ifdef OAM_FIX_GRX750
|
||||
unsigned char *dest_cell;
|
||||
#endif
|
||||
@@ -1465,8 +1461,8 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
@@ -1465,8 +1458,6 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
priv->tc_priv->param.oam_prio = 0;
|
||||
qid = priv->conn[conn].prio_queue_map[priv->tc_priv->param.oam_prio];
|
||||
vid = priv->conn[conn].subif_id;
|
||||
- dp_id.subif = (vid & (~0x7f)) |
|
||||
- ATM_DESC_SUBIF_ID(qid, mpoa_pt, mpoa_type);
|
||||
+// dp_id.subif = (vid & (~0x7f)) |
|
||||
+// ATM_DESC_SUBIF_ID(qid, mpoa_pt, mpoa_type);
|
||||
#ifdef OAM_FIX_GRX750
|
||||
dest_cell = kmalloc(CELL_SIZE, GFP_KERNEL);
|
||||
if (dest_cell == NULL) {
|
||||
@@ -1494,18 +1490,18 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
@@ -1494,18 +1485,8 @@ int ppe_send_oam(struct atm_vcc *vcc, vo
|
||||
#else
|
||||
memcpy(skb->data, cell, CELL_SIZE);
|
||||
#endif
|
||||
@@ -86,23 +81,13 @@
|
||||
- if (priv->tc_priv->tc_ops.send(NULL,
|
||||
- skb, dp_id.subif, ATM_OAM_PKT) == 0) {
|
||||
- #else
|
||||
+// /* SET SUBIFID */
|
||||
+// skb->DW0 = (skb->DW0 & ~0x7FFF) | dp_id.subif;
|
||||
+// skb->dev = priv->conn[conn].dev;
|
||||
+// tc_dbg(priv->tc_priv, MSG_TX, "conn: %d, dev name: %s, qid: 0x%x len:%d\n",
|
||||
+// conn, skb->dev->name, dp_id.subif, skb->len);
|
||||
+// #ifdef OAM_FIX_GRX750
|
||||
+// if (priv->tc_priv->tc_ops.send(NULL,
|
||||
+// skb, dp_id.subif, ATM_OAM_PKT) == 0) {
|
||||
+// #else
|
||||
if (priv->tc_priv->tc_ops.send(NULL,
|
||||
skb, qid, ATM_OAM_PKT) == 0) {
|
||||
- #endif
|
||||
+// #endif
|
||||
priv->stats.oam_tx_pkts++;
|
||||
priv->stats.oam_tx_bytes += skb->len;
|
||||
priv->conn[conn].stats.oam_tx_pkts++;
|
||||
@@ -1604,7 +1600,7 @@ static void oam_push(struct atm_priv *pr
|
||||
@@ -1604,7 +1585,7 @@ static void oam_push(struct atm_priv *pr
|
||||
conn = -1; /* invalid */
|
||||
if (conn_valid(conn) && priv->conn[conn].vcc != NULL) {
|
||||
vcc = priv->conn[conn].vcc;
|
||||
@@ -111,7 +96,7 @@
|
||||
|
||||
tc_dbg(priv->tc_priv, MSG_OAM_RX, "conn=%d, vpi: %d, vci:%d\n",
|
||||
conn, header->vpi, header->vci);
|
||||
@@ -2547,30 +2543,29 @@ static void ppe_atm_fw_hw_init(struct at
|
||||
@@ -2547,30 +2528,29 @@ static void ppe_atm_fw_hw_init(struct at
|
||||
static int atm_dev_init(struct atm_priv *atm_priv, int ep_id)
|
||||
{
|
||||
int i, err;
|
||||
@@ -160,7 +145,7 @@
|
||||
}
|
||||
//TODO : check for SoC PMAC, current fix
|
||||
#ifdef CONFIG_SOC_TYPE_XWAY
|
||||
@@ -2985,7 +2980,8 @@ static unsigned int atm_get_pvc_id(struc
|
||||
@@ -2985,7 +2965,8 @@ static unsigned int atm_get_pvc_id(struc
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -170,7 +155,7 @@
|
||||
}
|
||||
|
||||
static int atm_get_qid_by_vcc(struct net_device *dev, struct sk_buff *skb,
|
||||
@@ -3292,7 +3288,7 @@ static void atm_push(struct net_device *
|
||||
@@ -3292,7 +3273,7 @@ static void atm_push(struct net_device *
|
||||
+= skb->len;
|
||||
} else
|
||||
priv->stats.aal5_rx_errors++;
|
||||
@@ -179,6 +164,15 @@
|
||||
spin_unlock_bh(&priv->atm_lock);
|
||||
|
||||
vcc->push(vcc, skb);
|
||||
@@ -3701,7 +3682,7 @@ int get_dslwan_qid_with_vcc(struct atm_v
|
||||
|
||||
int get_atm_qid_with_pkt(struct sk_buff *skb, void *arg, int is_atm_vcc)
|
||||
{
|
||||
- return xway_atm_get_qid_by_vcc(skb, skb, arg, 1);
|
||||
+ return xway_atm_get_qid_by_vcc(skb->dev, skb, arg, 1);
|
||||
}
|
||||
|
||||
int get_mpoa_type(uint32_t dslwan_qid, uint32_t *mpoa_type)
|
||||
--- a/dcdp/inc/atm_tc.h
|
||||
+++ b/dcdp/inc/atm_tc.h
|
||||
@@ -449,7 +449,7 @@ struct atm_port {
|
||||
@@ -243,17 +237,15 @@
|
||||
|
||||
#include "inc/tc_main.h"
|
||||
#include "inc/reg_addr.h"
|
||||
@@ -62,6 +62,9 @@
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "inc/fw/vrx518_addr_def.h"
|
||||
#include "inc/fw/vrx518_ppe_fw.h"
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||
+#define PDE_DATA pde_data
|
||||
+#endif
|
||||
|
||||
static struct ptm_priv *g_ptm_priv;
|
||||
static struct ptm_ep_priv g_ep_priv[BOND_MAX];
|
||||
@@ -84,6 +87,7 @@ static int ptm_erb_addr_get(const unsign
|
||||
@@ -84,6 +85,7 @@ static int ptm_erb_addr_get(const unsign
|
||||
unsigned int *data_addr, unsigned int *desc_addr);
|
||||
|
||||
|
||||
@@ -261,7 +253,7 @@
|
||||
static inline void tc_ether_addr_copy(u8 *dst, const u8 *src)
|
||||
{
|
||||
#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
|
||||
@@ -98,6 +102,7 @@ static inline void tc_ether_addr_copy(u8
|
||||
@@ -98,6 +100,7 @@ static inline void tc_ether_addr_copy(u8
|
||||
a[2] = b[2];
|
||||
#endif
|
||||
}
|
||||
@@ -269,7 +261,7 @@
|
||||
|
||||
static inline int is_ptm_sl(struct ptm_ep_priv *priv)
|
||||
{
|
||||
@@ -182,8 +187,8 @@ static int ptm_get_qid(struct net_device
|
||||
@@ -182,8 +185,8 @@ static int ptm_get_qid(struct net_device
|
||||
return qid;
|
||||
}
|
||||
|
||||
@@ -280,7 +272,7 @@
|
||||
{
|
||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||
|
||||
@@ -191,8 +196,6 @@ static struct rtnl_link_stats64 *ptm_get
|
||||
@@ -191,8 +194,6 @@ static struct rtnl_link_stats64 *ptm_get
|
||||
memcpy(storage, &ptm_tc->stats64, sizeof(ptm_tc->stats64));
|
||||
else
|
||||
storage->tx_errors += ptm_tc->stats64.tx_errors;
|
||||
@@ -289,7 +281,7 @@
|
||||
}
|
||||
|
||||
static int ptm_set_mac_address(struct net_device *dev, void *p)
|
||||
@@ -204,12 +207,16 @@ static int ptm_set_mac_address(struct ne
|
||||
@@ -204,12 +205,16 @@ static int ptm_set_mac_address(struct ne
|
||||
return -EBUSY;
|
||||
|
||||
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm mac address update!\n");
|
||||
@@ -307,7 +299,7 @@
|
||||
{
|
||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||
|
||||
@@ -503,7 +510,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
@@ -503,7 +508,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
if (!showtime_stat(ptm_tc->tc_priv))
|
||||
goto PTM_XMIT_DROP;
|
||||
|
||||
@@ -316,7 +308,7 @@
|
||||
goto PTM_XMIT_DROP;
|
||||
|
||||
dump_skb_info(ptm_tc->tc_priv, skb, (MSG_TX | MSG_TXDATA));
|
||||
@@ -632,11 +639,8 @@ static int ptm_dev_init(struct tc_priv *
|
||||
@@ -632,11 +637,8 @@ static int ptm_dev_init(struct tc_priv *
|
||||
struct ptm_priv *ptm_tc;
|
||||
const char macaddr[ETH_ALEN]
|
||||
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
||||
@@ -330,7 +322,7 @@
|
||||
if (!dev) {
|
||||
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
||||
return -ENOMEM;
|
||||
@@ -644,7 +648,11 @@ static int ptm_dev_init(struct tc_priv *
|
||||
@@ -644,7 +646,11 @@ static int ptm_dev_init(struct tc_priv *
|
||||
ptm_tc = netdev_priv(dev);
|
||||
ptm_tc->dev = dev;
|
||||
ptm_tc->tc_priv = tc_priv;
|
||||
@@ -342,7 +334,7 @@
|
||||
spin_lock_init(&ptm_tc->ptm_lock);
|
||||
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
||||
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
||||
@@ -2103,7 +2111,6 @@ static int ptm_showtime_exit(const unsig
|
||||
@@ -2103,7 +2109,6 @@ static int ptm_showtime_exit(const unsig
|
||||
struct ptm_ep_priv *priv = tc_ep_priv(idx);
|
||||
u32 stop = ACA_TXIN_EN;
|
||||
struct dc_ep_dev *ep;
|
||||
@@ -445,18 +437,16 @@
|
||||
#include <net/genetlink.h>
|
||||
#include <linux/time.h>
|
||||
#include "inc/tc_main.h"
|
||||
@@ -35,6 +37,10 @@
|
||||
@@ -35,6 +37,8 @@
|
||||
#include "inc/platform.h"
|
||||
#include "inc/dsl_tc.h"
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||
+#define PDE_DATA pde_data
|
||||
+#endif
|
||||
+
|
||||
#define ATM_HEADER_SIZE (ATM_CELL_SIZE - ATM_CELL_PAYLOAD)
|
||||
static char *dbg_flag_str[] = {
|
||||
"rx",
|
||||
@@ -353,7 +359,7 @@ static ssize_t mem_proc_write(struct fil
|
||||
@@ -353,7 +357,7 @@ static ssize_t mem_proc_write(struct fil
|
||||
}
|
||||
addr = set_val = repeat_cnt = 0;
|
||||
|
||||
@@ -465,7 +455,7 @@
|
||||
return -EFAULT;
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
@@ -450,13 +456,12 @@ static int proc_read_mem_seq_open(struct
|
||||
@@ -450,13 +454,12 @@ static int proc_read_mem_seq_open(struct
|
||||
return single_open(file, proc_read_mem, NULL);
|
||||
}
|
||||
|
||||
@@ -485,7 +475,7 @@
|
||||
};
|
||||
|
||||
static ssize_t pp32_proc_write(struct file *file, const char __user *buf,
|
||||
@@ -748,13 +753,12 @@ static int proc_read_pp32_seq_open(struc
|
||||
@@ -748,13 +751,12 @@ static int proc_read_pp32_seq_open(struc
|
||||
return single_open(file, proc_read_pp32, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -505,7 +495,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_tc_cfg(struct seq_file *seq, void *v)
|
||||
@@ -865,13 +869,12 @@ static int proc_read_tc_cfg_seq_open(str
|
||||
@@ -865,13 +867,12 @@ static int proc_read_tc_cfg_seq_open(str
|
||||
return single_open(file, proc_read_tc_cfg, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -525,7 +515,7 @@
|
||||
};
|
||||
|
||||
static ssize_t proc_write_dbg(struct file *file, const char __user *buf,
|
||||
@@ -951,13 +954,12 @@ static int proc_read_dbg_seq_open(struct
|
||||
@@ -951,13 +952,12 @@ static int proc_read_dbg_seq_open(struct
|
||||
return single_open(file, proc_read_dbg, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -545,7 +535,7 @@
|
||||
};
|
||||
|
||||
static ssize_t proc_write_tc_switch(struct file *file, const char __user *buf,
|
||||
@@ -1018,11 +1020,11 @@ proc_tc_switch_help:
|
||||
@@ -1018,11 +1018,11 @@ proc_tc_switch_help:
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -561,7 +551,7 @@
|
||||
static ssize_t proc_write_show_time(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *data)
|
||||
{
|
||||
@@ -1077,10 +1079,9 @@ proc_show_time_help:
|
||||
@@ -1077,10 +1077,9 @@ proc_show_time_help:
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -575,7 +565,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_ver(struct seq_file *seq, void *v)
|
||||
@@ -1128,12 +1129,11 @@ static int proc_read_ver_seq_open(struct
|
||||
@@ -1128,12 +1127,11 @@ static int proc_read_ver_seq_open(struct
|
||||
return single_open(file, proc_read_ver, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -593,7 +583,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_soc(struct seq_file *seq, void *v)
|
||||
@@ -1142,20 +1142,18 @@ static int proc_read_soc(struct seq_file
|
||||
@@ -1142,20 +1140,18 @@ static int proc_read_soc(struct seq_file
|
||||
|
||||
tcpriv = (struct tc_priv *)seq->private;
|
||||
|
||||
@@ -622,7 +612,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1165,15 +1163,13 @@ static int proc_read_soc_seq_open(struct
|
||||
@@ -1165,15 +1161,13 @@ static int proc_read_soc_seq_open(struct
|
||||
return single_open(file, proc_read_soc, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -643,7 +633,7 @@
|
||||
static struct tc_proc_list tc_procs[] = {
|
||||
{TC_PROC_DIR, 0, NULL, 1},
|
||||
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
||||
@@ -1241,13 +1237,12 @@ static int proc_read_ptm_wanmib_seq_open
|
||||
@@ -1241,13 +1235,12 @@ static int proc_read_ptm_wanmib_seq_open
|
||||
return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -663,7 +653,7 @@
|
||||
};
|
||||
|
||||
static int proc_ptm_read_cfg(struct seq_file *seq, void *v)
|
||||
@@ -1300,7 +1295,7 @@ static ssize_t ptm_cfg_proc_write(struct
|
||||
@@ -1300,7 +1293,7 @@ static ssize_t ptm_cfg_proc_write(struct
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -672,7 +662,7 @@
|
||||
return -EFAULT;
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
@@ -1343,13 +1338,12 @@ proc_ptm_cfg_help:
|
||||
@@ -1343,13 +1336,12 @@ proc_ptm_cfg_help:
|
||||
}
|
||||
|
||||
|
||||
@@ -692,7 +682,7 @@
|
||||
};
|
||||
|
||||
static ssize_t proc_ptm_write_prio(struct file *file, const char __user *buf,
|
||||
@@ -1455,13 +1449,12 @@ static int proc_ptm_read_prio_seq_open(s
|
||||
@@ -1455,13 +1447,12 @@ static int proc_ptm_read_prio_seq_open(s
|
||||
return single_open(file, proc_ptm_read_prio, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -712,7 +702,7 @@
|
||||
};
|
||||
|
||||
static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file)
|
||||
@@ -1469,12 +1462,11 @@ static int proc_ptm_read_bond_seq_open(s
|
||||
@@ -1469,12 +1460,11 @@ static int proc_ptm_read_bond_seq_open(s
|
||||
return single_open(file, proc_ptm_read_bond, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -730,7 +720,7 @@
|
||||
};
|
||||
|
||||
static int proc_ptm_read_bondmib_seq_open(struct inode *inode,
|
||||
@@ -1483,13 +1475,12 @@ static int proc_ptm_read_bondmib_seq_ope
|
||||
@@ -1483,13 +1473,12 @@ static int proc_ptm_read_bondmib_seq_ope
|
||||
return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -750,7 +740,7 @@
|
||||
};
|
||||
|
||||
struct fwdbg_t {
|
||||
@@ -1910,14 +1901,14 @@ static int proc_read_fwdbg_seq_open(stru
|
||||
@@ -1910,14 +1899,14 @@ static int proc_read_fwdbg_seq_open(stru
|
||||
{
|
||||
return single_open(file, proc_read_fwdbg, NULL);
|
||||
}
|
||||
@@ -772,7 +762,7 @@
|
||||
static struct tc_proc_list ptm_sl_procs[] = {
|
||||
{TC_PROC_PTM_DIR, 0, NULL, 1},
|
||||
{"mem", 0644, &mem_proc_fops, 0},
|
||||
@@ -2077,7 +2068,7 @@ static ssize_t atm_cfg_proc_write(struct
|
||||
@@ -2077,7 +2066,7 @@ static ssize_t atm_cfg_proc_write(struct
|
||||
|
||||
priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||
|
||||
@@ -781,7 +771,7 @@
|
||||
return -EFAULT;
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
@@ -2119,13 +2110,12 @@ proc_atm_cfg_help:
|
||||
@@ -2119,13 +2108,12 @@ proc_atm_cfg_help:
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -801,7 +791,7 @@
|
||||
};
|
||||
|
||||
static ssize_t proc_write_atm_wanmib(struct file *file, const char __user *buf,
|
||||
@@ -2173,13 +2163,12 @@ static int proc_read_atm_wanmib_seq_open
|
||||
@@ -2173,13 +2161,12 @@ static int proc_read_atm_wanmib_seq_open
|
||||
|
||||
|
||||
|
||||
@@ -821,7 +811,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_htu_seq_open(struct inode *inode, struct file *file)
|
||||
@@ -2187,12 +2176,11 @@ static int proc_read_htu_seq_open(struct
|
||||
@@ -2187,12 +2174,11 @@ static int proc_read_htu_seq_open(struct
|
||||
return single_open(file, proc_read_htu, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -839,7 +829,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_queue_seq_open(struct inode *inode, struct file *file)
|
||||
@@ -2200,12 +2188,11 @@ static int proc_read_queue_seq_open(stru
|
||||
@@ -2200,12 +2186,11 @@ static int proc_read_queue_seq_open(stru
|
||||
return single_open(file, proc_read_queue, PDE_DATA(inode));
|
||||
}
|
||||
|
||||
@@ -857,7 +847,7 @@
|
||||
};
|
||||
|
||||
static void set_q_prio(struct atm_priv *priv,
|
||||
@@ -2428,13 +2415,12 @@ static const struct seq_operations pvc_m
|
||||
@@ -2428,13 +2413,12 @@ static const struct seq_operations pvc_m
|
||||
.show = pvc_mib_seq_show,
|
||||
};
|
||||
|
||||
@@ -877,7 +867,7 @@
|
||||
};
|
||||
|
||||
static int proc_read_pvc_mib_seq_open(struct inode *inode, struct file *file)
|
||||
@@ -2447,12 +2433,11 @@ static int proc_read_pvc_mib_seq_open(st
|
||||
@@ -2447,12 +2431,11 @@ static int proc_read_pvc_mib_seq_open(st
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -895,7 +885,7 @@
|
||||
};
|
||||
|
||||
static ssize_t proc_write_cell(struct file *file,
|
||||
@@ -2592,13 +2577,12 @@ static int proc_read_cell_seq_open(struc
|
||||
@@ -2592,13 +2575,12 @@ static int proc_read_cell_seq_open(struc
|
||||
return single_open(file, proc_read_cell, NULL);
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
--
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -463,34 +463,9 @@ static void set_qsb(struct atm_priv *pri
|
||||
@@ -461,34 +461,9 @@ static void set_qsb(struct atm_priv *pri
|
||||
/* Weighted Fair Queueing Factor (WFQF) */
|
||||
switch (qos->txtp.traffic_class) {
|
||||
case ATM_CBR:
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
case ATM_UBR:
|
||||
default:
|
||||
q_parm_tbl.bit.wfqf = QSB_WFQ_UBR_BYPASS;
|
||||
@@ -498,42 +473,9 @@ static void set_qsb(struct atm_priv *pri
|
||||
@@ -496,42 +471,9 @@ static void set_qsb(struct atm_priv *pri
|
||||
}
|
||||
|
||||
/* Sustained Cell Rate (SCR) Leaky Bucket Shaper VBR.0/VBR.1 */
|
||||
@@ -94,7 +94,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
|
||||
/* Queue Parameter Table (QPT) */
|
||||
tc_w32(QSB_QPT_SET_MASK, QSB_RTM);
|
||||
@@ -1064,15 +1006,6 @@ static int ppe_open(struct atm_vcc *vcc)
|
||||
@@ -1062,15 +1004,6 @@ static int ppe_open(struct atm_vcc *vcc)
|
||||
/* check bandwidth */
|
||||
if ((vcc->qos.txtp.traffic_class == ATM_CBR &&
|
||||
vcc->qos.txtp.max_pcr >
|
||||
@@ -110,7 +110,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
(port->tx_max_cell_rate - port->tx_used_cell_rate))) {
|
||||
tc_dbg(priv->tc_priv, MSG_INIT, "exceed TX line rate\n");
|
||||
return -EINVAL;
|
||||
@@ -1128,15 +1061,8 @@ static int ppe_open(struct atm_vcc *vcc)
|
||||
@@ -1126,15 +1059,8 @@ static int ppe_open(struct atm_vcc *vcc)
|
||||
/* reserve bandwidth */
|
||||
switch (vcc->qos.txtp.traffic_class) {
|
||||
case ATM_CBR:
|
||||
@@ -126,7 +126,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
}
|
||||
|
||||
/* update atm_vcc structure */
|
||||
@@ -1222,15 +1148,8 @@ static void ppe_close(struct atm_vcc *vc
|
||||
@@ -1220,15 +1146,8 @@ static void ppe_close(struct atm_vcc *vc
|
||||
/* release bandwidth */
|
||||
switch (vcc->qos.txtp.traffic_class) {
|
||||
case ATM_CBR:
|
||||
|
||||
@@ -3,7 +3,7 @@ This replaces it by a basic working implementation.
|
||||
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -545,7 +545,11 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -543,7 +543,11 @@ static void atm_aca_init(struct atm_priv
|
||||
cfg = &priv->tc_priv->cfg;
|
||||
|
||||
txin = ¶m.aca_txin;
|
||||
@@ -15,7 +15,7 @@ This replaces it by a basic working implementation.
|
||||
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
||||
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
||||
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
|
||||
@@ -567,7 +571,11 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -565,7 +569,11 @@ static void atm_aca_init(struct atm_priv
|
||||
txin->soc_cmlt_cnt_addr);
|
||||
|
||||
txout = ¶m.aca_txout;
|
||||
@@ -27,7 +27,7 @@ This replaces it by a basic working implementation.
|
||||
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
|
||||
txout->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_OUT_PD_LIST_BASE);
|
||||
txout->pd_desc_num = __ACA_TX_OUT_PD_LIST_NUM;
|
||||
@@ -589,7 +597,11 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -587,7 +595,11 @@ static void atm_aca_init(struct atm_priv
|
||||
txout->soc_cmlt_cnt_addr);
|
||||
|
||||
rxout = ¶m.aca_rxout;
|
||||
@@ -39,7 +39,7 @@ This replaces it by a basic working implementation.
|
||||
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
|
||||
rxout->pd_desc_base = SB_XBAR_ADDR(__ACA_RX_OUT_PD_LIST_BASE);
|
||||
rxout->pd_desc_num = __ACA_RX_OUT_PD_LIST_NUM;
|
||||
@@ -611,7 +623,11 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -609,7 +621,11 @@ static void atm_aca_init(struct atm_priv
|
||||
rxout->soc_cmlt_cnt_addr);
|
||||
|
||||
rxin = ¶m.aca_rxin;
|
||||
@@ -51,7 +51,7 @@ This replaces it by a basic working implementation.
|
||||
rxin->hd_size_in_dw = cfg->rxin.soc_desc_dwsz;
|
||||
rxin->pd_desc_base = SB_XBAR_ADDR(__RX_IN_PD_DES_LIST_BASE);
|
||||
rxin->pd_desc_num = __ACA_RX_IN_PD_LIST_NUM;
|
||||
@@ -1180,7 +1196,7 @@ static int ppe_ioctl(struct atm_dev *dev
|
||||
@@ -1178,7 +1194,7 @@ static int ppe_ioctl(struct atm_dev *dev
|
||||
static int ppe_send(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
{
|
||||
int ret, qid, mpoa_pt, mpoa_type, vid;
|
||||
@@ -60,7 +60,7 @@ This replaces it by a basic working implementation.
|
||||
struct atm_priv *priv;
|
||||
|
||||
if (!vcc) {
|
||||
@@ -1246,12 +1262,14 @@ static int ppe_send(struct atm_vcc *vcc,
|
||||
@@ -1244,12 +1260,14 @@ static int ppe_send(struct atm_vcc *vcc,
|
||||
tc_dbg(priv->tc_priv, MSG_TX, "vid: 0x%x, qid: 0x%x\n",
|
||||
vid, qid);
|
||||
|
||||
@@ -79,7 +79,7 @@ This replaces it by a basic working implementation.
|
||||
tc_dbg(priv->tc_priv, MSG_TX, "ATM: TX fail\n");
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -506,6 +506,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
@@ -504,6 +504,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||
int qid;
|
||||
enum tc_pkt_type type;
|
||||
@@ -87,7 +87,7 @@ This replaces it by a basic working implementation.
|
||||
|
||||
if (!showtime_stat(ptm_tc->tc_priv))
|
||||
goto PTM_XMIT_DROP;
|
||||
@@ -519,11 +520,13 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
@@ -517,11 +518,13 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||
type = ptm_tc->tc_priv->tc_mode == TC_PTM_BND_MODE
|
||||
? PTM_BOND_PKT : PTM_SL_PKT;
|
||||
|
||||
@@ -102,7 +102,7 @@ This replaces it by a basic working implementation.
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -640,7 +643,7 @@ static int ptm_dev_init(struct tc_priv *
|
||||
@@ -638,7 +641,7 @@ static int ptm_dev_init(struct tc_priv *
|
||||
const char macaddr[ETH_ALEN]
|
||||
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
||||
|
||||
@@ -111,7 +111,7 @@ This replaces it by a basic working implementation.
|
||||
if (!dev) {
|
||||
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
||||
return -ENOMEM;
|
||||
@@ -2337,7 +2340,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2335,7 +2338,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
cfg = &priv->tc_priv->cfg;
|
||||
|
||||
txin = ¶m.aca_txin;
|
||||
@@ -123,7 +123,7 @@ This replaces it by a basic working implementation.
|
||||
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
||||
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
||||
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
|
||||
@@ -2360,7 +2367,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2358,7 +2365,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
txin->soc_cmlt_cnt_addr);
|
||||
|
||||
txout = ¶m.aca_txout;
|
||||
@@ -135,7 +135,7 @@ This replaces it by a basic working implementation.
|
||||
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
|
||||
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
||||
txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase;
|
||||
@@ -2386,7 +2397,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2384,7 +2395,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
txout->soc_cmlt_cnt_addr);
|
||||
|
||||
rxout = ¶m.aca_rxout;
|
||||
@@ -147,7 +147,7 @@ This replaces it by a basic working implementation.
|
||||
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
|
||||
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
||||
rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase;
|
||||
@@ -2412,7 +2427,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2410,7 +2425,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
rxout->soc_cmlt_cnt_addr);
|
||||
|
||||
rxin = ¶m.aca_rxin;
|
||||
|
||||
@@ -54,7 +54,7 @@ significantly lower latencies when the line is saturated.
|
||||
struct cdma {
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -78,7 +78,11 @@ static const u32 tx_kvec[] = {
|
||||
@@ -76,7 +76,11 @@ static const u32 tx_kvec[] = {
|
||||
0x30B1B233, 0xB43536B7, 0xB8393ABB, 0x3CBDBE3F,
|
||||
0xC04142C3, 0x44C5C647, 0x48C9CA4B, 0xCC4D4ECF
|
||||
};
|
||||
@@ -66,7 +66,7 @@ significantly lower latencies when the line is saturated.
|
||||
static const char ptm_drv_name[] = "PTM SL";
|
||||
static const char ptm_bond_name[][IFNAMSIZ] = {"PTM US BOND", "PTM DS BOND"};
|
||||
|
||||
@@ -1018,6 +1022,10 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||
@@ -1016,6 +1020,10 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||
int i;
|
||||
u32 desc_addr;
|
||||
rx_descriptor_t desc;
|
||||
@@ -77,7 +77,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
||||
/* Initialize US Fast-Path Descriptor Queue Config/Context */
|
||||
@@ -1025,7 +1033,11 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||
@@ -1023,7 +1031,11 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||
desq_cfg.fast_path = 1;
|
||||
desq_cfg.mbox_int_en = 0;
|
||||
desq_cfg.des_sync_needed = 0;
|
||||
@@ -89,7 +89,7 @@ significantly lower latencies when the line is saturated.
|
||||
desq_cfg.des_base_addr = __US_FAST_PATH_DES_LIST_BASE;
|
||||
|
||||
tc_mem_write(priv, fpi_addr(__US_FP_INQ_DES_CFG_CTXT),
|
||||
@@ -1049,12 +1061,20 @@ static void us_qos_desq_cfg_ctxt_init(st
|
||||
@@ -1047,12 +1059,20 @@ static void us_qos_desq_cfg_ctxt_init(st
|
||||
int offset, i;
|
||||
rx_descriptor_t desc;
|
||||
u32 phy_addr;
|
||||
@@ -110,7 +110,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
offset = 0;
|
||||
for (i = 0; i < QOSQ_NUM; i++) {
|
||||
@@ -1093,6 +1113,10 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||
@@ -1091,6 +1111,10 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||
u32 phy_addr;
|
||||
int i;
|
||||
u32 offset;
|
||||
@@ -121,7 +121,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
/* Setup OUTQ_QoS_CFG_CTXT */
|
||||
/* NOTE: By default, Shaping & WFQ both are DISABLED!! */
|
||||
@@ -1121,7 +1145,11 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||
@@ -1119,7 +1143,11 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||
desq_cfg.des_in_own_val = US_OUTQ_DES_OWN;
|
||||
desq_cfg.mbox_int_en = 0;
|
||||
desq_cfg.des_sync_needed = 0;
|
||||
@@ -134,7 +134,7 @@ significantly lower latencies when the line is saturated.
|
||||
/**
|
||||
* Only BC0 is used in VRX518
|
||||
*/
|
||||
@@ -1187,7 +1215,11 @@ static void us_qos_cfg_init(struct ptm_e
|
||||
@@ -1185,7 +1213,11 @@ static void us_qos_cfg_init(struct ptm_e
|
||||
/* Set QoS NO DROP */
|
||||
sb_w32(1, __QOSQ_NO_DROP);
|
||||
/* Enable Preemption function/Disable QoS by default */
|
||||
@@ -146,7 +146,7 @@ significantly lower latencies when the line is saturated.
|
||||
/* By default, all qid mappint to non-preemption queue */
|
||||
sb_w32(0x0, _QID2PREEMP_MAP);
|
||||
|
||||
@@ -1389,6 +1421,11 @@ static void ptm_local_desq_cfg_ctxt_init
|
||||
@@ -1387,6 +1419,11 @@ static void ptm_local_desq_cfg_ctxt_init
|
||||
u32 dcnt, addr, pdbram_base;
|
||||
unsigned int us_des_alloc[] = {
|
||||
__US_TC_LOCAL_Q0_DES_LIST_NUM, __US_TC_LOCAL_Q1_DES_LIST_NUM};
|
||||
@@ -158,7 +158,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
/* Setup the Local DESQ Configuration/Context for UpStream Queues */
|
||||
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
||||
@@ -2334,6 +2371,10 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2332,6 +2369,10 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
u32 phybase = priv->ep->phy_membase;
|
||||
u32 start;
|
||||
u32 type;
|
||||
@@ -169,7 +169,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv));
|
||||
memset(¶m, 0, sizeof(param));
|
||||
@@ -2347,7 +2388,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
@@ -2345,7 +2386,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||
#endif
|
||||
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
||||
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
||||
@@ -198,7 +198,7 @@ significantly lower latencies when the line is saturated.
|
||||
|
||||
--- a/dcdp/tc_proc.c
|
||||
+++ b/dcdp/tc_proc.c
|
||||
@@ -1118,6 +1118,9 @@ static int proc_read_ver(struct seq_file
|
||||
@@ -1116,6 +1116,9 @@ static int proc_read_ver(struct seq_file
|
||||
(date >> 16) & 0xff,
|
||||
(date & 0xffff));
|
||||
|
||||
@@ -208,7 +208,7 @@ significantly lower latencies when the line is saturated.
|
||||
#ifdef FEATURE_POWER_DOWN
|
||||
seq_puts(seq, " + Support Power Down enhancement feature\n");
|
||||
#endif
|
||||
@@ -1170,6 +1173,113 @@ static const struct proc_ops tc_soc_proc
|
||||
@@ -1168,6 +1171,113 @@ static const struct proc_ops tc_soc_proc
|
||||
.proc_release = single_release,
|
||||
};
|
||||
|
||||
@@ -322,7 +322,7 @@ significantly lower latencies when the line is saturated.
|
||||
static struct tc_proc_list tc_procs[] = {
|
||||
{TC_PROC_DIR, 0, NULL, 1},
|
||||
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
||||
@@ -1178,6 +1288,9 @@ static struct tc_proc_list tc_procs[] =
|
||||
@@ -1176,6 +1286,9 @@ static struct tc_proc_list tc_procs[] =
|
||||
{"showtime", 0200, &tc_show_time_proc_fops, 0},
|
||||
{"ver", 0644, &tc_ver_proc_fops, 0},
|
||||
{"soc", 0644, &tc_soc_proc_fops, 0},
|
||||
@@ -332,7 +332,7 @@ significantly lower latencies when the line is saturated.
|
||||
};
|
||||
|
||||
int tc_proc_init(struct tc_priv *priv)
|
||||
@@ -1337,7 +1450,6 @@ proc_ptm_cfg_help:
|
||||
@@ -1335,7 +1448,6 @@ proc_ptm_cfg_help:
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
priv->tc_ops.umt_start = plat_umt_start;
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -3569,7 +3569,7 @@ static void atm_aca_ring_config_init(str
|
||||
@@ -3554,7 +3554,7 @@ static void atm_aca_ring_config_init(str
|
||||
static int atm_ring_init(struct atm_priv *priv)
|
||||
{
|
||||
atm_aca_ring_config_init(priv);
|
||||
@@ -305,7 +305,7 @@
|
||||
}
|
||||
|
||||
static int atm_init(struct tc_priv *tcpriv, u32 ep_id)
|
||||
@@ -3939,7 +3939,7 @@ void atm_tc_unload(void)
|
||||
@@ -3924,7 +3924,7 @@ void atm_tc_unload(void)
|
||||
/* unregister device */
|
||||
if (priv->tc_priv->tc_ops.dev_unreg != NULL)
|
||||
priv->tc_priv->tc_ops.dev_unreg(NULL,
|
||||
@@ -334,7 +334,7 @@
|
||||
int (*umt_init)(u32 umt_id, u32 umt_period, u32 umt_dst);
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -146,7 +146,11 @@ static int ptm_open(struct net_device *d
|
||||
@@ -144,7 +144,11 @@ static int ptm_open(struct net_device *d
|
||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||
|
||||
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm open\n");
|
||||
@@ -346,7 +346,7 @@
|
||||
#ifdef CONFIG_SOC_TYPE_XWAY
|
||||
xet_phy_wan_port(7, NULL, 1, 1);
|
||||
if (ppa_hook_ppa_phys_port_add_fn)
|
||||
@@ -163,7 +167,11 @@ static int ptm_stop(struct net_device *d
|
||||
@@ -161,7 +165,11 @@ static int ptm_stop(struct net_device *d
|
||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||
|
||||
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm stop\n");
|
||||
@@ -358,7 +358,7 @@
|
||||
#ifdef CONFIG_SOC_TYPE_XWAY
|
||||
if (ppa_drv_datapath_mac_entry_setting)
|
||||
ppa_drv_datapath_mac_entry_setting(dev->dev_addr, 0, 6, 10, 1, 2);
|
||||
@@ -564,7 +572,7 @@ static void ptm_rx(struct net_device *de
|
||||
@@ -562,7 +570,7 @@ static void ptm_rx(struct net_device *de
|
||||
ptm_tc->stats64.rx_packets++;
|
||||
ptm_tc->stats64.rx_bytes += skb->len;
|
||||
|
||||
@@ -367,22 +367,17 @@
|
||||
ptm_tc->stats64.rx_dropped++;
|
||||
|
||||
return;
|
||||
@@ -664,6 +672,14 @@ static int ptm_dev_init(struct tc_priv *
|
||||
@@ -662,6 +670,9 @@ static int ptm_dev_init(struct tc_priv *
|
||||
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
||||
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx);
|
||||
+ netif_napi_add_tx(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx);
|
||||
+#else
|
||||
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT);
|
||||
+ netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT);
|
||||
+
|
||||
+#endif
|
||||
err = register_netdev(ptm_tc->dev);
|
||||
if (err)
|
||||
goto err1;
|
||||
@@ -2618,7 +2634,9 @@ static int ptm_ring_init(struct ptm_ep_p
|
||||
@@ -2616,7 +2627,9 @@ static int ptm_ring_init(struct ptm_ep_p
|
||||
{
|
||||
ptm_aca_ring_config_init(priv, id, bonding);
|
||||
return priv->tc_priv->tc_ops.dev_reg(priv->ptm_tc->dev,
|
||||
@@ -393,7 +388,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2973,7 +2991,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m
|
||||
@@ -2971,7 +2984,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m
|
||||
/* unregister device */
|
||||
if (ptm_tc->tc_priv->tc_ops.dev_unreg != NULL)
|
||||
ptm_tc->tc_priv->tc_ops.dev_unreg(ptm_tc->dev,
|
||||
@@ -404,7 +399,7 @@
|
||||
|
||||
/* remove PTM callback function */
|
||||
ptm_cb_setup(ptm_tc, 0);
|
||||
@@ -2991,6 +3011,10 @@ void ptm_exit(void)
|
||||
@@ -2989,6 +3004,10 @@ void ptm_exit(void)
|
||||
|
||||
if (!priv)
|
||||
return;
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -688,7 +688,8 @@ static void atm_aca_init(struct atm_priv
|
||||
@@ -686,7 +686,8 @@ static void atm_aca_init(struct atm_priv
|
||||
ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
struct tm nowtm;
|
||||
char tmbuf[64];
|
||||
@@ -707,7 +708,8 @@ static int print_datetime(char *buffer,
|
||||
@@ -705,7 +706,8 @@ static int print_datetime(char *buffer,
|
||||
nowtm.tm_hour,
|
||||
nowtm.tm_min,
|
||||
nowtm.tm_sec);
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -909,7 +911,7 @@ void show_atm_pvc(struct seq_file *seq,
|
||||
@@ -907,7 +909,7 @@ void show_atm_pvc(struct seq_file *seq,
|
||||
char buf[64];
|
||||
|
||||
seq_printf(seq, "\tNet device: %s\n", pvc->dev->name);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -307,15 +307,19 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
@@ -305,15 +305,19 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
)
|
||||
{
|
||||
struct rtnl_link_stats64 *stat;
|
||||
@@ -21,7 +21,7 @@
|
||||
if (bonding)
|
||||
stats->tc_info = TC_PTM_BND_MODE;
|
||||
else
|
||||
@@ -349,11 +353,11 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
@@ -347,11 +351,11 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
? cur_cnt - last_cnt
|
||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT);
|
||||
last_cnt = priv->ptm_mib.rx_crc_err_pdu[0];
|
||||
@@ -367,7 +371,7 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
@@ -365,7 +369,7 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
? cur_cnt - last_cnt
|
||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE +
|
||||
offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4);
|
||||
last_cnt = priv->ptm_mib.tx_total_pdu[0];
|
||||
@@ -385,90 +389,108 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
@@ -383,90 +387,108 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||
/* For bonding information */
|
||||
if (bonding) {
|
||||
int i;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
|
||||
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -666,6 +666,7 @@ static void ptm_setup(struct net_device
|
||||
@@ -664,6 +664,7 @@ static void ptm_setup(struct net_device
|
||||
ether_setup(dev);
|
||||
dev->watchdog_timeo = 10 * HZ;
|
||||
dev->netdev_ops = &g_ptm_netdev_ops;
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
---
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -1158,8 +1158,9 @@ static void ppe_close(struct atm_vcc *vc
|
||||
@@ -1156,8 +1156,9 @@ static void ppe_close(struct atm_vcc *vc
|
||||
validate_oam_htu_entry(priv, 0);
|
||||
spin_unlock_bh(&priv->atm_lock);
|
||||
|
||||
@@ -35,7 +35,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
|
||||
|
||||
memset(conn, 0, sizeof(*conn));
|
||||
|
||||
@@ -2710,24 +2711,26 @@ static void mpoa_setup_sync(struct atm_p
|
||||
@@ -2695,24 +2696,26 @@ static void mpoa_setup_sync(struct atm_p
|
||||
struct wtx_queue_config_t tx_qcfg;
|
||||
struct uni_cell_header *cell_header;
|
||||
struct atm_vcc *vcc;
|
||||
|
||||
@@ -3,7 +3,7 @@ path.
|
||||
|
||||
--- a/dcdp/ptm_tc.c
|
||||
+++ b/dcdp/ptm_tc.c
|
||||
@@ -923,7 +923,7 @@ static void ptm_fw_init(struct ptm_ep_pr
|
||||
@@ -916,7 +916,7 @@ static void ptm_fw_init(struct ptm_ep_pr
|
||||
rx_gitf_cfg.rx_inserted_bytes_1h = 0;
|
||||
rx_gitf_cfg.rx_inserted_bytes_2l = 0;
|
||||
rx_gitf_cfg.rx_inserted_bytes_2h = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
|
||||
--- a/dcdp/atm_tc.c
|
||||
+++ b/dcdp/atm_tc.c
|
||||
@@ -279,7 +279,7 @@ unsigned int find_vpi(unsigned int vpi)
|
||||
@@ -277,7 +277,7 @@ unsigned int find_vpi(unsigned int vpi)
|
||||
* success: 0
|
||||
* failed: -1
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
#include "../inc/tc_common.h"
|
||||
--- a/dcdp/tc_proc.c
|
||||
+++ b/dcdp/tc_proc.c
|
||||
@@ -1945,7 +1945,7 @@ static void fwdbg_help(struct tc_comm *p
|
||||
@@ -1943,7 +1943,7 @@ static void fwdbg_help(struct tc_comm *p
|
||||
if (!cmds[i].cmd)
|
||||
fwdbg_help(priv, NULL, 0, result);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
|
||||
char *commands[], int num, char *result)
|
||||
{
|
||||
int i;
|
||||
@@ -1964,7 +1964,7 @@ int fw_dbg_start(struct tc_comm *priv,
|
||||
@@ -1962,7 +1962,7 @@ int fw_dbg_start(struct tc_comm *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,21 @@ endef
|
||||
$(eval $(call KernelPackage,hwmon-coretemp))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-corsair-cpro
|
||||
TITLE:=Corsair Commander Pro controller
|
||||
KCONFIG:=CONFIG_SENSORS_CORSAIR_CPRO
|
||||
FILES:=$(LINUX_DIR)/drivers/hwmon/corsair-cpro.ko
|
||||
AUTOLOAD:=$(call AutoProbe,corsair-cpro)
|
||||
$(call AddDepends/hwmon,+kmod-usb-hid)
|
||||
endef
|
||||
|
||||
define KernelPackage/hwmon-corsair-cpro/description
|
||||
Kernel module for the Corsair Commander Pro controller and Corsair 1000D
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,hwmon-corsair-cpro))
|
||||
|
||||
|
||||
define KernelPackage/hwmon-dme1737
|
||||
TITLE:=SMSC DME1737 and compatible monitoring support
|
||||
KCONFIG:=CONFIG_SENSORS_DME1737
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
|
||||
PKG_MIRROR_HASH:=a64b712809c1504975edecb5d31b1cfb8a860263654ded8cc952517b552c1032
|
||||
PKG_SOURCE_DATE:=2026-05-03
|
||||
PKG_SOURCE_VERSION:=1501e60e5554bd206c9b13532b7352e668508420
|
||||
PKG_MIRROR_HASH:=f84dfb74cac967401822bcef7a1ebdfff1b34d4e60df04110315521817938546
|
||||
PKG_SOURCE_DATE:=2026-05-23
|
||||
PKG_SOURCE_VERSION:=1fe93d2fefb213ec987763e7e94ce5eaa757bfc3
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
|
||||
@@ -470,6 +470,8 @@ function device_capabilities(config) {
|
||||
|
||||
phy_capabilities.ht_capa = band.ht_capa ?? 0;
|
||||
phy_capabilities.vht_capa = band.vht_capa ?? 0;
|
||||
phy_capabilities.he_mac_cap = [];
|
||||
phy_capabilities.he_phy_cap = [];
|
||||
for (let iftype in band.iftype_data) {
|
||||
if (!iftype.iftypes.ap)
|
||||
continue;
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_MIRROR_HASH:=c7c846ce6427d186f9f52562eb5951a27e209b77dac40fafd2b11dc104ae1cf5
|
||||
PKG_SOURCE_DATE:=2026-03-17
|
||||
PKG_SOURCE_VERSION:=e600d842ce81b776dc8e2c7aaf39bb923e446c45
|
||||
PKG_MIRROR_HASH:=c266c906cc40b0422f1e74e0118f68bb123c04233dfbf4689847eba74abec4eb
|
||||
PKG_SOURCE_DATE:=2026-05-23
|
||||
PKG_SOURCE_VERSION:=16718b6e3c0fc7db7be6ae5848db0eae88ac8a8b
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2025-12-02
|
||||
PKG_SOURCE_VERSION:=3cc98db1a422dcf560f2d6347fd410f17565a89d
|
||||
PKG_MIRROR_HASH:=25a204888b41e9a432ee0b8d03c1e0f09ae9aaae6a306c41781d680b632b82ae
|
||||
PKG_SOURCE_DATE:=2026-05-23
|
||||
PKG_SOURCE_VERSION:=795b32bb96b611493f423666236e9c1e49e0736c
|
||||
PKG_MIRROR_HASH:=7fdc7c111b21277603448f20b15ebbf3adeab6e3f51fb99f216587f3b5998fbd
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
|
||||
@@ -137,9 +137,9 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_board_102: macaddr@102 {
|
||||
macaddr_board_66: macaddr@66 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x102 0x6>;
|
||||
reg = <0x66 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
@@ -176,7 +176,7 @@
|
||||
compatible = "pci168c,0033";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&macaddr_board_102 2>;
|
||||
nvmem-cells = <&macaddr_board_66 2>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
@@ -188,7 +188,7 @@
|
||||
compatible = "pci168c,0033";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&macaddr_board_102 3>;
|
||||
nvmem-cells = <&macaddr_board_66 3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
@@ -206,7 +206,7 @@
|
||||
pll-data = <0xa6000000 0xa0000101 0x80001313>;
|
||||
phy-handle = <&phy>;
|
||||
|
||||
nvmem-cells = <&macaddr_board_102 0>;
|
||||
nvmem-cells = <&macaddr_board_66 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
gmac-config {
|
||||
@@ -221,6 +221,6 @@
|
||||
status = "okay";
|
||||
qca,no-eeprom;
|
||||
|
||||
nvmem-cells = <&macaddr_board_102 1>;
|
||||
nvmem-cells = <&macaddr_board_66 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@@ -12,6 +12,7 @@ CPU_TYPE:=cortex-a9
|
||||
SUBTARGETS:=generic
|
||||
|
||||
KERNEL_PATCHVER:=6.12
|
||||
KERNEL_TESTING_PATCHVER:=6.18
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS.
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM_5301X=y
|
||||
CONFIG_ARCH_BCM_53573=y
|
||||
CONFIG_ARCH_BCM_IPROC=y
|
||||
CONFIG_ARCH_BCM_NSP=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USES_CFI_GENERIC_LLVM_PASS=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
|
||||
CONFIG_ARM_ERRATA_754322=y
|
||||
CONFIG_ARM_ERRATA_764369=y
|
||||
CONFIG_ARM_ERRATA_775420=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=1
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_SP805_WATCHDOG=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_SERDES=y
|
||||
CONFIG_B53_SRAB_DRIVER=y
|
||||
CONFIG_BCM47XX_NVRAM=y
|
||||
CONFIG_BCM47XX_SPROM=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
CONFIG_BCMA=y
|
||||
CONFIG_BCMA_BLOCKIO=y
|
||||
CONFIG_BCMA_DEBUG=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
CONFIG_BCMA_DRIVER_GPIO=y
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_FALLBACK_SPROM=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_SOC=y
|
||||
CONFIG_BCMA_SFLASH=y
|
||||
# CONFIG_BCM_CYGNUS_PHY is not set
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_NS_THERMAL=y
|
||||
CONFIG_BCM_SR_THERMAL=y
|
||||
CONFIG_BGMAC=y
|
||||
CONFIG_BGMAC_BCMA=y
|
||||
CONFIG_BGMAC_PLATFORM=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
# CONFIG_CLK_BCM_NS2 is not set
|
||||
CONFIG_CLK_BCM_NSP=y
|
||||
# CONFIG_CLK_BCM_SR is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_IPROC=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=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_HAS_ASID=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_ARCH=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA256_ARCH=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BCM_5301X=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
|
||||
CONFIG_DEBUG_MISC=y
|
||||
CONFIG_DEBUG_UART_8250=y
|
||||
CONFIG_DEBUG_UART_8250_SHIFT=0
|
||||
CONFIG_DEBUG_UART_PHYS=0x18000300
|
||||
CONFIG_DEBUG_UART_VIRT=0xf1000300
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DMA_NEED_SYNC=y
|
||||
CONFIG_DMA_OPS_HELPERS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FS_IOMAP=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_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_DEVICES=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=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_74X164=y
|
||||
CONFIG_GPIO_BCM_XGS_IPROC=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BCM_IPROC=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_SLAVE=y
|
||||
# CONFIG_I2C_SLAVE_TESTUNIT is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
# CONFIG_LEDS_BCM63138 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BCM_IPROC=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
# CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_BCM47XXSFLASH=y
|
||||
CONFIG_MTD_BCM47XX_PARTS=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_BRCMNAND_IPROC=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_OF_PARTS_LINKSYS_NS=y
|
||||
CONFIG_MTD_PARSER_TPLINK_SAFELOADER=y
|
||||
CONFIG_MTD_PARSER_TRX=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_QCA8K=y
|
||||
CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY_FCS=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_DSA_TAG_NONE=y
|
||||
CONFIG_NET_DSA_TAG_QCA=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_BRCM_NVRAM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
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_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_BLOCK_MAX_ORDER=11
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_IPROC=y
|
||||
CONFIG_PCIE_IPROC_BCMA=y
|
||||
# CONFIG_PCIE_IPROC_PLATFORM is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PER_VMA_LOCK=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_BCM_NS_USB2 is not set
|
||||
# CONFIG_PHY_BCM_NS_USB3 is not set
|
||||
# CONFIG_PHY_BCM_SR_PCIE is not set
|
||||
CONFIG_PHY_BCM_SR_USB=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
# CONFIG_PHY_NS2_USB_DRD is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_IPROC_GPIO=y
|
||||
CONFIG_PINCTRL_NS=y
|
||||
# CONFIG_PINCTRL_NS2_MUX is not set
|
||||
CONFIG_PINCTRL_NSP_GPIO=y
|
||||
CONFIG_PINCTRL_NSP_MUX=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM_IPROC=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM_QSPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
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_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMMON=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@@ -0,0 +1,67 @@
|
||||
From c18e0b14b466fb0aa17c8ca6e61f16ba1254aebd Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Sun, 24 Nov 2024 12:58:51 -0800
|
||||
Subject: [PATCH] ARM: dts: meraki-mr26: wifi MACs in dts
|
||||
|
||||
OPENWRT HACK. Probably will not be accepted upstream.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
.../dts/broadcom/bcm53015-meraki-mr26.dts | 31 ++++++++++++++++++-
|
||||
1 file changed, 30 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts
|
||||
@@ -60,7 +60,7 @@
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
|
||||
- nvmem-cells = <&macaddr_board_config_66>;
|
||||
+ nvmem-cells = <&macaddr_board_config_66 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@@ -74,6 +74,33 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+&pcie_bridge0 {
|
||||
+ wifi@0,0 {
|
||||
+ reg = <0x0000 0 0 0 0>;
|
||||
+ compatible = "brcm,bcm43431";
|
||||
+ nvmem-cells = <&macaddr_board_config_66 1>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie_bridge1 {
|
||||
+ wifi@0,0 {
|
||||
+ reg = <0x0000 0 0 0 0>;
|
||||
+ compatible = "brcm,bcm43431";
|
||||
+ nvmem-cells = <&macaddr_board_config_66 2>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie_bridge2 {
|
||||
+ wifi@0,0 {
|
||||
+ reg = <0x0000 0 0 0 0>;
|
||||
+ compatible = "brcm,bcm43428";
|
||||
+ nvmem-cells = <&macaddr_board_config_66 3>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&nandcs {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
@@ -119,7 +146,9 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_board_config_66: macaddr@66 {
|
||||
+ compatible = "mac-base";
|
||||
reg = <0x66 0x6>;
|
||||
+ #nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 13 Apr 2021 18:25:20 +0200
|
||||
Subject: [PATCH] mtd: parsers: trx: parse "firmware" MTD partitions only
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Parsing every partition with "compatible" set to "brcm,trx" results in
|
||||
parsing both: firmware partition and failsafe partition on devices that
|
||||
implement failsafe booting. This affects e.g. Linksys EA9500 which has:
|
||||
|
||||
partition@200000 {
|
||||
reg = <0x0200000 0x01d00000>;
|
||||
compatible = "linksys,ns-firmware", "brcm,trx";
|
||||
};
|
||||
|
||||
partition@1f00000 {
|
||||
reg = <0x01f00000 0x01d00000>;
|
||||
compatible = "linksys,ns-firmware", "brcm,trx";
|
||||
};
|
||||
|
||||
Check for MTD partition name "firmware" before parsing. Recently added
|
||||
ofpart_linksys_ns.c creates "firmware" and "failsafe" depending on
|
||||
bootloader setup.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
drivers/mtd/parsers/parser_trx.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/parsers/parser_trx.c
|
||||
+++ b/drivers/mtd/parsers/parser_trx.c
|
||||
@@ -92,6 +92,10 @@ static int parser_trx_parse(struct mtd_i
|
||||
if (err != 0 && err != -EINVAL)
|
||||
pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err);
|
||||
|
||||
+ /* Don't parse any failsafe / backup partitions */
|
||||
+ if (strcmp(mtd->name, "firmware"))
|
||||
+ return -ENOENT;
|
||||
+
|
||||
parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition),
|
||||
GFP_KERNEL);
|
||||
if (!parts)
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 1 Oct 2016 22:54:48 +0200
|
||||
Subject: [PATCH] usb: xhci: add support for performing fake doorbell
|
||||
|
||||
Broadcom's Northstar XHCI controllers seem to need a special start
|
||||
procedure to work correctly. There isn't any official documentation of
|
||||
this, the problem is that controller doesn't detect any connected
|
||||
devices with default setup. Moreover connecting USB device to controller
|
||||
that doesn't run properly can cause SoC's watchdog issues.
|
||||
|
||||
A workaround that was successfully tested on multiple devices is to
|
||||
perform a fake doorbell. This patch adds code for doing this and enables
|
||||
it on BCM4708 family.
|
||||
---
|
||||
drivers/usb/host/xhci-plat.c | 6 +++++
|
||||
drivers/usb/host/xhci.c | 63 +++++++++++++++++++++++++++++++++++++++++---
|
||||
drivers/usb/host/xhci.h | 1 +
|
||||
3 files changed, 67 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/xhci-plat.c
|
||||
+++ b/drivers/usb/host/xhci-plat.c
|
||||
@@ -88,8 +88,13 @@ static int xhci_priv_post_resume_quirk(s
|
||||
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
struct xhci_plat_priv *priv = xhci_to_priv(xhci);
|
||||
+ struct platform_device *pdev = to_platform_device(dev);
|
||||
+ struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
xhci->quirks |= priv->quirks;
|
||||
+
|
||||
+ if (node && of_machine_is_compatible("brcm,bcm4708"))
|
||||
+ xhci->quirks |= XHCI_FAKE_DOORBELL;
|
||||
}
|
||||
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -165,6 +165,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * xhci_fake_doorbell - Perform a fake doorbell on a specified slot
|
||||
+ *
|
||||
+ * Some controllers require a fake doorbell to start correctly. Without that
|
||||
+ * they simply don't detect any devices.
|
||||
+ */
|
||||
+static int xhci_fake_doorbell(struct xhci_hcd *xhci, int slot_id)
|
||||
+{
|
||||
+ u32 temp;
|
||||
+
|
||||
+ /* Alloc a virt device for that slot */
|
||||
+ if (!xhci_alloc_virt_device(xhci, slot_id, NULL, GFP_NOIO)) {
|
||||
+ xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ /* Ring fake doorbell for slot_id ep 0 */
|
||||
+ xhci_ring_ep_doorbell(xhci, slot_id, 0, 0);
|
||||
+ usleep_range(1000, 1500);
|
||||
+
|
||||
+ /* Read the status to check if HSE is set or not */
|
||||
+ temp = readl(&xhci->op_regs->status);
|
||||
+
|
||||
+ /* Clear HSE if set */
|
||||
+ if (temp & STS_FATAL) {
|
||||
+ xhci_dbg(xhci, "HSE problem detected, status: 0x%08x\n", temp);
|
||||
+ temp &= ~0x1fff;
|
||||
+ temp |= STS_FATAL;
|
||||
+ writel(temp, &xhci->op_regs->status);
|
||||
+ usleep_range(1000, 1500);
|
||||
+ readl(&xhci->op_regs->status);
|
||||
+ }
|
||||
+
|
||||
+ /* Free virt device */
|
||||
+ xhci_free_virt_device(xhci, xhci->devs[slot_id], slot_id);
|
||||
+
|
||||
+ /* We're done if controller is already running */
|
||||
+ if (readl(&xhci->op_regs->command) & CMD_RUN)
|
||||
+ return 0;
|
||||
+
|
||||
+ return xhci_start(xhci);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -611,6 +654,15 @@ static int xhci_run_finished(struct xhci
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
+ if (xhci->quirks & XHCI_FAKE_DOORBELL) {
|
||||
+ int err = xhci_fake_doorbell(xhci, 1);
|
||||
+ if (err) {
|
||||
+ xhci_halt(xhci);
|
||||
+ spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
+ return err;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
|
||||
|
||||
if (xhci->quirks & XHCI_NEC_HOST)
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1645,6 +1645,7 @@ struct xhci_hcd {
|
||||
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
|
||||
#define XHCI_ETRON_HOST BIT_ULL(49)
|
||||
#define XHCI_LIMIT_ENDPOINT_INTERVAL_9 BIT_ULL(50)
|
||||
+#define XHCI_FAKE_DOORBELL BIT_ULL(51)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 24 Sep 2014 22:14:07 +0200
|
||||
Subject: [PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Broadcom devices have broken CFE (bootloader) that leaves hardware in an
|
||||
invalid state. It causes problems with booting Linux. On Northstar
|
||||
devices kernel was randomly hanging in ~25% of tries during early init.
|
||||
Hangs used to happen at random places in the start_kernel. On BCM53573
|
||||
kernel doesn't even seem to start booting.
|
||||
|
||||
To workaround this problem we need to do following very early:
|
||||
1) Clear 2 following bits in the SCTLR register:
|
||||
#define CR_M (1 << 0) /* MMU enable */
|
||||
#define CR_C (1 << 2) /* Dcache enable */
|
||||
2) Flush the whole D-cache
|
||||
3) Disable L2 cache
|
||||
|
||||
Unfortunately this patch is not upstreamable as it does above things
|
||||
unconditionally. We can't check if we are running on Broadcom platform
|
||||
in any safe way and doing such hacks with ARCH_MULTI_V7 is unacceptable
|
||||
as it could break other devices support.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/compressed/Makefile
|
||||
+++ b/arch/arm/boot/compressed/Makefile
|
||||
@@ -29,6 +29,11 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
|
||||
OBJS += ll_char_wr.o font.o
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_ARCH_BCM_5301X),y)
|
||||
+OBJS += head-bcm_5301x-mpcore.o
|
||||
+OBJS += cache-v7-min.o
|
||||
+endif
|
||||
+
|
||||
ifeq ($(CONFIG_ARCH_SA1100),y)
|
||||
OBJS += head-sa1100.o
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/compressed/head-bcm_5301x-mpcore.S
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Platform specific tweaks. This is merged into head.S by the linker.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/linkage.h>
|
||||
+#include <asm/assembler.h>
|
||||
+#include <asm/cp15.h>
|
||||
+
|
||||
+ .section ".start", "ax"
|
||||
+
|
||||
+/*
|
||||
+ * This code section is spliced into the head code by the linker
|
||||
+ */
|
||||
+
|
||||
+__plat_uncompress_start:
|
||||
+
|
||||
+ @ Preserve r8/r7 i.e. kernel entry values
|
||||
+ mov r12, r8
|
||||
+
|
||||
+ @ Clear MMU enable and Dcache enable bits
|
||||
+ mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR
|
||||
+ bic r0, #CR_C|CR_M
|
||||
+ mcr p15, 0, r0, c1, c0, 0 @ Write SCTLR
|
||||
+ nop
|
||||
+
|
||||
+ @ Call the cache invalidation routine
|
||||
+ bl v7_flush_dcache_all
|
||||
+ nop
|
||||
+ mov r0,#0
|
||||
+ ldr r3, =0x19022000 @ L2 cache controller, control reg
|
||||
+ str r0, [r3, #0x100] @ Disable L2 cache
|
||||
+ nop
|
||||
+
|
||||
+ @ Restore
|
||||
+ mov r8, r12
|
||||
--- a/arch/arm/boot/compressed/cache-v7-min.S
|
||||
+++ b/arch/arm/boot/compressed/cache-v7-min.S
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
+#include <asm/assembler.h>
|
||||
|
||||
__INIT
|
||||
|
||||
@@ -63,7 +64,7 @@ loop2:
|
||||
ARM( orr r11, r11, r9, lsl r2 ) @ factor index number into r11
|
||||
THUMB( lsl r6, r9, r2 )
|
||||
THUMB( orr r11, r11, r6 ) @ factor index number into r11
|
||||
- mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
|
||||
+ mcr p15, 0, r11, c7, c6, 2 @ clean & invalidate by set/way
|
||||
subs r9, r9, #1 @ decrement the index
|
||||
bge loop2
|
||||
subs r4, r4, #1 @ decrement the way
|
||||
--- a/arch/arm/boot/compressed/vmlinux.lds.S
|
||||
+++ b/arch/arm/boot/compressed/vmlinux.lds.S
|
||||
@@ -42,6 +42,7 @@ SECTIONS
|
||||
*(.start)
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
+ *(.init.text)
|
||||
ARM_STUBS_TEXT
|
||||
}
|
||||
.table : ALIGN(4) {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user