mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
kernel: bump 5.4 to 5.4.83 (#6040)
This commit is contained in:
parent
543a4a41a6
commit
995724bffb
@ -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 = .79
|
LINUX_VERSION-5.4 = .83
|
||||||
|
|
||||||
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.79 = a59091fb08ff66a344a7842b7c891f36cef609eed1d2944edf475cca8d91ce25
|
LINUX_KERNEL_HASH-5.4.83 = beec970bbb93de8ab839f27930f7ab00c7bd65af0ffa07a50e765affdc2561c6
|
||||||
|
|
||||||
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)))))))
|
||||||
|
@ -17,11 +17,13 @@ alfa-network,ap121f|\
|
|||||||
alfa-network,ap121fe|\
|
alfa-network,ap121fe|\
|
||||||
alfa-network,n2q|\
|
alfa-network,n2q|\
|
||||||
alfa-network,n5q|\
|
alfa-network,n5q|\
|
||||||
|
alfa-network,pi-wifi4|\
|
||||||
alfa-network,r36a|\
|
alfa-network,r36a|\
|
||||||
allnet,all-wap02860ac|\
|
allnet,all-wap02860ac|\
|
||||||
arduino,yun|\
|
arduino,yun|\
|
||||||
buffalo,bhr-4grv2|\
|
buffalo,bhr-4grv2|\
|
||||||
devolo,magic-2-wifi|\
|
devolo,magic-2-wifi|\
|
||||||
|
engenius,eap300-v2|\
|
||||||
engenius,ecb1750|\
|
engenius,ecb1750|\
|
||||||
engenius,enh202-v1|\
|
engenius,enh202-v1|\
|
||||||
engenius,ens202ext-v1|\
|
engenius,ens202ext-v1|\
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -11,7 +11,7 @@ PKG_RELEASE := 1
|
|||||||
|
|
||||||
PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
|
PKG_HASH := 76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
|
||||||
|
|
||||||
PKG_MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
|
PKG_MAINTAINER := Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/u-boot.mk
|
include $(INCLUDE_DIR)/u-boot.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dirk Mueller <dmueller@suse.com>
|
||||||
|
Date: Tue, 14 Jan 2020 18:53:41 +0100
|
||||||
|
Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
|
||||||
|
|
||||||
|
gcc 10 will default to -fno-common, which causes this error at link
|
||||||
|
time:
|
||||||
|
|
||||||
|
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||||
|
|
||||||
|
This is because both dtc-lexer as well as dtc-parser define the same
|
||||||
|
global symbol yyloc. Before with -fcommon those were merged into one
|
||||||
|
defintion. The proper solution would be to to mark this as "extern",
|
||||||
|
however that leads to:
|
||||||
|
|
||||||
|
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
|
||||||
|
26 | extern YYLTYPE yylloc;
|
||||||
|
| ^~~~~~
|
||||||
|
In file included from dtc-lexer.l:24:
|
||||||
|
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
|
||||||
|
127 | extern YYLTYPE yylloc;
|
||||||
|
| ^~~~~~
|
||||||
|
cc1: all warnings being treated as errors
|
||||||
|
|
||||||
|
which means the declaration is completely redundant and can just be
|
||||||
|
dropped.
|
||||||
|
|
||||||
|
Signed-off-by: Dirk Mueller <dmueller@suse.com>
|
||||||
|
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||||
|
[robh: cherry-pick from upstream]
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Signed-off-by: Rob Herring <robh@kernel.org>
|
||||||
|
---
|
||||||
|
scripts/dtc/dtc-lexer.l | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||||
|
index 5c6c3fd557d7f..b3b7270300de5 100644
|
||||||
|
--- a/scripts/dtc/dtc-lexer.l
|
||||||
|
+++ b/scripts/dtc/dtc-lexer.l
|
||||||
|
@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
|
||||||
|
#include "srcpos.h"
|
||||||
|
#include "dtc-parser.tab.h"
|
||||||
|
|
||||||
|
-YYLTYPE yylloc;
|
||||||
|
extern bool treesource_error;
|
||||||
|
|
||||||
|
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
@ -65,7 +65,7 @@ define KernelPackage/ata-ahci-platform
|
|||||||
$(LINUX_DIR)/drivers/ata/ahci_platform.ko \
|
$(LINUX_DIR)/drivers/ata/ahci_platform.ko \
|
||||||
$(LINUX_DIR)/drivers/ata/libahci_platform.ko
|
$(LINUX_DIR)/drivers/ata/libahci_platform.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1)
|
AUTOLOAD:=$(call AutoLoad,40,libahci libahci_platform ahci_platform,1)
|
||||||
$(call AddDepends/ata,@TARGET_ipq806x||TARGET_sunxi)
|
$(call AddDepends/ata,@TARGET_ipq806x||TARGET_layerscape||TARGET_sunxi)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/ata-ahci-platform/description
|
define KernelPackage/ata-ahci-platform/description
|
||||||
|
@ -1219,3 +1219,56 @@ define KernelPackage/sfp/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,sfp))
|
$(eval $(call KernelPackage,sfp))
|
||||||
|
|
||||||
|
define KernelPackage/igc
|
||||||
|
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||||
|
TITLE:=Intel(R) Ethernet Controller I225 Series support
|
||||||
|
DEPENDS:=@PCI_SUPPORT
|
||||||
|
KCONFIG:=CONFIG_IGC
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/igc/igc.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,igc)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/igc/description
|
||||||
|
Kernel modules for Intel(R) Ethernet Controller I225 Series
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,igc))
|
||||||
|
|
||||||
|
define KernelPackage/sfc
|
||||||
|
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||||
|
TITLE:=Solarflare SFC9000/SFC9100/EF100-family support
|
||||||
|
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-ptp +kmod-hwmon-core
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_SFC \
|
||||||
|
CONFIG_SFC_MTD=y \
|
||||||
|
CONFIG_SFC_MCDI_MON=y \
|
||||||
|
CONFIG_SFC_MCDI_LOGGING=y \
|
||||||
|
CONFIG_SFC_SRIOV=y
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/net/ethernet/sfc/sfc.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,sfc)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/sfc/description
|
||||||
|
Solarflare SFC9000/SFC9100/EF100-family support
|
||||||
|
Solarflare EF100 support requires at least kernel version 5.9
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sfc))
|
||||||
|
|
||||||
|
define KernelPackage/sfc-falcon
|
||||||
|
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||||
|
TITLE:=Solarflare SFC4000 support
|
||||||
|
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-i2c-algo-bit
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_SFC_FALCON \
|
||||||
|
CONFIG_SFC_FALCON_MTD=y
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/net/ethernet/sfc/falcon/sfc-falcon.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,sfc-falcon)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/sfc-falcon/description
|
||||||
|
Solarflare SFC4000 support
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sfc-falcon))
|
||||||
|
@ -1122,6 +1122,21 @@ define AddDepends/usb-net
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/usb-net-aqc111
|
||||||
|
TITLE:=Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE
|
||||||
|
KCONFIG:=CONFIG_USB_NET_AQC111
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/aqc111.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,aqc111)
|
||||||
|
$(call AddDepends/usb-net)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/usb-net-aqc111/description
|
||||||
|
Support for USB-to-Ethernet Aquantia AQtion 5/2.5GbE
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,usb-net-aqc111))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/usb-net-asix
|
define KernelPackage/usb-net-asix
|
||||||
TITLE:=Kernel module for USB-to-Ethernet Asix convertors
|
TITLE:=Kernel module for USB-to-Ethernet Asix convertors
|
||||||
DEPENDS:=+kmod-libphy
|
DEPENDS:=+kmod-libphy
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
ARCH:=aarch64
|
ARCH:=aarch64
|
||||||
SUBTARGET:=64
|
SUBTARGET:=64
|
||||||
BOARDNAME:=ARMv8 multiplatform
|
BOARDNAME:=QEMU ARMv8 Virtual Machine (cortex-a53)
|
||||||
|
CPU_TYPE:=cortex-a53
|
||||||
KERNELNAME:=Image
|
KERNELNAME:=Image
|
||||||
|
|
||||||
define Target/Description
|
define Target/Description
|
||||||
Build multi-platform images for the ARMv8 instruction set architecture
|
Build multi-platform images for the ARMv8 instruction set architecture
|
||||||
endef
|
endef
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
This is intended to be used with LEDE project to provide image for use with
|
This is intended to be used with OpenWrt project to provide image for use with
|
||||||
QEMU ARM virt machine.
|
QEMU ARM virt machine.
|
||||||
|
|
||||||
Run with qemu-system-arm
|
Run with qemu-system-arm
|
||||||
|
@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
|
|||||||
/* Read as many bytes as possible from FIFO */
|
/* Read as many bytes as possible from FIFO */
|
||||||
bcm2835_rd_fifo(bs);
|
bcm2835_rd_fifo(bs);
|
||||||
/* Write as many bytes as possible to FIFO */
|
/* Write as many bytes as possible to FIFO */
|
||||||
@@ -1334,7 +1338,8 @@ static int bcm2835_spi_probe(struct plat
|
@@ -1330,7 +1334,8 @@ static int bcm2835_spi_probe(struct plat
|
||||||
bcm2835_wr(bs, BCM2835_SPI_CS,
|
bcm2835_wr(bs, BCM2835_SPI_CS,
|
||||||
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
|
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|||||||
#define USB_VENDOR_ID_BELKIN 0x050d
|
#define USB_VENDOR_ID_BELKIN 0x050d
|
||||||
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
#define USB_DEVICE_ID_FLIP_KVM 0x3201
|
||||||
|
|
||||||
@@ -1245,6 +1248,9 @@
|
@@ -1253,6 +1256,9 @@
|
||||||
#define USB_VENDOR_ID_XAT 0x2505
|
#define USB_VENDOR_ID_XAT 0x2505
|
||||||
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
#define USB_DEVICE_ID_XAT_CSR 0x0220
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), HID_QUIRK_ALWAYS_POLL },
|
||||||
@@ -184,6 +185,7 @@ static const struct hid_device_id hid_qu
|
@@ -189,6 +190,7 @@ static const struct hid_device_id hid_qu
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_QUAD_USB_JOYPAD), HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE), HID_QUIRK_MULTI_INPUT },
|
||||||
|
@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
|||||||
dev_info(sdev->dev,
|
dev_info(sdev->dev,
|
||||||
"could not find PHY at %i, use fixed one\n",
|
"could not find PHY at %i, use fixed one\n",
|
||||||
bp->phy_addr);
|
bp->phy_addr);
|
||||||
@@ -2480,6 +2548,7 @@ static void b44_remove_one(struct ssb_de
|
@@ -2481,6 +2549,7 @@ static void b44_remove_one(struct ssb_de
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||||
b44_unregister_phy_one(bp);
|
b44_unregister_phy_one(bp);
|
||||||
|
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -2378,7 +2378,14 @@ static int mv88e6xxx_setup_upstream_port
|
@@ -2380,7 +2380,14 @@ static int mv88e6xxx_setup_upstream_port
|
||||||
|
|
||||||
if (chip->info->ops->set_egress_port) {
|
if (chip->info->ops->set_egress_port) {
|
||||||
err = chip->info->ops->set_egress_port(chip,
|
err = chip->info->ops->set_egress_port(chip,
|
||||||
@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
#define MV88E6XXX_CASCADE_PORT_MULTIPLE 0xf
|
#define MV88E6XXX_CASCADE_PORT_MULTIPLE 0xf
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
||||||
+++ b/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
|
@@ -294,7 +294,9 @@ int mv88e6250_g1_ieee_pri_map(struct mv8
|
||||||
/* Offset 0x1a: Monitor Control */
|
/* Offset 0x1a: Monitor Control */
|
||||||
/* Offset 0x1a: Monitor & MGMT Control on some devices */
|
/* Offset 0x1a: Monitor & MGMT Control on some devices */
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
{
|
{
|
||||||
u16 reg;
|
u16 reg;
|
||||||
int err;
|
int err;
|
||||||
@@ -272,11 +274,20 @@ int mv88e6095_g1_set_egress_port(struct
|
@@ -303,11 +305,20 @@ int mv88e6095_g1_set_egress_port(struct
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg);
|
return mv88e6xxx_g1_write(chip, MV88E6185_G1_MONITOR_CTL, reg);
|
||||||
}
|
}
|
||||||
@@ -310,17 +321,24 @@ static int mv88e6390_g1_monitor_write(st
|
@@ -341,17 +352,24 @@ static int mv88e6390_g1_monitor_write(st
|
||||||
return mv88e6xxx_g1_write(chip, MV88E6390_G1_MONITOR_MGMT_CTL, reg);
|
return mv88e6xxx_g1_write(chip, MV88E6390_G1_MONITOR_MGMT_CTL, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
return err;
|
return err;
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/global1.h
|
--- a/drivers/net/dsa/mv88e6xxx/global1.h
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/global1.h
|
+++ b/drivers/net/dsa/mv88e6xxx/global1.h
|
||||||
@@ -288,8 +288,12 @@ int mv88e6095_g1_stats_set_histogram(str
|
@@ -289,8 +289,12 @@ int mv88e6095_g1_stats_set_histogram(str
|
||||||
int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip);
|
int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip);
|
||||||
void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val);
|
void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val);
|
||||||
int mv88e6xxx_g1_stats_clear(struct mv88e6xxx_chip *chip);
|
int mv88e6xxx_g1_stats_clear(struct mv88e6xxx_chip *chip);
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -4920,6 +4920,80 @@ static int mv88e6xxx_port_mdb_del(struct
|
@@ -4922,6 +4922,80 @@ static int mv88e6xxx_port_mdb_del(struct
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
|
static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
|
||||||
bool unicast, bool multicast)
|
bool unicast, bool multicast)
|
||||||
{
|
{
|
||||||
@@ -4974,6 +5048,8 @@ static const struct dsa_switch_ops mv88e
|
@@ -4976,6 +5050,8 @@ static const struct dsa_switch_ops mv88e
|
||||||
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
|
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
|
||||||
.port_mdb_add = mv88e6xxx_port_mdb_add,
|
.port_mdb_add = mv88e6xxx_port_mdb_add,
|
||||||
.port_mdb_del = mv88e6xxx_port_mdb_del,
|
.port_mdb_del = mv88e6xxx_port_mdb_del,
|
||||||
@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
|
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
|
||||||
@@ -267,6 +267,7 @@ int mv88e6095_g1_set_egress_port(struct
|
@@ -298,6 +298,7 @@ int mv88e6095_g1_set_egress_port(struct
|
||||||
enum mv88e6xxx_egress_direction direction,
|
enum mv88e6xxx_egress_direction direction,
|
||||||
int port)
|
int port)
|
||||||
{
|
{
|
||||||
@ -147,7 +147,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
u16 reg;
|
u16 reg;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@@ -276,11 +277,13 @@ int mv88e6095_g1_set_egress_port(struct
|
@@ -307,11 +308,13 @@ int mv88e6095_g1_set_egress_port(struct
|
||||||
|
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case MV88E6XXX_EGRESS_DIR_INGRESS:
|
case MV88E6XXX_EGRESS_DIR_INGRESS:
|
||||||
@ -161,7 +161,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
|
reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
|
||||||
reg |= port <<
|
reg |= port <<
|
||||||
__bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
|
__bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
|
||||||
@@ -289,7 +292,11 @@ int mv88e6095_g1_set_egress_port(struct
|
@@ -320,7 +323,11 @@ int mv88e6095_g1_set_egress_port(struct
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Older generations also call this the ARP destination. It has been
|
/* Older generations also call this the ARP destination. It has been
|
||||||
@@ -325,14 +332,17 @@ int mv88e6390_g1_set_egress_port(struct
|
@@ -356,14 +363,17 @@ int mv88e6390_g1_set_egress_port(struct
|
||||||
enum mv88e6xxx_egress_direction direction,
|
enum mv88e6xxx_egress_direction direction,
|
||||||
int port)
|
int port)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST;
|
ptr = MV88E6390_G1_MONITOR_MGMT_CTL_PTR_EGRESS_DEST;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -340,10 +350,10 @@ int mv88e6390_g1_set_egress_port(struct
|
@@ -371,10 +381,10 @@ int mv88e6390_g1_set_egress_port(struct
|
||||||
}
|
}
|
||||||
|
|
||||||
err = mv88e6390_g1_monitor_write(chip, ptr, port);
|
err = mv88e6390_g1_monitor_write(chip, ptr, port);
|
||||||
|
@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -4987,7 +4987,7 @@ static void mv88e6xxx_port_mirror_del(st
|
@@ -4989,7 +4989,7 @@ static void mv88e6xxx_port_mirror_del(st
|
||||||
if (chip->info->ops->set_egress_port(chip,
|
if (chip->info->ops->set_egress_port(chip,
|
||||||
direction,
|
direction,
|
||||||
dsa_upstream_port(ds,
|
dsa_upstream_port(ds,
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
--- a/drivers/net/dsa/mv88e6xxx/global1.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
|
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
|
||||||
@@ -278,13 +278,13 @@ int mv88e6095_g1_set_egress_port(struct
|
@@ -309,13 +309,13 @@ int mv88e6095_g1_set_egress_port(struct
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case MV88E6XXX_EGRESS_DIR_INGRESS:
|
case MV88E6XXX_EGRESS_DIR_INGRESS:
|
||||||
dest_port_chip = &chip->ingress_dest_port;
|
dest_port_chip = &chip->ingress_dest_port;
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
|
@@ -196,7 +196,7 @@ struct flash_info {
|
||||||
|
u16 page_size;
|
||||||
|
u16 addr_width;
|
||||||
|
|
||||||
|
- u16 flags;
|
||||||
|
+ u32 flags;
|
||||||
|
#define SECT_4K BIT(0) /* SPINOR_OP_BE_4K works uniformly */
|
||||||
|
#define SPI_NOR_NO_ERASE BIT(1) /* No erase command needed */
|
||||||
|
#define SST_WRITE BIT(2) /* use SST byte programming */
|
||||||
|
@@ -233,6 +233,10 @@ struct flash_info {
|
||||||
|
#define SPI_NOR_SKIP_SFDP BIT(13) /* Skip parsing of SFDP tables */
|
||||||
|
#define USE_CLSR BIT(14) /* use CLSR command */
|
||||||
|
#define SPI_NOR_OCTAL_READ BIT(15) /* Flash supports Octal Read */
|
||||||
|
+#define SPI_NOR_4BIT_BP BIT(17) /*
|
||||||
|
+ * Flash SR has 4 bit fields (BP0-3)
|
||||||
|
+ * for block protection.
|
||||||
|
+ */
|
||||||
|
|
||||||
|
/* Part specific fixup hooks. */
|
||||||
|
const struct spi_nor_fixups *fixups;
|
||||||
|
@@ -1983,6 +1987,9 @@ static int spi_nor_clear_sr_bp(struct sp
|
||||||
|
int ret;
|
||||||
|
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
|
||||||
|
|
||||||
|
+ if (nor->flags & SNOR_F_HAS_4BIT_BP)
|
||||||
|
+ mask |= SR_BP3;
|
||||||
|
+
|
||||||
|
ret = read_sr(nor);
|
||||||
|
if (ret < 0) {
|
||||||
|
dev_err(nor->dev, "error while reading status register\n");
|
||||||
|
@@ -2335,7 +2342,7 @@ static const struct flash_info spi_nor_i
|
||||||
|
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
|
||||||
|
{ "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
|
||||||
|
- { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
|
||||||
|
+ { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_4BIT_BP) },
|
||||||
|
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
|
||||||
|
{ "mx25u3235f", INFO(0xc22536, 0, 64 * 1024, 64,
|
||||||
|
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||||
|
@@ -5024,6 +5031,9 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||||
|
if (info->flags & USE_CLSR)
|
||||||
|
nor->flags |= SNOR_F_USE_CLSR;
|
||||||
|
|
||||||
|
+ if (info->flags & SPI_NOR_4BIT_BP)
|
||||||
|
+ nor->flags |= SNOR_F_HAS_4BIT_BP;
|
||||||
|
+
|
||||||
|
if (info->flags & SPI_NOR_NO_ERASE)
|
||||||
|
mtd->flags |= MTD_NO_ERASE;
|
||||||
|
|
||||||
|
--- a/include/linux/mtd/spi-nor.h
|
||||||
|
+++ b/include/linux/mtd/spi-nor.h
|
||||||
|
@@ -127,6 +127,7 @@
|
||||||
|
#define SR_BP0 BIT(2) /* Block protect 0 */
|
||||||
|
#define SR_BP1 BIT(3) /* Block protect 1 */
|
||||||
|
#define SR_BP2 BIT(4) /* Block protect 2 */
|
||||||
|
+#define SR_BP3 BIT(5) /* Block protect 3 */
|
||||||
|
#define SR_TB BIT(5) /* Top/Bottom protect */
|
||||||
|
#define SR_SRWD BIT(7) /* SR write protect */
|
||||||
|
/* Spansion/Cypress specific status bits */
|
||||||
|
@@ -243,6 +244,7 @@ enum spi_nor_option_flags {
|
||||||
|
SNOR_F_4B_OPCODES = BIT(6),
|
||||||
|
SNOR_F_HAS_4BAIT = BIT(7),
|
||||||
|
SNOR_F_HAS_LOCK = BIT(8),
|
||||||
|
+ SNOR_F_HAS_4BIT_BP = BIT(12),
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
@ -13,16 +13,15 @@ index 12d967b..c2b98b6 100644
|
|||||||
struct nf_ct_event_notifier {
|
struct nf_ct_event_notifier {
|
||||||
int (*fcn)(unsigned int events, struct nf_ct_event *item);
|
int (*fcn)(unsigned int events, struct nf_ct_event *item);
|
||||||
};
|
};
|
||||||
@@ -80,7 +84,7 @@ int nf_conntrack_register_notifier(struc
|
@@ -80,6 +84,7 @@ int nf_conntrack_register_notifier(struc
|
||||||
struct nf_ct_event_notifier *nb);
|
struct nf_ct_event_notifier *nb);
|
||||||
void nf_conntrack_unregister_notifier(struct net *net,
|
void nf_conntrack_unregister_notifier(struct net *net,
|
||||||
struct nf_ct_event_notifier *nb);
|
struct nf_ct_event_notifier *nb);
|
||||||
-
|
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
void nf_ct_deliver_cached_events(struct nf_conn *ct);
|
void nf_ct_deliver_cached_events(struct nf_conn *ct);
|
||||||
int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct,
|
int nf_conntrack_eventmask_report(unsigned int eventmask, struct nf_conn *ct,
|
||||||
u32 portid, int report);
|
@@ -105,11 +110,13 @@ int nf_conntrack_eventmask_report(unsign
|
||||||
@@ -105,12 +109,15 @@ int nf_conntrack_eventmask_report(unsign
|
|
||||||
nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
|
nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||||
@ -33,12 +32,10 @@ index 12d967b..c2b98b6 100644
|
|||||||
|
|
||||||
if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb))
|
if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
e = nf_ct_ecache_find(ct);
|
e = nf_ct_ecache_find(ct);
|
||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
return;
|
|
||||||
@@ -124,10 +131,12 @@ static inline int
|
@@ -124,10 +131,12 @@ static inline int
|
||||||
u32 portid, int report)
|
u32 portid, int report)
|
||||||
{
|
{
|
||||||
@ -51,8 +48,8 @@ index 12d967b..c2b98b6 100644
|
|||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
return nf_conntrack_eventmask_report(1 << event, ct, portid, report);
|
return nf_conntrack_eventmask_report(1 << event, ct, portid, report);
|
||||||
}
|
#else
|
||||||
@@ -139,11 +148,14 @@ nf_conntrack_event_report(enum ip_conntr
|
@@ -139,10 +148,12 @@ nf_conntrack_event_report(enum ip_conntr
|
||||||
nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct)
|
nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||||
@ -61,12 +58,10 @@ index 12d967b..c2b98b6 100644
|
|||||||
|
|
||||||
if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb))
|
if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
return nf_conntrack_eventmask_report(1 << event, ct, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return nf_conntrack_eventmask_report(1 << event, ct, 0, 0);
|
||||||
|
#else
|
||||||
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
|
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
|
||||||
index e469e85..1d31db8 100644
|
index e469e85..1d31db8 100644
|
||||||
--- a/include/net/netns/conntrack.h
|
--- a/include/net/netns/conntrack.h
|
||||||
@ -87,9 +82,9 @@ diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
|
|||||||
index 63073be..08d7aab 100644
|
index 63073be..08d7aab 100644
|
||||||
--- a/net/netfilter/Kconfig
|
--- a/net/netfilter/Kconfig
|
||||||
+++ b/net/netfilter/Kconfig
|
+++ b/net/netfilter/Kconfig
|
||||||
@@ -148,6 +148,14 @@ config NF_CONNTRACK_EVENTS
|
@@ -148,6 +148,14 @@ config NF_CONNTRACK_RTCACHE
|
||||||
|
To compile it as a module, choose M here. If unsure, say N.
|
||||||
If unsure, say `N'.
|
The module will be called nf_conntrack_rtcache.
|
||||||
|
|
||||||
+config NF_CONNTRACK_CHAIN_EVENTS
|
+config NF_CONNTRACK_CHAIN_EVENTS
|
||||||
+ bool "Register multiple callbacks to ct events"
|
+ bool "Register multiple callbacks to ct events"
|
||||||
@ -106,19 +101,16 @@ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core
|
|||||||
index 6bd1508..9b81c7c 100644
|
index 6bd1508..9b81c7c 100644
|
||||||
--- a/net/netfilter/nf_conntrack_core.c
|
--- a/net/netfilter/nf_conntrack_core.c
|
||||||
+++ b/net/netfilter/nf_conntrack_core.c
|
+++ b/net/netfilter/nf_conntrack_core.c
|
||||||
@@ -2590,7 +2590,10 @@
|
@@ -2591,6 +2591,9 @@ int nf_conntrack_init_net(struct net *ne
|
||||||
nf_conntrack_ecache_pernet_init(net);
|
|
||||||
nf_conntrack_helper_pernet_init(net);
|
nf_conntrack_helper_pernet_init(net);
|
||||||
nf_conntrack_proto_pernet_init(net);
|
nf_conntrack_proto_pernet_init(net);
|
||||||
-
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||||
+ ATOMIC_INIT_NOTIFIER_HEAD(&net->ct.nf_conntrack_chain);
|
+ ATOMIC_INIT_NOTIFIER_HEAD(&net->ct.nf_conntrack_chain);
|
||||||
+#endif
|
+#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_expect:
|
err_expect:
|
||||||
|
|
||||||
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
|
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
|
||||||
index da9df2d..e0e2a8f 100644
|
index da9df2d..e0e2a8f 100644
|
||||||
--- a/net/netfilter/nf_conntrack_ecache.c
|
--- a/net/netfilter/nf_conntrack_ecache.c
|
||||||
@ -274,18 +266,18 @@ diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_n
|
|||||||
index 04111c1..8c741f7 100644
|
index 04111c1..8c741f7 100644
|
||||||
--- a/net/netfilter/nf_conntrack_netlink.c
|
--- a/net/netfilter/nf_conntrack_netlink.c
|
||||||
+++ b/net/netfilter/nf_conntrack_netlink.c
|
+++ b/net/netfilter/nf_conntrack_netlink.c
|
||||||
@@ -28,6 +28,11 @@
|
@@ -32,6 +32,11 @@
|
||||||
#include <linux/netlink.h>
|
#include <linux/siphash.h>
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/netfilter.h>
|
||||||
+
|
+
|
||||||
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||||
+#include <linux/notifier.h>
|
+#include <linux/notifier.h>
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
#include <linux/slab.h>
|
#include <net/netlink.h>
|
||||||
|
#include <net/sock.h>
|
||||||
#include <linux/netfilter.h>
|
#include <net/netfilter/nf_conntrack.h>
|
||||||
@@ -676,14 +681,22 @@ static size_t ctnetlink_nlmsg_size(const
|
@@ -676,14 +681,22 @@ static size_t ctnetlink_nlmsg_size(const
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
|||||||
|
|
||||||
--- a/mm/page_alloc.c
|
--- a/mm/page_alloc.c
|
||||||
+++ b/mm/page_alloc.c
|
+++ b/mm/page_alloc.c
|
||||||
@@ -6861,7 +6861,7 @@ static void __ref alloc_node_mem_map(str
|
@@ -6883,7 +6883,7 @@ static void __ref alloc_node_mem_map(str
|
||||||
mem_map = NODE_DATA(0)->node_mem_map;
|
mem_map = NODE_DATA(0)->node_mem_map;
|
||||||
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
|
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
|
||||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||||
|
@ -506,7 +506,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|||||||
+MODULE_ALIAS("nf-flow-table-hw");
|
+MODULE_ALIAS("nf-flow-table-hw");
|
||||||
--- a/net/netfilter/nf_tables_api.c
|
--- a/net/netfilter/nf_tables_api.c
|
||||||
+++ b/net/netfilter/nf_tables_api.c
|
+++ b/net/netfilter/nf_tables_api.c
|
||||||
@@ -5742,6 +5742,13 @@ static int nf_tables_flowtable_parse_hoo
|
@@ -5743,6 +5743,13 @@ static int nf_tables_flowtable_parse_hoo
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -520,7 +520,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|||||||
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
|
ops = kcalloc(n, sizeof(struct nf_hook_ops), GFP_KERNEL);
|
||||||
if (!ops)
|
if (!ops)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -5872,10 +5879,19 @@ static int nf_tables_newflowtable(struct
|
@@ -5873,10 +5880,19 @@ static int nf_tables_newflowtable(struct
|
||||||
}
|
}
|
||||||
|
|
||||||
flowtable->data.type = type;
|
flowtable->data.type = type;
|
||||||
@ -540,7 +540,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|||||||
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
|
err = nf_tables_flowtable_parse_hook(&ctx, nla[NFTA_FLOWTABLE_HOOK],
|
||||||
flowtable);
|
flowtable);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
@@ -6001,7 +6017,8 @@ static int nf_tables_fill_flowtable_info
|
@@ -6002,7 +6018,8 @@ static int nf_tables_fill_flowtable_info
|
||||||
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
|
nla_put_string(skb, NFTA_FLOWTABLE_NAME, flowtable->name) ||
|
||||||
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
|
nla_put_be32(skb, NFTA_FLOWTABLE_USE, htonl(flowtable->use)) ||
|
||||||
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
|
nla_put_be64(skb, NFTA_FLOWTABLE_HANDLE, cpu_to_be64(flowtable->handle),
|
||||||
|
@ -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"
|
||||||
@@ -375,6 +379,28 @@ static const struct ethtool_ops br_ethto
|
@@ -376,6 +380,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,
|
||||||
@@ -403,6 +429,9 @@ static const struct net_device_ops br_ne
|
@@ -404,6 +430,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,
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -2657,6 +2657,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
@@ -2659,6 +2659,7 @@ static int mv88e6xxx_setup(struct dsa_sw
|
||||||
|
|
||||||
chip->ds = ds;
|
chip->ds = ds;
|
||||||
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
|
ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip);
|
||||||
|
@ -13,7 +13,7 @@ Reviewed-by: Stuart Yoder <stuart.yoder@freescale.com>
|
|||||||
|
|
||||||
--- a/arch/arm64/include/asm/pgtable.h
|
--- a/arch/arm64/include/asm/pgtable.h
|
||||||
+++ b/arch/arm64/include/asm/pgtable.h
|
+++ b/arch/arm64/include/asm/pgtable.h
|
||||||
@@ -414,6 +414,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t p
|
@@ -422,6 +422,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t p
|
||||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
|
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
|
||||||
#define pgprot_writecombine(prot) \
|
#define pgprot_writecombine(prot) \
|
||||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
|
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
|
||||||
|
@ -11,7 +11,7 @@ Signed-off-by: Haiying Wang <Haiying.wang@freescale.com>
|
|||||||
|
|
||||||
--- a/arch/arm64/include/asm/pgtable.h
|
--- a/arch/arm64/include/asm/pgtable.h
|
||||||
+++ b/arch/arm64/include/asm/pgtable.h
|
+++ b/arch/arm64/include/asm/pgtable.h
|
||||||
@@ -417,6 +417,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t p
|
@@ -425,6 +425,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t p
|
||||||
#define pgprot_cached(prot) \
|
#define pgprot_cached(prot) \
|
||||||
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL) | \
|
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL) | \
|
||||||
PTE_PXN | PTE_UXN)
|
PTE_PXN | PTE_UXN)
|
||||||
|
@ -295,7 +295,7 @@ This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5.
|
|||||||
ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
|
ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
|
||||||
--- a/sound/soc/qcom/lpass-platform.c
|
--- a/sound/soc/qcom/lpass-platform.c
|
||||||
+++ b/sound/soc/qcom/lpass-platform.c
|
+++ b/sound/soc/qcom/lpass-platform.c
|
||||||
@@ -565,8 +565,11 @@ int asoc_qcom_lpass_platform_register(st
|
@@ -568,8 +568,11 @@ int asoc_qcom_lpass_platform_register(st
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif");
|
drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif");
|
||||||
|
@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -783,16 +783,23 @@ static inline struct flexcan_priv *rx_of
|
@@ -785,16 +785,23 @@ static inline struct flexcan_priv *rx_of
|
||||||
return container_of(offload, struct flexcan_priv, offload);
|
return container_of(offload, struct flexcan_priv, offload);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
mb = flexcan_get_mb(priv, n);
|
mb = flexcan_get_mb(priv, n);
|
||||||
|
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
@@ -806,7 +813,7 @@ static unsigned int flexcan_mailbox_read
|
@@ -808,7 +815,7 @@ static unsigned int flexcan_mailbox_read
|
||||||
code = reg_ctrl & FLEXCAN_MB_CODE_MASK;
|
code = reg_ctrl & FLEXCAN_MB_CODE_MASK;
|
||||||
if ((code != FLEXCAN_MB_CODE_RX_FULL) &&
|
if ((code != FLEXCAN_MB_CODE_RX_FULL) &&
|
||||||
(code != FLEXCAN_MB_CODE_RX_OVERRUN))
|
(code != FLEXCAN_MB_CODE_RX_OVERRUN))
|
||||||
@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
if (code == FLEXCAN_MB_CODE_RX_OVERRUN) {
|
if (code == FLEXCAN_MB_CODE_RX_OVERRUN) {
|
||||||
/* This MB was overrun, we lost data */
|
/* This MB was overrun, we lost data */
|
||||||
@@ -816,11 +823,17 @@ static unsigned int flexcan_mailbox_read
|
@@ -818,11 +825,17 @@ static unsigned int flexcan_mailbox_read
|
||||||
} else {
|
} else {
|
||||||
reg_iflag1 = priv->read(®s->iflag1);
|
reg_iflag1 = priv->read(®s->iflag1);
|
||||||
if (!(reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE))
|
if (!(reg_iflag1 & FLEXCAN_IFLAG_RX_FIFO_AVAILABLE))
|
||||||
@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
/* increase timstamp to full 32 bit */
|
/* increase timstamp to full 32 bit */
|
||||||
*timestamp = reg_ctrl << 16;
|
*timestamp = reg_ctrl << 16;
|
||||||
|
|
||||||
@@ -839,7 +852,7 @@ static unsigned int flexcan_mailbox_read
|
@@ -841,7 +854,7 @@ static unsigned int flexcan_mailbox_read
|
||||||
*(__be32 *)(cf->data + i) = data;
|
*(__be32 *)(cf->data + i) = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
/* Clear IRQ */
|
/* Clear IRQ */
|
||||||
if (n < 32)
|
if (n < 32)
|
||||||
@@ -856,7 +869,7 @@ static unsigned int flexcan_mailbox_read
|
@@ -858,7 +871,7 @@ static unsigned int flexcan_mailbox_read
|
||||||
*/
|
*/
|
||||||
priv->read(®s->timer);
|
priv->read(®s->timer);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -1569,7 +1569,6 @@ static int flexcan_probe(struct platform
|
@@ -1573,7 +1573,6 @@ static int flexcan_probe(struct platform
|
||||||
struct net_device *dev;
|
struct net_device *dev;
|
||||||
struct flexcan_priv *priv;
|
struct flexcan_priv *priv;
|
||||||
struct regulator *reg_xceiver;
|
struct regulator *reg_xceiver;
|
||||||
@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
struct clk *clk_ipg = NULL, *clk_per = NULL;
|
struct clk *clk_ipg = NULL, *clk_per = NULL;
|
||||||
struct flexcan_regs __iomem *regs;
|
struct flexcan_regs __iomem *regs;
|
||||||
int err, irq;
|
int err, irq;
|
||||||
@@ -1604,12 +1603,11 @@ static int flexcan_probe(struct platform
|
@@ -1608,12 +1607,11 @@ static int flexcan_probe(struct platform
|
||||||
clock_freq = clk_get_rate(clk_per);
|
clock_freq = clk_get_rate(clk_per);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -743,8 +743,6 @@ static void flexcan_irq_state(struct net
|
@@ -745,8 +745,6 @@ static void flexcan_irq_state(struct net
|
||||||
u32 timestamp;
|
u32 timestamp;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK;
|
flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK;
|
||||||
if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) {
|
if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) {
|
||||||
tx_state = unlikely(reg_esr & FLEXCAN_ESR_TX_WRN) ?
|
tx_state = unlikely(reg_esr & FLEXCAN_ESR_TX_WRN) ?
|
||||||
@@ -764,6 +762,8 @@ static void flexcan_irq_state(struct net
|
@@ -766,6 +764,8 @@ static void flexcan_irq_state(struct net
|
||||||
if (likely(new_state == priv->can.state))
|
if (likely(new_state == priv->can.state))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
#define FLEXCAN_IFLAG_RX_FIFO_OVERFLOW BIT(7)
|
#define FLEXCAN_IFLAG_RX_FIFO_OVERFLOW BIT(7)
|
||||||
#define FLEXCAN_IFLAG_RX_FIFO_WARN BIT(6)
|
#define FLEXCAN_IFLAG_RX_FIFO_WARN BIT(6)
|
||||||
#define FLEXCAN_IFLAG_RX_FIFO_AVAILABLE BIT(5)
|
#define FLEXCAN_IFLAG_RX_FIFO_AVAILABLE BIT(5)
|
||||||
@@ -879,7 +879,7 @@ static inline u64 flexcan_read_reg_iflag
|
@@ -881,7 +881,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||||
u32 iflag1, iflag2;
|
u32 iflag1, iflag2;
|
||||||
|
|
||||||
iflag2 = priv->read(®s->iflag2) & priv->reg_imask2_default &
|
iflag2 = priv->read(®s->iflag2) & priv->reg_imask2_default &
|
||||||
@ -32,7 +32,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
iflag1 = priv->read(®s->iflag1) & priv->reg_imask1_default;
|
iflag1 = priv->read(®s->iflag1) & priv->reg_imask1_default;
|
||||||
|
|
||||||
return (u64)iflag2 << 32 | iflag1;
|
return (u64)iflag2 << 32 | iflag1;
|
||||||
@@ -929,7 +929,7 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -931,7 +931,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
reg_iflag2 = priv->read(®s->iflag2);
|
reg_iflag2 = priv->read(®s->iflag2);
|
||||||
|
|
||||||
/* transmission complete interrupt */
|
/* transmission complete interrupt */
|
||||||
@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
||||||
|
|
||||||
handled = IRQ_HANDLED;
|
handled = IRQ_HANDLED;
|
||||||
@@ -941,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -943,7 +943,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
/* after sending a RTR frame MB is in RX mode */
|
/* after sending a RTR frame MB is in RX mode */
|
||||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||||
&priv->tx_mb->can_ctrl);
|
&priv->tx_mb->can_ctrl);
|
||||||
@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1320,7 +1320,7 @@ static int flexcan_open(struct net_devic
|
@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic
|
||||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||||
|
|
||||||
priv->reg_imask1_default = 0;
|
priv->reg_imask1_default = 0;
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -897,13 +897,13 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -899,13 +899,13 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
|
|
||||||
/* reception interrupt */
|
/* reception interrupt */
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
|
@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
struct clk *clk_ipg;
|
struct clk *clk_ipg;
|
||||||
struct clk *clk_per;
|
struct clk *clk_per;
|
||||||
@@ -878,9 +878,9 @@ static inline u64 flexcan_read_reg_iflag
|
@@ -880,9 +880,9 @@ static inline u64 flexcan_read_reg_iflag
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
u32 iflag1, iflag2;
|
u32 iflag1, iflag2;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
return (u64)iflag2 << 32 | iflag1;
|
return (u64)iflag2 << 32 | iflag1;
|
||||||
}
|
}
|
||||||
@@ -1227,8 +1227,8 @@ static int flexcan_chip_start(struct net
|
@@ -1225,8 +1225,8 @@ static int flexcan_chip_start(struct net
|
||||||
/* enable interrupts atomically */
|
/* enable interrupts atomically */
|
||||||
disable_irq(dev->irq);
|
disable_irq(dev->irq);
|
||||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||||
@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
enable_irq(dev->irq);
|
enable_irq(dev->irq);
|
||||||
|
|
||||||
/* print chip status */
|
/* print chip status */
|
||||||
@@ -1319,8 +1319,8 @@ static int flexcan_open(struct net_devic
|
@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic
|
||||||
priv->tx_mb_idx = priv->mb_count - 1;
|
priv->tx_mb_idx = priv->mb_count - 1;
|
||||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||||
|
|
||||||
@@ -1332,12 +1332,12 @@ static int flexcan_open(struct net_devic
|
@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic
|
||||||
|
|
||||||
imask = GENMASK_ULL(priv->offload.mb_last,
|
imask = GENMASK_ULL(priv->offload.mb_last,
|
||||||
priv->offload.mb_first);
|
priv->offload.mb_first);
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -878,8 +878,7 @@ static inline u64 flexcan_read_reg_iflag
|
@@ -880,8 +880,7 @@ static inline u64 flexcan_read_reg_iflag
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
u32 iflag1, iflag2;
|
u32 iflag1, iflag2;
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
iflag1 = priv->read(®s->iflag1) & priv->rx_mask1;
|
iflag1 = priv->read(®s->iflag1) & priv->rx_mask1;
|
||||||
|
|
||||||
return (u64)iflag2 << 32 | iflag1;
|
return (u64)iflag2 << 32 | iflag1;
|
||||||
@@ -1228,7 +1227,7 @@ static int flexcan_chip_start(struct net
|
@@ -1226,7 +1225,7 @@ static int flexcan_chip_start(struct net
|
||||||
disable_irq(dev->irq);
|
disable_irq(dev->irq);
|
||||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||||
priv->write(priv->rx_mask1, ®s->imask1);
|
priv->write(priv->rx_mask1, ®s->imask1);
|
||||||
@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
enable_irq(dev->irq);
|
enable_irq(dev->irq);
|
||||||
|
|
||||||
/* print chip status */
|
/* print chip status */
|
||||||
@@ -1319,9 +1318,6 @@ static int flexcan_open(struct net_devic
|
@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic
|
||||||
priv->tx_mb_idx = priv->mb_count - 1;
|
priv->tx_mb_idx = priv->mb_count - 1;
|
||||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||||
|
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
@@ -1332,12 +1328,12 @@ static int flexcan_open(struct net_devic
|
@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic
|
||||||
|
|
||||||
imask = GENMASK_ULL(priv->offload.mb_last,
|
imask = GENMASK_ULL(priv->offload.mb_last,
|
||||||
priv->offload.mb_first);
|
priv->offload.mb_first);
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
struct clk *clk_ipg;
|
struct clk *clk_ipg;
|
||||||
struct clk *clk_per;
|
struct clk *clk_per;
|
||||||
@@ -872,16 +872,15 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -874,16 +874,15 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t flexcan_irq(int irq, void *dev_id)
|
static irqreturn_t flexcan_irq(int irq, void *dev_id)
|
||||||
@@ -1052,6 +1051,7 @@ static int flexcan_chip_start(struct net
|
@@ -1054,6 +1053,7 @@ static int flexcan_chip_start(struct net
|
||||||
struct flexcan_priv *priv = netdev_priv(dev);
|
struct flexcan_priv *priv = netdev_priv(dev);
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
u32 reg_mcr, reg_ctrl, reg_ctrl2, reg_mecr;
|
u32 reg_mcr, reg_ctrl, reg_ctrl2, reg_mecr;
|
||||||
@ -70,7 +70,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
int err, i;
|
int err, i;
|
||||||
struct flexcan_mb __iomem *mb;
|
struct flexcan_mb __iomem *mb;
|
||||||
|
|
||||||
@@ -1226,8 +1226,9 @@ static int flexcan_chip_start(struct net
|
@@ -1224,8 +1224,9 @@ static int flexcan_chip_start(struct net
|
||||||
/* enable interrupts atomically */
|
/* enable interrupts atomically */
|
||||||
disable_irq(dev->irq);
|
disable_irq(dev->irq);
|
||||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||||
@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
enable_irq(dev->irq);
|
enable_irq(dev->irq);
|
||||||
|
|
||||||
/* print chip status */
|
/* print chip status */
|
||||||
@@ -1321,19 +1322,14 @@ static int flexcan_open(struct net_devic
|
@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic
|
||||||
priv->offload.mailbox_read = flexcan_mailbox_read;
|
priv->offload.mailbox_read = flexcan_mailbox_read;
|
||||||
|
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
|
@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
u32 reg_ctrl_default;
|
u32 reg_ctrl_default;
|
||||||
|
|
||||||
struct clk *clk_ipg;
|
struct clk *clk_ipg;
|
||||||
@@ -890,7 +890,8 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -892,7 +892,8 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
struct flexcan_priv *priv = netdev_priv(dev);
|
struct flexcan_priv *priv = netdev_priv(dev);
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
irqreturn_t handled = IRQ_NONE;
|
irqreturn_t handled = IRQ_NONE;
|
||||||
@ -49,7 +49,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
enum can_state last_state = priv->can.state;
|
enum can_state last_state = priv->can.state;
|
||||||
|
|
||||||
/* reception interrupt */
|
/* reception interrupt */
|
||||||
@@ -924,10 +925,10 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -926,10 +927,10 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
u32 reg_ctrl = priv->read(&priv->tx_mb->can_ctrl);
|
||||||
|
|
||||||
handled = IRQ_HANDLED;
|
handled = IRQ_HANDLED;
|
||||||
@@ -939,7 +940,7 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -941,7 +942,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
/* after sending a RTR frame MB is in RX mode */
|
/* after sending a RTR frame MB is in RX mode */
|
||||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||||
&priv->tx_mb->can_ctrl);
|
&priv->tx_mb->can_ctrl);
|
||||||
@ -71,7 +71,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1226,7 +1227,7 @@ static int flexcan_chip_start(struct net
|
@@ -1224,7 +1225,7 @@ static int flexcan_chip_start(struct net
|
||||||
/* enable interrupts atomically */
|
/* enable interrupts atomically */
|
||||||
disable_irq(dev->irq);
|
disable_irq(dev->irq);
|
||||||
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
priv->write(priv->reg_ctrl_default, ®s->ctrl);
|
||||||
@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
priv->write(upper_32_bits(reg_imask), ®s->imask2);
|
priv->write(upper_32_bits(reg_imask), ®s->imask2);
|
||||||
priv->write(lower_32_bits(reg_imask), ®s->imask1);
|
priv->write(lower_32_bits(reg_imask), ®s->imask1);
|
||||||
enable_irq(dev->irq);
|
enable_irq(dev->irq);
|
||||||
@@ -1318,6 +1319,7 @@ static int flexcan_open(struct net_devic
|
@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic
|
||||||
flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
|
flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
|
||||||
priv->tx_mb_idx = priv->mb_count - 1;
|
priv->tx_mb_idx = priv->mb_count - 1;
|
||||||
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
|
||||||
|
@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -778,6 +778,23 @@ static void flexcan_irq_state(struct net
|
@@ -780,6 +780,23 @@ static void flexcan_irq_state(struct net
|
||||||
dev->stats.rx_fifo_errors++;
|
dev->stats.rx_fifo_errors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
||||||
{
|
{
|
||||||
return container_of(offload, struct flexcan_priv, offload);
|
return container_of(offload, struct flexcan_priv, offload);
|
||||||
@@ -872,17 +889,6 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -874,17 +891,6 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -790,11 +790,24 @@ static inline u64 flexcan_read64_mask(st
|
@@ -792,11 +792,24 @@ static inline u64 flexcan_read64_mask(st
|
||||||
return reg & mask;
|
return reg & mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
||||||
{
|
{
|
||||||
return container_of(offload, struct flexcan_priv, offload);
|
return container_of(offload, struct flexcan_priv, offload);
|
||||||
@@ -931,7 +944,7 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -933,7 +946,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
/* transmission complete interrupt */
|
/* transmission complete interrupt */
|
||||||
if (reg_iflag_tx & priv->tx_mask) {
|
if (reg_iflag_tx & priv->tx_mask) {
|
||||||
@@ -946,7 +959,7 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -948,7 +961,7 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
/* after sending a RTR frame MB is in RX mode */
|
/* after sending a RTR frame MB is in RX mode */
|
||||||
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
|
||||||
&priv->tx_mb->can_ctrl);
|
&priv->tx_mb->can_ctrl);
|
||||||
|
@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -883,15 +883,10 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -885,15 +885,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
}
|
}
|
||||||
|
|
||||||
mark_as_read:
|
mark_as_read:
|
||||||
|
@ -15,7 +15,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -627,10 +627,10 @@ static int flexcan_get_berr_counter(cons
|
@@ -629,10 +629,10 @@ static int flexcan_get_berr_counter(cons
|
||||||
static netdev_tx_t flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
static netdev_tx_t flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
{
|
{
|
||||||
const struct flexcan_priv *priv = netdev_priv(dev);
|
const struct flexcan_priv *priv = netdev_priv(dev);
|
||||||
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (can_dropped_invalid_skb(dev, skb))
|
if (can_dropped_invalid_skb(dev, skb))
|
||||||
@@ -638,18 +638,18 @@ static netdev_tx_t flexcan_start_xmit(st
|
@@ -640,18 +640,18 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||||
|
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -821,7 +821,7 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -823,7 +823,7 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
struct flexcan_mb __iomem *mb;
|
struct flexcan_mb __iomem *mb;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
u32 reg_ctrl, reg_id, reg_iflag1;
|
u32 reg_ctrl, reg_id, reg_iflag1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -858,8 +858,8 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -860,8 +860,8 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
reg_ctrl = priv->read(&mb->can_ctrl);
|
reg_ctrl = priv->read(&mb->can_ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
skb = ERR_PTR(-ENOMEM);
|
skb = ERR_PTR(-ENOMEM);
|
||||||
goto mark_as_read;
|
goto mark_as_read;
|
||||||
}
|
}
|
||||||
@@ -869,17 +869,17 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -871,17 +871,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
|
|
||||||
reg_id = priv->read(&mb->can_id);
|
reg_id = priv->read(&mb->can_id);
|
||||||
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
|
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
|
||||||
|
@ -124,7 +124,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
/* FlexCAN module is essentially modelled as a little-endian IP in most
|
/* FlexCAN module is essentially modelled as a little-endian IP in most
|
||||||
* SoCs, i.e the registers as well as the message buffer areas are
|
* SoCs, i.e the registers as well as the message buffer areas are
|
||||||
* implemented in a little-endian fashion.
|
* implemented in a little-endian fashion.
|
||||||
@@ -630,7 +684,7 @@ static netdev_tx_t flexcan_start_xmit(st
|
@@ -632,7 +686,7 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||||
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
|
||||||
u32 can_id;
|
u32 can_id;
|
||||||
u32 data;
|
u32 data;
|
||||||
@ -133,7 +133,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (can_dropped_invalid_skb(dev, skb))
|
if (can_dropped_invalid_skb(dev, skb))
|
||||||
@@ -648,6 +702,9 @@ static netdev_tx_t flexcan_start_xmit(st
|
@@ -650,6 +704,9 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||||
if (cfd->can_id & CAN_RTR_FLAG)
|
if (cfd->can_id & CAN_RTR_FLAG)
|
||||||
ctrl |= FLEXCAN_MB_CNT_RTR;
|
ctrl |= FLEXCAN_MB_CNT_RTR;
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||||
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
||||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||||
@@ -858,7 +915,10 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -860,7 +917,10 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
reg_ctrl = priv->read(&mb->can_ctrl);
|
reg_ctrl = priv->read(&mb->can_ctrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
if (unlikely(!skb)) {
|
if (unlikely(!skb)) {
|
||||||
skb = ERR_PTR(-ENOMEM);
|
skb = ERR_PTR(-ENOMEM);
|
||||||
goto mark_as_read;
|
goto mark_as_read;
|
||||||
@@ -873,9 +933,17 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -875,9 +935,17 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
else
|
else
|
||||||
cfd->can_id = (reg_id >> 18) & CAN_SFF_MASK;
|
cfd->can_id = (reg_id >> 18) & CAN_SFF_MASK;
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||||
__be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)]));
|
__be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)]));
|
||||||
@@ -1020,27 +1088,14 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -1022,27 +1090,14 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
|
|
||||||
static void flexcan_set_bittiming(struct net_device *dev)
|
static void flexcan_set_bittiming(struct net_device *dev)
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
|
if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
|
||||||
reg |= FLEXCAN_CTRL_LPB;
|
reg |= FLEXCAN_CTRL_LPB;
|
||||||
if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
||||||
@@ -1051,9 +1106,102 @@ static void flexcan_set_bittiming(struct
|
@@ -1053,9 +1108,102 @@ static void flexcan_set_bittiming(struct
|
||||||
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
|
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
|
||||||
priv->write(reg, ®s->ctrl);
|
priv->write(reg, ®s->ctrl);
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* flexcan_chip_start
|
/* flexcan_chip_start
|
||||||
@@ -1065,7 +1213,7 @@ static int flexcan_chip_start(struct net
|
@@ -1067,7 +1215,7 @@ static int flexcan_chip_start(struct net
|
||||||
{
|
{
|
||||||
struct flexcan_priv *priv = netdev_priv(dev);
|
struct flexcan_priv *priv = netdev_priv(dev);
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
u64 reg_imask;
|
u64 reg_imask;
|
||||||
int err, i;
|
int err, i;
|
||||||
struct flexcan_mb __iomem *mb;
|
struct flexcan_mb __iomem *mb;
|
||||||
@@ -1162,6 +1310,26 @@ static int flexcan_chip_start(struct net
|
@@ -1164,6 +1312,26 @@ static int flexcan_chip_start(struct net
|
||||||
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
|
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
|
||||||
priv->write(reg_ctrl, ®s->ctrl);
|
priv->write(reg_ctrl, ®s->ctrl);
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
||||||
reg_ctrl2 = priv->read(®s->ctrl2);
|
reg_ctrl2 = priv->read(®s->ctrl2);
|
||||||
reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS;
|
reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS;
|
||||||
@@ -1309,6 +1477,12 @@ static int flexcan_open(struct net_devic
|
@@ -1304,6 +1472,12 @@ static int flexcan_open(struct net_devic
|
||||||
struct flexcan_priv *priv = netdev_priv(dev);
|
struct flexcan_priv *priv = netdev_priv(dev);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -362,11 +362,11 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
err = pm_runtime_get_sync(priv->dev);
|
err = pm_runtime_get_sync(priv->dev);
|
||||||
if (err < 0)
|
if (err < 0) {
|
||||||
return err;
|
pm_runtime_put_noidle(priv->dev);
|
||||||
@@ -1321,7 +1495,10 @@ static int flexcan_open(struct net_devic
|
@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic
|
||||||
if (err)
|
if (err)
|
||||||
goto out_close;
|
goto out_transceiver_disable;
|
||||||
|
|
||||||
- priv->mb_size = sizeof(struct flexcan_mb) + CAN_MAX_DLEN;
|
- priv->mb_size = sizeof(struct flexcan_mb) + CAN_MAX_DLEN;
|
||||||
+ if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
|
+ if (priv->can.ctrlmode & CAN_CTRLMODE_FD)
|
||||||
@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
|
priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
|
||||||
(sizeof(priv->regs->mb[1]) / priv->mb_size);
|
(sizeof(priv->regs->mb[1]) / priv->mb_size);
|
||||||
|
|
||||||
@@ -1666,6 +1843,18 @@ static int flexcan_probe(struct platform
|
@@ -1670,6 +1847,18 @@ static int flexcan_probe(struct platform
|
||||||
priv->devtype_data = devtype_data;
|
priv->devtype_data = devtype_data;
|
||||||
priv->reg_xceiver = reg_xceiver;
|
priv->reg_xceiver = reg_xceiver;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
--- a/drivers/net/can/flexcan.c
|
--- a/drivers/net/can/flexcan.c
|
||||||
+++ b/drivers/net/can/flexcan.c
|
+++ b/drivers/net/can/flexcan.c
|
||||||
@@ -702,9 +702,13 @@ static netdev_tx_t flexcan_start_xmit(st
|
@@ -704,9 +704,13 @@ static netdev_tx_t flexcan_start_xmit(st
|
||||||
if (cfd->can_id & CAN_RTR_FLAG)
|
if (cfd->can_id & CAN_RTR_FLAG)
|
||||||
ctrl |= FLEXCAN_MB_CNT_RTR;
|
ctrl |= FLEXCAN_MB_CNT_RTR;
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
for (i = 0; i < cfd->len; i += sizeof(u32)) {
|
||||||
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
data = be32_to_cpup((__be32 *)&cfd->data[i]);
|
||||||
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
|
||||||
@@ -935,6 +939,9 @@ static struct sk_buff *flexcan_mailbox_r
|
@@ -937,6 +941,9 @@ static struct sk_buff *flexcan_mailbox_r
|
||||||
|
|
||||||
if (reg_ctrl & FLEXCAN_MB_CNT_EDL) {
|
if (reg_ctrl & FLEXCAN_MB_CNT_EDL) {
|
||||||
cfd->len = can_dlc2len(get_canfd_dlc((reg_ctrl >> 16) & 0xf));
|
cfd->len = can_dlc2len(get_canfd_dlc((reg_ctrl >> 16) & 0xf));
|
||||||
|
@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
/* FLEXCAN memory error control register (MECR) bits */
|
/* FLEXCAN memory error control register (MECR) bits */
|
||||||
#define FLEXCAN_MECR_ECRWRDIS BIT(31)
|
#define FLEXCAN_MECR_ECRWRDIS BIT(31)
|
||||||
@@ -1322,6 +1323,7 @@ static int flexcan_chip_start(struct net
|
@@ -1324,6 +1325,7 @@ static int flexcan_chip_start(struct net
|
||||||
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
||||||
reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3));
|
reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3));
|
||||||
reg_mcr = priv->read(®s->mcr) & ~FLEXCAN_MCR_FDEN;
|
reg_mcr = priv->read(®s->mcr) & ~FLEXCAN_MCR_FDEN;
|
||||||
@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
/* support BRS when set CAN FD mode
|
/* support BRS when set CAN FD mode
|
||||||
* 64 bytes payload per MB and 7 MBs per RAM block by default
|
* 64 bytes payload per MB and 7 MBs per RAM block by default
|
||||||
@@ -1331,10 +1333,14 @@ static int flexcan_chip_start(struct net
|
@@ -1333,10 +1335,14 @@ static int flexcan_chip_start(struct net
|
||||||
reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE;
|
reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE;
|
||||||
reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3);
|
reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3);
|
||||||
reg_mcr |= FLEXCAN_MCR_FDEN;
|
reg_mcr |= FLEXCAN_MCR_FDEN;
|
||||||
@ -54,7 +54,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
|
||||||
@@ -1852,7 +1858,7 @@ static int flexcan_probe(struct platform
|
@@ -1856,7 +1862,7 @@ static int flexcan_probe(struct platform
|
||||||
|
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) {
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
|
||||||
|
@ -31,7 +31,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
/* FLEXCAN FD Bit Timing register (FDCBT) bits */
|
/* FLEXCAN FD Bit Timing register (FDCBT) bits */
|
||||||
#define FLEXCAN_FDCBT_FPRESDIV(x) (((x) & 0x3ff) << 20)
|
#define FLEXCAN_FDCBT_FPRESDIV(x) (((x) & 0x3ff) << 20)
|
||||||
@@ -1100,7 +1103,7 @@ static void flexcan_set_bittiming(struct
|
@@ -1102,7 +1105,7 @@ static void flexcan_set_bittiming(struct
|
||||||
struct can_bittiming *bt = &priv->can.bittiming;
|
struct can_bittiming *bt = &priv->can.bittiming;
|
||||||
struct can_bittiming *dbt = &priv->can.data_bittiming;
|
struct can_bittiming *dbt = &priv->can.data_bittiming;
|
||||||
struct flexcan_regs __iomem *regs = priv->regs;
|
struct flexcan_regs __iomem *regs = priv->regs;
|
||||||
@ -40,7 +40,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
|
|
||||||
reg = priv->read(®s->ctrl);
|
reg = priv->read(®s->ctrl);
|
||||||
reg &= ~(FLEXCAN_CTRL_LPB | FLEXCAN_CTRL_SMP | FLEXCAN_CTRL_LOM);
|
reg &= ~(FLEXCAN_CTRL_LPB | FLEXCAN_CTRL_SMP | FLEXCAN_CTRL_LOM);
|
||||||
@@ -1172,6 +1175,19 @@ static void flexcan_set_bittiming(struct
|
@@ -1174,6 +1177,19 @@ static void flexcan_set_bittiming(struct
|
||||||
FLEXCAN_FDCBT_FPROPSEG(dbt->prop_seg);
|
FLEXCAN_FDCBT_FPROPSEG(dbt->prop_seg);
|
||||||
priv->write(reg_fdcbt, ®s->fdcbt);
|
priv->write(reg_fdcbt, ®s->fdcbt);
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
if (bt->brp != dbt->brp)
|
if (bt->brp != dbt->brp)
|
||||||
netdev_warn(dev, "Warning!! data brp = %d and brp = %d don't match.\n"
|
netdev_warn(dev, "Warning!! data brp = %d and brp = %d don't match.\n"
|
||||||
"flexcan may not work. consider using different bitrate or data bitrate\n",
|
"flexcan may not work. consider using different bitrate or data bitrate\n",
|
||||||
@@ -1321,6 +1337,7 @@ static int flexcan_chip_start(struct net
|
@@ -1323,6 +1339,7 @@ static int flexcan_chip_start(struct net
|
||||||
/* FDCTRL */
|
/* FDCTRL */
|
||||||
if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) {
|
if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) {
|
||||||
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
reg_fdctrl = priv->read(®s->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
|
||||||
|
@ -52,7 +52,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
||||||
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
||||||
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
|
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
|
||||||
@@ -1759,6 +1766,7 @@ out_put_node:
|
@@ -1763,6 +1770,7 @@ out_put_node:
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id flexcan_of_match[] = {
|
static const struct of_device_id flexcan_of_match[] = {
|
||||||
|
@ -35,7 +35,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
|||||||
static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
|
static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
|
||||||
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
||||||
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
||||||
@@ -1775,6 +1782,7 @@ static const struct of_device_id flexcan
|
@@ -1779,6 +1786,7 @@ static const struct of_device_id flexcan
|
||||||
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
|
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
|
||||||
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
||||||
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
||||||
|
@ -28,7 +28,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
|
|
||||||
#define DRV_NAME "flexcan"
|
#define DRV_NAME "flexcan"
|
||||||
@@ -1955,9 +1956,7 @@ static int __maybe_unused flexcan_suspen
|
@@ -1959,9 +1960,7 @@ static int __maybe_unused flexcan_suspen
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
} else {
|
} else {
|
||||||
@ -39,7 +39,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
}
|
}
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
netif_device_detach(dev);
|
netif_device_detach(dev);
|
||||||
@@ -1983,7 +1982,9 @@ static int __maybe_unused flexcan_resume
|
@@ -1987,7 +1986,9 @@ static int __maybe_unused flexcan_resume
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
} else {
|
} else {
|
||||||
|
@ -47,7 +47,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
|
|
||||||
/* FLEXCAN Bit Timing register (CBT) bits */
|
/* FLEXCAN Bit Timing register (CBT) bits */
|
||||||
#define FLEXCAN_CBT_BTF BIT(31)
|
#define FLEXCAN_CBT_BTF BIT(31)
|
||||||
@@ -1054,6 +1053,12 @@ static irqreturn_t flexcan_irq(int irq,
|
@@ -1056,6 +1055,12 @@ static irqreturn_t flexcan_irq(int irq,
|
||||||
|
|
||||||
reg_esr = priv->read(®s->esr);
|
reg_esr = priv->read(®s->esr);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
|
|
||||||
|
|
||||||
reg_mcr = priv->read(®s->mcr);
|
reg_mcr = priv->read(®s->mcr);
|
||||||
@@ -1766,11 +1810,6 @@ static int flexcan_setup_stop_mode(struc
|
@@ -1770,11 +1814,6 @@ static int flexcan_setup_stop_mode(struc
|
||||||
gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit,
|
gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit,
|
||||||
priv->stm.ack_gpr, priv->stm.ack_bit);
|
priv->stm.ack_gpr, priv->stm.ack_bit);
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_put_node:
|
out_put_node:
|
||||||
@@ -1778,6 +1817,30 @@ out_put_node:
|
@@ -1782,6 +1821,30 @@ out_put_node:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
|
|||||||
static const struct of_device_id flexcan_of_match[] = {
|
static const struct of_device_id flexcan_of_match[] = {
|
||||||
{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
|
{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
|
||||||
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
|
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
|
||||||
@@ -1920,9 +1983,19 @@ static int flexcan_probe(struct platform
|
@@ -1924,9 +1987,19 @@ static int flexcan_probe(struct platform
|
||||||
devm_can_led_init(dev);
|
devm_can_led_init(dev);
|
||||||
|
|
||||||
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) {
|
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) {
|
||||||
|
@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
|
|||||||
static const struct can_bittiming_const flexcan_bittiming_const = {
|
static const struct can_bittiming_const flexcan_bittiming_const = {
|
||||||
.name = DRV_NAME,
|
.name = DRV_NAME,
|
||||||
.tseg1_min = 4,
|
.tseg1_min = 4,
|
||||||
@@ -1852,6 +1857,8 @@ static const struct of_device_id flexcan
|
@@ -1856,6 +1861,8 @@ static const struct of_device_id flexcan
|
||||||
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
|
||||||
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
|
||||||
{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
|
{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -1131,7 +1131,8 @@ static int i2c_imx_probe(struct platform
|
@@ -1159,7 +1159,8 @@ static int i2c_imx_probe(struct platform
|
||||||
goto rpm_disable;
|
goto rpm_disable;
|
||||||
|
|
||||||
/* Request IRQ */
|
/* Request IRQ */
|
||||||
|
@ -15,7 +15,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -1229,7 +1229,8 @@ static int __maybe_unused i2c_imx_runtim
|
@@ -1257,7 +1257,8 @@ static int __maybe_unused i2c_imx_runtim
|
||||||
{
|
{
|
||||||
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
|
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1239,14 +1240,28 @@ static int __maybe_unused i2c_imx_runtim
|
@@ -1267,14 +1268,28 @@ static int __maybe_unused i2c_imx_runtim
|
||||||
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
|
struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -896,10 +896,17 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -924,10 +924,17 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
unsigned int i, temp;
|
unsigned int i, temp;
|
||||||
int result;
|
int result;
|
||||||
bool is_lastmsg = false;
|
bool is_lastmsg = false;
|
||||||
@ -37,7 +37,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
|
result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
goto out;
|
goto out;
|
||||||
@@ -971,6 +978,9 @@ fail0:
|
@@ -999,6 +1006,9 @@ fail0:
|
||||||
pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
|
pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
@ -47,7 +47,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
|
|||||||
dev_dbg(&i2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__,
|
dev_dbg(&i2c_imx->adapter.dev, "<%s> exit with: %s: %d\n", __func__,
|
||||||
(result < 0) ? "error" : "success msg",
|
(result < 0) ? "error" : "success msg",
|
||||||
(result < 0) ? result : num);
|
(result < 0) ? result : num);
|
||||||
@@ -1261,7 +1271,7 @@ static int i2c_imx_resume(struct device
|
@@ -1289,7 +1299,7 @@ static int i2c_imx_resume(struct device
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops i2c_imx_pm_ops = {
|
static const struct dev_pm_ops i2c_imx_pm_ops = {
|
||||||
|
@ -77,7 +77,7 @@ Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
|
|||||||
static inline void imx_i2c_write_reg(unsigned int val,
|
static inline void imx_i2c_write_reg(unsigned int val,
|
||||||
struct imx_i2c_struct *i2c_imx, unsigned int reg)
|
struct imx_i2c_struct *i2c_imx, unsigned int reg)
|
||||||
{
|
{
|
||||||
@@ -1159,6 +1177,14 @@ static int i2c_imx_probe(struct platform
|
@@ -1187,6 +1205,14 @@ static int i2c_imx_probe(struct platform
|
||||||
clk_notifier_register(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
clk_notifier_register(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
||||||
i2c_imx_set_clk(i2c_imx, clk_get_rate(i2c_imx->clk));
|
i2c_imx_set_clk(i2c_imx, clk_get_rate(i2c_imx->clk));
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -492,16 +492,24 @@ static int i2c_imx_acked(struct imx_i2c_
|
@@ -514,16 +514,24 @@ static int i2c_imx_acked(struct imx_i2c_
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
|
|||||||
|
|
||||||
i2c_imx->cur_clk = i2c_clk_rate;
|
i2c_imx->cur_clk = i2c_clk_rate;
|
||||||
|
|
||||||
@@ -532,20 +540,23 @@ static void i2c_imx_set_clk(struct imx_i
|
@@ -554,20 +562,23 @@ static void i2c_imx_set_clk(struct imx_i
|
||||||
dev_dbg(&i2c_imx->adapter.dev, "IFDR[IC]=0x%x, REAL DIV=%d\n",
|
dev_dbg(&i2c_imx->adapter.dev, "IFDR[IC]=0x%x, REAL DIV=%d\n",
|
||||||
i2c_clk_div[i].val, i2c_clk_div[i].div);
|
i2c_clk_div[i].val, i2c_clk_div[i].div);
|
||||||
#endif
|
#endif
|
||||||
@ -73,7 +73,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
|
static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
|
||||||
@@ -555,6 +566,10 @@ static int i2c_imx_start(struct imx_i2c_
|
@@ -577,6 +588,10 @@ static int i2c_imx_start(struct imx_i2c_
|
||||||
|
|
||||||
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
|
|||||||
imx_i2c_write_reg(i2c_imx->ifdr, i2c_imx, IMX_I2C_IFDR);
|
imx_i2c_write_reg(i2c_imx->ifdr, i2c_imx, IMX_I2C_IFDR);
|
||||||
/* Enable I2C controller */
|
/* Enable I2C controller */
|
||||||
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
||||||
@@ -1175,7 +1190,11 @@ static int i2c_imx_probe(struct platform
|
@@ -1203,7 +1218,11 @@ static int i2c_imx_probe(struct platform
|
||||||
i2c_imx->bitrate = pdata->bitrate;
|
i2c_imx->bitrate = pdata->bitrate;
|
||||||
i2c_imx->clk_change_nb.notifier_call = i2c_imx_clk_notifier_call;
|
i2c_imx->clk_change_nb.notifier_call = i2c_imx_clk_notifier_call;
|
||||||
clk_notifier_register(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
clk_notifier_register(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -940,6 +940,14 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -968,6 +968,14 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
enable_runtime_pm = true;
|
enable_runtime_pm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct imx_i2c_hwdata imx1_i2c_hwdata = {
|
static const struct imx_i2c_hwdata imx1_i2c_hwdata = {
|
||||||
@@ -923,6 +983,78 @@ static int i2c_imx_read(struct imx_i2c_s
|
@@ -951,6 +1011,78 @@ static int i2c_imx_read(struct imx_i2c_s
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|||||||
static int i2c_imx_xfer(struct i2c_adapter *adapter,
|
static int i2c_imx_xfer(struct i2c_adapter *adapter,
|
||||||
struct i2c_msg *msgs, int num)
|
struct i2c_msg *msgs, int num)
|
||||||
{
|
{
|
||||||
@@ -945,8 +1077,13 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -973,8 +1105,13 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
* before switching to master mode and attempting a Start cycle
|
* before switching to master mode and attempting a Start cycle
|
||||||
*/
|
*/
|
||||||
result = i2c_imx_bus_busy(i2c_imx, 0);
|
result = i2c_imx_bus_busy(i2c_imx, 0);
|
||||||
@ -201,7 +201,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|||||||
|
|
||||||
result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
|
result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
@@ -1093,6 +1230,50 @@ static int i2c_imx_init_recovery_info(st
|
@@ -1121,6 +1258,50 @@ static int i2c_imx_init_recovery_info(st
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +252,7 @@ Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
|
|||||||
static u32 i2c_imx_func(struct i2c_adapter *adapter)
|
static u32 i2c_imx_func(struct i2c_adapter *adapter)
|
||||||
{
|
{
|
||||||
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL
|
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL
|
||||||
@@ -1217,8 +1398,13 @@ static int i2c_imx_probe(struct platform
|
@@ -1245,8 +1426,13 @@ static int i2c_imx_probe(struct platform
|
||||||
i2c_imx, IMX_I2C_I2CR);
|
i2c_imx, IMX_I2C_I2CR);
|
||||||
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -1398,13 +1398,12 @@ static int i2c_imx_probe(struct platform
|
@@ -1426,13 +1426,12 @@ static int i2c_imx_probe(struct platform
|
||||||
i2c_imx, IMX_I2C_I2CR);
|
i2c_imx, IMX_I2C_I2CR);
|
||||||
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
imx_i2c_write_reg(i2c_imx->hwdata->i2sr_clr_opcode, i2c_imx, IMX_I2C_I2SR);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -1066,12 +1066,15 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -1094,12 +1094,15 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
|
|
||||||
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
|
|||||||
/*
|
/*
|
||||||
* workround for ERR010027: ensure that the I2C BUS is idle
|
* workround for ERR010027: ensure that the I2C BUS is idle
|
||||||
* before switching to master mode and attempting a Start cycle
|
* before switching to master mode and attempting a Start cycle
|
||||||
@@ -1085,10 +1088,6 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -1113,10 +1116,6 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
/* Functions for DMA support */
|
/* Functions for DMA support */
|
||||||
static void i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
|
static void i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx,
|
||||||
dma_addr_t phy_addr)
|
dma_addr_t phy_addr)
|
||||||
@@ -681,23 +692,33 @@ static void i2c_imx_stop(struct imx_i2c_
|
@@ -705,21 +716,33 @@ static void i2c_imx_stop(struct imx_i2c_
|
||||||
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,9 +57,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
- if (temp & I2SR_IIF) {
|
- if (temp & I2SR_IIF) {
|
||||||
- /* save status register */
|
- /* save status register */
|
||||||
- i2c_imx->i2csr = temp;
|
- i2c_imx->i2csr = temp;
|
||||||
- temp &= ~I2SR_IIF;
|
- i2c_imx_clear_irq(i2c_imx, I2SR_IIF);
|
||||||
- temp |= (i2c_imx->hwdata->i2sr_clr_opcode & I2SR_IIF);
|
|
||||||
- imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2SR);
|
|
||||||
- wake_up(&i2c_imx->queue);
|
- wake_up(&i2c_imx->queue);
|
||||||
- return IRQ_HANDLED;
|
- return IRQ_HANDLED;
|
||||||
- }
|
- }
|
||||||
@ -70,8 +68,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
+ status |= (i2c_imx->hwdata->i2sr_clr_opcode & I2SR_IAL);
|
+ status |= (i2c_imx->hwdata->i2sr_clr_opcode & I2SR_IAL);
|
||||||
+ imx_i2c_write_reg(status, i2c_imx, IMX_I2C_I2SR);
|
+ imx_i2c_write_reg(status, i2c_imx, IMX_I2C_I2SR);
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
- return IRQ_NONE;
|
|
||||||
+static irqreturn_t i2c_imx_master_isr(struct imx_i2c_struct *i2c_imx)
|
+static irqreturn_t i2c_imx_master_isr(struct imx_i2c_struct *i2c_imx)
|
||||||
+{
|
+{
|
||||||
+ unsigned int status;
|
+ unsigned int status;
|
||||||
@ -81,12 +78,13 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
+ i2c_imx->i2csr = status | I2SR_IIF;
|
+ i2c_imx->i2csr = status | I2SR_IIF;
|
||||||
+
|
+
|
||||||
+ wake_up(&i2c_imx->queue);
|
+ wake_up(&i2c_imx->queue);
|
||||||
+
|
|
||||||
|
- return IRQ_NONE;
|
||||||
+ return IRQ_HANDLED;
|
+ return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
|
static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
|
||||||
@@ -1066,6 +1087,13 @@ static int i2c_imx_xfer(struct i2c_adapt
|
@@ -1094,6 +1117,13 @@ static int i2c_imx_xfer(struct i2c_adapt
|
||||||
|
|
||||||
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
|
||||||
|
|
||||||
@ -100,7 +98,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
if (!pm_runtime_enabled(i2c_imx->adapter.dev.parent)) {
|
if (!pm_runtime_enabled(i2c_imx->adapter.dev.parent)) {
|
||||||
pm_runtime_enable(i2c_imx->adapter.dev.parent);
|
pm_runtime_enable(i2c_imx->adapter.dev.parent);
|
||||||
enable_runtime_pm = true;
|
enable_runtime_pm = true;
|
||||||
@@ -1279,11 +1307,169 @@ static u32 i2c_imx_func(struct i2c_adapt
|
@@ -1307,11 +1337,169 @@ static u32 i2c_imx_func(struct i2c_adapt
|
||||||
| I2C_FUNC_SMBUS_READ_BLOCK_DATA;
|
| I2C_FUNC_SMBUS_READ_BLOCK_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +268,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
static int i2c_imx_probe(struct platform_device *pdev)
|
static int i2c_imx_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct imx_i2c_struct *i2c_imx;
|
struct imx_i2c_struct *i2c_imx;
|
||||||
@@ -1392,10 +1578,7 @@ static int i2c_imx_probe(struct platform
|
@@ -1420,10 +1608,7 @@ static int i2c_imx_probe(struct platform
|
||||||
if (is_imx7d_i2c(i2c_imx) && i2c_imx->bitrate > IMX_I2C_MAX_E_BIT_RATE)
|
if (is_imx7d_i2c(i2c_imx) && i2c_imx->bitrate > IMX_I2C_MAX_E_BIT_RATE)
|
||||||
i2c_imx->bitrate = IMX_I2C_MAX_E_BIT_RATE;
|
i2c_imx->bitrate = IMX_I2C_MAX_E_BIT_RATE;
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -503,6 +503,14 @@ static void i2c_imx_dma_free(struct imx_
|
@@ -516,6 +516,14 @@ static void i2c_imx_clear_irq(struct imx
|
||||||
dma->chan_using = NULL;
|
imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
+/* Clear arbitration lost bit */
|
+/* Clear arbitration lost bit */
|
||||||
@ -32,17 +32,16 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
|
static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
|
||||||
{
|
{
|
||||||
unsigned long orig_jiffies = jiffies;
|
unsigned long orig_jiffies = jiffies;
|
||||||
@@ -515,8 +523,7 @@ static int i2c_imx_bus_busy(struct imx_i
|
@@ -528,7 +536,7 @@ static int i2c_imx_bus_busy(struct imx_i
|
||||||
|
|
||||||
/* check for arbitration lost */
|
/* check for arbitration lost */
|
||||||
if (temp & I2SR_IAL) {
|
if (temp & I2SR_IAL) {
|
||||||
- temp &= ~I2SR_IAL;
|
- i2c_imx_clear_irq(i2c_imx, I2SR_IAL);
|
||||||
- imx_i2c_write_reg(temp, i2c_imx, IMX_I2C_I2SR);
|
|
||||||
+ i2c_imx_clr_al_bit(temp, i2c_imx);
|
+ i2c_imx_clr_al_bit(temp, i2c_imx);
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,14 +707,6 @@ static void i2c_imx_clr_if_bit(unsigned
|
@@ -724,14 +732,6 @@ static void i2c_imx_clr_if_bit(unsigned
|
||||||
imx_i2c_write_reg(status, i2c_imx, IMX_I2C_I2SR);
|
imx_i2c_write_reg(status, i2c_imx, IMX_I2C_I2SR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
static irqreturn_t i2c_imx_master_isr(struct imx_i2c_struct *i2c_imx)
|
static irqreturn_t i2c_imx_master_isr(struct imx_i2c_struct *i2c_imx)
|
||||||
{
|
{
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
@@ -1050,12 +1049,14 @@ static int i2c_imx_recovery_for_layersca
|
@@ -1080,12 +1080,14 @@ static int i2c_imx_recovery_for_layersca
|
||||||
gpio_set_value(i2c_imx->gpio, 1);
|
gpio_set_value(i2c_imx->gpio, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -77,7 +76,7 @@ Signed-off-by: Biwen Li <biwen.li@nxp.com>
|
|||||||
|
|
||||||
/* Restore the saved value of the register SCFG_RCWPMUXCR0 */
|
/* Restore the saved value of the register SCFG_RCWPMUXCR0 */
|
||||||
if (i2c_imx->need_set_pmuxcr == 1) {
|
if (i2c_imx->need_set_pmuxcr == 1) {
|
||||||
@@ -1069,10 +1070,9 @@ static int i2c_imx_recovery_for_layersca
|
@@ -1099,10 +1101,9 @@ static int i2c_imx_recovery_for_layersca
|
||||||
* I2C_IBSR[IBAL] = 1
|
* I2C_IBSR[IBAL] = 1
|
||||||
*/
|
*/
|
||||||
temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR);
|
temp = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR);
|
||||||
|
@ -15,7 +15,7 @@ Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/i2c/busses/i2c-imx.c
|
--- a/drivers/i2c/busses/i2c-imx.c
|
||||||
+++ b/drivers/i2c/busses/i2c-imx.c
|
+++ b/drivers/i2c/busses/i2c-imx.c
|
||||||
@@ -1451,23 +1451,20 @@ static const struct i2c_algorithm i2c_im
|
@@ -1482,23 +1482,20 @@ static const struct i2c_algorithm i2c_im
|
||||||
static irqreturn_t i2c_imx_isr(int irq, void *dev_id)
|
static irqreturn_t i2c_imx_isr(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct imx_i2c_struct *i2c_imx = dev_id;
|
struct imx_i2c_struct *i2c_imx = dev_id;
|
||||||
|
@ -52,7 +52,7 @@ Signed-off-by: Peng Ma <peng.ma@nxp.com>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void i2c_imx_dma_callback(void *arg)
|
static void i2c_imx_dma_callback(void *arg)
|
||||||
@@ -1602,10 +1604,14 @@ static int i2c_imx_probe(struct platform
|
@@ -1633,10 +1635,14 @@ static int i2c_imx_probe(struct platform
|
||||||
dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n");
|
dev_info(&i2c_imx->adapter.dev, "IMX I2C adapter registered\n");
|
||||||
|
|
||||||
/* Init DMA config if supported */
|
/* Init DMA config if supported */
|
||||||
|
@ -11,7 +11,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
|
|||||||
|
|
||||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
@@ -2410,7 +2410,7 @@ static const struct flash_info spi_nor_i
|
@@ -2417,7 +2417,7 @@ static const struct flash_info spi_nor_i
|
||||||
{ "s25fl512s", INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
|
{ "s25fl512s", INFO6(0x010220, 0x4d0080, 256 * 1024, 256,
|
||||||
SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
|
SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
|
||||||
SPI_NOR_HAS_LOCK | USE_CLSR) },
|
SPI_NOR_HAS_LOCK | USE_CLSR) },
|
||||||
|
@ -59,13 +59,11 @@
|
|||||||
green {
|
green {
|
||||||
label = "bpi-r64:pio:green";
|
label = "bpi-r64:pio:green";
|
||||||
gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
red {
|
red {
|
||||||
label = "bpi-r64:pio:red";
|
label = "bpi-r64:pio:red";
|
||||||
gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -258,15 +256,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&pcie0 {
|
&pcie0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie0_pins>;
|
pinctrl-0 = <&pcie0_pins>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie1 {
|
&pcie1 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie1_pins>;
|
pinctrl-0 = <&pcie1_pins>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&pio {
|
&pio {
|
||||||
|
@ -156,19 +156,19 @@
|
|||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
rtkgsw: rtkgsw@0 {
|
rtkgsw: rtkgsw@0 {
|
||||||
compatible = "mediatek,rtk-gsw";
|
compatible = "mediatek,rtk-gsw";
|
||||||
mediatek,ethsys = <ðsys>;
|
mediatek,ethsys = <ðsys>;
|
||||||
mediatek,mdio = <&mdio>;
|
mediatek,mdio = <&mdio>;
|
||||||
mediatek,reset-pin = <&pio 54 0>;
|
mediatek,reset-pin = <&pio 54 0>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&pcie0 {
|
&pcie0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pcie0_pins>;
|
pinctrl-0 = <&pcie0_pins>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&slot0 {
|
&slot0 {
|
||||||
@ -450,29 +450,31 @@
|
|||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <ð_pins>;
|
pinctrl-0 = <ð_pins>;
|
||||||
gmac0: mac@0 {
|
gmac0: mac@0 {
|
||||||
compatible = "mediatek,eth-mac";
|
compatible = "mediatek,eth-mac";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
phy-mode = "sgmii";
|
phy-mode = "sgmii";
|
||||||
fixed-link {
|
fixed-link {
|
||||||
speed = <1000>;
|
speed = <1000>;
|
||||||
full-duplex;
|
full-duplex;
|
||||||
pause;
|
pause;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
gmac1: mac@1 {
|
|
||||||
compatible = "mediatek,eth-mac";
|
gmac1: mac@1 {
|
||||||
reg = <1>;
|
compatible = "mediatek,eth-mac";
|
||||||
phy-mode = "rgmii";
|
reg = <1>;
|
||||||
fixed-link {
|
phy-mode = "rgmii";
|
||||||
speed = <1000>;
|
fixed-link {
|
||||||
full-duplex;
|
speed = <1000>;
|
||||||
pause;
|
full-duplex;
|
||||||
};
|
pause;
|
||||||
};
|
};
|
||||||
mdio: mdio-bus {
|
};
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
mdio: mdio-bus {
|
||||||
};
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c1 {
|
&i2c1 {
|
||||||
@ -513,50 +515,50 @@
|
|||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
partitions {
|
partitions {
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
|
|
||||||
partition@0 {
|
partition@0 {
|
||||||
label = "Preloader";
|
label = "Preloader";
|
||||||
reg = <0x00000 0x0080000>;
|
reg = <0x00000 0x0080000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@80000 {
|
partition@80000 {
|
||||||
label = "ATF";
|
label = "ATF";
|
||||||
reg = <0x80000 0x0040000>;
|
reg = <0x80000 0x0040000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@c0000 {
|
partition@c0000 {
|
||||||
label = "uboot";
|
label = "uboot";
|
||||||
reg = <0xc0000 0x0080000>;
|
reg = <0xc0000 0x0080000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@140000 {
|
partition@140000 {
|
||||||
label = "uboot-env";
|
label = "uboot-env";
|
||||||
reg = <0x140000 0x0080000>;
|
reg = <0x140000 0x0080000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
factory: partition@1c0000 {
|
factory: partition@1c0000 {
|
||||||
label = "factory";
|
label = "factory";
|
||||||
reg = <0x1c0000 0x0040000>;
|
reg = <0x1c0000 0x0040000>;
|
||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@200000 {
|
partition@200000 {
|
||||||
label = "firmware";
|
label = "firmware";
|
||||||
reg = <0x200000 0x2000000>;
|
reg = <0x200000 0x2000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@2200000 {
|
partition@2200000 {
|
||||||
label = "reserved";
|
label = "reserved";
|
||||||
reg = <0x2200000 0x4000000>;
|
reg = <0x2200000 0x4000000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,11 +54,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
gsw: gsw@0 {
|
gsw: gsw@0 {
|
||||||
compatible = "mediatek,mt753x";
|
compatible = "mediatek,mt753x";
|
||||||
mediatek,ethsys = <ðsys>;
|
mediatek,ethsys = <ðsys>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
@ -66,13 +66,11 @@
|
|||||||
green {
|
green {
|
||||||
label = "bpi-r64:pio:green";
|
label = "bpi-r64:pio:green";
|
||||||
gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
red {
|
red {
|
||||||
label = "bpi-r64:pio:red";
|
label = "bpi-r64:pio:red";
|
||||||
gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
||||||
default-state = "off";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -154,34 +152,34 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&gsw {
|
&gsw {
|
||||||
mediatek,mdio = <&mdio>;
|
mediatek,mdio = <&mdio>;
|
||||||
mediatek,portmap = "llllw";
|
mediatek,portmap = "llllw";
|
||||||
mediatek,mdio_master_pinmux = <0>;
|
mediatek,mdio_master_pinmux = <0>;
|
||||||
reset-gpios = <&pio 54 0>;
|
reset-gpios = <&pio 54 0>;
|
||||||
interrupt-parent = <&pio>;
|
interrupt-parent = <&pio>;
|
||||||
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
port5: port@5 {
|
port5: port@5 {
|
||||||
compatible = "mediatek,mt753x-port";
|
compatible = "mediatek,mt753x-port";
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii";
|
||||||
fixed-link {
|
fixed-link {
|
||||||
speed = <1000>;
|
speed = <1000>;
|
||||||
full-duplex;
|
full-duplex;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
port6: port@6 {
|
port6: port@6 {
|
||||||
compatible = "mediatek,mt753x-port";
|
compatible = "mediatek,mt753x-port";
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
phy-mode = "sgmii";
|
phy-mode = "sgmii";
|
||||||
fixed-link {
|
fixed-link {
|
||||||
speed = <2500>;
|
speed = <2500>;
|
||||||
full-duplex;
|
full-duplex;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&i2c1 {
|
&i2c1 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
@ -19,33 +19,33 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
+&gsw {
|
+&gsw {
|
||||||
+ mediatek,mdio = <&mdio>;
|
+ mediatek,mdio = <&mdio>;
|
||||||
+ mediatek,portmap = "wllll";
|
+ mediatek,portmap = "wllll";
|
||||||
+ mediatek,mdio_master_pinmux = <0>;
|
+ mediatek,mdio_master_pinmux = <0>;
|
||||||
+ reset-gpios = <&pio 54 0>;
|
+ reset-gpios = <&pio 54 0>;
|
||||||
+ interrupt-parent = <&pio>;
|
+ interrupt-parent = <&pio>;
|
||||||
+ interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
|
+ interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+
|
+
|
||||||
+ port5: port@5 {
|
+ port5: port@5 {
|
||||||
+ compatible = "mediatek,mt753x-port";
|
+ compatible = "mediatek,mt753x-port";
|
||||||
+ reg = <5>;
|
+ reg = <5>;
|
||||||
+ phy-mode = "rgmii";
|
+ phy-mode = "rgmii";
|
||||||
+ fixed-link {
|
+ fixed-link {
|
||||||
+ speed = <1000>;
|
+ speed = <1000>;
|
||||||
+ full-duplex;
|
+ full-duplex;
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
+ port6: port@6 {
|
+ port6: port@6 {
|
||||||
+ compatible = "mediatek,mt753x-port";
|
+ compatible = "mediatek,mt753x-port";
|
||||||
+ reg = <6>;
|
+ reg = <6>;
|
||||||
+ phy-mode = "sgmii";
|
+ phy-mode = "sgmii";
|
||||||
+ fixed-link {
|
+ fixed-link {
|
||||||
+ speed = <2500>;
|
+ speed = <2500>;
|
||||||
+ full-duplex;
|
+ full-duplex;
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
&i2c1 {
|
&i2c1 {
|
||||||
@ -81,7 +81,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
@@ -40,23 +39,38 @@
|
@@ -40,23 +39,36 @@
|
||||||
|
|
||||||
gpio-keys {
|
gpio-keys {
|
||||||
compatible = "gpio-keys";
|
compatible = "gpio-keys";
|
||||||
@ -108,13 +108,11 @@
|
|||||||
+ green {
|
+ green {
|
||||||
+ label = "bpi-r64:pio:green";
|
+ label = "bpi-r64:pio:green";
|
||||||
+ gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
+ gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
|
||||||
+ default-state = "off";
|
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
+ red {
|
+ red {
|
||||||
+ label = "bpi-r64:pio:red";
|
+ label = "bpi-r64:pio:red";
|
||||||
+ gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
+ gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
|
||||||
+ default-state = "off";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
+ mediatek,ethsys = <ðsys>;
|
+ mediatek,ethsys = <ðsys>;
|
||||||
+ #address-cells = <1>;
|
+ #address-cells = <1>;
|
||||||
+ #size-cells = <0>;
|
+ #size-cells = <0>;
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
memory@40000000 {
|
memory@40000000 {
|
||||||
device_type = "memory";
|
device_type = "memory";
|
||||||
|
@ -44,7 +44,7 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
|
|||||||
+};
|
+};
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
|
+++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
|
||||||
@@ -0,0 +1,343 @@
|
@@ -0,0 +1,340 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
|
+ * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
|
||||||
+ *
|
+ *
|
||||||
@ -132,13 +132,11 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
|
|||||||
+ led3 {
|
+ led3 {
|
||||||
+ label = "u7623-01:green:led3";
|
+ label = "u7623-01:green:led3";
|
||||||
+ gpios = <&pio 14 GPIO_ACTIVE_LOW>;
|
+ gpios = <&pio 14 GPIO_ACTIVE_LOW>;
|
||||||
+ default-state = "off";
|
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
+ led4 {
|
+ led4 {
|
||||||
+ label = "u7623-01:green:led4";
|
+ label = "u7623-01:green:led4";
|
||||||
+ gpios = <&pio 15 GPIO_ACTIVE_LOW>;
|
+ gpios = <&pio 15 GPIO_ACTIVE_LOW>;
|
||||||
+ default-state = "off";
|
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+};
|
+};
|
||||||
@ -343,7 +341,6 @@ Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
|
|||||||
+ led@0 {
|
+ led@0 {
|
||||||
+ reg = <0>;
|
+ reg = <0>;
|
||||||
+ label = "led0";
|
+ label = "led0";
|
||||||
+ default-state = "off";
|
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
+ };
|
+ };
|
||||||
|
@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
}
|
}
|
||||||
|
|
||||||
netif_tx_start_all_queues(port->dev);
|
netif_tx_start_all_queues(port->dev);
|
||||||
@@ -5124,8 +5128,11 @@ static void mvpp2_mac_config(struct phyl
|
@@ -5125,8 +5129,11 @@ static void mvpp2_mac_config(struct phyl
|
||||||
mvpp2_port_enable(port);
|
mvpp2_port_enable(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
struct ethtool_eee *p = &priv->dev->ports[port].eee;
|
struct ethtool_eee *p = &priv->dev->ports[port].eee;
|
||||||
--- a/drivers/net/dsa/lantiq_gswip.c
|
--- a/drivers/net/dsa/lantiq_gswip.c
|
||||||
+++ b/drivers/net/dsa/lantiq_gswip.c
|
+++ b/drivers/net/dsa/lantiq_gswip.c
|
||||||
@@ -1517,7 +1517,9 @@ static void gswip_phylink_mac_link_down(
|
@@ -1518,7 +1518,9 @@ static void gswip_phylink_mac_link_down(
|
||||||
static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
|
static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
|
||||||
unsigned int mode,
|
unsigned int mode,
|
||||||
phy_interface_t interface,
|
phy_interface_t interface,
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
# This must be sourced after 30_uboot-envtools
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
board=$(board_name)
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
cznic,turris-omnia)
|
||||||
|
# Do nothing if this is not the old U-Boot
|
||||||
|
grep -q 'U-Boot 2015.10-rc2' /dev/mtd0 || exit 0
|
||||||
|
# Do nothing if we already have distro_bootcmd
|
||||||
|
fw_printenv distro_bootcmd >/dev/null 2>/dev/null && exit 0
|
||||||
|
# Set the complete environment, since U-Boot does not merge the default environment from its own image!
|
||||||
|
fw_setenv -s - <<-"EOF"
|
||||||
|
baudrate 115200
|
||||||
|
bootdelay 3
|
||||||
|
ethact neta2
|
||||||
|
fdt_high 0x10000000
|
||||||
|
initrd_high 0x10000000
|
||||||
|
bootargs earlyprintk console=ttyS0,115200 rootfstype=btrfs rootdelay=2 root=b301 rootflags=subvol=@,commit=5 rw
|
||||||
|
bootcmd i2c dev 1; i2c read 0x2a 0x9 1 0x00FFFFF0; setexpr.b rescue *0x00FFFFF0; if test $rescue -ge 1; then echo BOOT RESCUE; run rescueboot; else echo BOOT eMMC FS; run mmcboot; setenv bootargs; run distro_bootcmd; fi
|
||||||
|
rescueboot i2c mw 0x2a.1 0x3 0x1c 1; i2c mw 0x2a.1 0x4 0x1c 1; mw.l 0x01000000 0x00ff000c; i2c write 0x01000000 0x2a.1 0x5 4 -s; setenv bootargs "$bootargs omniarescue=$rescue"; sf probe; sf read 0x1000000 0x100000 0x700000; bootz 0x1000000
|
||||||
|
mmcboot btrload mmc 0 ${kernel_addr_r} boot/zImage @ && btrload mmc 0 ${fdt_addr_r} boot/dtb @ && setenv bootargs ${bootargs} cfg80211.freg=${regdomain} && bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||||
|
kernel_addr_r 0x1000000
|
||||||
|
scriptaddr 0x1800000
|
||||||
|
fdt_addr_r 0x2000000
|
||||||
|
boot_targets mmc0 scsi0
|
||||||
|
boot_prefixes / /boot/
|
||||||
|
boot_scripts boot.scr
|
||||||
|
distro_bootcmd scsi_need_init=true; for target in ${boot_targets}; do run bootcmd_${target}; done
|
||||||
|
bootcmd_mmc0 devnum=0; run mmc_boot
|
||||||
|
mmc_boot if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
|
||||||
|
bootcmd_scsi0 devnum=0; run scsi_boot
|
||||||
|
scsi_boot run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
|
||||||
|
scsi_init if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi
|
||||||
|
scan_dev_for_boot_part for distro_bootpart in 1; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
|
||||||
|
scan_dev_for_boot echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_scripts; done
|
||||||
|
scan_dev_for_scripts for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
|
||||||
|
boot_a_script load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
@ -27,18 +27,18 @@ 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
|
KERNEL := kernel-bin | append-dtb
|
||||||
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 \
|
||||||
partx-utils kmod-i2c-mux-pca954x
|
partx-utils kmod-i2c-mux-pca954x
|
||||||
IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz
|
IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz
|
||||||
IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-img | sdcard-img | gzip | append-metadata
|
IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
|
||||||
IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip
|
IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip
|
||||||
IMAGE_NAME = $$(2)
|
IMAGE_NAME = $$(2)
|
||||||
SOC := armada-385
|
SOC := armada-385
|
||||||
SUPPORTED_DEVICES += armada-385-turris-omnia
|
SUPPORTED_DEVICES += armada-385-turris-omnia
|
||||||
|
BOOT_SCRIPT := turris-omnia
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += cznic_turris-omnia
|
TARGET_DEVICES += cznic_turris-omnia
|
||||||
|
|
||||||
|
17
target/linux/mvebu/image/turris-omnia.bootscript
Normal file
17
target/linux/mvebu/image/turris-omnia.bootscript
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Determine root device
|
||||||
|
setexpr rootpart ${distro_bootpart} + 1
|
||||||
|
if test ${devtype} = mmc -a ${devnum} = 0; then
|
||||||
|
setenv rootdev /dev/mmcblk0p${rootpart}
|
||||||
|
elif test ${devtype} = scsi -a ${devnum} = 0; then
|
||||||
|
setenv rootdev /dev/sda${rootpart}
|
||||||
|
else
|
||||||
|
# New U-Boot only
|
||||||
|
part uuid ${devtype} ${devnum}:${rootpart} uuid
|
||||||
|
setenv rootdev PARTUUID=${uuid}
|
||||||
|
fi
|
||||||
|
setenv bootargs earlyprintk console=ttyS0,115200 root=${rootdev} rootfstype=auto rootwait
|
||||||
|
|
||||||
|
# Load and boot
|
||||||
|
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
|
||||||
|
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
|
||||||
|
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
|||||||
|
|
||||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
@@ -4930,6 +4930,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
@@ -4937,6 +4937,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||||
struct mtd_info *mtd = &nor->mtd;
|
struct mtd_info *mtd = &nor->mtd;
|
||||||
struct device_node *np = spi_nor_get_flash_node(nor);
|
struct device_node *np = spi_nor_get_flash_node(nor);
|
||||||
struct spi_nor_flash_parameter *params = &nor->params;
|
struct spi_nor_flash_parameter *params = &nor->params;
|
||||||
@ -18,7 +18,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
|||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -4992,7 +4993,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
@@ -4999,7 +5000,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||||
/* Init flash parameters based on flash_info struct and SFDP */
|
/* Init flash parameters based on flash_info struct and SFDP */
|
||||||
spi_nor_init_params(nor);
|
spi_nor_init_params(nor);
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ ramips_setup_interfaces()
|
|||||||
jcg,y2)
|
jcg,y2)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
||||||
ucidef_set_interface_lan "eth0.1 ra0 rax0"
|
|
||||||
;;
|
;;
|
||||||
linksys,re6500|\
|
linksys,re6500|\
|
||||||
netgear,wac104)
|
netgear,wac104)
|
||||||
@ -68,7 +67,6 @@ ramips_setup_interfaces()
|
|||||||
xiaoyu,xy-c5)
|
xiaoyu,xy-c5)
|
||||||
ucidef_add_switch "switch0" \
|
ucidef_add_switch "switch0" \
|
||||||
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
|
||||||
ucidef_set_interface_lan "eth0.1"
|
|
||||||
;;
|
;;
|
||||||
ubnt,edgerouter-x)
|
ubnt,edgerouter-x)
|
||||||
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0"
|
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0"
|
||||||
@ -160,9 +158,6 @@ ramips_setup_macs()
|
|||||||
wan_mac=$label_mac
|
wan_mac=$label_mac
|
||||||
lan_mac=$(macaddr_add $label_mac 1)
|
lan_mac=$(macaddr_add $label_mac 1)
|
||||||
;;
|
;;
|
||||||
phicomm,k2p|phicomm,k2p-32m)
|
|
||||||
wan_mac=$(mtd_get_mac_binary factory 0xe006)
|
|
||||||
;;
|
|
||||||
xiaomi,mir3g|\
|
xiaomi,mir3g|\
|
||||||
xiaomi,mi-router-ac2100|\
|
xiaomi,mi-router-ac2100|\
|
||||||
xiaomi,redmi-router-ac2100)
|
xiaomi,redmi-router-ac2100)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||||
@@ -2296,6 +2296,11 @@ static const struct flash_info spi_nor_i
|
@@ -2303,6 +2303,11 @@ static const struct flash_info spi_nor_i
|
||||||
SPI_NOR_4B_OPCODES | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
|
SPI_NOR_4B_OPCODES | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
|
||||||
.fixups = &gd25q256_fixups,
|
.fixups = &gd25q256_fixups,
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505@gmail.com>
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
Loading…
Reference in New Issue
Block a user