Merge Official Source

This commit is contained in:
AmadeusGhost 2020-06-04 11:53:11 +08:00
commit ed635ca2f5
84 changed files with 1517 additions and 904 deletions

View File

@ -51,10 +51,12 @@ $(eval $(call TestHostCommand,working-g++, \
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
$(TMP_DIR)/a.out))
ifndef IB
$(eval $(call TestHostCommand,ncurses, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
endif
ifeq ($(HOST_OS),Linux)
zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic
@ -62,6 +64,10 @@ else
zlib_link_flags := -lz
endif
$(eval $(call TestHostCommand,perl-data-dumper, \
Please install the Perl Data::Dumper module, \
perl -MData::Dumper -e 1))
$(eval $(call TestHostCommand,perl-thread-queue, \
Please install the Perl Thread::Queue module, \
perl -MThread::Queue -e 1))

View File

@ -17,11 +17,12 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs
coreutils kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl ca-certificates \
default-settings luci luci-base luci-compat luci-lib-fs luci-lib-ipkg luci-proto-relay \
luci-app-cpufreq luci-app-flowoffload
# For the basic set
DEFAULT_PACKAGES.basic:=
# For nas targets
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm
# For router targets
DEFAULT_PACKAGES.router:=dnsmasq-full iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload kmod-tcp-bbr
DEFAULT_PACKAGES.bootloader:=
ifneq ($(DUMP),)
all: dumpinfo

View File

@ -4,7 +4,7 @@
START=95
boot() {
mount_root done
rm -f /sysupgrade.tgz
rm -f /sysupgrade.tgz && sync
# process user commands
[ -f /etc/rc.local ] && {

View File

@ -404,7 +404,7 @@ ucidef_set_led_gpio() {
}
ucidef_set_led_ide() {
_ucidef_set_led_trigger "$1" "$2" "$3" ide-disk
_ucidef_set_led_trigger "$1" "$2" "$3" disk-activity
}
ucidef_set_led_netdev() {

View File

@ -9,6 +9,8 @@ do_mount_root() {
echo "- config restore -"
cd /
tar xzf /sysupgrade.tgz
# Prevent configuration corruption on a power loss
sync
}
}

View File

@ -8,10 +8,10 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_VERSION:=2020.01
PKG_VERSION:=2020.04
PKG_RELEASE:=1
PKG_HASH:=aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1
PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
include $(INCLUDE_DIR)/u-boot.mk
include $(INCLUDE_DIR)/package.mk

View File

@ -1,6 +1,6 @@
From b66c70cd15fa02297b94d928970932ef62c2ff02 Mon Sep 17 00:00:00 2001
From 83ee930c18b068c9a16b66c01aaa5d6e06570152 Mon Sep 17 00:00:00 2001
From: Michael Heimpold <mhei@heimpold.de>
Date: Sun, 3 Nov 2019 00:50:21 +0100
Date: Sun, 19 Apr 2020 02:46:46 +0200
Subject: [PATCH] arm: mxs: add support for I2SE's Duckbill boards
The Duckbill devices are small, pen-drive sized boards based on
@ -28,13 +28,13 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/mach-imx/mxs/Kconfig | 5 +
board/i2se/duckbill/Kconfig | 15 +++
board/i2se/duckbill/MAINTAINERS | 6 ++
board/i2se/duckbill/MAINTAINERS | 6 +
board/i2se/duckbill/Makefile | 10 ++
board/i2se/duckbill/duckbill.c | 186 ++++++++++++++++++++++++++++++++
board/i2se/duckbill/iomux.c | 156 +++++++++++++++++++++++++++
configs/duckbill_defconfig | 41 +++++++
include/configs/duckbill.h | 176 ++++++++++++++++++++++++++++++
8 files changed, 595 insertions(+)
board/i2se/duckbill/duckbill.c | 189 ++++++++++++++++++++++++++++++++
board/i2se/duckbill/iomux.c | 157 ++++++++++++++++++++++++++
configs/duckbill_defconfig | 43 ++++++++
include/configs/duckbill.h | 172 +++++++++++++++++++++++++++++
8 files changed, 597 insertions(+)
create mode 100644 board/i2se/duckbill/Kconfig
create mode 100644 board/i2se/duckbill/MAINTAINERS
create mode 100644 board/i2se/duckbill/Makefile
@ -44,7 +44,7 @@ Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
create mode 100644 include/configs/duckbill.h
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
index 68072d5a1f..82aaa3ef76 100644
index b90d7b6e41..e7d8bc6792 100644
--- a/arch/arm/mach-imx/mxs/Kconfig
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT
@ -58,14 +58,14 @@ index 68072d5a1f..82aaa3ef76 100644
config TARGET_MX28EVK
bool "Support mx28evk"
select BOARD_EARLY_INIT_F
@@ -67,6 +71,7 @@ config SYS_SOC
@@ -70,6 +74,7 @@ config SYS_SOC
source "board/bluegiga/apx4devkit/Kconfig"
source "board/freescale/mx28evk/Kconfig"
+source "board/i2se/duckbill/Kconfig"
source "board/liebherr/xea/Kconfig"
source "board/ppcag/bg0900/Kconfig"
source "board/schulercontrol/sc_sps_1/Kconfig"
source "board/technologic/ts4600/Kconfig"
diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig
new file mode 100644
index 0000000000..98c1e4689f
@ -101,13 +101,13 @@ index 0000000000..5496baa330
+F: configs/duckbill_defconfig
diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile
new file mode 100644
index 0000000000..0079eb413c
index 0000000000..11bac98e4c
--- /dev/null
+++ b/board/i2se/duckbill/Makefile
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2014-2019
+# (C) Copyright 2014-2020
+# Michael Heimpold, mhei@heimpold.de.
+
+ifndef CONFIG_SPL_BUILD
@ -117,15 +117,15 @@ index 0000000000..0079eb413c
+endif
diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c
new file mode 100644
index 0000000000..f93c372611
index 0000000000..93defc6c28
--- /dev/null
+++ b/board/i2se/duckbill/duckbill.c
@@ -0,0 +1,186 @@
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * I2SE Duckbill board
+ *
+ * (C) Copyright 2014-2019 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2014-2020 Michael Heimpold <mhei@heimpold.de>
+ */
+
+#include <common.h>
@ -177,14 +177,14 @@ index 0000000000..f93c372611
+ return 0;
+}
+
+#ifdef CONFIG_CMD_MMC
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+ return mxsmmc_initialize(bis, 0, NULL, NULL);
+}
+#endif
+
+#ifdef CONFIG_CMD_NET
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+ unsigned int reset_gpio;
@ -198,6 +198,7 @@ index 0000000000..f93c372611
+ reset_gpio = MX28_PAD_GPMI_ALE__GPIO_0_26;
+
+ /* Reset PHY */
+ gpio_request(reset_gpio, "enet0_phy_rst");
+ gpio_direction_output(reset_gpio, 0);
+ udelay(200);
+ gpio_set_value(reset_gpio, 1);
@ -270,6 +271,7 @@ index 0000000000..f93c372611
+ char *s;
+
+ /* Board revision detection */
+ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision");
+ gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17);
+
+ /* MX28_PAD_LCD_D17__GPIO_1_17: v1 = pull-down, v2 = pull-up */
@ -290,6 +292,7 @@ index 0000000000..f93c372611
+ led_red_gpio = MX28_PAD_AUART1_RX__GPIO_3_4;
+ else
+ led_red_gpio = MX28_PAD_SAIF0_LRCLK__GPIO_3_21;
+ gpio_request(led_red_gpio, "led_red");
+ gpio_direction_output(led_red_gpio, 1);
+
+ if (system_rev == 1)
@ -309,15 +312,15 @@ index 0000000000..f93c372611
+}
diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c
new file mode 100644
index 0000000000..1db3c52c34
index 0000000000..c6cc211181
--- /dev/null
+++ b/board/i2se/duckbill/iomux.c
@@ -0,0 +1,156 @@
@@ -0,0 +1,157 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * I2SE Duckbill IOMUX setup
+ *
+ * Copyright (C) 2013-2019 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2013-2020 Michael Heimpold <mhei@heimpold.de>
+ */
+
+#include <common.h>
@ -462,6 +465,7 @@ index 0000000000..1db3c52c34
+{
+ mxs_common_spl_init(arg, resptr, iomux_setup, ARRAY_SIZE(iomux_setup));
+
+ gpio_request(MX28_PAD_LCD_D17__GPIO_1_17, "board_revision");
+ gpio_direction_input(MX28_PAD_LCD_D17__GPIO_1_17);
+
+ if (gpio_get_value(MX28_PAD_LCD_D17__GPIO_1_17))
@ -471,10 +475,10 @@ index 0000000000..1db3c52c34
+}
diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig
new file mode 100644
index 0000000000..fcdec4f3c7
index 0000000000..b2d7fbcf77
--- /dev/null
+++ b/configs/duckbill_defconfig
@@ -0,0 +1,41 @@
@@ -0,0 +1,43 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MX28=y
+CONFIG_SYS_TEXT_BASE=0x40002000
@ -510,6 +514,8 @@ index 0000000000..fcdec4f3c7
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_DOS_PARTITION=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_OFFSET_REDUND=0x40000
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_MXS_GPIO=y
+CONFIG_MMC_MXS=y
@ -518,13 +524,13 @@ index 0000000000..fcdec4f3c7
+CONFIG_OF_LIBFDT=y
diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h
new file mode 100644
index 0000000000..76da1008b8
index 0000000000..565d8c58b7
--- /dev/null
+++ b/include/configs/duckbill.h
@@ -0,0 +1,176 @@
@@ -0,0 +1,172 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2014-2019 Michael Heimpold <mhei@heimpold.de>
+ * Copyright (C) 2014-2020 Michael Heimpold <mhei@heimpold.de>
+ *
+ */
+#ifndef __CONFIGS_DUCKBILL_H__
@ -545,7 +551,6 @@ index 0000000000..76da1008b8
+/* Environment is in MMC */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+
+/* FEC Ethernet on SoC */
+#ifdef CONFIG_CMD_NET
@ -622,9 +627,6 @@ index 0000000000..76da1008b8
+ "else " \
+ "echo Firmware Update OK; " \
+ "fi; setenv error\0" \
+ "erase_mmc=mmc erase 0 2\0" \
+ "erase_env1=mmc erase 100 100\0" \
+ "erase_env2=mmc erase 200 100\0" \
+ "image=zImage\0" \
+ "console=ttyAMA0\0" \
+ "fdt_addr=0x41000000\0" \
@ -637,8 +639,8 @@ index 0000000000..76da1008b8
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "root=${mmcroot} " \
+ "rootwait bootsys=${bootsys} panic=1 ${extraargs}\0" \
+ "loadimage=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
+ "loadfdt=ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \
+ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/${image}\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/${fdt_file}\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "setexpr mmcpart 1 + ${bootsys}; " \
+ "setenv mmcroot /dev/mmcblk0p${mmcpart}; " \

View File

@ -328,20 +328,88 @@ endef
$(eval $(call KernelPackage,iio-st_accel))
define KernelPackage/iio-st_sensors-i2c
define KernelPackage/iio-st_accel-i2c
SUBMENU:=$(IIO_MENU)
TITLE:=STMicroelectronics accelerometer 3-Axis Driver (I2C)
DEPENDS:=+kmod-iio-st_accel +kmod-i2c-core +kmod-regmap-i2c
KCONFIG:= CONFIG_IIO_ST_ACCEL_I2C_3AXIS
FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko
AUTOLOAD:=$(call AutoLoad,56,st_sensors_i2c)
FILES:= \
$(LINUX_DIR)/drivers/iio/accel/st_accel_i2c.ko \
$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko
AUTOLOAD:=$(call AutoLoad,56,st_accel_i2c)
endef
define KernelPackage/iio-st_sensors-i2c/description
define KernelPackage/iio-st_accel-i2c/description
This package adds support for STMicroelectronics I2C based accelerometers
endef
$(eval $(call KernelPackage,iio-st_sensors-i2c))
$(eval $(call KernelPackage,iio-st_accel-i2c))
define KernelPackage/iio-st_accel-spi
SUBMENU:=$(IIO_MENU)
TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI)
DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi
KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS
FILES:= \
$(LINUX_DIR)/drivers/iio/accel/st_accel_spi.ko \
$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko
AUTOLOAD:=$(call AutoLoad,56,st_accel_spi)
endef
define KernelPackage/iio-st_accel-spi/description
This package adds support for STMicroelectronics SPI based accelerometers
endef
$(eval $(call KernelPackage,iio-st_accel-spi))
define KernelPackage/iio-lsm6dsx
SUBMENU:=$(IIO_MENU)
DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf +kmod-regmap-core
TITLE:=ST LSM6DSx driver for IMU MEMS sensors
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx)
endef
define KernelPackage/iio-lsm6dsx/description
Support for the ST LSM6DSx and related IMU MEMS sensors.
endef
$(eval $(call KernelPackage,iio-lsm6dsx))
define KernelPackage/iio-lsm6dsx-i2c
SUBMENU:=$(IIO_MENU)
DEPENDS:=+kmod-iio-lsm6dsx +kmod-i2c-core +kmod-regmap-i2c
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (I2C)
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-i2c)
endef
define KernelPackage/iio-lsm6dsx-i2c/description
Support for the ST LSM6DSx and related IMU MEMS I2C sensors.
endef
$(eval $(call KernelPackage,iio-lsm6dsx-i2c))
define KernelPackage/iio-lsm6dsx-spi
SUBMENU:=$(IIO_MENU)
DEPENDS:=+kmod-iio-lsm6dsx +kmod-regmap-spi
TITLE:=ST LSM6DSx driver for IMU MEMS sensors (SPI)
KCONFIG:=CONFIG_IIO_ST_LSM6DSX
FILES:=$(LINUX_DIR)/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko
AUTOLOAD:=$(call AutoProbe,st_lsm6dsx-spi)
endef
define KernelPackage/iio-lsm6dsx-spi/description
Support for the ST LSM6DSx and related IMU MEMS SPI sensors.
endef
$(eval $(call KernelPackage,iio-lsm6dsx-spi))
define KernelPackage/iio-sps30
@ -360,22 +428,6 @@ endef
$(eval $(call KernelPackage,iio-sps30))
define KernelPackage/iio-st_sensors-spi
SUBMENU:=$(IIO_MENU)
TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI)
DEPENDS:=+kmod-iio-st_accel +kmod-regmap-spi
KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS
FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko
AUTOLOAD:=$(call AutoLoad,56,st_sensors_spi)
endef
define KernelPackage/iio-st_sensors-spi/description
This package adds support for STMicroelectronics SPI based accelerometers
endef
$(eval $(call KernelPackage,iio-st_sensors-spi))
define KernelPackage/iio-tsl4531
SUBMENU:=$(IIO_MENU)
DEPENDS:=+kmod-i2c-core +kmod-iio-core

