mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
kernel: bump 5.4 to 5.4.85 (#6105)
This commit is contained in:
parent
137a9b3f2c
commit
7dcc873eca
@ -8,11 +8,11 @@ endif
|
|||||||
|
|
||||||
LINUX_VERSION-4.14 = .195
|
LINUX_VERSION-4.14 = .195
|
||||||
LINUX_VERSION-4.19 = .138
|
LINUX_VERSION-4.19 = .138
|
||||||
LINUX_VERSION-5.4 = .84
|
LINUX_VERSION-5.4 = .85
|
||||||
|
|
||||||
LINUX_KERNEL_HASH-4.14.195 = 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021
|
LINUX_KERNEL_HASH-4.14.195 = 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021
|
||||||
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
|
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
|
||||||
LINUX_KERNEL_HASH-5.4.84 = 0985fcf6cdcebceca63cb70abab66d12e75fac61014a796ce71272b33f831515
|
LINUX_KERNEL_HASH-5.4.85 = 1de3586d8e7a9a814726610745d80907a267590d2770ec1079ef2875c4984008
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||||
|
@ -62,7 +62,7 @@ endif
|
|||||||
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
DEFAULT_PACKAGES += $(DEFAULT_PACKAGES.$(DEVICE_TYPE))
|
||||||
|
|
||||||
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
|
filter_packages = $(filter-out -% $(patsubst -%,%,$(filter -%,$(1))),$(1))
|
||||||
extra_packages = $(if $(filter wpad-mini wpad-basic wpad-basic-wolfssl wpad nas,$(1)),iwinfo)
|
extra_packages = $(if $(filter wpad wpad-% nas,$(1)),iwinfo)
|
||||||
|
|
||||||
define ProfileDefault
|
define ProfileDefault
|
||||||
NAME:=
|
NAME:=
|
||||||
@ -229,7 +229,9 @@ ifeq ($(DUMP),1)
|
|||||||
.PRECIOUS: $(TMP_CONFIG)
|
.PRECIOUS: $(TMP_CONFIG)
|
||||||
|
|
||||||
ifdef KERNEL_TESTING_PATCHVER
|
ifdef KERNEL_TESTING_PATCHVER
|
||||||
FEATURES += testing-kernel
|
ifneq ($(KERNEL_TESTING_PATCHVER),$(KERNEL_PATCHVER))
|
||||||
|
FEATURES += testing-kernel
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(CONFIG_OF),)
|
ifneq ($(CONFIG_OF),)
|
||||||
FEATURES += dt
|
FEATURES += dt
|
||||||
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
PKG_NAME:=uboot-envtools
|
PKG_NAME:=uboot-envtools
|
||||||
PKG_DISTNAME:=u-boot
|
PKG_DISTNAME:=u-boot
|
||||||
PKG_VERSION:=2020.04
|
PKG_VERSION:=2020.04
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
@ -24,9 +24,12 @@ arduino,yun|\
|
|||||||
buffalo,bhr-4grv2|\
|
buffalo,bhr-4grv2|\
|
||||||
devolo,magic-2-wifi|\
|
devolo,magic-2-wifi|\
|
||||||
engenius,eap300-v2|\
|
engenius,eap300-v2|\
|
||||||
|
engenius,ecb1200|\
|
||||||
engenius,ecb1750|\
|
engenius,ecb1750|\
|
||||||
|
engenius,ecb350-v1|\
|
||||||
engenius,enh202-v1|\
|
engenius,enh202-v1|\
|
||||||
engenius,ens202ext-v1|\
|
engenius,ens202ext-v1|\
|
||||||
|
engenius,enstationac-v1|\
|
||||||
etactica,eg200|\
|
etactica,eg200|\
|
||||||
glinet,gl-ar750s-nor|\
|
glinet,gl-ar750s-nor|\
|
||||||
glinet,gl-ar750s-nor-nand|\
|
glinet,gl-ar750s-nor-nand|\
|
||||||
@ -79,6 +82,10 @@ netgear,wndr4300tn|\
|
|||||||
netgear,wndr4300sw)
|
netgear,wndr4300sw)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
||||||
;;
|
;;
|
||||||
|
plasmacloud,pa300|\
|
||||||
|
plasmacloud,pa300e)
|
||||||
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
|
||||||
|
;;
|
||||||
qihoo,c301)
|
qihoo,c301)
|
||||||
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
|
ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
|
||||||
;;
|
;;
|
||||||
|
@ -59,6 +59,11 @@ define U-Boot/l-50
|
|||||||
BUILD_DEVICES:=checkpoint_l-50
|
BUILD_DEVICES:=checkpoint_l-50
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define U-Boot/nas220
|
||||||
|
NAME:=Seagate Blackarmor NAS220
|
||||||
|
BUILD_DEVICES:=seagate_blackarmor-nas220
|
||||||
|
endef
|
||||||
|
|
||||||
define U-Boot/nsa310
|
define U-Boot/nsa310
|
||||||
NAME:=Zyxel NSA310
|
NAME:=Zyxel NSA310
|
||||||
BUILD_DEVICES:=zyxel_nsa310b
|
BUILD_DEVICES:=zyxel_nsa310b
|
||||||
@ -95,6 +100,7 @@ UBOOT_TARGETS := \
|
|||||||
ib62x0 ib62x0_second_stage \
|
ib62x0 ib62x0_second_stage \
|
||||||
iconnect iconnect_second_stage \
|
iconnect iconnect_second_stage \
|
||||||
l-50 \
|
l-50 \
|
||||||
|
nas220 \
|
||||||
nsa310 \
|
nsa310 \
|
||||||
nsa310s \
|
nsa310s \
|
||||||
nsa325 \
|
nsa325 \
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
--- a/include/configs/nas220.h
|
||||||
|
+++ b/include/configs/nas220.h
|
||||||
|
@@ -54,17 +54,22 @@
|
||||||
|
/*
|
||||||
|
* Default environment variables
|
||||||
|
*/
|
||||||
|
-#define CONFIG_BOOTCOMMAND ""
|
||||||
|
+#define CONFIG_BOOTCOMMAND \
|
||||||
|
+ "ubi part ubi; " \
|
||||||
|
+ "ubi read 0x800000 kernel; " \
|
||||||
|
+ "bootm 0x800000"
|
||||||
|
|
||||||
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
"bootargs=console=ttyS0,115200\0" \
|
||||||
|
"mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),"\
|
||||||
|
"0x010000@0xa0000(env),"\
|
||||||
|
- "0x500000@0xc0000(uimage),"\
|
||||||
|
- "0x1a40000@0x5c0000(rootfs)\0" \
|
||||||
|
+ "0x1e80000@0xc0000(ubi)\0"\
|
||||||
|
"mtdids=nand0=orion_nand\0"\
|
||||||
|
"autostart=no\0"\
|
||||||
|
- "autoload=no\0"
|
||||||
|
+ "autoload=no\0"\
|
||||||
|
+ "ipaddr=10.4.50.165\0"\
|
||||||
|
+ "serverip=10.4.50.5\0"\
|
||||||
|
+ "bootdelay=3"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ethernet Driver configuration
|
@ -6,10 +6,10 @@
|
|||||||
#
|
#
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION := 2019.04
|
PKG_VERSION := 2020.04
|
||||||
PKG_RELEASE := 1
|
PKG_RELEASE := 1
|
||||||
|
|
||||||
PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
|
PKG_HASH := fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
|
||||||
|
|
||||||
PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
|
PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
|
|
||||||
|
@ -446,6 +446,56 @@ endef
|
|||||||
$(eval $(call KernelPackage,iio-tsl4531))
|
$(eval $(call KernelPackage,iio-tsl4531))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c
|
||||||
|
SUBMENU:=$(IIO_MENU)
|
||||||
|
TITLE:=Freescale FXAS21002C 3-axis gyro driver
|
||||||
|
DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer
|
||||||
|
KCONFIG:= CONFIG_FXAS21002C
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_core.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,56,fxas21002c)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c/description
|
||||||
|
Support for Freescale FXAS21002C 3-axis gyro.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,iio-fxas21002c))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c-i2c
|
||||||
|
SUBMENU:=$(IIO_MENU)
|
||||||
|
TITLE:=Freescale FXAS21002C 3-axis gyro driver (I2C)
|
||||||
|
DEPENDS:=+kmod-iio-fxas21002c +kmod-i2c-core +kmod-regmap-i2c
|
||||||
|
KCONFIG:= CONFIG_FXAS21002C_I2C
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_i2c.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_i2c)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c-i2c/description
|
||||||
|
Support for Freescale FXAS21002C 3-axis gyro
|
||||||
|
connected via I2C.
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,iio-fxas21002c-i2c))
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c-spi
|
||||||
|
SUBMENU:=$(IIO_MENU)
|
||||||
|
DEPENDS:=+kmod-iio-fxas21002c +kmod-regmap-spi
|
||||||
|
TITLE:=Freescale FXAS21002C 3-axis gyro driver (SPI)
|
||||||
|
KCONFIG:= CONFIG_FXAS21002C_SPI
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/iio/gyro/fxas21002c_spi.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,56,fxas21002c_spi)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/iio-fxas21002c-spi/description
|
||||||
|
Support for Freescale FXAS21002C 3-axis gyro
|
||||||
|
connected via SPI.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,iio-fxas21002c-spi))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/iio-fxos8700
|
define KernelPackage/iio-fxos8700
|
||||||
SUBMENU:=$(IIO_MENU)
|
SUBMENU:=$(IIO_MENU)
|
||||||
TITLE:=Freescale FXOS8700 3-axis accelerometer driver
|
TITLE:=Freescale FXOS8700 3-axis accelerometer driver
|
||||||
|
@ -1168,3 +1168,15 @@ define KernelPackage/nft-fib
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,nft-fib))
|
$(eval $(call KernelPackage,nft-fib))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/nft-queue
|
||||||
|
SUBMENU:=$(NF_MENU)
|
||||||
|
TITLE:=Netfilter nf_tables queue support
|
||||||
|
DEPENDS:=+kmod-nft-core +kmod-nfnetlink-queue
|
||||||
|
FILES:=$(foreach mod,$(NFT_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
|
||||||
|
AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_QUEUE-m)))
|
||||||
|
KCONFIG:=$(KCONFIG_NFT_QUEUE)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,nft-queue))
|
||||||
|
@ -48,7 +48,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|||||||
|
|
||||||
#include "xhci.h"
|
#include "xhci.h"
|
||||||
#include "xhci-trace.h"
|
#include "xhci-trace.h"
|
||||||
@@ -62,6 +64,44 @@
|
@@ -63,6 +65,44 @@
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
|
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
|
||||||
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
|
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|||||||
static const char hcd_name[] = "xhci_hcd";
|
static const char hcd_name[] = "xhci_hcd";
|
||||||
|
|
||||||
static struct hc_driver __read_mostly xhci_pci_hc_driver;
|
static struct hc_driver __read_mostly xhci_pci_hc_driver;
|
||||||
@@ -296,6 +336,873 @@ static void xhci_pme_acpi_rtd3_enable(st
|
@@ -298,6 +338,873 @@ static void xhci_pme_acpi_rtd3_enable(st
|
||||||
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
|
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
|
||||||
#endif /* CONFIG_ACPI */
|
#endif /* CONFIG_ACPI */
|
||||||
|
|
||||||
@ -967,7 +967,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|||||||
/* called during probe() after chip reset completes */
|
/* called during probe() after chip reset completes */
|
||||||
static int xhci_pci_setup(struct usb_hcd *hcd)
|
static int xhci_pci_setup(struct usb_hcd *hcd)
|
||||||
{
|
{
|
||||||
@@ -337,6 +1244,27 @@ static int xhci_pci_probe(struct pci_dev
|
@@ -339,6 +1246,27 @@ static int xhci_pci_probe(struct pci_dev
|
||||||
struct hc_driver *driver;
|
struct hc_driver *driver;
|
||||||
struct usb_hcd *hcd;
|
struct usb_hcd *hcd;
|
||||||
|
|
||||||
@ -995,7 +995,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|||||||
driver = (struct hc_driver *)id->driver_data;
|
driver = (struct hc_driver *)id->driver_data;
|
||||||
|
|
||||||
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
|
/* Prevent runtime suspending between USB-2 and USB-3 initialization */
|
||||||
@@ -398,6 +1326,16 @@ static void xhci_pci_remove(struct pci_d
|
@@ -400,6 +1328,16 @@ static void xhci_pci_remove(struct pci_d
|
||||||
{
|
{
|
||||||
struct xhci_hcd *xhci;
|
struct xhci_hcd *xhci;
|
||||||
|
|
||||||
@ -1012,7 +1012,7 @@ Signed-off-by: Vinod Koul <vkoul@kernel.org>
|
|||||||
xhci = hcd_to_xhci(pci_get_drvdata(dev));
|
xhci = hcd_to_xhci(pci_get_drvdata(dev));
|
||||||
xhci->xhc_state |= XHCI_STATE_REMOVING;
|
xhci->xhc_state |= XHCI_STATE_REMOVING;
|
||||||
|
|
||||||
@@ -537,6 +1475,11 @@ static int xhci_pci_resume(struct usb_hc
|
@@ -539,6 +1477,11 @@ static int xhci_pci_resume(struct usb_hc
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL)
|
if (pdev->vendor == PCI_VENDOR_ID_INTEL)
|
||||||
usb_enable_intel_xhci_ports(pdev);
|
usb_enable_intel_xhci_ports(pdev);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ produce a noisy warning.
|
|||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
--- a/drivers/usb/host/xhci-pci.c
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
+++ b/drivers/usb/host/xhci-pci.c
|
||||||
@@ -283,6 +283,7 @@ static void xhci_pci_quirks(struct devic
|
@@ -285,6 +285,7 @@ static void xhci_pci_quirks(struct devic
|
||||||
pdev->device == 0x0015) {
|
pdev->device == 0x0015) {
|
||||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||||
xhci->quirks |= XHCI_ZERO_64B_REGS;
|
xhci->quirks |= XHCI_ZERO_64B_REGS;
|
||||||
|
@ -0,0 +1,194 @@
|
|||||||
|
From: Paul Burton <paul.burton@mips.com>
|
||||||
|
Date: Wed, 9 Oct 2019 23:09:45 +0000
|
||||||
|
Subject: MIPS: cmdline: Clean up boot_command_line initialization
|
||||||
|
|
||||||
|
Our current code to initialize boot_command_line is a mess. Some of this
|
||||||
|
is due to the addition of too many options over the years, and some of
|
||||||
|
this is due to workarounds for early_init_dt_scan_chosen() performing
|
||||||
|
actions specific to options from other architectures that probably
|
||||||
|
shouldn't be in generic code.
|
||||||
|
|
||||||
|
Clean this up by introducing a new bootcmdline_init() function that
|
||||||
|
simplifies the initialization somewhat. The major changes are:
|
||||||
|
|
||||||
|
- Because bootcmdline_init() is a function it can return early in the
|
||||||
|
CONFIG_CMDLINE_OVERRIDE case.
|
||||||
|
|
||||||
|
- We clear boot_command_line rather than inheriting whatever
|
||||||
|
early_init_dt_scan_chosen() may have left us. This means we no longer
|
||||||
|
need to set boot_command_line to a space character in an attempt to
|
||||||
|
prevent early_init_dt_scan_chosen() from copying CONFIG_CMDLINE into
|
||||||
|
boot_command_line without us knowing about it.
|
||||||
|
|
||||||
|
- Indirection via USE_PROM_CMDLINE, USE_DTB_CMDLINE, EXTEND_WITH_PROM &
|
||||||
|
BUILTIN_EXTEND_WITH_PROM macros is removed; they seemingly served only
|
||||||
|
to obfuscate the code.
|
||||||
|
|
||||||
|
- The logic is cleaner, clearer & commented.
|
||||||
|
|
||||||
|
Two minor drawbacks of this approach are:
|
||||||
|
|
||||||
|
1) We call of_scan_flat_dt(), which means we scan through the DT again.
|
||||||
|
The overhead is fairly minimal & shouldn't be noticeable.
|
||||||
|
|
||||||
|
2) cmdline_scan_chosen() duplicates a small amount of the logic from
|
||||||
|
early_init_dt_scan_chosen(). Alternatives might be to allow the
|
||||||
|
generic FDT code to keep & expose a copy of the arguments taken from
|
||||||
|
the /chosen node's bootargs property, or to introduce a function like
|
||||||
|
early_init_dt_scan_chosen() that retrieves them without modification
|
||||||
|
to handle CONFIG_CMDLINE. Neither of these sounds particularly
|
||||||
|
cleaner though, and this way we at least keep the extra work in
|
||||||
|
arch/mips.
|
||||||
|
|
||||||
|
Origin: upstream, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7784cac697351f0cc0a4bb619594c0c99348c5aa
|
||||||
|
Signed-off-by: Paul Burton <paul.burton@mips.com>
|
||||||
|
Cc: linux-mips@vger.kernel.org
|
||||||
|
|
||||||
|
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
|
||||||
|
index b8884de89c81e1b444b218a15519556b4a374089..e56dd6c25d46336fcb9af21326f697d0c37aac1c 100644
|
||||||
|
--- a/arch/mips/kernel/setup.c
|
||||||
|
+++ b/arch/mips/kernel/setup.c
|
||||||
|
@@ -538,11 +538,88 @@ static void __init check_kernel_sections_mem(void)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#define USE_PROM_CMDLINE IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER)
|
||||||
|
-#define USE_DTB_CMDLINE IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB)
|
||||||
|
-#define EXTEND_WITH_PROM IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND)
|
||||||
|
-#define BUILTIN_EXTEND_WITH_PROM \
|
||||||
|
- IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND)
|
||||||
|
+static void __init bootcmdline_append(const char *s, size_t max)
|
||||||
|
+{
|
||||||
|
+ if (!s[0] || !max)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (boot_command_line[0])
|
||||||
|
+ strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
|
||||||
|
+
|
||||||
|
+ strlcat(boot_command_line, s, max);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int __init bootcmdline_scan_chosen(unsigned long node, const char *uname,
|
||||||
|
+ int depth, void *data)
|
||||||
|
+{
|
||||||
|
+ bool *dt_bootargs = data;
|
||||||
|
+ const char *p;
|
||||||
|
+ int l;
|
||||||
|
+
|
||||||
|
+ if (depth != 1 || !data ||
|
||||||
|
+ (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ p = of_get_flat_dt_prop(node, "bootargs", &l);
|
||||||
|
+ if (p != NULL && l > 0) {
|
||||||
|
+ bootcmdline_append(p, min(l, COMMAND_LINE_SIZE));
|
||||||
|
+ *dt_bootargs = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void __init bootcmdline_init(char **cmdline_p)
|
||||||
|
+{
|
||||||
|
+ bool dt_bootargs = false;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If CMDLINE_OVERRIDE is enabled then initializing the command line is
|
||||||
|
+ * trivial - we simply use the built-in command line unconditionally &
|
||||||
|
+ * unmodified.
|
||||||
|
+ */
|
||||||
|
+ if (IS_ENABLED(CONFIG_CMDLINE_OVERRIDE)) {
|
||||||
|
+ strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If the user specified a built-in command line &
|
||||||
|
+ * MIPS_CMDLINE_BUILTIN_EXTEND, then the built-in command line is
|
||||||
|
+ * prepended to arguments from the bootloader or DT so we'll copy them
|
||||||
|
+ * to the start of boot_command_line here. Otherwise, empty
|
||||||
|
+ * boot_command_line to undo anything early_init_dt_scan_chosen() did.
|
||||||
|
+ */
|
||||||
|
+ if (IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))
|
||||||
|
+ strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
+ else
|
||||||
|
+ boot_command_line[0] = 0;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If we're configured to take boot arguments from DT, look for those
|
||||||
|
+ * now.
|
||||||
|
+ */
|
||||||
|
+ if (IS_ENABLED(CONFIG_MIPS_CMDLINE_FROM_DTB))
|
||||||
|
+ of_scan_flat_dt(bootcmdline_scan_chosen, &dt_bootargs);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If we didn't get any arguments from DT (regardless of whether that's
|
||||||
|
+ * because we weren't configured to look for them, or because we looked
|
||||||
|
+ * & found none) then we'll take arguments from the bootloader.
|
||||||
|
+ * plat_mem_setup() should have filled arcs_cmdline with arguments from
|
||||||
|
+ * the bootloader.
|
||||||
|
+ */
|
||||||
|
+ if (IS_ENABLED(CONFIG_MIPS_CMDLINE_DTB_EXTEND) || !dt_bootargs)
|
||||||
|
+ bootcmdline_append(arcs_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If the user specified a built-in command line & we didn't already
|
||||||
|
+ * prepend it, we append it to boot_command_line here.
|
||||||
|
+ */
|
||||||
|
+ if (IS_ENABLED(CONFIG_CMDLINE_BOOL) &&
|
||||||
|
+ !IS_ENABLED(CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND))
|
||||||
|
+ bootcmdline_append(builtin_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
+}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* arch_mem_init - initialize memory management subsystem
|
||||||
|
@@ -570,48 +647,12 @@ static void __init arch_mem_init(char **cmdline_p)
|
||||||
|
{
|
||||||
|
extern void plat_mem_setup(void);
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * Initialize boot_command_line to an innocuous but non-empty string in
|
||||||
|
- * order to prevent early_init_dt_scan_chosen() from copying
|
||||||
|
- * CONFIG_CMDLINE into it without our knowledge. We handle
|
||||||
|
- * CONFIG_CMDLINE ourselves below & don't want to duplicate its
|
||||||
|
- * content because repeating arguments can be problematic.
|
||||||
|
- */
|
||||||
|
- strlcpy(boot_command_line, " ", COMMAND_LINE_SIZE);
|
||||||
|
-
|
||||||
|
/* call board setup routine */
|
||||||
|
plat_mem_setup();
|
||||||
|
memblock_set_bottom_up(true);
|
||||||
|
|
||||||
|
-#if defined(CONFIG_CMDLINE_BOOL) && defined(CONFIG_CMDLINE_OVERRIDE)
|
||||||
|
- strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
-#else
|
||||||
|
- if ((USE_PROM_CMDLINE && arcs_cmdline[0]) ||
|
||||||
|
- (USE_DTB_CMDLINE && !boot_command_line[0]))
|
||||||
|
- strlcpy(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
-
|
||||||
|
- if (EXTEND_WITH_PROM && arcs_cmdline[0]) {
|
||||||
|
- if (boot_command_line[0])
|
||||||
|
- strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
|
||||||
|
- strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-#if defined(CONFIG_CMDLINE_BOOL)
|
||||||
|
- if (builtin_cmdline[0]) {
|
||||||
|
- if (boot_command_line[0])
|
||||||
|
- strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
|
||||||
|
- strlcat(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (BUILTIN_EXTEND_WITH_PROM && arcs_cmdline[0]) {
|
||||||
|
- if (boot_command_line[0])
|
||||||
|
- strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
|
||||||
|
- strlcat(boot_command_line, arcs_cmdline, COMMAND_LINE_SIZE);
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
-#endif
|
||||||
|
+ bootcmdline_init(cmdline_p);
|
||||||
|
strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
|
||||||
|
-
|
||||||
|
*cmdline_p = command_line;
|
||||||
|
|
||||||
|
parse_early_param();
|
@ -1,24 +0,0 @@
|
|||||||
From 0c8856211d26f84277f7fcb0b9595e5c646bc464 Mon Sep 17 00:00:00 2001
|
|
||||||
From: John Crispin <john@phrozen.org>
|
|
||||||
Date: Tue, 6 Mar 2018 10:00:55 +0100
|
|
||||||
Subject: [PATCH 11/33] MIPS: ath79: select the PINCTRL subsystem
|
|
||||||
|
|
||||||
The pinmux on QCA SoCs is controlled by a single register. The
|
|
||||||
"pinctrl-single" driver can be used but requires the target
|
|
||||||
to select PINCTRL.
|
|
||||||
|
|
||||||
Signed-off-by: John Crispin <john@phrozen.org>
|
|
||||||
---
|
|
||||||
arch/mips/Kconfig | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
--- a/arch/mips/Kconfig
|
|
||||||
+++ b/arch/mips/Kconfig
|
|
||||||
@@ -296,6 +296,7 @@ config BCM63XX
|
|
||||||
select SYS_HAS_EARLY_PRINTK
|
|
||||||
select SWAP_IO_SPACE
|
|
||||||
select GPIOLIB
|
|
||||||
+ select PINCTRL
|
|
||||||
select HAVE_CLK
|
|
||||||
select MIPS_L1_CACHE_SHIFT_4
|
|
||||||
select CLKDEV_LOOKUP
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From: Nick Hainke <vincent@systemli.org>
|
||||||
|
Date: Sun, 25 Oct 2020 00:52:47 +0200
|
||||||
|
Subject: [PATCH] ath79: fix block protection clearing
|
||||||
|
|
||||||
|
The block protection bits of macronix do not match the implementation.
|
||||||
|
The chip has 3 BP bits. Bit 5 is actually the third BP but here the
|
||||||
|
5th bit is SR_TB. Therefore the patch adds SR_TB to the mask. In the
|
||||||
|
4.19er kernel the whole register was simply set to 0.
|
||||||
|
|
||||||
|
The wrong implementation did not remove the block protection. This led
|
||||||
|
to jffs2 errors in the form of:
|
||||||
|
"jffs2: Newly-erased block contained word 0x19852003 at offset 0x..."
|
||||||
|
This caused inconsistent memory and other errors.
|
||||||
|
|
||||||
|
Suggested-by: David Bauer <mail@david-bauer.net>
|
||||||
|
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
||||||
|
|
||||||
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
@@ -1985,7 +1985,7 @@ static int sr2_bit7_quad_enable(struct s
|
||||||
|
static int spi_nor_clear_sr_bp(struct spi_nor *nor)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
- u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
||||||
|
+ u8 mask = SR_TB | SR_BP2 | SR_BP1 | SR_BP0;
|
||||||
|
|
||||||
|
if (nor->flags & SNOR_F_HAS_4BIT_BP)
|
||||||
|
mask |= SR_BP3;
|
@ -706,7 +706,7 @@
|
|||||||
EXPORT_SYMBOL(xfrm_parse_spi);
|
EXPORT_SYMBOL(xfrm_parse_spi);
|
||||||
--- a/net/ipv4/tcp_input.c
|
--- a/net/ipv4/tcp_input.c
|
||||||
+++ b/net/ipv4/tcp_input.c
|
+++ b/net/ipv4/tcp_input.c
|
||||||
@@ -3971,14 +3971,16 @@ static bool tcp_parse_aligned_timestamp(
|
@@ -3972,14 +3972,16 @@ static bool tcp_parse_aligned_timestamp(
|
||||||
{
|
{
|
||||||
const __be32 *ptr = (const __be32 *)(th + 1);
|
const __be32 *ptr = (const __be32 *)(th + 1);
|
||||||
|
|
||||||
@ -754,7 +754,7 @@
|
|||||||
ptr = ip6hoff + sizeof(struct ipv6hdr);
|
ptr = ip6hoff + sizeof(struct ipv6hdr);
|
||||||
--- a/include/net/neighbour.h
|
--- a/include/net/neighbour.h
|
||||||
+++ b/include/net/neighbour.h
|
+++ b/include/net/neighbour.h
|
||||||
@@ -273,8 +273,10 @@ static inline bool neigh_key_eq128(const
|
@@ -274,8 +274,10 @@ static inline bool neigh_key_eq128(const
|
||||||
const u32 *n32 = (const u32 *)n->primary_key;
|
const u32 *n32 = (const u32 *)n->primary_key;
|
||||||
const u32 *p32 = pkey;
|
const u32 *p32 = pkey;
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
From b3797d1a92afe97c173b00fdb7824cedba24eef0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chuanhong Guo <gch981213@gmail.com>
|
||||||
|
Date: Sun, 20 Sep 2020 01:00:45 +0800
|
||||||
|
Subject: [PATCH] ath79: ar8216: make switch register access atomic
|
||||||
|
|
||||||
|
due to some unknown reason these register accesses sometimes fail
|
||||||
|
on the integrated switch without this patch.
|
||||||
|
|
||||||
|
THIS ONLY WORKS ON ATH79 AND MAY BREAK THE DRIVER ON OTHER PLATFORMS!
|
||||||
|
The mdio bus on ath79 works in polling mode and doesn't rely on
|
||||||
|
any interrupt. This patch breaks the driver on any mdio master
|
||||||
|
with interrupts used.
|
||||||
|
|
||||||
|
---
|
||||||
|
--- a/drivers/net/phy/ar8216.c
|
||||||
|
+++ b/drivers/net/phy/ar8216.c
|
||||||
|
@@ -252,6 +252,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p
|
||||||
|
u32
|
||||||
|
ar8xxx_read(struct ar8xxx_priv *priv, int reg)
|
||||||
|
{
|
||||||
|
+ unsigned long flags;
|
||||||
|
struct mii_bus *bus = priv->mii_bus;
|
||||||
|
u16 r1, r2, page;
|
||||||
|
u32 val;
|
||||||
|
@@ -259,11 +260,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
|
||||||
|
split_addr((u32) reg, &r1, &r2, &page);
|
||||||
|
|
||||||
|
mutex_lock(&bus->mdio_lock);
|
||||||
|
+ local_irq_save(flags);
|
||||||
|
|
||||||
|
bus->write(bus, 0x18, 0, page);
|
||||||
|
wait_for_page_switch();
|
||||||
|
val = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
|
||||||
|
|
||||||
|
+ local_irq_restore(flags);
|
||||||
|
mutex_unlock(&bus->mdio_lock);
|
||||||
|
|
||||||
|
return val;
|
||||||
|
@@ -272,17 +275,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
|
||||||
|
void
|
||||||
|
ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
|
||||||
|
{
|
||||||
|
+ unsigned long flags;
|
||||||
|
struct mii_bus *bus = priv->mii_bus;
|
||||||
|
u16 r1, r2, page;
|
||||||
|
|
||||||
|
split_addr((u32) reg, &r1, &r2, &page);
|
||||||
|
|
||||||
|
mutex_lock(&bus->mdio_lock);
|
||||||
|
+ local_irq_save(flags);
|
||||||
|
|
||||||
|
bus->write(bus, 0x18, 0, page);
|
||||||
|
wait_for_page_switch();
|
||||||
|
ar8xxx_mii_write32(priv, 0x10 | r2, r1, val);
|
||||||
|
|
||||||
|
+ local_irq_restore(flags);
|
||||||
|
mutex_unlock(&bus->mdio_lock);
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
--- a/drivers/usb/host/xhci-pci.c
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
+++ b/drivers/usb/host/xhci-pci.c
|
||||||
@@ -252,6 +252,10 @@ static void xhci_pci_quirks(struct devic
|
@@ -254,6 +254,10 @@ static void xhci_pci_quirks(struct devic
|
||||||
pdev->device == 0x3432)
|
pdev->device == 0x3432)
|
||||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|||||||
|
|
||||||
--- a/drivers/usb/host/xhci-pci.c
|
--- a/drivers/usb/host/xhci-pci.c
|
||||||
+++ b/drivers/usb/host/xhci-pci.c
|
+++ b/drivers/usb/host/xhci-pci.c
|
||||||
@@ -253,8 +253,10 @@ static void xhci_pci_quirks(struct devic
|
@@ -255,8 +255,10 @@ static void xhci_pci_quirks(struct devic
|
||||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_VIA &&
|
if (pdev->vendor == PCI_VENDOR_ID_VIA &&
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|||||||
|
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -1264,6 +1264,9 @@ ifneq ($(dtstree),)
|
@@ -1267,6 +1267,9 @@ ifneq ($(dtstree),)
|
||||||
%.dtb: include/config/kernel.release scripts_dtc
|
%.dtb: include/config/kernel.release scripts_dtc
|
||||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Signed-off-by: Nataliya Korovkina <malus.brandywine@gmail.com>
|
|||||||
|
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -1264,7 +1264,7 @@ ifneq ($(dtstree),)
|
@@ -1267,7 +1267,7 @@ ifneq ($(dtstree),)
|
||||||
%.dtb: include/config/kernel.release scripts_dtc
|
%.dtb: include/config/kernel.release scripts_dtc
|
||||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||||
|
|
||||||
|
@ -1812,7 +1812,7 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
|
|||||||
# CONFIG_GPIO_SCH311X is not set
|
# CONFIG_GPIO_SCH311X is not set
|
||||||
# CONFIG_GPIO_SX150X is not set
|
# CONFIG_GPIO_SX150X is not set
|
||||||
# CONFIG_GPIO_SYSCON is not set
|
# CONFIG_GPIO_SYSCON is not set
|
||||||
# CONFIG_GPIO_SYSFS is not set
|
CONFIG_GPIO_SYSFS=y
|
||||||
# CONFIG_GPIO_TPIC2810 is not set
|
# CONFIG_GPIO_TPIC2810 is not set
|
||||||
# CONFIG_GPIO_TS4900 is not set
|
# CONFIG_GPIO_TS4900 is not set
|
||||||
# CONFIG_GPIO_TS5500 is not set
|
# CONFIG_GPIO_TS5500 is not set
|
||||||
@ -3928,6 +3928,7 @@ CONFIG_PARTITION_ADVANCED=y
|
|||||||
# CONFIG_PCH_PHUB is not set
|
# CONFIG_PCH_PHUB is not set
|
||||||
# CONFIG_PCI is not set
|
# CONFIG_PCI is not set
|
||||||
# CONFIG_PCI200SYN is not set
|
# CONFIG_PCI200SYN is not set
|
||||||
|
# CONFIG_PCIEAER is not set
|
||||||
# CONFIG_PCIEAER_INJECT is not set
|
# CONFIG_PCIEAER_INJECT is not set
|
||||||
# CONFIG_PCIEASPM is not set
|
# CONFIG_PCIEASPM is not set
|
||||||
# CONFIG_PCIEPORTBUS is not set
|
# CONFIG_PCIEPORTBUS is not set
|
||||||
@ -6222,7 +6223,7 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
|||||||
# CONFIG_VBOXGUEST is not set
|
# CONFIG_VBOXGUEST is not set
|
||||||
# CONFIG_VCNL4000 is not set
|
# CONFIG_VCNL4000 is not set
|
||||||
# CONFIG_VCNL4035 is not set
|
# CONFIG_VCNL4035 is not set
|
||||||
# CONFIG_VDSO is not set
|
CONFIG_VDSO=y
|
||||||
# CONFIG_VEML6070 is not set
|
# CONFIG_VEML6070 is not set
|
||||||
# CONFIG_VETH is not set
|
# CONFIG_VETH is not set
|
||||||
# CONFIG_VEXPRESS_CONFIG is not set
|
# CONFIG_VEXPRESS_CONFIG is not set
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
From: Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||||
|
Subject: [PATCH 1/2] rtc: rs5c372: support alarms up to 1 week
|
||||||
|
|
||||||
|
The Ricoh R2221x, R2223x, RS5C372, RV5C387A chips can handle 1 week
|
||||||
|
alarms.
|
||||||
|
|
||||||
|
Read the "wday" alarm register and convert it to a date to support up 1
|
||||||
|
week in our driver.
|
||||||
|
|
||||||
|
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/rtc/rtc-rs5c372.c | 48 ++++++++++++++++++++++++++++++++++-----
|
||||||
|
1 file changed, 42 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
|
||||||
|
index 3bd6eaa0d..94b778c6e 100644
|
||||||
|
--- a/drivers/rtc/rtc-rs5c372.c
|
||||||
|
+++ b/drivers/rtc/rtc-rs5c372.c
|
||||||
|
@@ -393,7 +393,9 @@ static int rs5c_read_alarm(struct device *dev, struct rtc_wkalrm *t)
|
||||||
|
{
|
||||||
|
struct i2c_client *client = to_i2c_client(dev);
|
||||||
|
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
||||||
|
- int status;
|
||||||
|
+ int status, wday_offs;
|
||||||
|
+ struct rtc_time rtc;
|
||||||
|
+ unsigned long alarm_secs;
|
||||||
|
|
||||||
|
status = rs5c_get_regs(rs5c);
|
||||||
|
if (status < 0)
|
||||||
|
@@ -403,6 +405,30 @@ static int rs5c_read_alarm(struct device *dev, struct rtc_wkalrm *t)
|
||||||
|
t->time.tm_sec = 0;
|
||||||
|
t->time.tm_min = bcd2bin(rs5c->regs[RS5C_REG_ALARM_A_MIN] & 0x7f);
|
||||||
|
t->time.tm_hour = rs5c_reg2hr(rs5c, rs5c->regs[RS5C_REG_ALARM_A_HOURS]);
|
||||||
|
+ t->time.tm_wday = ffs(rs5c->regs[RS5C_REG_ALARM_A_WDAY] & 0x7f) - 1;
|
||||||
|
+
|
||||||
|
+ /* determine the day, month and year based on alarm wday, taking as a
|
||||||
|
+ * reference the current time from the rtc
|
||||||
|
+ */
|
||||||
|
+ status = rs5c372_rtc_read_time(dev, &rtc);
|
||||||
|
+ if (status < 0)
|
||||||
|
+ return status;
|
||||||
|
+
|
||||||
|
+ wday_offs = t->time.tm_wday - rtc.tm_wday;
|
||||||
|
+ alarm_secs = mktime64(rtc.tm_year + 1900,
|
||||||
|
+ rtc.tm_mon + 1,
|
||||||
|
+ rtc.tm_mday + wday_offs,
|
||||||
|
+ t->time.tm_hour,
|
||||||
|
+ t->time.tm_min,
|
||||||
|
+ t->time.tm_sec);
|
||||||
|
+
|
||||||
|
+ if (wday_offs < 0 || (wday_offs == 0 &&
|
||||||
|
+ (t->time.tm_hour < rtc.tm_hour ||
|
||||||
|
+ (t->time.tm_hour == rtc.tm_hour &&
|
||||||
|
+ t->time.tm_min <= rtc.tm_min))))
|
||||||
|
+ alarm_secs += 7 * 86400;
|
||||||
|
+
|
||||||
|
+ rtc_time64_to_tm(alarm_secs, &t->time);
|
||||||
|
|
||||||
|
/* ... and status */
|
||||||
|
t->enabled = !!(rs5c->regs[RS5C_REG_CTRL1] & RS5C_CTRL1_AALE);
|
||||||
|
@@ -417,12 +443,20 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
|
||||||
|
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
||||||
|
int status, addr, i;
|
||||||
|
unsigned char buf[3];
|
||||||
|
+ struct rtc_time rtc_tm;
|
||||||
|
+ unsigned long rtc_secs, alarm_secs;
|
||||||
|
|
||||||
|
- /* only handle up to 24 hours in the future, like RTC_ALM_SET */
|
||||||
|
- if (t->time.tm_mday != -1
|
||||||
|
- || t->time.tm_mon != -1
|
||||||
|
- || t->time.tm_year != -1)
|
||||||
|
+ /* chip only can handle alarms up to one week in the future*/
|
||||||
|
+ status = rs5c372_rtc_read_time(dev, &rtc_tm);
|
||||||
|
+ if (status)
|
||||||
|
+ return status;
|
||||||
|
+ rtc_secs = rtc_tm_to_time64(&rtc_tm);
|
||||||
|
+ alarm_secs = rtc_tm_to_time64(&t->time);
|
||||||
|
+ if (alarm_secs >= rtc_secs + 7 * 86400) {
|
||||||
|
+ dev_err(dev, "%s: alarm maximum is one week in the future (%d)\n",
|
||||||
|
+ __func__, status);
|
||||||
|
return -EINVAL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* REVISIT: round up tm_sec */
|
||||||
|
|
||||||
|
@@ -443,7 +477,9 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
|
||||||
|
/* set alarm */
|
||||||
|
buf[0] = bin2bcd(t->time.tm_min);
|
||||||
|
buf[1] = rs5c_hr2reg(rs5c, t->time.tm_hour);
|
||||||
|
- buf[2] = 0x7f; /* any/all days */
|
||||||
|
+ /* each bit is the day of the week, 0x7f means all days */
|
||||||
|
+ buf[2] = (t->time.tm_wday >= 0 && t->time.tm_wday < 7) ?
|
||||||
|
+ BIT(t->time.tm_wday) : 0x7f;
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof(buf); i++) {
|
||||||
|
addr = RS5C_ADDR(RS5C_REG_ALARM_A_MIN + i);
|
@ -0,0 +1,72 @@
|
|||||||
|
From: Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||||
|
Subject: [PATCH 2/2] rtc: rs5c372: let the alarm to be used as wakeup source
|
||||||
|
|
||||||
|
Currently there is no use for the interrupts on the rs5c372 RTC and the
|
||||||
|
wakealarm isn't enabled. There are some devices like NASes which use this
|
||||||
|
RTC to wake up from the power off state when the INTR pin is activated by
|
||||||
|
the alarm clock.
|
||||||
|
|
||||||
|
Enable the alarm and let to be used as a wakeup source.
|
||||||
|
|
||||||
|
Tested on a Buffalo LS421DE NAS.
|
||||||
|
|
||||||
|
Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/rtc/rtc-rs5c372.c | 16 ++++++++++++++++
|
||||||
|
1 file changed, 16 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
|
||||||
|
index 94b778c6e..76775d66e 100644
|
||||||
|
--- a/drivers/rtc/rtc-rs5c372.c
|
||||||
|
+++ b/drivers/rtc/rtc-rs5c372.c
|
||||||
|
@@ -654,6 +654,7 @@ static int rs5c372_probe(struct i2c_client *client,
|
||||||
|
int err = 0;
|
||||||
|
int smbus_mode = 0;
|
||||||
|
struct rs5c372 *rs5c372;
|
||||||
|
+ bool rs5c372_can_wakeup_device = false;
|
||||||
|
|
||||||
|
dev_dbg(&client->dev, "%s\n", __func__);
|
||||||
|
|
||||||
|
@@ -689,6 +690,12 @@ static int rs5c372_probe(struct i2c_client *client,
|
||||||
|
else
|
||||||
|
rs5c372->type = id->driver_data;
|
||||||
|
|
||||||
|
+#ifdef CONFIG_OF
|
||||||
|
+ if(of_property_read_bool(client->dev.of_node,
|
||||||
|
+ "wakeup-source"))
|
||||||
|
+ rs5c372_can_wakeup_device = true;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* we read registers 0x0f then 0x00-0x0f; skip the first one */
|
||||||
|
rs5c372->regs = &rs5c372->buf[1];
|
||||||
|
rs5c372->smbus = smbus_mode;
|
||||||
|
@@ -722,6 +729,8 @@ static int rs5c372_probe(struct i2c_client *client,
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ rs5c372->has_irq = 1;
|
||||||
|
+
|
||||||
|
/* if the oscillator lost power and no other software (like
|
||||||
|
* the bootloader) set it up, do it here.
|
||||||
|
*
|
||||||
|
@@ -748,6 +757,10 @@ static int rs5c372_probe(struct i2c_client *client,
|
||||||
|
);
|
||||||
|
|
||||||
|
/* REVISIT use client->irq to register alarm irq ... */
|
||||||
|
+ if (rs5c372_can_wakeup_device) {
|
||||||
|
+ device_init_wakeup(&client->dev, true);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
rs5c372->rtc = devm_rtc_device_register(&client->dev,
|
||||||
|
rs5c372_driver.driver.name,
|
||||||
|
&rs5c372_rtc_ops, THIS_MODULE);
|
||||||
|
@@ -761,6 +774,9 @@ static int rs5c372_probe(struct i2c_client *client,
|
||||||
|
if (err)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
|
+ /* the rs5c372 alarm only supports a minute accuracy */
|
||||||
|
+ rs5c372->rtc->uie_unsupported = 1;
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
exit:
|
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include "br_private.h"
|
#include "br_private.h"
|
||||||
@@ -376,6 +380,28 @@ static const struct ethtool_ops br_ethto
|
@@ -382,6 +386,28 @@ static const struct ethtool_ops br_ethto
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
static const struct net_device_ops br_netdev_ops = {
|
static const struct net_device_ops br_netdev_ops = {
|
||||||
.ndo_open = br_dev_open,
|
.ndo_open = br_dev_open,
|
||||||
.ndo_stop = br_dev_stop,
|
.ndo_stop = br_dev_stop,
|
||||||
@@ -404,6 +430,9 @@ static const struct net_device_ops br_ne
|
@@ -410,6 +436,9 @@ static const struct net_device_ops br_ne
|
||||||
.ndo_bridge_setlink = br_setlink,
|
.ndo_bridge_setlink = br_setlink,
|
||||||
.ndo_bridge_dellink = br_dellink,
|
.ndo_bridge_dellink = br_dellink,
|
||||||
.ndo_features_check = passthru_features_check,
|
.ndo_features_check = passthru_features_check,
|
||||||
|
@ -18,15 +18,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
#include "mtk_eth_soc.h"
|
#include "mtk_eth_soc.h"
|
||||||
|
|
||||||
@@ -1246,6 +1247,7 @@ static int mtk_poll_rx(struct napi_struc
|
@@ -1259,13 +1260,12 @@ static int mtk_poll_rx(struct napi_struc
|
||||||
unsigned int pktlen;
|
|
||||||
dma_addr_t dma_addr;
|
|
||||||
int mac;
|
|
||||||
+ u16 hash;
|
|
||||||
|
|
||||||
ring = mtk_get_rx_ring(eth);
|
|
||||||
if (unlikely(!ring))
|
|
||||||
@@ -1259,13 +1261,12 @@ static int mtk_poll_rx(struct napi_struc
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* find out which mac the packet come from. values start at 1 */
|
/* find out which mac the packet come from. values start at 1 */
|
||||||
@ -45,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
|
if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
|
||||||
!eth->netdev[mac]))
|
!eth->netdev[mac]))
|
||||||
@@ -2247,6 +2248,9 @@ static void mtk_gdm_config(struct mtk_et
|
@@ -2247,6 +2247,9 @@ static void mtk_gdm_config(struct mtk_et
|
||||||
|
|
||||||
val |= config;
|
val |= config;
|
||||||
|
|
||||||
|
@ -10,13 +10,31 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -1316,6 +1316,10 @@ static int mtk_poll_rx(struct napi_struc
|
@@ -19,6 +19,7 @@
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/pinctrl/devinfo.h>
|
||||||
|
#include <linux/phylink.h>
|
||||||
|
+#include <linux/jhash.h>
|
||||||
|
#include <net/dsa.h>
|
||||||
|
|
||||||
|
#include "mtk_eth_soc.h"
|
||||||
|
@@ -1246,6 +1247,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||||
|
struct net_device *netdev;
|
||||||
|
unsigned int pktlen;
|
||||||
|
dma_addr_t dma_addr;
|
||||||
|
+ u32 hash;
|
||||||
|
int mac;
|
||||||
|
|
||||||
|
ring = mtk_get_rx_ring(eth);
|
||||||
|
@@ -1315,6 +1317,12 @@ static int mtk_poll_rx(struct napi_struc
|
||||||
skb->protocol = eth_type_trans(skb, netdev);
|
skb->protocol = eth_type_trans(skb, netdev);
|
||||||
bytes += pktlen;
|
bytes += pktlen;
|
||||||
|
|
||||||
+ hash = trxd.rxd4 & GENMASK(13, 0);
|
+ hash = trxd.rxd4 & GENMASK(13, 0);
|
||||||
+ if (hash != GENMASK(13, 0))
|
+ if (hash != GENMASK(13, 0)) {
|
||||||
|
+ hash = jhash_1word(hash, 0);
|
||||||
+ skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
|
+ skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
||||||
(trxd.rxd2 & RX_DMA_VTAG))
|
(trxd.rxd2 & RX_DMA_VTAG))
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o
|
+mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -2277,12 +2277,17 @@ static int mtk_open(struct net_device *d
|
@@ -2280,12 +2280,17 @@ static int mtk_open(struct net_device *d
|
||||||
|
|
||||||
/* we run 2 netdevs on the same dma ring so we only bring it up once */
|
/* we run 2 netdevs on the same dma ring so we only bring it up once */
|
||||||
if (!refcount_read(ð->dma_refcnt)) {
|
if (!refcount_read(ð->dma_refcnt)) {
|
||||||
@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
napi_enable(ð->tx_napi);
|
napi_enable(ð->tx_napi);
|
||||||
napi_enable(ð->rx_napi);
|
napi_enable(ð->rx_napi);
|
||||||
@@ -2352,6 +2357,9 @@ static int mtk_stop(struct net_device *d
|
@@ -2355,6 +2360,9 @@ static int mtk_stop(struct net_device *d
|
||||||
|
|
||||||
mtk_dma_free(eth);
|
mtk_dma_free(eth);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3141,6 +3149,13 @@ static int mtk_probe(struct platform_dev
|
@@ -3144,6 +3152,13 @@ static int mtk_probe(struct platform_dev
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
continue;
|
continue;
|
||||||
@@ -3215,6 +3230,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -3218,6 +3233,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7621_CLKS_BITMAP,
|
.required_clks = MT7621_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct mtk_soc_data mt7622_data = {
|
static const struct mtk_soc_data mt7622_data = {
|
||||||
@@ -3223,6 +3239,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -3226,6 +3242,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.hw_features = MTK_HW_FEATURES,
|
.hw_features = MTK_HW_FEATURES,
|
||||||
.required_clks = MT7622_CLKS_BITMAP,
|
.required_clks = MT7622_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
|
@ -20,16 +20,16 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
+mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_offload.o
|
+mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_offload.o
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -19,6 +19,8 @@
|
@@ -20,6 +20,8 @@
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/pinctrl/devinfo.h>
|
#include <linux/pinctrl/devinfo.h>
|
||||||
#include <linux/phylink.h>
|
#include <linux/phylink.h>
|
||||||
|
#include <linux/jhash.h>
|
||||||
+#include <linux/netfilter.h>
|
+#include <linux/netfilter.h>
|
||||||
+#include <net/netfilter/nf_flow_table.h>
|
+#include <net/netfilter/nf_flow_table.h>
|
||||||
#include <net/dsa.h>
|
#include <net/dsa.h>
|
||||||
|
|
||||||
#include "mtk_eth_soc.h"
|
#include "mtk_eth_soc.h"
|
||||||
@@ -1324,8 +1326,12 @@ static int mtk_poll_rx(struct napi_struc
|
@@ -1327,8 +1329,12 @@ static int mtk_poll_rx(struct napi_struc
|
||||||
(trxd.rxd2 & RX_DMA_VTAG))
|
(trxd.rxd2 & RX_DMA_VTAG))
|
||||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
||||||
RX_DMA_VID(trxd.rxd3));
|
RX_DMA_VID(trxd.rxd3));
|
||||||
@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
skip_rx:
|
skip_rx:
|
||||||
ring->data[idx] = new_data;
|
ring->data[idx] = new_data;
|
||||||
@@ -2858,6 +2864,25 @@ static int mtk_set_rxnfc(struct net_devi
|
@@ -2861,6 +2867,25 @@ static int mtk_set_rxnfc(struct net_devi
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
static const struct ethtool_ops mtk_ethtool_ops = {
|
static const struct ethtool_ops mtk_ethtool_ops = {
|
||||||
.get_link_ksettings = mtk_get_link_ksettings,
|
.get_link_ksettings = mtk_get_link_ksettings,
|
||||||
.set_link_ksettings = mtk_set_link_ksettings,
|
.set_link_ksettings = mtk_set_link_ksettings,
|
||||||
@@ -2889,6 +2914,7 @@ static const struct net_device_ops mtk_n
|
@@ -2892,6 +2917,7 @@ static const struct net_device_ops mtk_n
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
.ndo_poll_controller = mtk_poll_controller,
|
.ndo_poll_controller = mtk_poll_controller,
|
||||||
#endif
|
#endif
|
||||||
@ -78,7 +78,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||||
@@ -3154,6 +3180,10 @@ static int mtk_probe(struct platform_dev
|
@@ -3157,6 +3183,10 @@ static int mtk_probe(struct platform_dev
|
||||||
eth->base + MTK_ETH_PPE_BASE, 2);
|
eth->base + MTK_ETH_PPE_BASE, 2);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_free_dev;
|
goto err_free_dev;
|
||||||
|
@ -22,6 +22,7 @@ case "$board" in
|
|||||||
"iom,iconnect-1.1"|\
|
"iom,iconnect-1.1"|\
|
||||||
"iom,ix2-200"|\
|
"iom,ix2-200"|\
|
||||||
"raidsonic,ib-nas62x0"|\
|
"raidsonic,ib-nas62x0"|\
|
||||||
|
"seagate,blackarmor-nas220"|\
|
||||||
"seagate,dockstar"|\
|
"seagate,dockstar"|\
|
||||||
"seagate,goflexhome"|\
|
"seagate,goflexhome"|\
|
||||||
"seagate,goflexnet"|\
|
"seagate,goflexnet"|\
|
||||||
|
@ -11,6 +11,20 @@ boot() {
|
|||||||
path_to_hwmon='/sys/class/hwmon/hwmon0'
|
path_to_hwmon='/sys/class/hwmon/hwmon0'
|
||||||
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||||||
;;
|
;;
|
||||||
|
seagate,blackarmor-nas220)
|
||||||
|
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||||||
|
# adt7476 fan control chip. 3 temp sensors. Set to 1/4 speed at 35C and max speed at 48C.
|
||||||
|
echo 7 > "$path_to_hwmon/pwm1_auto_channels_temp"
|
||||||
|
echo 64 > "$path_to_hwmon/pwm1_auto_point1_pwm"
|
||||||
|
echo 255 > "$path_to_hwmon/pwm1_auto_point2_pwm"
|
||||||
|
echo 35000 > "$path_to_hwmon/temp1_auto_point1_temp"
|
||||||
|
echo 48000 > "$path_to_hwmon/temp1_auto_point2_temp"
|
||||||
|
echo 35000 > "$path_to_hwmon/temp2_auto_point1_temp"
|
||||||
|
echo 48000 > "$path_to_hwmon/temp2_auto_point2_temp"
|
||||||
|
echo 35000 > "$path_to_hwmon/temp3_auto_point1_temp"
|
||||||
|
echo 48000 > "$path_to_hwmon/temp3_auto_point2_temp"
|
||||||
|
echo 2 > "$path_to_hwmon/pwm1_enable"
|
||||||
|
;;
|
||||||
zyxel,nsa310b)
|
zyxel,nsa310b)
|
||||||
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||||||
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||||||
|
@ -212,6 +212,7 @@ CONFIG_LZO_DECOMPRESS=y
|
|||||||
CONFIG_MACH_KIRKWOOD=y
|
CONFIG_MACH_KIRKWOOD=y
|
||||||
CONFIG_MACH_MVEBU_ANY=y
|
CONFIG_MACH_MVEBU_ANY=y
|
||||||
CONFIG_MANGLE_BOOTARGS=y
|
CONFIG_MANGLE_BOOTARGS=y
|
||||||
|
CONFIG_MARVELL_PHY=y
|
||||||
CONFIG_MDIO_BUS=y
|
CONFIG_MDIO_BUS=y
|
||||||
CONFIG_MDIO_DEVICE=y
|
CONFIG_MDIO_DEVICE=y
|
||||||
CONFIG_MEMFD_CREATE=y
|
CONFIG_MEMFD_CREATE=y
|
||||||
@ -281,6 +282,7 @@ CONFIG_PINCTRL=y
|
|||||||
CONFIG_PINCTRL_KIRKWOOD=y
|
CONFIG_PINCTRL_KIRKWOOD=y
|
||||||
CONFIG_PINCTRL_MVEBU=y
|
CONFIG_PINCTRL_MVEBU=y
|
||||||
# CONFIG_PINCTRL_SINGLE is not set
|
# CONFIG_PINCTRL_SINGLE is not set
|
||||||
|
CONFIG_PINCTRL_SX150X=y
|
||||||
CONFIG_PLAT_ORION=y
|
CONFIG_PLAT_ORION=y
|
||||||
CONFIG_POWER_RESET=y
|
CONFIG_POWER_RESET=y
|
||||||
CONFIG_POWER_RESET_GPIO=y
|
CONFIG_POWER_RESET_GPIO=y
|
||||||
|
@ -137,6 +137,18 @@ define Device/raidsonic_ib-nas62x0
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += raidsonic_ib-nas62x0
|
TARGET_DEVICES += raidsonic_ib-nas62x0
|
||||||
|
|
||||||
|
define Device/seagate_blackarmor-nas220
|
||||||
|
DEVICE_VENDOR := Seagate
|
||||||
|
DEVICE_MODEL := Blackarmor NAS220
|
||||||
|
DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \
|
||||||
|
mdadm kmod-gpio-button-hotplug
|
||||||
|
PAGESIZE := 512
|
||||||
|
SUBPAGESIZE := 256
|
||||||
|
BLOCKSIZE := 16k
|
||||||
|
UBINIZE_OPTS := -e 1
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += seagate_blackarmor-nas220
|
||||||
|
|
||||||
define Device/seagate_dockstar
|
define Device/seagate_dockstar
|
||||||
DEVICE_VENDOR := Seagate
|
DEVICE_VENDOR := Seagate
|
||||||
DEVICE_MODEL := FreeAgent Dockstar
|
DEVICE_MODEL := FreeAgent Dockstar
|
||||||
|
@ -0,0 +1,99 @@
|
|||||||
|
--- a/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
|
||||||
|
+++ b/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
|
||||||
|
@@ -17,6 +17,13 @@
|
||||||
|
compatible = "seagate,blackarmor-nas220","marvell,kirkwood-88f6192",
|
||||||
|
"marvell,kirkwood";
|
||||||
|
|
||||||
|
+ aliases {
|
||||||
|
+ led-boot = &led_status_amber;
|
||||||
|
+ led-failsafe = &led_status_amber;
|
||||||
|
+ led-running = &led_status_blue;
|
||||||
|
+ led-upgrade = &led_status_amber;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
memory { /* 128 MB */
|
||||||
|
device_type = "memory";
|
||||||
|
reg = <0x00000000 0x8000000>;
|
||||||
|
@@ -36,14 +43,14 @@
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
- label = "Reset";
|
||||||
|
- linux,code = <KEY_POWER>;
|
||||||
|
+ label = "Reset Button";
|
||||||
|
+ linux,code = <KEY_RESTART>;
|
||||||
|
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- button {
|
||||||
|
- label = "Power";
|
||||||
|
- linux,code = <KEY_SLEEP>;
|
||||||
|
+ power {
|
||||||
|
+ label = "Power Button";
|
||||||
|
+ linux,code = <KEY_POWER>;
|
||||||
|
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@@ -51,11 +58,27 @@
|
||||||
|
gpio-leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
- blue-power {
|
||||||
|
+ led_power_blue: power_blue {
|
||||||
|
label = "nas220:blue:power";
|
||||||
|
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
|
linux,default-trigger = "default-on";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+ disk_blue {
|
||||||
|
+ label = "nas220:blue:disk";
|
||||||
|
+ gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
|
||||||
|
+ linux,default-trigger = "disk-activity";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ led_status_blue: status_blue {
|
||||||
|
+ label = "nas220:blue:status";
|
||||||
|
+ gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ led_status_amber: status_amber {
|
||||||
|
+ label = "nas220:amber:status";
|
||||||
|
+ gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
regulators {
|
||||||
|
@@ -153,6 +176,33 @@
|
||||||
|
|
||||||
|
&nand {
|
||||||
|
status = "okay";
|
||||||
|
+
|
||||||
|
+ partitions {
|
||||||
|
+ compatible = "fixed-partitions";
|
||||||
|
+
|
||||||
|
+ partition@0 {
|
||||||
|
+ label = "uboot";
|
||||||
|
+ reg = <0x0 0xa0000>;
|
||||||
|
+ read-only;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@a0000 {
|
||||||
|
+ label = "uboot-env";
|
||||||
|
+ reg = <0xa0000 0x10000>;
|
||||||
|
+ read-only;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@b0000 {
|
||||||
|
+ label = "reserved";
|
||||||
|
+ reg = <0xb0000 0x10000>;
|
||||||
|
+ read-only;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@c0000 {
|
||||||
|
+ label = "ubi";
|
||||||
|
+ reg = <0xc0000 0x1e80000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&mdio {
|
@ -141,7 +141,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
#define ENETC_SIPCAPR0_RSS BIT(8)
|
#define ENETC_SIPCAPR0_RSS BIT(8)
|
||||||
#define ENETC_SIPCAPR1 0x24
|
#define ENETC_SIPCAPR1 0x24
|
||||||
#define ENETC_SITGTGR 0x30
|
#define ENETC_SITGTGR 0x30
|
||||||
@@ -440,22 +441,6 @@ union enetc_rx_bd {
|
@@ -444,22 +445,6 @@ union enetc_rx_bd {
|
||||||
#define EMETC_MAC_ADDR_FILT_RES 3 /* # of reserved entries at the beginning */
|
#define EMETC_MAC_ADDR_FILT_RES 3 /* # of reserved entries at the beginning */
|
||||||
#define ENETC_MAX_NUM_VFS 2
|
#define ENETC_MAX_NUM_VFS 2
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
#define ENETC_CBD_FLAGS_SF BIT(7) /* short format */
|
#define ENETC_CBD_FLAGS_SF BIT(7) /* short format */
|
||||||
#define ENETC_CBD_STATUS_MASK 0xf
|
#define ENETC_CBD_STATUS_MASK 0xf
|
||||||
|
|
||||||
@@ -554,3 +539,70 @@ static inline void enetc_set_bdr_prio(st
|
@@ -558,3 +543,70 @@ static inline void enetc_set_bdr_prio(st
|
||||||
val |= ENETC_TBMR_SET_PRIO(prio);
|
val |= ENETC_TBMR_SET_PRIO(prio);
|
||||||
enetc_txbdr_wr(hw, bdr_idx, ENETC_TBMR, val);
|
enetc_txbdr_wr(hw, bdr_idx, ENETC_TBMR, val);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
|||||||
rx_frm_cnt++;
|
rx_frm_cnt++;
|
||||||
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
||||||
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
||||||
@@ -321,8 +321,15 @@ struct enetc_hw {
|
@@ -325,8 +325,15 @@ struct enetc_hw {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* general register accessors */
|
/* general register accessors */
|
||||||
@ -272,7 +272,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
|||||||
#ifdef ioread64
|
#ifdef ioread64
|
||||||
#define enetc_rd_reg64(reg) ioread64((reg))
|
#define enetc_rd_reg64(reg) ioread64((reg))
|
||||||
#else
|
#else
|
||||||
@@ -341,12 +348,102 @@ static inline u64 enetc_rd_reg64(void __
|
@@ -345,12 +352,102 @@ static inline u64 enetc_rd_reg64(void __
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
||||||
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
||||||
@@ -195,15 +195,21 @@ static const char tx_ring_stats[][ETH_GS
|
@@ -199,15 +199,21 @@ static const char tx_ring_stats[][ETH_GS
|
||||||
static int enetc_get_sset_count(struct net_device *ndev, int sset)
|
static int enetc_get_sset_count(struct net_device *ndev, int sset)
|
||||||
{
|
{
|
||||||
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
||||||
|
@ -259,7 +259,7 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
||||||
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
|
||||||
@@ -325,7 +325,7 @@ struct enetc_hw {
|
@@ -329,7 +329,7 @@ struct enetc_hw {
|
||||||
#define enetc_wr_reg(reg, val) enetc_wr_reg_wa((reg), (val))
|
#define enetc_wr_reg(reg, val) enetc_wr_reg_wa((reg), (val))
|
||||||
|
|
||||||
/* accessors for data-path, due to MDIO issue on LS1028 these should be called
|
/* accessors for data-path, due to MDIO issue on LS1028 these should be called
|
||||||
@ -268,7 +268,7 @@ Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
|
|||||||
*/
|
*/
|
||||||
#define enetc_rd_reg_hot(reg) ioread32((reg))
|
#define enetc_rd_reg_hot(reg) ioread32((reg))
|
||||||
#define enetc_wr_reg_hot(reg, val) iowrite32((val), (reg))
|
#define enetc_wr_reg_hot(reg, val) iowrite32((val), (reg))
|
||||||
@@ -348,90 +348,45 @@ static inline u64 enetc_rd_reg64(void __
|
@@ -352,90 +352,45 @@ static inline u64 enetc_rd_reg64(void __
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
#define ENETC_PTCCBSR1(n) (0x1114 + (n) * 8) /* n = 0 to 7*/
|
#define ENETC_PTCCBSR1(n) (0x1114 + (n) * 8) /* n = 0 to 7*/
|
||||||
#define ENETC_RSSHASH_KEY_SIZE 40
|
#define ENETC_RSSHASH_KEY_SIZE 40
|
||||||
#define ENETC_PRSSK(n) (0x1410 + (n) * 4) /* n = [0..9] */
|
#define ENETC_PRSSK(n) (0x1410 + (n) * 4) /* n = [0..9] */
|
||||||
@@ -673,6 +675,8 @@ struct enetc_cbd {
|
@@ -677,6 +679,8 @@ struct enetc_cbd {
|
||||||
u8 status_flags;
|
u8 status_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
+#endif
|
+#endif
|
||||||
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
||||||
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
|
||||||
@@ -183,6 +183,21 @@ static const struct {
|
@@ -187,6 +187,21 @@ static const struct {
|
||||||
{ ENETC_PICDR(3), "ICM DR3 discarded frames" },
|
{ ENETC_PICDR(3), "ICM DR3 discarded frames" },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
static const char rx_ring_stats[][ETH_GSTRING_LEN] = {
|
static const char rx_ring_stats[][ETH_GSTRING_LEN] = {
|
||||||
"Rx ring %2d frames",
|
"Rx ring %2d frames",
|
||||||
"Rx ring %2d alloc errors",
|
"Rx ring %2d alloc errors",
|
||||||
@@ -192,6 +207,10 @@ static const char tx_ring_stats[][ETH_GS
|
@@ -196,6 +211,10 @@ static const char tx_ring_stats[][ETH_GS
|
||||||
"Tx ring %2d frames",
|
"Tx ring %2d frames",
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
static int enetc_get_sset_count(struct net_device *ndev, int sset)
|
static int enetc_get_sset_count(struct net_device *ndev, int sset)
|
||||||
{
|
{
|
||||||
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
struct enetc_ndev_priv *priv = netdev_priv(ndev);
|
||||||
@@ -209,6 +228,12 @@ static int enetc_get_sset_count(struct n
|
@@ -213,6 +232,12 @@ static int enetc_get_sset_count(struct n
|
||||||
|
|
||||||
len += ARRAY_SIZE(enetc_port_counters);
|
len += ARRAY_SIZE(enetc_port_counters);
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,6 +272,28 @@ static void enetc_get_strings(struct net
|
@@ -251,6 +276,28 @@ static void enetc_get_strings(struct net
|
||||||
ETH_GSTRING_LEN);
|
ETH_GSTRING_LEN);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
}
|
}
|
||||||
@ -267,7 +267,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,6 +321,18 @@ static void enetc_get_ethtool_stats(stru
|
@@ -278,6 +325,18 @@ static void enetc_get_ethtool_stats(stru
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(enetc_port_counters); i++)
|
for (i = 0; i < ARRAY_SIZE(enetc_port_counters); i++)
|
||||||
data[o++] = enetc_port_rd(hw, enetc_port_counters[i].reg);
|
data[o++] = enetc_port_rd(hw, enetc_port_counters[i].reg);
|
||||||
@ -317,7 +317,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
|
|
||||||
/* MAC counters */
|
/* MAC counters */
|
||||||
#define ENETC_PM0_REOCT 0x8100
|
#define ENETC_PM0_REOCT 0x8100
|
||||||
@@ -294,6 +305,15 @@ enum enetc_bdr_type {TX, RX};
|
@@ -298,6 +309,15 @@ enum enetc_bdr_type {TX, RX};
|
||||||
#define ENETC_PM0_TSCOL 0x82E0
|
#define ENETC_PM0_TSCOL 0x82E0
|
||||||
#define ENETC_PM0_TLCOL 0x82E8
|
#define ENETC_PM0_TLCOL 0x82E8
|
||||||
#define ENETC_PM0_TECOL 0x82F0
|
#define ENETC_PM0_TECOL 0x82F0
|
||||||
@ -333,7 +333,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
|
|
||||||
/* Port counters */
|
/* Port counters */
|
||||||
#define ENETC_PICDR(n) (0x0700 + (n) * 8) /* n = [0..3] */
|
#define ENETC_PICDR(n) (0x0700 + (n) * 8) /* n = [0..3] */
|
||||||
@@ -452,6 +472,7 @@ union enetc_tx_bd {
|
@@ -456,6 +476,7 @@ union enetc_tx_bd {
|
||||||
#define ENETC_TXBD_FLAGS_CSUM BIT(3)
|
#define ENETC_TXBD_FLAGS_CSUM BIT(3)
|
||||||
#define ENETC_TXBD_FLAGS_EX BIT(6)
|
#define ENETC_TXBD_FLAGS_EX BIT(6)
|
||||||
#define ENETC_TXBD_FLAGS_F BIT(7)
|
#define ENETC_TXBD_FLAGS_F BIT(7)
|
||||||
@ -341,7 +341,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
|
|
||||||
static inline void enetc_clear_tx_bd(union enetc_tx_bd *txbd)
|
static inline void enetc_clear_tx_bd(union enetc_tx_bd *txbd)
|
||||||
{
|
{
|
||||||
@@ -479,6 +500,8 @@ static inline __le16 enetc_txbd_l3_csoff
|
@@ -483,6 +504,8 @@ static inline __le16 enetc_txbd_l3_csoff
|
||||||
#define ENETC_TXBD_L4_UDP BIT(5)
|
#define ENETC_TXBD_L4_UDP BIT(5)
|
||||||
#define ENETC_TXBD_L4_TCP BIT(6)
|
#define ENETC_TXBD_L4_TCP BIT(6)
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
union enetc_rx_bd {
|
union enetc_rx_bd {
|
||||||
struct {
|
struct {
|
||||||
__le64 addr;
|
__le64 addr;
|
||||||
@@ -625,21 +648,307 @@ enum bdcr_cmd_class {
|
@@ -629,21 +652,307 @@ enum bdcr_cmd_class {
|
||||||
BDCR_CMD_RFS,
|
BDCR_CMD_RFS,
|
||||||
BDCR_CMD_PORT_GCL,
|
BDCR_CMD_PORT_GCL,
|
||||||
BDCR_CMD_RECV_CLASSIFIER,
|
BDCR_CMD_RECV_CLASSIFIER,
|
||||||
@ -662,7 +662,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
/* gate control list entry */
|
/* gate control list entry */
|
||||||
struct gce {
|
struct gce {
|
||||||
__le32 period;
|
__le32 period;
|
||||||
@@ -656,13 +965,55 @@ struct tgs_gcl_data {
|
@@ -660,13 +969,55 @@ struct tgs_gcl_data {
|
||||||
struct gce entry[0];
|
struct gce entry[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -719,7 +719,7 @@ Signed-off-by: Po Liu <Po.Liu@nxp.com>
|
|||||||
};
|
};
|
||||||
}; /* Long format */
|
}; /* Long format */
|
||||||
__le32 data[6];
|
__le32 data[6];
|
||||||
@@ -677,11 +1028,88 @@ struct enetc_cbd {
|
@@ -681,11 +1032,88 @@ struct enetc_cbd {
|
||||||
|
|
||||||
#define ENETC_CLK 400000000ULL
|
#define ENETC_CLK 400000000ULL
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Li Jun <jun.li@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/usb/host/xhci-hub.c
|
--- a/drivers/usb/host/xhci-hub.c
|
||||||
+++ b/drivers/usb/host/xhci-hub.c
|
+++ b/drivers/usb/host/xhci-hub.c
|
||||||
@@ -1733,7 +1733,8 @@ static bool xhci_port_missing_cas_quirk(
|
@@ -1737,7 +1737,8 @@ static bool xhci_port_missing_cas_quirk(
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&
|
if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&
|
||||||
|
@ -111,7 +111,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
struct mvpp2_port *port = netdev_priv(dev);
|
struct mvpp2_port *port = netdev_priv(dev);
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -448,9 +448,10 @@ static void mtk_mac_link_down(struct phy
|
@@ -449,9 +449,10 @@ static void mtk_mac_link_down(struct phy
|
||||||
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
#include <linux/mfd/syscon.h>
|
#include <linux/mfd/syscon.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
@@ -2482,6 +2483,13 @@ static int mtk_hw_init(struct mtk_eth *e
|
@@ -2485,6 +2486,13 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_disable_pm;
|
goto err_disable_pm;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
|
||||||
ret = device_reset(eth->dev);
|
ret = device_reset(eth->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@@ -3080,6 +3088,16 @@ static int mtk_probe(struct platform_dev
|
@@ -3083,6 +3091,16 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,6 +209,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&coherencyfab {
|
||||||
|
broken-idle;
|
||||||
|
};
|
||||||
|
|
||||||
ð1 {
|
ð1 {
|
||||||
pinctrl-0 = <&ge1_rgmii_pins>;
|
pinctrl-0 = <&ge1_rgmii_pins>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
@ -226,6 +230,7 @@
|
|||||||
rs5c372a: rs5c372a@32 {
|
rs5c372a: rs5c372a@32 {
|
||||||
compatible = "ricoh,rs5c372a";
|
compatible = "ricoh,rs5c372a";
|
||||||
reg = <0x32>;
|
reg = <0x32>;
|
||||||
|
wakeup-source;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ define Device/marvell_macchiatobin-singleshot
|
|||||||
DEVICE_ALT0_VENDOR := SolidRun
|
DEVICE_ALT0_VENDOR := SolidRun
|
||||||
DEVICE_ALT0_MODEL := Armada 8040 Community Board
|
DEVICE_ALT0_MODEL := Armada 8040 Community Board
|
||||||
DEVICE_ALT0_VARIANT := Single Shot
|
DEVICE_ALT0_VARIANT := Single Shot
|
||||||
DEVICE_PACKAGES += kmod-i2c-mux-pca954x
|
DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-ledtrig-heartbeat
|
||||||
DEVICE_DTS := armada-8040-mcbin-singleshot
|
DEVICE_DTS := armada-8040-mcbin-singleshot
|
||||||
SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot
|
SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot
|
||||||
endef
|
endef
|
||||||
|
@ -27,7 +27,8 @@ define Device/cznic_turris-omnia
|
|||||||
DEVICE_VENDOR := CZ.NIC
|
DEVICE_VENDOR := CZ.NIC
|
||||||
DEVICE_MODEL := Turris Omnia
|
DEVICE_MODEL := Turris Omnia
|
||||||
KERNEL_INSTALL := 1
|
KERNEL_INSTALL := 1
|
||||||
KERNEL := kernel-bin | append-dtb
|
KERNEL := kernel-bin
|
||||||
|
KERNEL_INITRAMFS := kernel-bin
|
||||||
DEVICE_PACKAGES := \
|
DEVICE_PACKAGES := \
|
||||||
mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
||||||
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
|
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
From 525b0858ff2fdb78defec2d4d6d63baaa423d5fd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
|
||||||
|
Date: Fri, 13 Mar 2020 16:42:44 +1300
|
||||||
|
Subject: [PATCH] gpio: mvebu: avoid error message for optional IRQ
|
||||||
|
|
||||||
|
platform_get_irq() will generate an error message if the requested irq
|
||||||
|
is not present
|
||||||
|
|
||||||
|
mvebu-gpio f1010140.gpio: IRQ index 3 not found
|
||||||
|
|
||||||
|
use platform_get_irq_optional() to avoid the error message being
|
||||||
|
generated.
|
||||||
|
|
||||||
|
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
|
||||||
|
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
||||||
|
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||||
|
---
|
||||||
|
drivers/gpio/gpio-mvebu.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
|
||||||
|
index d2b999c7987f1..3c9f4fb3d5a28 100644
|
||||||
|
--- a/drivers/gpio/gpio-mvebu.c
|
||||||
|
+++ b/drivers/gpio/gpio-mvebu.c
|
||||||
|
@@ -1245,7 +1245,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
|
||||||
|
* pins.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < 4; i++) {
|
||||||
|
- int irq = platform_get_irq(pdev, i);
|
||||||
|
+ int irq = platform_get_irq_optional(pdev, i);
|
||||||
|
|
||||||
|
if (irq < 0)
|
||||||
|
continue;
|
@ -0,0 +1,65 @@
|
|||||||
|
From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
|
Date: Tue, 10 Nov 2020 16:38:31 +0100
|
||||||
|
Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED
|
||||||
|
|
||||||
|
With board revision 1.3, SolidRun moved the power LED to the middle of
|
||||||
|
the board. In old place of power LED a GPIO controllable heartbeat LED
|
||||||
|
was added. This commit only touches Single Shot variant, since only this
|
||||||
|
variant is all revision 1.3.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
This is slightly modified patch. Some boards could be placed in an
|
||||||
|
enclosure, so the LED18 is enabled by default, since that'll be the only
|
||||||
|
visible indicator that the board is operating.
|
||||||
|
|
||||||
|
Reported-by: Alexandra Alth <alexandra@alth.de>
|
||||||
|
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
|
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
|
||||||
|
---
|
||||||
|
.../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++
|
||||||
|
1 file changed, 22 insertions(+)
|
||||||
|
|
||||||
|
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
|
||||||
|
@@ -5,6 +5,8 @@
|
||||||
|
* Device Tree file for MACCHIATOBin Armada 8040 community board platform
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <dt-bindings/leds/common.h>
|
||||||
|
+
|
||||||
|
#include "armada-8040-mcbin.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
@@ -12,6 +14,20 @@
|
||||||
|
compatible = "marvell,armada8040-mcbin-singleshot",
|
||||||
|
"marvell,armada8040-mcbin", "marvell,armada8040",
|
||||||
|
"marvell,armada-ap806-quad", "marvell,armada-ap806";
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+ pinctrl-0 = <&cp0_led18_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+
|
||||||
|
+ led18 {
|
||||||
|
+ gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>;
|
||||||
|
+ function = LED_FUNCTION_HEARTBEAT;
|
||||||
|
+ color = <LED_COLOR_ID_GREEN>;
|
||||||
|
+ linux,default-trigger = "heartbeat";
|
||||||
|
+ default-state = "on";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
};
|
||||||
|
|
||||||
|
&cp0_eth0 {
|
||||||
|
@@ -27,3 +43,10 @@
|
||||||
|
managed = "in-band-status";
|
||||||
|
sfp = <&sfp_eth1>;
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&cp0_pinctrl {
|
||||||
|
+ cp0_led18_pins: led18-pins {
|
||||||
|
+ marvell,pins = "mpp33";
|
||||||
|
+ marvell,function = "gpio";
|
||||||
|
+ };
|
||||||
|
+};
|
@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -2919,6 +2919,7 @@ static const struct net_device_ops mtk_n
|
@@ -2922,6 +2922,7 @@ static const struct net_device_ops mtk_n
|
||||||
|
|
||||||
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
|
|||||||
const __be32 *_id = of_get_property(np, "reg", NULL);
|
const __be32 *_id = of_get_property(np, "reg", NULL);
|
||||||
struct phylink *phylink;
|
struct phylink *phylink;
|
||||||
int phy_mode, id, err;
|
int phy_mode, id, err;
|
||||||
@@ -3011,6 +3012,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -3014,6 +3015,9 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
|
|
||||||
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
|
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user