View File

@ -295,6 +295,24 @@ endef
$(eval $(call KernelPackage,gpio-pcf857x))
define KernelPackage/gpio-it87
SUBMENU:=$(OTHER_MENU)
DEPENDS:=@GPIO_SUPPORT @TARGET_x86
TITLE:=GPIO support for IT87xx Super I/O chips
KCONFIG:=CONFIG_GPIO_IT87
FILES:=$(LINUX_DIR)/drivers/gpio/gpio-it87.ko
AUTOLOAD:=$(call AutoLoad,25,gpio-it87,1)
endef
define KernelPackage/gpio-it87/description
This driver is tested with ITE IT8728 and IT8732 Super I/O chips, and
supports the IT8761E, IT8613, IT8620E, and IT8628E Super I/O chips as
well.
endef
$(eval $(call KernelPackage,gpio-it87))
define KernelPackage/ppdev
SUBMENU:=$(OTHER_MENU)
TITLE:=Parallel port support

View File

@ -1,60 +0,0 @@
#
# Copyright (C) 2008-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libconfig
PKG_VERSION:=1.7.2
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://hyperrealm.github.io/libconfig/dist/
PKG_HASH:=7c3c7a9c73ff3302084386e96f903eb62ce06953bb1666235fac74363a16fad9
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=LGPL-2.1+
include $(INCLUDE_DIR)/package.mk
define Package/libconfig
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Configuration File Library
URL:=http://www.hyperrealm.com/libconfig/
ABI_VERSION:=11
endef
define Package/libconfig/description
Libconfig is a simple library for manipulating structured configuration
files. This file format is more compact and more readable than XML. And
unlike XML, it is type-aware, so it is not necessary to do string
parsing in application code.
Libconfig is very compact -- just 38K for the stripped C shared
library (less than one-fourth the size of the expat XML parser library)
and 66K for the stripped C++ shared library. This makes it well-suited
for memory-constrained systems like handheld devices.
endef
CONFIGURE_ARGS += \
--enable-shared \
--disable-static \
--disable-cxx
define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
endef
define Package/libconfig/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libconfig.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libconfig))

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
PKG_VERSION:=4.4.0-stable
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
@ -56,7 +56,7 @@ define Package/libwolfssl/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192
TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer
# --enable-stunnel needed for OpenSSL API compatibility bits
CONFIGURE_ARGS += \

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_UPSTREAM_VERSION:=2.81
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
@ -89,6 +89,7 @@ endef
define Package/dnsmasq/conffiles
/etc/config/dhcp
/etc/dnsmasq.conf
/etc/dnsmasq.d/
endef
define Package/dnsmasq-full/config

View File

@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
PKG_SOURCE_DATE:=2020-03-13
PKG_SOURCE_VERSION:=5e9c23c6f40ff26209ef22cfeeda4904a5918f3d
PKG_MIRROR_HASH:=3ede9616c5a9fbbf9db68eeb083efc605246ec53b7f4404b8dc63b5190646949
PKG_SOURCE_DATE:=2020-06-03
PKG_SOURCE_VERSION:=939c281c70ef82929ffcb3cb383fd6fdc40f341b
PKG_MIRROR_HASH:=4cd16ef955fe32ddb579ec79f3d8f636e7100ccecd95be1991e7e4d317090a54
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=ISC

View File

@ -11,9 +11,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
PKG_SOURCE_DATE:=2020-03-22
PKG_SOURCE_VERSION:=9f5a7c4f9b78cb2de8fe5dd7af55bf0221706402
PKG_MIRROR_HASH:=d62cae4b3d2f65c189f179c3dabf1c8c244c5de801439c483ea87dcf8e85b476
PKG_SOURCE_DATE:=2020-06-03
PKG_SOURCE_VERSION:=2faa20e5e9d107b97e393a4eb458370e80b4d720
PKG_MIRROR_HASH:=c5094a1751cbc610a91d21b7ddbec85c4f80d51dddb249fdcabb327ab1e2523f
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=GPL-2.0

View File

@ -1,69 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=exfat-utils
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_VERSION)?
PKG_HASH:=7d4e95c3042b58601a581dc02f55eb4a726a2fb8db2e74a9619dbf3083997e06
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
include $(INCLUDE_DIR)/package.mk
CONFIGURE_ARGS += \
--enable-shared \
--disable-static
define Package/exfat-utils/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
DEPENDS:=+libexfat
URL:=https://github.com/exfat-utils/exfat-utils
endef
define Package/exfat-mkfs
$(Package/exfat-utils/Default)
TITLE:=Utility for creating an exFAT File System
endef
define Package/exfat-fsck
$(Package/exfat-utils/Default)
TITLE:=Utility for checking/repairing an exFAT File System
endef
define Package/libexfat
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for exFAT File System tools
DEPENDS:=+libuuid
ABI_VERSION:=1
endef
define Package/libexfat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libexfat.so.* $(1)/usr/lib/
endef
define Package/exfat-mkfs/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.exfat $(1)/usr/sbin
endef
define Package/exfat-fsck/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.exfat $(1)/usr/sbin
endef
$(eval $(call BuildPackage,libexfat))
$(eval $(call BuildPackage,exfat-mkfs))
$(eval $(call BuildPackage,exfat-fsck))

View File

@ -1,98 +0,0 @@
#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=xfsprogs
PKG_CPE_ID:=cpe:/a:sgi:xfsprogs
PKG_RELEASE:=4
PKG_VERSION:=4.11.0
PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs
PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/xfsprogs/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Filesystem
DEPENDS:=+libuuid +libpthread +librt
URL:=http://oss.sgi.com/projects/xfs
endef
define Package/xfs-admin
$(call Package/xfsprogs/default)
TITLE:=Utilities for changing parameters of an XFS filesystems
endef
define Package/xfs-mkfs
$(call Package/xfsprogs/default)
TITLE:=Utility for creating XFS filesystems
endef
define Package/xfs-fsck
$(call Package/xfsprogs/default)
TITLE:=Utilities for checking and repairing XFS filesystems
endef
define Package/xfs-growfs
$(call Package/xfsprogs/default)
TITLE:=Utility for increasing the size of XFS filesystems
endef
CONFIGURE_ARGS += \
--enable-gettext=no \
--enable-lib64=no \
--enable-blkid=no
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_LARGEFILE64_SOURCE \
-D_FILE_OFFSET_BITS=64 \
-D_GNU_SOURCE
MAKE_FLAGS += \
DEBUG= Q= \
PCFLAGS="-Wall" \
PKG_PLATFORM=linux \
ENABLE_GETTEXT=no
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/libxfs crc32table.h CFLAGS="$(HOST_CFLAGS) -I$(PKG_BUILD_DIR)/include"
$(call Build/Compile/Default)
endef
define Package/xfs-admin/install
mkdir -p $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_admin $(1)/sbin
endef
define Package/xfs-mkfs/install
mkdir -p $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.xfs $(1)/usr/sbin
endef
define Package/xfs-fsck/install
mkdir -p $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/xfs_repair $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_db $(1)/usr/sbin
endef
define Package/xfs-growfs/install
mkdir -p $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xfs_growfs $(1)/usr/sbin
endef
$(eval $(call BuildPackage,xfs-admin))
$(eval $(call BuildPackage,xfs-mkfs))
$(eval $(call BuildPackage,xfs-fsck))
$(eval $(call BuildPackage,xfs-growfs))

View File

@ -1,14 +0,0 @@
--- a/libxfs/Makefile
+++ b/libxfs/Makefile
@@ -118,9 +118,9 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT)
# don't try linking xfs_repair with a debug libxfs.
DEBUG = -DNDEBUG
-LDIRT = gen_crc32table crc32table.h crc32selftest
+LDIRT = gen_crc32table crc32table.h
-default: crc32selftest ltdepend $(LTLIBRARY)
+default: ltdepend $(LTLIBRARY)
crc32table.h: gen_crc32table.c
@echo " [CC] gen_crc32table"

View File

@ -1,12 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -46,8 +46,7 @@ HDR_SUBDIRS = include libxfs
DLIB_SUBDIRS = libxlog libxcmd libhandle
LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
-TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \
- mdrestore repair rtcp m4 man doc debian
+TOOL_SUBDIRS = db fsck growfs io mkfs repair
ifneq ("$(PKG_PLATFORM)","darwin")
TOOL_SUBDIRS += fsr

View File

@ -1,12 +0,0 @@
--- a/libxfs/libxfs_priv.h
+++ b/libxfs/libxfs_priv.h
@@ -84,9 +84,6 @@ extern uint32_t crc32c_le(uint32_t crc,
/* for all the support code that uses progname in error messages */
extern char *progname;
-#undef ASSERT
-#define ASSERT(ex) assert(ex)
-
#ifndef EWRONGFS
#define EWRONGFS EINVAL
#endif

View File

@ -1,26 +0,0 @@
From 930f9aa8f08759fa739dd6e615ba8b3a1890008d Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Mon, 6 May 2019 13:56:13 -0700
Subject: [PATCH] db/malloc: Use posix_memalign instead of deprecated valloc
valloc is not available with uClibc-ng as well as being deprecated, which
causes compilation errors. aligned_alloc is not available before C11 so
used posix_memalign.'
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
db/malloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/db/malloc.c
+++ b/db/malloc.c
@@ -56,8 +56,7 @@ xmalloc(
{
void *ptr;
- ptr = valloc(size);
- if (ptr)
+ if(!posix_memalign(&ptr, sysconf(_SC_PAGESIZE), size))
return ptr;
badmalloc();
/* NOTREACHED */

View File

@ -1,48 +0,0 @@
From 8041435de7ed028a27ecca64302945ad455c69a6 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <darrick.wong@oracle.com>
Date: Mon, 5 Feb 2018 14:38:02 -0600
Subject: [PATCH] xfs_io: fix copy_file_range symbol name collision
glibc 2.27 has a copy_file_range wrapper, so we need to change our
internal function out of the way to avoid compiler warnings.
Reported-by: fredrik@crux.nu
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
io/copy_file_range.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -42,13 +42,18 @@ copy_range_help(void)
"));
}
+/*
+ * Issue a raw copy_file_range syscall; for our test program we don't want the
+ * glibc buffered copy fallback.
+ */
static loff_t
-copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len)
{
loff_t ret;
do {
- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0);
+ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst,
+ len, 0);
if (ret == -1) {
perror("copy_range");
return errno;
@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv)
copy_dst_truncate();
}
- ret = copy_file_range(fd, &src, &dst, len);
+ ret = copy_file_range_cmd(fd, &src, &dst, len);
close(fd);
return ret;
}

View File

@ -230,7 +230,6 @@ define Device/wd_mybooklive
DEVICE_VENDOR := Western Digital
DEVICE_MODEL := My Book Live Series (Single + Duo)
DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-basic
DEVICE_TYPE := nas
DEVICE_DTS := wd-mybooklive
SUPPORTED_DEVICES += mbl wd,mybooklive-duo
BLOCKSIZE := 1k

View File

@ -1,4 +1,5 @@
BOARDNAME := Devices which boot from SATA (NAS)
DEVICE_TYPE := nas
FEATURES += ext4 usb ramdisk squashfs rootfs-part boot-part
DEFAULT_PACKAGES += badblocks block-mount e2fsprogs kmod-hwmon-drivetemp \
kmod-dm kmod-md-mod partx-utils mkf2fs f2fsck

View File

@ -13,7 +13,7 @@ SUBTARGETS:=generic
KERNEL_PATCHVER:=4.14
DEVICE_TYPE:=developerboard
DEVICE_TYPE:=basic
define Target/Description
Synopsys DesignWare boards

View File

@ -14,7 +14,7 @@ SUBTARGETS:=generic
KERNEL_PATCHVER:=5.4
DEVICE_TYPE:=developerboard
DEVICE_TYPE:=basic
define Target/Description
Synopsys DesignWare boards

View File

@ -194,7 +194,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+MODULE_LICENSE("GPL");
--- /dev/null
+++ b/drivers/phy/phy-ar7200-usb.c
@@ -0,0 +1,135 @@
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
+ *
@ -265,7 +265,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
+ if (IS_ERR(priv->rst_phy)) {
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ return PTR_ERR(priv->rst_phy);
+ }
+

View File

@ -194,7 +194,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+MODULE_LICENSE("GPL");
--- /dev/null
+++ b/drivers/phy/phy-ar7200-usb.c
@@ -0,0 +1,135 @@
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
+ *
@ -265,7 +265,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
+ if (IS_ERR(priv->rst_phy)) {
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ return PTR_ERR(priv->rst_phy);
+ }
+

View File

@ -12,10 +12,11 @@
static int cfe_env;
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -62,6 +62,8 @@ void (*_dma_cache_wback_inv)(unsigned lo
@@ -62,6 +62,9 @@ void (*_dma_cache_wback_inv)(unsigned lo
void (*_dma_cache_wback)(unsigned long start, unsigned long size);
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
+EXPORT_SYMBOL(_dma_cache_wback_inv);
+EXPORT_SYMBOL(_dma_cache_inv);
+
#endif /* CONFIG_DMA_NONCOHERENT */

View File

@ -174,7 +174,7 @@
partition@20000 {
compatible = "brcm,wfi-split";
label = "wfi";
reg = <0x0020000 0x7a80000>;
reg = <0x0020000 0x7ac0000>;
};
};
};

View File

@ -187,7 +187,7 @@
partition@20000 {
compatible = "brcm,wfi-split";
label = "wfi";
reg = <0x0020000 0x7a80000>;
reg = <0x0020000 0x7ac0000>;
};
};
};

View File

@ -167,6 +167,18 @@
read-only;
};
partition@340000 {
label = "serial";
reg = <0x0340000 0x00a0000>;
read-only;
};
partition@3e0000 {
label = "protect";
reg = <0x03e0000 0x0140000>;
read-only;
};
partition@6920000 {
label = "bootflag1";
reg = <0x6920000 0x0140000>;

View File

@ -15,7 +15,8 @@ LZMA_TEXT_START = 0x81800000 # 32MB - 8MB
LOADER_MAKEOPTS= \
KDIR=$(KDIR) \
LOADADDR=$(KERNEL_LOADADDR) \
LOADER_ADDR=$(LOADER_ENTRY) \
KERNEL_ADDR=$(KERNEL_LOADADDR) \
RAMSIZE=$(RAMSIZE) \
LZMA_TEXT_START=$(LZMA_TEXT_START) \
CHIP_ID=$(CHIP_ID)
@ -96,31 +97,6 @@ define Image/FileSystemStrip
$(firstword $(subst +,$(space),$(subst root.,,$(notdir $(1)))))
endef
define Build/ad1018-jffs2-cferam
mv $@ $@.kernel
rm -rf $@-cferam
mkdir -p $@-cferam
# CFE RAM JFFS2 partition
cp $(KDIR)/bcm63xx-cfe/$(CFE_RAM_FILE) $@-cferam/$(CFE_RAM_JFFS2_NAME)
$(call Build/cfe-jffs2,$@-cferam)
mv $@ $@.cferam
# First block of CFE RAM 1 will be destroyed by MMAP
dd if=$@.cferam bs=$(BLOCKSIZE) count=1 > $@
dd if=$@.cferam >> $@
$(call Build/pad-to,896k)
# CFE RAM 2
dd if=$@.cferam >> $@
# Append kernel @ 4M
$(call Build/pad-to,4096k)
dd if=$@.kernel >> $@
rm -f $@.kernel
endef
define Build/cfe-bin
$(STAGING_DIR_HOST)/bin/imagetag -i $(IMAGE_KERNEL) -f $(IMAGE_ROOTFS) \
--output $@ --boardid $(CFE_BOARD_ID) --chipid $(CHIP_ID) \

View File

@ -19,7 +19,7 @@ endef
define Device/bcm63xx
FILESYSTEMS := squashfs jffs2-64k jffs2-128k
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma elf
IMAGES := cfe.bin
IMAGE/cfe.bin := cfe-bin --pad $$$$(shell expr $$$$(FLASH_MB) / 2)
@ -36,6 +36,11 @@ define Device/bcm63xx
CFE_EXTRAS = --block-size $$(BLOCK_SIZE) --image-offset $$(if $$(IMAGE_OFFSET),$$(IMAGE_OFFSET),$$(BLOCK_SIZE))
endef
define Device/bcm63xx-legacy
$(Device/bcm63xx)
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma-cfe
endef
define Device/bcm63xx_netgear
$(Device/bcm63xx)
DEVICE_VENDOR := NETGEAR
@ -76,7 +81,7 @@ endef
TARGET_DEVICES += brcm_bcm96328avng
define Device/brcm_bcm96338gw
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96338GW
CFE_BOARD_ID := 6338GW
@ -85,7 +90,7 @@ endef
TARGET_DEVICES += brcm_bcm96338gw
define Device/brcm_bcm96338w
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96338W
CFE_BOARD_ID := 6338W
@ -95,7 +100,7 @@ endef
TARGET_DEVICES += brcm_bcm96338w
define Device/brcm_bcm96345gw2
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96345GW2
IMAGES += cfe-bc221.bin
@ -106,7 +111,7 @@ endef
TARGET_DEVICES += brcm_bcm96345gw2
define Device/brcm_bcm96348gw
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96348GW
IMAGES += cfe-bc221.bin
@ -117,7 +122,7 @@ endef
TARGET_DEVICES += brcm_bcm96348gw
define Device/brcm_bcm96348gw-10
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96348GW-10
CFE_BOARD_ID := 96348GW-10
@ -127,7 +132,7 @@ endef
TARGET_DEVICES += brcm_bcm96348gw-10
define Device/brcm_bcm96348gw-11
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96348GW-11
CFE_BOARD_ID := 96348GW-11
@ -137,7 +142,7 @@ endef
TARGET_DEVICES += brcm_bcm96348gw-11
define Device/brcm_bcm96348r
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96348R
CFE_BOARD_ID := 96348R
@ -147,7 +152,7 @@ endef
TARGET_DEVICES += brcm_bcm96348r
define Device/brcm_bcm96358vw
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96358VW
CFE_BOARD_ID := 96358VW
@ -156,7 +161,7 @@ endef
TARGET_DEVICES += brcm_bcm96358vw
define Device/brcm_bcm96358vw2
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Generic
DEVICE_MODEL := 96358VW2
CFE_BOARD_ID := 96358VW2
@ -245,7 +250,7 @@ TARGET_DEVICES += adb_av4202n
### Alcatel ###
define Device/alcatel_rg100a
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Alcatel
DEVICE_MODEL := RG100A
CFE_BOARD_ID := 96358VW2
@ -257,7 +262,7 @@ TARGET_DEVICES += alcatel_rg100a
### Asmax ###
define Device/asmax_ar-1004g
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Asmax
DEVICE_MODEL := AR 1004g
CFE_BOARD_ID := 96348GW-10
@ -269,7 +274,7 @@ TARGET_DEVICES += asmax_ar-1004g
### Belkin ###
define Device/belkin_f5d7633
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Belkin
DEVICE_MODEL := F5D7633
CFE_BOARD_ID := 96348GW-10
@ -328,7 +333,7 @@ TARGET_DEVICES += brcm_bcm963269bhr
### BT ###
define Device/bt_home-hub-2-a
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_MODEL := Home Hub 2.0
DEVICE_VARIANT := A
@ -340,7 +345,7 @@ endef
TARGET_DEVICES += bt_home-hub-2-a
define Device/bt_voyager-2110
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_MODEL := Voyager 2110
CFE_BOARD_ID := V2110
@ -352,7 +357,7 @@ endef
TARGET_DEVICES += bt_voyager-2110
define Device/bt_voyager-2500v-bb
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := BT
DEVICE_MODEL := Voyager 2500V
CFE_BOARD_ID := V2500V_BB
@ -401,7 +406,7 @@ endef
TARGET_DEVICES += comtrend_ar-5387un
define Device/comtrend_ct-536plus
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Comtrend
DEVICE_MODEL := CT-536+
DEVICE_ALT0_VENDOR := Comtrend
@ -414,7 +419,7 @@ endef
TARGET_DEVICES += comtrend_ct-536plus
define Device/comtrend_ct-5365
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Comtrend
DEVICE_MODEL := CT-5365
CFE_BOARD_ID := 96348A-122
@ -425,7 +430,7 @@ endef
TARGET_DEVICES += comtrend_ct-5365
define Device/comtrend_ct-6373
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Comtrend
DEVICE_MODEL := CT-6373
CFE_BOARD_ID := CT6373-1
@ -483,7 +488,7 @@ TARGET_DEVICES += comtrend_wap-5813n
### D-Link ###
define Device/d-link_dsl-2640b-b
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DSL-2640B
DEVICE_VARIANT := B2
@ -495,7 +500,7 @@ endef
TARGET_DEVICES += d-link_dsl-2640b-b
define Device/d-link_dsl-2640u
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DSL-2640U
DEVICE_VARIANT := C1
@ -509,7 +514,7 @@ endef
TARGET_DEVICES += d-link_dsl-2640u
define Device/d-link_dsl-2650u
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DSL-2650U
CFE_BOARD_ID := 96358VW2
@ -519,7 +524,7 @@ endef
TARGET_DEVICES += d-link_dsl-2650u
define Device/d-link_dsl-274xb-c2
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DSL-2740B
DEVICE_VARIANT := C2
@ -534,7 +539,7 @@ endef
TARGET_DEVICES += d-link_dsl-274xb-c2
define Device/d-link_dsl-274xb-c3
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DSL-2740B
DEVICE_VARIANT := C3
@ -582,7 +587,7 @@ endef
TARGET_DEVICES += d-link_dsl-275xb-d1
define Device/d-link_dva-g3810bn-tl
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DVA-G3810BN/TL
CFE_BOARD_ID := 96358VW
@ -593,7 +598,7 @@ TARGET_DEVICES += d-link_dva-g3810bn-tl
### Davolink ###
define Device/davolink_dv-201amr
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Davolink
DEVICE_MODEL := DV-201AMR
IMAGES := cfe-old.bin
@ -606,7 +611,7 @@ TARGET_DEVICES += davolink_dv-201amr
### Dynalink ###
define Device/dynalink_rta770bw
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Dynalink
DEVICE_MODEL := RTA770BW
DEVICE_ALT0_VENDOR := Siemens
@ -621,7 +626,7 @@ endef
TARGET_DEVICES += dynalink_rta770bw
define Device/dynalink_rta770w
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Dynalink
DEVICE_MODEL := RTA770W
IMAGES =
@ -634,7 +639,7 @@ endef
TARGET_DEVICES += dynalink_rta770w
define Device/dynalink_rta1025w
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Dynalink
DEVICE_MODEL := RTA1025W
CFE_BOARD_ID := RTA1025W_16
@ -646,7 +651,7 @@ endef
TARGET_DEVICES += dynalink_rta1025w
define Device/dynalink_rta1320
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Dynalink
DEVICE_MODEL := RTA1320
CFE_BOARD_ID := RTA1320_16M
@ -658,7 +663,7 @@ TARGET_DEVICES += dynalink_rta1320
### Huawei ###
define Device/huawei_echolife-hg520v
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Huawei
DEVICE_MODEL := EchoLife HG520v
CFE_BOARD_ID := HW6358GW_B
@ -671,7 +676,7 @@ endef
TARGET_DEVICES += huawei_echolife-hg520v
define Device/huawei_echolife-hg553
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Huawei
DEVICE_MODEL := EchoLife HG553
CFE_BOARD_ID := HW553
@ -683,7 +688,7 @@ endef
TARGET_DEVICES += huawei_echolife-hg553
define Device/huawei_echolife-hg556a-a
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Huawei
DEVICE_MODEL := EchoLife HG556a
DEVICE_VARIANT := A
@ -697,7 +702,7 @@ endef
TARGET_DEVICES += huawei_echolife-hg556a-a
define Device/huawei_echolife-hg556a-b
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Huawei
DEVICE_MODEL := EchoLife HG556a
DEVICE_VARIANT := B
@ -711,7 +716,7 @@ endef
TARGET_DEVICES += huawei_echolife-hg556a-b
define Device/huawei_echolife-hg556a-c
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Huawei
DEVICE_MODEL := EchoLife HG556a
DEVICE_VARIANT := C
@ -787,7 +792,7 @@ endef
TARGET_DEVICES += netgear_cvg834g
define Device/netgear_dg834gt-pn
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := DG834GT
DEVICE_ALT0_VENDOR := NETGEAR
@ -800,7 +805,7 @@ endef
TARGET_DEVICES += netgear_dg834gt-pn
define Device/netgear_dg834g-v4
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := DG834G
DEVICE_VARIANT := v4
@ -881,7 +886,7 @@ TARGET_DEVICES += observa_vh4032n
### Pirelli ###
define Device/pirelli_a226g
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Pirelli
DEVICE_MODEL := A226G
CFE_BOARD_ID := DWV-S0
@ -892,7 +897,7 @@ endef
TARGET_DEVICES += pirelli_a226g
define Device/pirelli_a226m
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Pirelli
DEVICE_MODEL := A226M
CFE_BOARD_ID := DWV-S0
@ -903,7 +908,7 @@ endef
TARGET_DEVICES += pirelli_a226m
define Device/pirelli_a226m-fwb
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Pirelli
DEVICE_MODEL := A226M-FWB
CFE_BOARD_ID := DWV-S0
@ -915,7 +920,7 @@ endef
TARGET_DEVICES += pirelli_a226m-fwb
define Device/pirelli_agpf-s0
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Pirelli
DEVICE_MODEL := Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
CFE_BOARD_ID := AGPF-S0
@ -928,7 +933,7 @@ TARGET_DEVICES += pirelli_agpf-s0
### Sagem ###
define Device/sagem_fast-2404
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Sagemcom
DEVICE_MODEL := F@st 2404
CFE_BOARD_ID := F@ST2404
@ -949,7 +954,7 @@ endef
TARGET_DEVICES += sagem_fast-2504n
define Device/sagem_fast-2604
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Sagemcom
DEVICE_MODEL := F@st 2604
CFE_BOARD_ID := F@ST2604
@ -996,7 +1001,7 @@ TARGET_DEVICES += sercomm_ad1018-nor
### SFR ###
define Device/sfr_neufbox-4-sercomm-r0
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := SFR
DEVICE_MODEL := Neufbox 4
DEVICE_VARIANT := Sercomm
@ -1008,7 +1013,7 @@ endef
TARGET_DEVICES += sfr_neufbox-4-sercomm-r0
define Device/sfr_neufbox-4-foxconn-r1
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := SFR
DEVICE_MODEL := Neufbox 4
DEVICE_VARIANT := Foxconn
@ -1045,7 +1050,7 @@ TARGET_DEVICES += sky_sr102
### T-Com ###
define Device/t-com_speedport-w-303v
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := T-Com
DEVICE_MODEL := Speedport W 303V
IMAGES := factory.bin sysupgrade.bin
@ -1058,7 +1063,7 @@ endef
TARGET_DEVICES += t-com_speedport-w-303v
define Device/t-com_speedport-w-500v
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := T-Com
DEVICE_MODEL := Speedport W 500V
CFE_BOARD_ID := 96348GW
@ -1070,7 +1075,7 @@ TARGET_DEVICES += t-com_speedport-w-500v
### Tecom ###
define Device/tecom_gw6000
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Tecom
DEVICE_MODEL := GW6000
CFE_BOARD_ID := 96348GW
@ -1081,7 +1086,7 @@ endef
TARGET_DEVICES += tecom_gw6000
define Device/tecom_gw6200
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Tecom
DEVICE_MODEL := GW6200
CFE_BOARD_ID := 96348GW
@ -1094,7 +1099,7 @@ TARGET_DEVICES += tecom_gw6200
### Telsey ###
define Device/telsey_cpva502plus
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Telsey
DEVICE_MODEL := CPVA502+
CFE_BOARD_ID := CPVA502+
@ -1106,7 +1111,7 @@ endef
TARGET_DEVICES += telsey_cpva502plus
define Device/telsey_cpva642
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Telsey
DEVICE_MODEL := CPVA642-type (CPA-ZNTE60T)
CFE_BOARD_ID := CPVA642
@ -1118,7 +1123,7 @@ endef
TARGET_DEVICES += telsey_cpva642
define Device/telsey_magic
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := Alice
DEVICE_MODEL := W-Gate
DEVICE_ALT0_VENDOR := Telsey
@ -1133,7 +1138,7 @@ TARGET_DEVICES += telsey_magic
### TP-Link ###
define Device/tp-link_td-w8900gb
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := TD-W8900GB
CFE_BOARD_ID := 96348GW-11
@ -1147,7 +1152,7 @@ TARGET_DEVICES += tp-link_td-w8900gb
### USRobotics ###
define Device/usrobotics_usr9108
$(Device/bcm63xx)
$(Device/bcm63xx-legacy)
DEVICE_VENDOR := USRobotics
DEVICE_MODEL := USR9108
CFE_BOARD_ID := 96348GW-A

View File

@ -39,7 +39,7 @@ endef
define Device/sercomm-nand
$(Device/bcm63xx-nand)
IMAGES += factory.img
IMAGES = factory.img sysupgrade.bin
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | cfe-sercomm-part | gzip | cfe-sercomm-load | cfe-sercomm-crypto
SERCOM_PID :=
SERCOMM_VERSION :=
@ -125,7 +125,6 @@ TARGET_DEVICES += netgear_dgnd3700-v2
### Sercomm ###
define Device/sercomm_ad1018
$(Device/sercomm-nand)
IMAGE/cfe.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | ad1018-jffs2-cferam | append-ubi | cfe-wfi-tag
DEVICE_VENDOR := Sercomm
DEVICE_MODEL := AD1018
CHIP_ID := 6328

View File

@ -17,7 +17,8 @@
# by the Free Software Foundation.
#
LOADADDR :=
LOADER_ADDR :=
KERNEL_ADDR :=
LZMA_TEXT_START := 0x80a00000
LOADER_DATA :=
@ -49,7 +50,7 @@ OBJECTS := head.o loader.o cache.o board.o printf.o LzmaDecode.o
ifneq ($(strip $(LOADER_DATA)),)
OBJECTS += data.o
CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(LOADADDR)
CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(KERNEL_ADDR)
endif
@ -79,7 +80,7 @@ loader2.o: loader.bin
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
loader.elf: loader2.o
$(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $<
$(LD) -e startup -T loader2.lds -Ttext $(LOADER_ADDR) -o $@ $<
mrproper: clean

View File

@ -171,7 +171,6 @@ define Device/dlink_dns-313
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DNS-313 1-Bay Network Storage Enclosure
DEVICE_DTS := gemini-dlink-dns-313
DEVICE_TYPE := nas
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES)
BLOCKSIZE := 1k
FILESYSTEMS := ext4
@ -204,7 +203,6 @@ define Device/raidsonic_ib-4220-b
DEVICE_VENDOR := Raidsonic
DEVICE_MODEL := NAS IB-4220-B
DEVICE_DTS := gemini-nas4220b
DEVICE_TYPE := nas
endef
TARGET_DEVICES += raidsonic_ib-4220-b

View File

@ -0,0 +1,149 @@
From 5c74c54ce6fff719999ff48f128cf4150ee4ff59 Mon Sep 17 00:00:00 2001
From: Iwan R Timmer <irtimmer@gmail.com>
Date: Thu, 7 Nov 2019 22:11:13 +0100
Subject: [PATCH] net: dsa: mv88e6xxx: Split monitor port configuration
Separate the configuration of the egress and ingress monitor port.
This allows the port mirror functionality to do ingress and egress
port mirroring to separate ports.
Signed-off-by: Iwan R Timmer <irtimmer@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/dsa/mv88e6xxx/chip.c | 9 ++++++-
drivers/net/dsa/mv88e6xxx/chip.h | 9 ++++++-
drivers/net/dsa/mv88e6xxx/global1.c | 42 ++++++++++++++++++++---------
drivers/net/dsa/mv88e6xxx/global1.h | 8 ++++--
4 files changed, 52 insertions(+), 16 deletions(-)
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2378,7 +2378,14 @@ static int mv88e6xxx_setup_upstream_port
if (chip->info->ops->set_egress_port) {
err = chip->info->ops->set_egress_port(chip,
- upstream_port);
+ MV88E6XXX_EGRESS_DIR_INGRESS,
+ upstream_port);
+ if (err)
+ return err;
+
+ err = chip->info->ops->set_egress_port(chip,
+ MV88E6XXX_EGRESS_DIR_EGRESS,
+ upstream_port);
if (err)
return err;
}
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -33,6 +33,11 @@ enum mv88e6xxx_egress_mode {
MV88E6XXX_EGRESS_MODE_ETHERTYPE,
};
+enum mv88e6xxx_egress_direction {
+ MV88E6XXX_EGRESS_DIR_INGRESS,
+ MV88E6XXX_EGRESS_DIR_EGRESS,
+};
+
enum mv88e6xxx_frame_mode {
MV88E6XXX_FRAME_MODE_NORMAL,
MV88E6XXX_FRAME_MODE_DSA,
@@ -464,7 +469,9 @@ struct mv88e6xxx_ops {
int (*stats_get_stats)(struct mv88e6xxx_chip *chip, int port,
uint64_t *data);
int (*set_cpu_port)(struct mv88e6xxx_chip *chip, int port);
- int (*set_egress_port)(struct mv88e6xxx_chip *chip, int port);
+ int (*set_egress_port)(struct mv88e6xxx_chip *chip,
+ enum mv88e6xxx_egress_direction direction,
+ int port);
#define MV88E6XXX_CASCADE_PORT_NONE 0xe
#define MV88E6XXX_CASCADE_PORT_MULTIPLE 0xf
--- a/drivers/net/dsa/mv88e6xxx/global1.c
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
@@ -263,7 +263,9 @@ int mv88e6250_g1_ieee_pri_map(struct mv8
/* Offset 0x1a: Monitor Control */
/* Offset 0x1a: Monitor & MGMT Control on some devices */
-int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port)
+int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip,
+ enum mv88e6xxx_egress_direction direction,
+ int port)
{
u16 reg;
int err;
@@ -272,11 +274,20 @@ int mv88e6095_g1_set_egress_port(struct
if (err)
return err;
- reg &= ~(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK |
- MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
-
- reg |= port << __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK) |
- port << __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
+ switch (direction) {
+ case MV88E6XXX_EGRESS_DIR_INGRESS:
+ reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
+ reg |= port <<
+ __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK);
+ break;
+ case MV88E6XXX_EGRESS_DIR_EGRESS:
+ reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
+ reg |= port <<
+ __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
+ break;
+ default:
+ return -EINVAL;
+ }
return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg);
}
@@ -310,17 +321,24 @@ static int mv88e6390_g1_monitor_write(st
return mv88e6xxx_g1_write(chip, MV88E6390_G1_MONITOR_MGMT_CTL, reg);
}
-int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port)
+int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip,
+ enum mv88e6xxx_egress_direction direction,
+ int port)
{
u16 ptr;
int err;
- ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST;
- err = mv88e6390_g1_monitor_write(chip, ptr, port);
- if (err)
- return err;
+ switch (direction) {
+ case MV88E6XXX_EGRESS_DIR_INGRESS:
+ ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST;
+ break;
+ case MV88E6XXX_EGRESS_DIR_EGRESS:
+ ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST;
+ break;
+ default:
+ return -EINVAL;
+ }
- ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST;
err = mv88e6390_g1_monitor_write(chip, ptr, port);
if (err)
return err;
--- a/drivers/net/dsa/mv88e6xxx/global1.h
+++ b/drivers/net/dsa/mv88e6xxx/global1.h
@@ -288,8 +288,12 @@ int mv88e6095_g1_stats_set_histogram(str
int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip);
void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val);
int mv88e6xxx_g1_stats_clear(struct mv88e6xxx_chip *chip);
-int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port);
-int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port);
+int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip,
+ enum mv88e6xxx_egress_direction direction,
+ int port);
+int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip,
+ enum mv88e6xxx_egress_direction direction,
+ int port);
int mv88e6095_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port);
int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port);
int mv88e6390_g1_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);

View File

@ -0,0 +1,266 @@
From f0942e00a1abb6404ca4302c66497fc623676c11 Mon Sep 17 00:00:00 2001
From: Iwan R Timmer <irtimmer@gmail.com>
Date: Thu, 7 Nov 2019 22:11:14 +0100
Subject: [PATCH] net: dsa: mv88e6xxx: Add support for port mirroring
Add support for configuring port mirroring through the cls_matchall
classifier. We do a full ingress and/or egress capture towards a
capture port. It allows setting a different capture port for ingress
and egress traffic.
It keeps track of the mirrored ports and the destination ports to
prevent changes to the capture port while other ports are being
mirrored.
Signed-off-by: Iwan R Timmer <irtimmer@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/dsa/mv88e6xxx/chip.c | 76 +++++++++++++++++++++++++++++
drivers/net/dsa/mv88e6xxx/chip.h | 6 +++
drivers/net/dsa/mv88e6xxx/global1.c | 18 +++++--
drivers/net/dsa/mv88e6xxx/port.c | 37 ++++++++++++++
drivers/net/dsa/mv88e6xxx/port.h | 3 ++
5 files changed, 136 insertions(+), 4 deletions(-)
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4921,6 +4921,80 @@ static int mv88e6xxx_port_mdb_del(struct
return err;
}
+static int mv88e6xxx_port_mirror_add(struct dsa_switch *ds, int port,
+ struct dsa_mall_mirror_tc_entry *mirror,
+ bool ingress)
+{
+ enum mv88e6xxx_egress_direction direction = ingress ?
+ MV88E6XXX_EGRESS_DIR_INGRESS :
+ MV88E6XXX_EGRESS_DIR_EGRESS;
+ struct mv88e6xxx_chip *chip = ds->priv;
+ bool other_mirrors = false;
+ int i;
+ int err;
+
+ if (!chip->info->ops->set_egress_port)
+ return -EOPNOTSUPP;
+
+ mutex_lock(&chip->reg_lock);
+ if ((ingress ? chip->ingress_dest_port : chip->egress_dest_port) !=
+ mirror->to_local_port) {
+ for (i = 0; i < mv88e6xxx_num_ports(chip); i++)
+ other_mirrors |= ingress ?
+ chip->ports[i].mirror_ingress :
+ chip->ports[i].mirror_egress;
+
+ /* Can't change egress port when other mirror is active */
+ if (other_mirrors) {
+ err = -EBUSY;
+ goto out;
+ }
+
+ err = chip->info->ops->set_egress_port(chip,
+ direction,
+ mirror->to_local_port);
+ if (err)
+ goto out;
+ }
+
+ err = mv88e6xxx_port_set_mirror(chip, port, direction, true);
+out:
+ mutex_unlock(&chip->reg_lock);
+
+ return err;
+}
+
+static void mv88e6xxx_port_mirror_del(struct dsa_switch *ds, int port,
+ struct dsa_mall_mirror_tc_entry *mirror)
+{
+ enum mv88e6xxx_egress_direction direction = mirror->ingress ?
+ MV88E6XXX_EGRESS_DIR_INGRESS :
+ MV88E6XXX_EGRESS_DIR_EGRESS;
+ struct mv88e6xxx_chip *chip = ds->priv;
+ bool other_mirrors = false;
+ int i;
+
+ mutex_lock(&chip->reg_lock);
+ if (mv88e6xxx_port_set_mirror(chip, port, direction, false))
+ dev_err(ds->dev, "p%d: failed to disable mirroring\n", port);
+
+ for (i = 0; i < mv88e6xxx_num_ports(chip); i++)
+ other_mirrors |= mirror->ingress ?
+ chip->ports[i].mirror_ingress :
+ chip->ports[i].mirror_egress;
+
+ /* Reset egress port when no other mirror is active */
+ if (!other_mirrors) {
+ if (chip->info->ops->set_egress_port(chip,
+ direction,
+ dsa_upstream_port(ds,
+ port)));
+ dev_err(ds->dev, "failed to set egress port\n");
+ }
+
+ mutex_unlock(&chip->reg_lock);
+}
+
static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
bool unicast, bool multicast)
{
@@ -4975,6 +5049,8 @@ static const struct dsa_switch_ops mv88e
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
.port_mdb_add = mv88e6xxx_port_mdb_add,
.port_mdb_del = mv88e6xxx_port_mdb_del,
+ .port_mirror_add = mv88e6xxx_port_mirror_add,
+ .port_mirror_del = mv88e6xxx_port_mirror_del,
.crosschip_bridge_join = mv88e6xxx_crosschip_bridge_join,
.crosschip_bridge_leave = mv88e6xxx_crosschip_bridge_leave,
.port_hwtstamp_set = mv88e6xxx_port_hwtstamp_set,
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -232,6 +232,8 @@ struct mv88e6xxx_port {
u64 vtu_member_violation;
u64 vtu_miss_violation;
u8 cmode;
+ bool mirror_ingress;
+ bool mirror_egress;
unsigned int serdes_irq;
};
@@ -315,6 +317,10 @@ struct mv88e6xxx_chip {
u16 evcap_config;
u16 enable_count;
+ /* Current ingress and egress monitor ports */
+ int egress_dest_port;
+ int ingress_dest_port;
+
/* Per-port timestamping resources. */
struct mv88e6xxx_port_hwtstamp port_hwtstamp[DSA_MAX_PORTS];
--- a/drivers/net/dsa/mv88e6xxx/global1.c
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
@@ -267,6 +267,7 @@ int mv88e6095_g1_set_egress_port(struct
enum mv88e6xxx_egress_direction direction,
int port)
{
+ int *dest_port_chip;
u16 reg;
int err;
@@ -276,11 +277,13 @@ int mv88e6095_g1_set_egress_port(struct
switch (direction) {
case MV88E6XXX_EGRESS_DIR_INGRESS:
+ dest_port_chip = &chip->ingress_dest_port;
reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
reg |= port <<
__bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK);
break;
case MV88E6XXX_EGRESS_DIR_EGRESS:
+ dest_port_chip = &chip->egress_dest_port;
reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
reg |= port <<
__bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
@@ -289,7 +292,11 @@ int mv88e6095_g1_set_egress_port(struct
return -EINVAL;
}
- return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg);
+ err = mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg);
+ if (!err)
+ *dest_port_chip = port;
+
+ return err;
}
/* Older generations also call this the ARP destination. It has been
@@ -325,14 +332,17 @@ int mv88e6390_g1_set_egress_port(struct
enum mv88e6xxx_egress_direction direction,
int port)
{
+ int *dest_port_chip;
u16 ptr;
int err;
switch (direction) {
case MV88E6XXX_EGRESS_DIR_INGRESS:
+ dest_port_chip = &chip->ingress_dest_port;
ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_INGRESS_DEST;
break;
case MV88E6XXX_EGRESS_DIR_EGRESS:
+ dest_port_chip = &chip->egress_dest_port;
ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST;
break;
default:
@@ -340,10 +350,10 @@ int mv88e6390_g1_set_egress_port(struct
}
err = mv88e6390_g1_monitor_write(chip, ptr, port);
- if (err)
- return err;
+ if (!err)
+ *dest_port_chip = port;
- return 0;
+ return err;
}
int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port)
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -1181,6 +1181,43 @@ int mv88e6095_port_set_upstream_port(str
return mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg);
}
+int mv88e6xxx_port_set_mirror(struct mv88e6xxx_chip *chip, int port,
+ enum mv88e6xxx_egress_direction direction,
+ bool mirror)
+{
+ bool *mirror_port;
+ u16 reg;
+ u16 bit;
+ int err;
+
+ err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_CTL2, &reg);
+ if (err)
+ return err;
+
+ switch (direction) {
+ case MV88E6XXX_EGRESS_DIR_INGRESS:
+ bit = MV88E6XXX_PORT_CTL2_INGRESS_MONITOR;
+ mirror_port = &chip->ports[port].mirror_ingress;
+ break;
+ case MV88E6XXX_EGRESS_DIR_EGRESS:
+ bit = MV88E6XXX_PORT_CTL2_EGRESS_MONITOR;
+ mirror_port = &chip->ports[port].mirror_egress;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ reg &= ~bit;
+ if (mirror)
+ reg |= bit;
+
+ err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL2, reg);
+ if (!err)
+ *mirror_port = mirror;
+
+ return err;
+}
+
int mv88e6xxx_port_set_8021q_mode(struct mv88e6xxx_chip *chip, int port,
u16 mode)
{
--- a/drivers/net/dsa/mv88e6xxx/port.h
+++ b/drivers/net/dsa/mv88e6xxx/port.h
@@ -368,6 +368,9 @@ int mv88e6352_port_link_state(struct mv8
int mv88e6xxx_port_set_map_da(struct mv88e6xxx_chip *chip, int port);
int mv88e6095_port_set_upstream_port(struct mv88e6xxx_chip *chip, int port,
int upstream_port);
+int mv88e6xxx_port_set_mirror(struct mv88e6xxx_chip *chip, int port,
+ enum mv88e6xxx_egress_direction direction,
+ bool mirror);
int mv88e6xxx_port_disable_learn_limit(struct mv88e6xxx_chip *chip, int port);
int mv88e6xxx_port_disable_pri_override(struct mv88e6xxx_chip *chip, int port);

View File

@ -0,0 +1,30 @@
From 4e4637b10374ede3cd33d7e1b389e6cea6343ea3 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Tue, 12 Nov 2019 13:05:23 +0000
Subject: [PATCH] net: dsa: mv88e6xxx: fix broken if statement because of a
stray semicolon
There is a stray semicolon in an if statement that will cause a dev_err
message to be printed unconditionally. Fix this by removing the stray
semicolon.
Addresses-Coverity: ("Stay semicolon")
Fixes: f0942e00a1ab ("net: dsa: mv88e6xxx: Add support for port mirroring")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4988,7 +4988,7 @@ static void mv88e6xxx_port_mirror_del(st
if (chip->info->ops->set_egress_port(chip,
direction,
dsa_upstream_port(ds,
- port)));
+ port)))
dev_err(ds->dev, "failed to set egress port\n");
}

View File

@ -0,0 +1,34 @@
From 3ee339eb28959629db33aaa2b8cde4c63c6289eb Mon Sep 17 00:00:00 2001
From: Andrew Lunn <andrew@lunn.ch>
Date: Thu, 27 Feb 2020 21:20:49 +0100
Subject: [PATCH] net: dsa: mv88e6xxx: Fix masking of egress port
Add missing ~ to the usage of the mask.
Reported-by: Kevin Benson <Kevin.Benson@zii.aero>
Reported-by: Chris Healy <Chris.Healy@zii.aero>
Fixes: 5c74c54ce6ff ("net: dsa: mv88e6xxx: Split monitor port configuration")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/dsa/mv88e6xxx/global1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/dsa/mv88e6xxx/global1.c
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
@@ -278,13 +278,13 @@ int mv88e6095_g1_set_egress_port(struct
switch (direction) {
case MV88E6XXX_EGRESS_DIR_INGRESS:
dest_port_chip = &chip->ingress_dest_port;
- reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
+ reg &= ~MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
reg |= port <<
__bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK);
break;
case MV88E6XXX_EGRESS_DIR_EGRESS:
dest_port_chip = &chip->egress_dest_port;
- reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
+ reg &= ~MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
reg |= port <<
__bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
break;

View File

@ -2380,7 +2380,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
# CONFIG_LEDS_TRIGGER_MTD is not set
CONFIG_LEDS_TRIGGER_NETDEV=y
# CONFIG_LEDS_TRIGGER_ONESHOT is not set

View File

@ -2513,7 +2513,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
# CONFIG_LEDS_TRIGGER_MTD is not set
CONFIG_LEDS_TRIGGER_NETDEV=y
# CONFIG_LEDS_TRIGGER_ONESHOT is not set

View File

@ -2684,7 +2684,6 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
# CONFIG_LEDS_TRIGGER_MTD is not set
CONFIG_LEDS_TRIGGER_NETDEV=y
# CONFIG_LEDS_TRIGGER_ONESHOT is not set

View File

@ -27,6 +27,7 @@
#define char_to_num(c) ((c >= '0' && c <= '9') ? (c - '0') : (0))
#define BCM_WFI_PARTS 3
#define BCM_WFI_SPLIT_PARTS 2
#define CFERAM_NAME "cferam"
#define CFERAM_NAME_LEN (sizeof(CFERAM_NAME) - 1)
@ -46,6 +47,11 @@
#define SERCOMM_MAGIC "eRcOmM.000"
#define SERCOMM_MAGIC_LEN (sizeof(SERCOMM_MAGIC) - 1)
#define PART_CFERAM "cferam"
#define PART_FIRMWARE "firmware"
#define PART_IMAGE_1 "img1"
#define PART_IMAGE_2 "img2"
static u32 jffs2_dirent_crc(struct jffs2_raw_dirent *node)
{
return crc32(0, node, sizeof(struct jffs2_raw_dirent) - 8);
@ -187,14 +193,14 @@ static int parse_bcm_wfi(struct mtd_info *master,
return -ENOMEM;
if (cfe_part) {
parts[cur_part].name = "cferam";
parts[cur_part].name = PART_CFERAM;
parts[cur_part].mask_flags = MTD_WRITEABLE;
parts[cur_part].offset = cfe_off;
parts[cur_part].size = kernel_off - cfe_off;
cur_part++;
}
parts[cur_part].name = "firmware";
parts[cur_part].name = PART_FIRMWARE;
parts[cur_part].offset = kernel_off;
parts[cur_part].size = size - (kernel_off - off);
cur_part++;
@ -273,6 +279,7 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *parts;
loff_t cfe_off;
loff_t img1_off = 0;
loff_t img2_off = master->size / 2;
@ -280,6 +287,7 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master,
loff_t img2_size = (master->size - img2_off);
loff_t active_off, inactive_off;
loff_t active_size, inactive_size;
const char *inactive_name;
uint8_t *buf;
char *cfe1_name = NULL, *cfe2_name = NULL;
size_t cfe1_size = 0, cfe2_size = 0;
@ -314,11 +322,13 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master,
active_size = img1_size;
inactive_off = img2_off;
inactive_size = img2_size;
inactive_name = PART_IMAGE_2;
} else {
active_off = img2_off;
active_size = img2_size;
inactive_off = img1_off;
inactive_size = img1_size;
inactive_name = PART_IMAGE_1;
}
ret = parse_bcm_wfi(master, pparts, buf, active_off, active_size, true);
@ -326,8 +336,6 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master,
kfree(buf);
if (ret > 0) {
struct mtd_partition *parts;
parts = kzalloc((ret + 1) * sizeof(*parts), GFP_KERNEL);
if (!parts)
return -ENOMEM;
@ -335,11 +343,23 @@ static int mtdsplit_parse_bcm_wfi_split(struct mtd_info *master,
memcpy(parts, *pparts, ret * sizeof(*parts));
kfree(*pparts);
parts[ret].name = "img2";
parts[ret].name = inactive_name;
parts[ret].offset = inactive_off;
parts[ret].size = inactive_size;
ret++;
*pparts = parts;
} else {
parts = kzalloc(BCM_WFI_SPLIT_PARTS * sizeof(*parts), GFP_KERNEL);
parts[0].name = PART_IMAGE_1;
parts[0].offset = img1_off;
parts[0].size = img1_size;
parts[1].name = PART_IMAGE_2;
parts[1].offset = img2_off;
parts[1].size = img2_size;
*pparts = parts;
}
@ -387,14 +407,15 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *parts;
struct mtd_info *mtd_bf1, *mtd_bf2;
struct erase_info bf_erase;
loff_t img1_off = 0;
loff_t img2_off = master->size / 2;
loff_t img1_size = (img2_off - img1_off);
loff_t img2_size = (master->size - img2_off);
loff_t active_off, inactive_off;
loff_t active_size, inactive_size;
const char *inactive_name;
uint8_t *buf;
int bf1, bf2;
int ret;
@ -420,6 +441,8 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master,
printk("sercomm: bootflag2=%d\n", bf2);
if (bf1 == bf2 && bf2 >= 0) {
struct erase_info bf_erase;
bf2 = -ENOENT;
bf_erase.addr = 0;
bf_erase.len = mtd_bf2->size;
@ -431,11 +454,13 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master,
active_size = img1_size;
inactive_off = img2_off;
inactive_size = img2_size;
inactive_name = PART_IMAGE_2;
} else {
active_off = img2_off;
active_size = img2_size;
inactive_off = img1_off;
inactive_size = img1_size;
inactive_name = PART_IMAGE_1;
}
ret = parse_bcm_wfi(master, pparts, buf, active_off, active_size, false);
@ -443,8 +468,6 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master,
kfree(buf);
if (ret > 0) {
struct mtd_partition *parts;
parts = kzalloc((ret + 1) * sizeof(*parts), GFP_KERNEL);
if (!parts)
return -ENOMEM;
@ -452,11 +475,23 @@ static int mtdsplit_parse_ser_wfi(struct mtd_info *master,
memcpy(parts, *pparts, ret * sizeof(*parts));
kfree(*pparts);
parts[ret].name = "img2";
parts[ret].name = inactive_name;
parts[ret].offset = inactive_off;
parts[ret].size = inactive_size;
ret++;
*pparts = parts;
} else {
parts = kzalloc(BCM_WFI_SPLIT_PARTS * sizeof(*parts), GFP_KERNEL);
parts[0].name = PART_IMAGE_1;
parts[0].offset = img1_off;
parts[0].size = img1_size;
parts[1].name = PART_IMAGE_2;
parts[1].offset = img2_off;
parts[1].size = img2_size;
*pparts = parts;
}

View File

@ -35,7 +35,7 @@ define Build/boot-overlay
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
--space-fixup --compr=zlib --squash-uids \
$(MKUBIFS_OPTS) -c 8124 \
$(MKUBIFS_OPTS) -c 16248 \
-o $@.boot.ubifs -d $@.boot
$(TAR) -C $@.boot -cf $@.boot.tar .

View File

@ -0,0 +1,66 @@
From 66d19a4f8d0fa7539f90cad64d793b4dac6f6e5d Mon Sep 17 00:00:00 2001
From: Robert Jones <rjones@gateworks.com>
Date: Fri, 14 Feb 2020 13:01:55 -0800
Subject: [PATCH] ARM: dts: imx: ventana: add fxos8700 on gateworks boards
Add fxos8700 iio imu entries for Gateworks ventana SBCs.
Signed-off-by: Robert Jones <rjones@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 5 +++++
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 5 +++++
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
index 1a9a9d9..60563ff 100644
--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
@@ -313,6 +313,11 @@
interrupts = <12 2>;
wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
};
+
+ accel@1e {
+ compatible = "nxp,fxos8700";
+ reg = <0x1e>;
+ };
};
&ldb {
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
index 54b2bea..8942bec 100644
--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
@@ -304,6 +304,11 @@
interrupts = <11 2>;
wakeup-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
};
+
+ accel@1e {
+ compatible = "nxp,fxos8700";
+ reg = <0x1e>;
+ };
};
&ldb {
diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
index 1b6c133..c40583d 100644
--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
@@ -361,6 +361,11 @@
interrupts = <12 2>;
wakeup-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
};
+
+ accel@1e {
+ compatible = "nxp,fxos8700";
+ reg = <0x1e>;
+ };
};
&ldb {
--
2.7.4

View File

@ -0,0 +1,59 @@
From d2cf2f91ba5b6d7696b1870e28017a3e1a7a1bb8 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Fri, 28 Feb 2020 11:46:07 -0800
Subject: [PATCH] ARM: dts: imx6qdl-gw5910: add CC1352 UART
The GW5910-C revision adds a TI CC1352 connected to IMX UART4
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
index be1af74..30fe47f 100644
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -220,6 +220,14 @@
status = "okay";
};
+/* cc1352 */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
/* Sterling-LWB Bluetooth */
&uart4 {
pinctrl-names = "default";
@@ -411,6 +419,23 @@
>;
};
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
+ MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
+ MX6QDL_PAD_EIM_D23__UART3_RTS_B 0x1b0b1
+ MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1
+ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x4001b0b1 /* DIO20 */
+ MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x4001b0b1 /* DIO14 */
+ MX6QDL_PAD_DISP0_DAT12__GPIO5_IO06 0x4001b0b1 /* DIO15 */
+ MX6QDL_PAD_DISP0_DAT14__GPIO5_IO08 0x1b0b1 /* TMS */
+ MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b1 /* TCK */
+ MX6QDL_PAD_DISP0_DAT16__GPIO5_IO10 0x1b0b1 /* TDO */
+ MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x1b0b1 /* TDI */
+ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x4001b0b1 /* RST# */
+ >;
+ };
+
pinctrl_uart4: uart4grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
--
2.7.4

View File

@ -0,0 +1,50 @@
From 957743b79b1ebb710f5498b61a212cebc302e685 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Wed, 29 Apr 2020 08:22:35 -0700
Subject: [PATCH 01/20] ARM: dts: imx6qdl-gw552x: add USB OTG support
The GW552x-B board revision adds USB OTG support.
Enable the device-tree node and configure the OTG_ID pin.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi
index dc646b7..bb35971 100644
--- a/arch/arm/boot/dts/imx6qdl-gw552x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw552x.dtsi
@@ -258,6 +258,14 @@
status = "okay";
};
+&usbotg {
+ vbus-supply = <&reg_5p0v>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotg>;
+ disable-over-current;
+ status = "okay";
+};
+
&wdog1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wdog>;
@@ -359,6 +367,12 @@
>;
};
+ pinctrl_usbotg: usbotggrp {
+ fsl,pins = <
+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x13059
+ >;
+ };
+
pinctrl_wdog: wdoggrp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT8__WDOG1_B 0x1b0b0
--
2.7.4

View File

@ -0,0 +1,81 @@
From 9e72702a3d9a967edac02d8e937bce2b68b77814 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Tue, 12 May 2020 13:59:37 -0700
Subject: [PATCH 05/20] ARM: dts: imx6qdl-gw560x: add lsm9ds1 iio imu/magn
support
Add one node for the accel/gyro i2c device and another for the separate
magnetometer device in the lsm9ds1.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi
index e8e36df..69ca70d 100644
--- a/arch/arm/boot/dts/imx6qdl-gw560x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw560x.dtsi
@@ -295,6 +295,15 @@
VDDIO-supply = <&reg_3p3v>;
};
+ magn@1c {
+ compatible = "st,lsm9ds1-magn";
+ reg = <0x1c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mag>;
+ interrupt-parent = <&gpio5>;
+ interrupts = <9 IRQ_TYPE_EDGE_RISING>;
+ };
+
tca8418: keypad@34 {
compatible = "ti,tca8418";
pinctrl-names = "default";
@@ -389,6 +398,16 @@
};
};
};
+
+ imu@6a {
+ compatible = "st,lsm9ds1-imu";
+ reg = <0x6a>;
+ st,drdy-int-pin = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_imu>;
+ interrupt-parent = <&gpio5>;
+ interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
+ };
};
&i2c3 {
@@ -609,6 +628,12 @@
>;
};
+ pinctrl_imu: imugrp {
+ fsl,pins = <
+ MX6QDL_PAD_DISP0_DAT12__GPIO5_IO06 0x1b0b0
+ >;
+ };
+
pinctrl_keypad: keypadgrp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT17__GPIO5_IO11 0x0001b0b0 /* KEYPAD_IRQ# */
@@ -616,6 +641,12 @@
>;
};
+ pinctrl_mag: maggrp {
+ fsl,pins = <
+ MX6QDL_PAD_DISP0_DAT15__GPIO5_IO09 0x1b0b0
+ >;
+ };
+
pinctrl_pcie: pciegrp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT10__GPIO4_IO31 0x1b0b0 /* PCI_RST# */
--
2.7.4

View File

@ -0,0 +1,74 @@
From c8756cbad816954be912ba32277ccd55fe7acc01 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Tue, 12 May 2020 13:59:56 -0700
Subject: [PATCH 06/20] ARM: dts: imx6qdl-gw5904: add lsm9ds1 iio imu/magn
support
Add one node for the accel/gyro i2c device and another for the separate
magnetometer device in the lsm9ds1.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
index 6d21cc6..76d6cf5 100644
--- a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
@@ -248,6 +248,15 @@
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
+ magn@1c {
+ compatible = "st,lsm9ds1-magn";
+ reg = <0x1c>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mag>;
+ interrupt-parent = <&gpio5>;
+ interrupts = <17 IRQ_TYPE_EDGE_RISING>;
+ };
+
ltc3676: pmic@3c {
compatible = "lltc,ltc3676";
reg = <0x3c>;
@@ -320,6 +329,16 @@
};
};
};
+
+ imu@6a {
+ compatible = "st,lsm9ds1-imu";
+ reg = <0x6a>;
+ st,drdy-int-pin = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_imu>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
+ };
};
&i2c3 {
@@ -501,6 +520,18 @@
>;
};
+ pinctrl_imu: imugrp {
+ fsl,pins = <
+ MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0
+ >;
+ };
+
+ pinctrl_mag: maggrp {
+ fsl,pins = <
+ MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x1b0b0
+ >;
+ };
+
pinctrl_pcie: pciegrp {
fsl,pins = <
MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 /* PCIE RST */
--
2.7.4

View File

@ -0,0 +1,87 @@
From d40edafe80569c5b4d8893c1cdd1060c54ef433c Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Tue, 12 May 2020 14:54:15 -0700
Subject: [PATCH 07/20] ARM: dts: imx6qdl-gw5910: add support for bcm4330-bt
The Sterling-LWB has a BCM4330 which has a UART based bluetooth
HCI. Add support for binding to the bcm_hci driver to take care
of handling the shutdown gpio and loading firmware.
Because the shutdown gpio is more of an enable than a regulator
go ahead and replace the regulator with a shutdown-gpio.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 32 ++++++++++++--------------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
index 30fe47f..b850f8f 100644
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -83,19 +83,6 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
-
- reg_bt: regulator-bt {
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_reg_bt>;
- compatible = "regulator-fixed";
- regulator-name = "bt";
- gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <100>;
- enable-active-high;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
};
@@ -231,9 +218,14 @@
/* Sterling-LWB Bluetooth */
&uart4 {
pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_uart4>;
+ pinctrl-0 = <&pinctrl_uart4>,<&pinctrl_bten>;
uart-has-rtscts;
status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4330-bt";
+ shutdown-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
};
/* GPS */
@@ -288,6 +280,12 @@
>;
};
+ pinctrl_bten: btengrp {
+ fsl,pins = <
+ MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b1
+ >;
+ };
+
pinctrl_ecspi3: escpi3grp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
@@ -393,12 +391,6 @@
>;
};
- pinctrl_reg_bt: regbtgrp {
- fsl,pins = <
- MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b1
- >;
- };
-
pinctrl_reg_wl: regwlgrp {
fsl,pins = <
MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x1b0b1
--
2.7.4

View File

@ -0,0 +1,38 @@
From 4792ff641cc8993606013d27d84cda59d8cc76c5 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Tue, 12 May 2020 15:02:34 -0700
Subject: [PATCH 08/20] ARM: dts: imx6qdl-gw5910: fix wlan regulator
Connect the wl_reg regulator to usdhc2 such that it can be enabled
and disabled as needed. There is no need for this to be always-on.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
arch/arm/boot/dts/imx6qdl-gw5910.dtsi | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
index b850f8f..0857de5 100644
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -81,7 +81,6 @@
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- regulator-always-on;
};
};
@@ -251,7 +250,7 @@
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
- vmmc-supply = <&reg_3p3v>;
+ vmmc-supply = <&reg_wl>;
non-removable;
bus-width = <4>;
status = "okay";
--
2.7.4

View File

@ -259,6 +259,7 @@ CONFIG_KPSS_XCC=y
CONFIG_KRAITCC=y
CONFIG_KRAIT_CLOCKS=y
CONFIG_KRAIT_L2_ACCESSORS=y
CONFIG_LEDS_TRIGGER_DISK=y
CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_LOCK_SPIN_ON_OWNER=y

View File

@ -273,6 +273,7 @@ CONFIG_KPSS_XCC=y
CONFIG_KRAITCC=y
CONFIG_KRAIT_CLOCKS=y
CONFIG_KRAIT_L2_ACCESSORS=y
CONFIG_LEDS_TRIGGER_DISK=y
CONFIG_LIBFDT=y
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_LOCK_SPIN_ON_OWNER=y

View File

@ -66,7 +66,6 @@ define Device/iom_ix2-200
DEVICE_MODEL := StorCenter ix2-200
DEVICE_DTS := kirkwood-iomega_ix2_200
DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-hwmon-lm63
DEVICE_TYPE:=nas
PAGESIZE := 512
SUBPAGESIZE := 256
BLOCKSIZE := 16k

View File

@ -60,11 +60,13 @@ CONFIG_CPU_HAS_PREFETCH=y
CONFIG_CPU_HAS_SYNC=y
# CONFIG_CPU_MICROMIPS is not set
CONFIG_CPU_MIPS32=y
# CONFIG_CPU_MIPS32_3_5_FEATURES is not set
CONFIG_CPU_MIPS32_R1=y
# CONFIG_CPU_MIPS32_R2 is not set
# CONFIG_CPU_MIPS32_R6 is not set
# CONFIG_CPU_MIPS64_R1 is not set
# CONFIG_CPU_MIPS64_R2 is not set
# CONFIG_CPU_MIPS32_R5_FEATURES is not set
# CONFIG_CPU_MIPS64_R6 is not set
CONFIG_CPU_MIPSR1=y
CONFIG_CPU_MIPSR2_IRQ_EI=y

View File

@ -11,7 +11,7 @@ BOARDNAME:=Marvell EBU Armada
FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part
SUBTARGETS:=cortexa9 cortexa53 cortexa72
KERNEL_PATCHVER:=4.19
KERNEL_PATCHVER:=5.4
KERNEL_TESTING_PATCHVER:=5.4
include $(INCLUDE_DIR)/target.mk

View File

@ -345,7 +345,6 @@ CONFIG_MVNETA=y
CONFIG_MVNETA_BM=y
CONFIG_MVNETA_BM_ENABLE=y
CONFIG_MVPP2=y
CONFIG_MVSW61XX_PHY=y
CONFIG_MV_XOR=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEON=y
@ -452,7 +451,6 @@ CONFIG_SPI_ORION=y
CONFIG_SRAM=y
CONFIG_SRAM_EXEC=y
CONFIG_SRCU=y
CONFIG_SWCONFIG=y
CONFIG_SWPHY=y
CONFIG_SWP_EMULATE=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y

View File

@ -348,7 +348,6 @@ CONFIG_MVNETA=y
CONFIG_MVNETA_BM=y
CONFIG_MVNETA_BM_ENABLE=y
# CONFIG_MVPP2 is not set
CONFIG_MVSW61XX_PHY=y
CONFIG_MV_XOR=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEON=y
@ -454,7 +453,6 @@ CONFIG_SPI_ORION=y
CONFIG_SRAM=y
CONFIG_SRAM_EXEC=y
CONFIG_SRCU=y
CONFIG_SWCONFIG=y
CONFIG_SWPHY=y
CONFIG_SWP_EMULATE=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y

View File

@ -16,19 +16,19 @@ linksys,caiman|\
linksys,cobra|\
linksys,rango|\
linksys,shelby)
ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "eth1"
ucidef_set_led_netdev "wan" "WAN" "pca963x:$boardname:white:wan" "wan"
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:$boardname:white:usb2" "usb1-port1"
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:$boardname:white:usb3_1" "usb2-port1" "usb3-port1"
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:$boardname:white:usb3_2" "usb3-port1"
;;
linksys,mamba)
ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "wan"
ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
;;
linksys,venom)
ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1"
ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "wan"
ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"

View File

@ -4,55 +4,86 @@
# Copyright (C) 2016 LEDE-Project.org
#
. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
mvebu_setup_interfaces()
{
local board="$1"
case "$board" in
cznic,turris-omnia)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3 lan4" "eth2"
;;
linksys,caiman|\
linksys,cobra|\
linksys,mamba|\
linksys,rango|\
linksys,shelby|\
linksys,venom)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
marvell,a385-db-ap)
ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
;;
marvell,axp-gp)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
;;
solidrun,clearfog-a1|\
solidrun,clearfog-pro-a1)
# eth0 is standalone ethernet
# eth1 is switch
# eth2 is SFP
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2"
;;
solidrun,clearfog-base-a1)
# eth0 is standalone ethernet
# eth1 is standalone ethernet
# eth2 is SFP
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
}
mvebu_setup_macs()
{
local board="$1"
local lan_mac=""
local wan_mac=""
local label_mac=""
case "$board" in
buffalo,ls421de)
lan_mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
;;
linksys,caiman|\
linksys,cobra|\
linksys,rango|\
linksys,shelby|\
linksys,venom)
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
wan_mac=$(macaddr_setbit_la $label_mac)
;;
linksys,mamba)
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
lan_mac=$label_mac
wan_mac=$label_mac
;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
board=$(board_name)
case "$board" in
cznic,turris-omnia)
ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4"
ucidef_set_interface_wan "eth2"
;;
linksys,caiman|\
linksys,cobra|\
linksys,mamba|\
linksys,rango|\
linksys,shelby|\
linksys,venom)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
;;
marvell,a385-db-ap)
ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
;;
marvell,axp-gp)
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
;;
solidrun,clearfog-a1|\
solidrun,clearfog-pro-a1)
# eth0 is standalone ethernet
# eth1 is switch
# eth2 is SFP
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
# switch port 5 is connected to eth1
ucidef_add_switch "switch0" \
"0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6"
;;
solidrun,clearfog-base-a1)
# eth0 is standalone ethernet
# eth1 is standalone ethernet
# eth2 is SFP
ucidef_set_interfaces_lan_wan "eth1" "eth0 eth2"
;;
*)
ucidef_set_interface_lan "eth0"
;;
esac
mvebu_setup_interfaces $board
mvebu_setup_macs $board
board_config_flush
exit 0

View File

@ -1,50 +0,0 @@
#
# Copyright (C) 2014-2015 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
preinit_set_mac_address() {
local mac
. /lib/functions.sh
case $(board_name) in
buffalo,ls421de)
mac=$(mtd_get_mac_ascii u-boot-env eth1addr)
ip link set dev eth0 address $mac 2>/dev/null
;;
linksys,caiman|linksys,cobra|linksys,rango|linksys,shelby|linksys,venom)
# rename interfaces back to the way they were with 4.4
case "$(readlink /sys/class/net/eth0)" in
*f1070000*)
ip link set eth0 name tmp0
ip link set eth1 name eth0
ip link set tmp0 name eth1
;;
esac
mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
mac_wan=$(macaddr_setbit_la "$mac")
ip link set dev eth0 address $mac 2>/dev/null
ip link set dev eth1 address $mac_wan 2>/dev/null
;;
linksys,mamba)
mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ip link set dev eth0 address $mac 2>/dev/null
ip link set dev eth1 address $mac 2>/dev/null
;;
marvell,a385-db-ap|solidrun,clearfog*a1)
# rename interfaces back to the way they were with 4.4
case "$(readlink /sys/class/net/eth0)" in
*f1070000*)
ip link set eth0 name tmp0
ip link set eth1 name eth0
ip link set eth2 name eth1
ip link set tmp0 name eth2
;;
esac
;;
esac
}
boot_hook_add preinit_main preinit_set_mac_address

View File

@ -53,7 +53,7 @@ TARGET_DEVICES += globalscale_mirabox
define Device/linksys
$(Device/NAND-128K)
DEVICE_VENDOR := Linksys
DEVICE_PACKAGES := kmod-mwlwifi swconfig wpad-basic
DEVICE_PACKAGES := kmod-mwlwifi wpad-basic
IMAGES += factory.img
KERNEL_SIZE := 6144k
endef
@ -223,7 +223,7 @@ define Device/solidrun_clearfog-pro-a1
DEVICE_MODEL := ClearFog Pro
KERNEL_INSTALL := 1
KERNEL := kernel-bin
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils swconfig
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils
IMAGES := sdcard.img.gz
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base

View File

@ -1,40 +0,0 @@
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -257,6 +257,16 @@
};
};
};
+
+ mvsw61xx {
+ compatible = "marvell,88e6172";
+ status = "okay";
+ reg = <0x10>;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ cpu-port-1 = <6>;
+ };
};
&pciec {
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -82,6 +82,18 @@
linux,default-trigger = "disk-activity";
};
};
+
+ mvsw61xx {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "marvell,88e6176";
+ status = "okay";
+ reg = <0x10>;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ cpu-port-1 = <6>;
+ };
};
&ahci0 {

View File

@ -1,21 +0,0 @@
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -88,6 +88,18 @@
};
};
+ mvsw61xx {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "marvell,88e6176";
+ status = "okay";
+ reg = <0x4>;
+ is-indirect;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-0 = <&rear_button_pins>;

View File

@ -1,30 +0,0 @@
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -171,6 +171,7 @@
status = "okay";
switch@0 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -161,6 +161,7 @@
status = "okay";
switch@4 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -413,6 +413,7 @@
status = "okay";
switch@0 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;

View File

@ -0,0 +1,13 @@
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 8480a16919a0..8cf3c9d5205b 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -299,7 +299,7 @@
port@4 {
reg = <4>;
- label = "internet";
+ label = "wan";
};
port@5 {

View File

@ -0,0 +1,27 @@
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index 827e82be2201..b6aecf4cc5eb 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -109,7 +109,7 @@
};
&eth2 {
- status = "okay";
+ status = "disabled";
phy-mode = "sgmii";
buffer-manager = <&bm>;
bm,pool-long = <2>;
@@ -191,10 +191,10 @@
label = "wan";
};
- port@5 {
- reg = <5>;
+ port@6 {
+ reg = <6>;
label = "cpu";
- ethernet = <&eth2>;
+ ethernet = <&eth0>;
fixed-link {
speed = <1000>;

View File

@ -1,40 +0,0 @@
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -210,6 +210,16 @@
compatible = "pwm-fan";
pwms = <&gpio0 24 4000>;
};
+
+ mvsw61xx {
+ compatible = "marvell,88e6172";
+ status = "okay";
+ reg = <0x10>;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ cpu-port-1 = <6>;
+ };
};
&pciec {
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -82,6 +82,18 @@
linux,default-trigger = "disk-activity";
};
};
+
+ mvsw61xx {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "marvell,88e6176";
+ status = "okay";
+ reg = <0x10>;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ cpu-port-1 = <6>;
+ };
};
&ahci0 {

View File

@ -1,21 +0,0 @@
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -30,6 +30,18 @@
};
};
+ mvsw61xx {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "marvell,88e6176";
+ status = "okay";
+ reg = <0x4>;
+ is-indirect;
+
+ mii-bus = <&mdio>;
+ cpu-port-0 = <5>;
+ };
+
gpio-keys {
compatible = "gpio-keys";
pinctrl-0 = <&rear_button_pins>;

View File

@ -1,30 +0,0 @@
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -171,6 +171,7 @@
status = "okay";
switch@0 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -103,6 +103,7 @@
status = "okay";
switch@4 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -366,6 +366,7 @@
status = "okay";
switch@0 {
+ status = "disabled";
compatible = "marvell,mv88e6085";
#address-cells = <1>;
#size-cells = <0>;

View File

@ -0,0 +1,13 @@
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 8480a16919a0..8cf3c9d5205b 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -299,7 +299,7 @@
port@4 {
reg = <4>;
- label = "internet";
+ label = "wan";
};
port@5 {

View File

@ -0,0 +1,27 @@
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index 827e82be2201..b6aecf4cc5eb 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -109,7 +109,7 @@
};
&eth2 {
- status = "okay";
+ status = "disabled";
phy-mode = "sgmii";
buffer-manager = <&bm>;
bm,pool-long = <2>;
@@ -191,10 +191,10 @@
label = "wan";
};
- port@5 {
- reg = <5>;
+ port@6 {
+ reg = <6>;
label = "cpu";
- ethernet = <&eth2>;
+ ethernet = <&eth0>;
fixed-link {
speed = <1000>;

View File

@ -0,0 +1,53 @@
From e928880bd8b26fd704231549456ae7da88cecda6 Mon Sep 17 00:00:00 2001
From: Tomasz Maciej Nowak <tmn505@gmail.com>
Date: Mon, 20 Apr 2020 14:35:34 +0200
Subject: [PATCH] arm64: dts: marvell: espressobin: remove COMPHY nodes
assignmet
This commit removes changes from upstream commits:
8e18c8e58da6 arm64: dts: marvell: armada-3720-espressobin: declare SATA
PHY property
bd3d25b07342 arm64: dts: marvell: armada-37xx: link USB hosts with their
PHYs
For most boards which have factory bootloader this caused that devices
connected to USB 3.0 and SATA port were not detected. For them to
function users would need to upgrade the bootloader to version with ARM
Trusted Firmware 2.1 or later. Unfortunately there is no official
bootloader image with updated ATF component, therefore drop these
properties from nodes. This change was also tested briefly with
bootloader with updated ATF and the ports functioned properly.
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -54,8 +54,6 @@
/* J6 */
&sata {
status = "okay";
- phys = <&comphy2 0>;
- phy-names = "sata-phy";
};
/* J1 */
@@ -121,11 +119,17 @@
/* J7 */
&usb3 {
status = "okay";
+
+ /delete-property/ phys;
+ /delete-property/ phy-names;
};
/* J8 */
&usb2 {
status = "okay";
+
+ /delete-property/ phys;
+ /delete-property/ phy-names;
};
&mdio {

View File

@ -1,6 +1,4 @@
CONFIG_64BIT=y
# CONFIG_ARCH_AGILEX is not set
# CONFIG_ARCH_BITMAIN is not set
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
@ -83,9 +81,7 @@ CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARM64=y
# CONFIG_ARM64_16K_PAGES is not set
CONFIG_ARM64_4K_PAGES=y
# CONFIG_ARM64_64K_PAGES is not set
CONFIG_ARM64_CNP=y
CONFIG_ARM64_CONT_SHIFT=4
CONFIG_ARM64_CRYPTO=y
@ -97,17 +93,12 @@ CONFIG_ARM64_ERRATUM_826319=y
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_HW_AFDBM=y
# CONFIG_ARM64_LSE_ATOMICS is not set
CONFIG_ARM64_MODULE_PLTS=y
CONFIG_ARM64_PAGE_SHIFT=12
CONFIG_ARM64_PAN=y
CONFIG_ARM64_PA_BITS=48
CONFIG_ARM64_PA_BITS_48=y
# CONFIG_ARM64_PMEM is not set
# CONFIG_ARM64_PSEUDO_NMI is not set
# CONFIG_ARM64_PTDUMP_DEBUGFS is not set
CONFIG_ARM64_PTR_AUTH=y
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
CONFIG_ARM64_SSBD=y
CONFIG_ARM64_SVE=y
CONFIG_ARM64_TAGGED_ADDR_ABI=y
@ -131,7 +122,6 @@ CONFIG_ARM_GIC_V3_ITS_PCI=y
CONFIG_ARM_PSCI_FW=y
CONFIG_ARM_SBSA_WATCHDOG=y
# CONFIG_ARM_SCMI_PROTOCOL is not set
# CONFIG_ARM_SP805_WATCHDOG is not set
CONFIG_ATA=y
# CONFIG_ATA_SFF is not set
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
@ -167,8 +157,6 @@ CONFIG_COMMON_CLK=y
CONFIG_COMMON_CLK_CS2000_CP=y
CONFIG_CONFIGFS_FS=y
CONFIG_CONTIG_ALLOC=y
# CONFIG_CPU_BIG_ENDIAN is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
@ -190,7 +178,6 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
CONFIG_CRYPTO_ANSI_CPRNG=y
# CONFIG_CRYPTO_CHACHA20_NEON is not set
CONFIG_CRYPTO_CRC32=y
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRCT10DIF=y
@ -209,7 +196,6 @@ CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_NHPOLY1305_NEON is not set
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_RNG=y
@ -247,9 +233,7 @@ CONFIG_EEPROM_AT24=y
CONFIG_EFI_EARLYCON=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
# CONFIG_F2FS_CHECK_FS is not set
CONFIG_F2FS_FS=y
# CONFIG_F2FS_FS_SECURITY is not set
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_STAT_FS=y
CONFIG_FANOTIFY=y
@ -261,7 +245,6 @@ CONFIG_FONT_AUTOSELECT=y
CONFIG_FONT_SUPPORT=y
CONFIG_FRAME_POINTER=y
CONFIG_FREEZER=y
# CONFIG_FSL_QDMA is not set
CONFIG_FS_IOMAP=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
@ -299,7 +282,6 @@ CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_THUNDERX=y
# CONFIG_GVE is not set
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_HARDIRQS_SW_RESEND=y
@ -372,6 +354,8 @@ CONFIG_HWSPINLOCK=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_CAVIUM=y
CONFIG_HW_RANDOM_OPTEE=y
CONFIG_HZ=250
CONFIG_HZ_250=y
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_BOARDINFO=y
@ -429,12 +413,8 @@ CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_THUNDER=y
CONFIG_MEMFD_CREATE=y
CONFIG_MEMORY_BALLOON=y
# CONFIG_MEMORY_HOTPLUG is not set
CONFIG_MEMORY_ISOLATION=y
CONFIG_MEMTEST=y
# CONFIG_MFD_LOCHNAGAR is not set
# CONFIG_MFD_ROHM_BD70528 is not set
# CONFIG_MFD_STPMIC1 is not set
CONFIG_MFD_SYSCON=y
CONFIG_MIGRATION=y
CONFIG_MMC=y
@ -461,7 +441,6 @@ CONFIG_NUMA=y
CONFIG_NUMA_BALANCING=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
CONFIG_NVMEM=y
# CONFIG_NVMEM_REBOOT_MODE is not set
CONFIG_NVMEM_SYSFS=y
# CONFIG_OCTEONTX2_AF is not set
CONFIG_OF=y
@ -483,7 +462,6 @@ CONFIG_PCI=y
CONFIG_PCIEAER=y
CONFIG_PCIEPORTBUS=y
# CONFIG_PCIE_AL is not set
# CONFIG_PCIE_BW is not set
CONFIG_PCIE_PME=y
CONFIG_PCI_ATS=y
CONFIG_PCI_DOMAINS=y
@ -494,7 +472,6 @@ CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_IOV=y
# CONFIG_PCI_MESON is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PGTABLE_LEVELS=4
@ -502,7 +479,6 @@ CONFIG_PHYLIB=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_PM=y
CONFIG_PM_CLK=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_STD_PARTITION=""
@ -515,7 +491,6 @@ CONFIG_POWER_SUPPLY=y
CONFIG_PROC_VMCORE=y
CONFIG_QUEUED_RWLOCKS=y
CONFIG_QUEUED_SPINLOCKS=y
# CONFIG_RANDOMIZE_BASE is not set
CONFIG_RAS=y
CONFIG_RATIONAL=y
# CONFIG_RAVE_SP_CORE is not set

View File

@ -0,0 +1,46 @@
From e8287ec10f21877eb0ac4c1fb4e89e42d8bc10da Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Wed, 11 Mar 2020 08:19:45 -0700
Subject: [PATCH 2/7] gpio: thunderx: fix irq_request_resources
If there are no parent resources do not call irq_chip_request_resources_parent
at all as this will return an error.
This resolves a regression where devices using a thunderx gpio as an interrupt
would fail probing.
Fixes: 0d04d0c ("gpio: thunderx: Use the default parent apis for {request,release}_resources")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
drivers/gpio/gpio-thunderx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c
index 715371b..feda2a2 100644
--- a/drivers/gpio/gpio-thunderx.c
+++ b/drivers/gpio/gpio-thunderx.c
@@ -363,15 +363,18 @@ static int thunderx_gpio_irq_request_resources(struct irq_data *data)
{
struct thunderx_line *txline = irq_data_get_irq_chip_data(data);
struct thunderx_gpio *txgpio = txline->txgpio;
+ struct irq_data *parent_data = data->parent_data;
int r;
r = gpiochip_lock_as_irq(&txgpio->chip, txline->line);
if (r)
return r;
- r = irq_chip_request_resources_parent(data);
- if (r)
- gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
+ if (parent_data && parent_data->chip->irq_request_resources) {
+ r = irq_chip_request_resources_parent(data);
+ if (r)
+ gpiochip_unlock_as_irq(&txgpio->chip, txline->line);
+ }
return r;
}
--
2.7.4

View File

@ -1,20 +1,22 @@
From 6edfb172ff1dd3cfc84c19790c245a4005474bb7 Mon Sep 17 00:00:00 2001
From 097cc81ee5c15913ad330baffff2e3dea09bdad0 Mon Sep 17 00:00:00 2001
From: Tim Harvey <tharvey@gateworks.com>
Date: Tue, 25 Feb 2020 12:01:36 -0800
Subject: [PATCH 03/12] can: mcp251x: convert to half-duplex SPI
Date: Thu, 30 Aug 2018 15:16:08 -0700
Subject: [PATCH] can: mcp251x: convert driver to half-duplex SPI
Some SPI host controllers such as the Cavium Thunder do not support
Some SPI host controllers such as the Cavium Thunder TX do not support
full-duplex SPI. Using half-duplex transfers allows the driver to work
with those host controllers.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
drivers/net/can/spi/mcp251x.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/can/spi/mcp251x.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index bb20a9b..dc0574a 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_de
@@ -291,23 +291,23 @@ static u8 mcp251x_read_reg(struct spi_device *spi, u8 reg)
priv->spi_tx_buf[0] = INSTRUCTION_READ;
priv->spi_tx_buf[1] = reg;
@ -43,3 +45,18 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
}
static void mcp251x_write_reg(struct spi_device *spi, u8 reg, u8 val)
@@ -398,8 +398,9 @@ static void mcp251x_hw_rx_frame(struct spi_device *spi, u8 *buf,
buf[i] = mcp251x_read_reg(spi, RXBCTRL(buf_idx) + i);
} else {
priv->spi_tx_buf[RXBCTRL_OFF] = INSTRUCTION_READ_RXB(buf_idx);
- mcp251x_spi_trans(spi, SPI_TRANSFER_BUF_LEN);
- memcpy(buf, priv->spi_rx_buf, SPI_TRANSFER_BUF_LEN);
+ spi_write_then_read(spi, priv->spi_tx_buf, 1, priv->spi_rx_buf,
+ SPI_TRANSFER_BUF_LEN);
+ memcpy(buf + 1, priv->spi_rx_buf, SPI_TRANSFER_BUF_LEN - 1);
}
}
--
2.7.4

View File

@ -83,8 +83,7 @@
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
// XXX empiric value to obtain actual 10MHz SCK at the chip
spi-max-frequency = <3125000>;
spi-max-frequency = <33000000>;
partitions {
compatible = "fixed-partitions";

View File

@ -93,7 +93,7 @@
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <3125000>;
spi-max-frequency = <33000000>;
partitions {
compatible = "fixed-partitions";
@ -139,8 +139,7 @@
flash@1 {
compatible = "jedec,spi-nor";
reg = <1>;
// XXX empiric value to obtain actual 10MHz SCK at the chip
spi-max-frequency = <3125000>;
spi-max-frequency = <33000000>;
partitions {
compatible = "fixed-partitions";

View File

@ -1187,7 +1187,8 @@ define Device/zyxel_keenetic
IMAGE_SIZE := 7872k
DEVICE_VENDOR := ZyXEL
DEVICE_MODEL := Keenetic
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport \
kmod-usb-dwc2
SUPPORTED_DEVICES += kn
endef
TARGET_DEVICES += zyxel_keenetic

View File

@ -1,29 +0,0 @@
From a758e0870c6d1e4b0272f6e7f9efa9face5534bb Mon Sep 17 00:00:00 2001
From: John Crispin <blogic@openwrt.org>
Date: Sun, 27 Jul 2014 09:49:07 +0100
Subject: [PATCH 32/53] USB: dwc2: add device_reset()
Signed-off-by: John Crispin <blogic@openwrt.org>
---
drivers/usb/dwc2/hcd.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -48,6 +48,7 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/usb.h>
+#include <linux/reset.h>
#include <linux/usb/hcd.h>
#include <linux/usb/ch11.h>
@@ -5215,6 +5216,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso
retval = -ENOMEM;
+ device_reset(hsotg->dev);
+
hcfg = dwc2_readl(hsotg->regs + HCFG);
dev_dbg(hsotg->dev, "hcfg=%08x\n", hcfg);

View File

@ -1,29 +0,0 @@
From a758e0870c6d1e4b0272f6e7f9efa9face5534bb Mon Sep 17 00:00:00 2001
From: John Crispin <blogic@openwrt.org>
Date: Sun, 27 Jul 2014 09:49:07 +0100
Subject: [PATCH 32/53] USB: dwc2: add device_reset()
Signed-off-by: John Crispin <blogic@openwrt.org>
---
drivers/usb/dwc2/hcd.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -49,6 +49,7 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/usb.h>
+#include <linux/reset.h>
#include <linux/usb/hcd.h>
#include <linux/usb/ch11.h>
@@ -5023,6 +5024,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hso
retval = -ENOMEM;
+ device_reset(hsotg->dev);
+
hcfg = dwc2_readl(hsotg, HCFG);
dev_dbg(hsotg->dev, "hcfg=%08x\n", hcfg);

View File

@ -218,7 +218,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y

View File

@ -192,7 +192,7 @@ CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIO_ICH=y
CONFIG_GPIO_IT87=y
# CONFIG_GPIO_IT87 is not set
CONFIG_GPIO_LYNXPOINT=y
CONFIG_GPIO_SCH=y
CONFIG_GPIO_SYSFS=y