未验证 提交 041d7abc 编写于 作者: A AmadeusGhost 提交者: GitHub

kernel: bump 5.4 to 5.4.79 and add mt7620-nand driver (#5830)

* kernel: bump 5.4 to 5.4.79

* ramips: add mt7620-nand driver for NAND flash

This add the mt7620-nand driver
and enable nand ubifs for subtarget mt7620
Signed-off-by: NChen Minqiang <ptpt52@gmail.com>
Co-authored-by: NChen Minqiang <ptpt52@gmail.com>
上级 bcbce88a
......@@ -8,11 +8,11 @@ endif
LINUX_VERSION-4.14 = .195
LINUX_VERSION-4.19 = .138
LINUX_VERSION-5.4 = .75
LINUX_VERSION-5.4 = .79
LINUX_KERNEL_HASH-4.14.195 = 394f28798670240baacd9e2cce521fbd79f8da5e1fc191695b0e11381445a021
LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02
LINUX_KERNEL_HASH-5.4.75 = d2466fd6eb5433e7bf287b617b11b2640c65a7ea93a57eb7a80d7f537cbc1470
LINUX_KERNEL_HASH-5.4.79 = a59091fb08ff66a344a7842b7c891f36cef609eed1d2944edf475cca8d91ce25
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
......
......@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=uboot-envtools
PKG_DISTNAME:=u-boot
PKG_VERSION:=2020.04
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
......
......@@ -26,6 +26,7 @@ glinet,gl-mv1000)
;;
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-ultra|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
idx="$(find_mtd_index u-boot-env)"
......
......@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=uboot-layerscape
PKG_VERSION:=LSDK-20.04-update-290520
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot
......
fdtaddr=0x8f000000
loadaddr=0x81000000
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
bootm_size=0x10000000
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot
......
fdtaddr=0x8f000000
loadaddr=0x81000000
fdt_high=0xffffffff
initrd_high=0xffffffff
bootm_size=0x10000000
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000
bootcmd=echo starting openwrt ...;run nor_boot
......
fdtaddr=0x8f000000
loadaddr=0x81000000
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
bootm_size=0x10000000
hwconfig=fsl_ddr:bank_intlv=auto
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
......
fdtaddr=0x8f000000
loadaddr=0x81000000
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
bootm_size=0x10000000
hwconfig=fsl_ddr:bank_intlv=auto
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi-0:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
......
......@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=linux-firmware
PKG_VERSION:=20201022
PKG_RELEASE:=1
PKG_VERSION:=20201118
PKG_RELEASE:=2
PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_HASH:=bf586e0beb4c65f22bf0a79811f259aa0a5a7cc9f70eebecb260525b6914cef7
PKG_HASH:=863d5a31da725b856a917280d1e3014929b3bc3d4e6e5faecf530c13afb7e2b9
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
......
......@@ -101,9 +101,7 @@ Package/brcmfmac-firmware-43455-sdio-rpi-4b = $(call Package/firmware-default,Br
define Package/brcmfmac-firmware-43455-sdio-rpi-4b/install
$(INSTALL_DIR) $(1)/lib/firmware/brcm
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt \
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
$(SED) 's/boardflags3=.*/boardflags3=0x44200100/g' \
$(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt \
$(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
endef
$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-4b))
......
......@@ -7,29 +7,28 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=exfat
PKG_VERSION:=5.8.7
PKG_VERSION:=5.10.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)?
PKG_HASH:=20254677bed3f456e89cc9d757c1a47abbadab4d75640eef4a995370a37be3f4
PKG_HASH:=0ff77dd7d39eb231d00c3c4909b9fad31ebeeb618bd6fa18fce142becc9c1f98
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION)
PKG_MAINTAINER:=
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS+= --strip-components 1
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
define KernelPackage/fs-exfat
SECTION:=kernel
CATEGORY:=Kernel modules
SUBMENU:=Filesystems
TITLE:=exFAT kernel module
URL:=https://github.com/namjaejeon/linux-exfat-oot
FILES:=$(PKG_BUILD_DIR)/exfat.ko
AUTOLOAD:=$(call AutoProbe,exfat)
DEPENDS:=+kmod-nls-base
DEPENDS:= +kmod-nls-base
endef
define KernelPackage/exfat/description
......
......@@ -864,6 +864,6 @@
ipv6_hdr(skb)->hop_limit != hop_limit ||
- flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
+ flowlabel != net_hdr_word(ipv6_hdr(skb)))) {
err = ip6_route_me_harder(state->net, skb);
err = ip6_route_me_harder(state->net, state->sk, skb);
if (err < 0)
ret = NF_DROP_ERR(err);
......@@ -86,7 +86,14 @@ ifeq ($(SUBTARGET),bcm2708)
endif
define Device/rpi-2
DEVICE_MODEL := 2B/3B/3B+/3CM/4B
DEVICE_MODEL := 2B/2B 1.2
DEVICE_VARIANT := (32bit)
DEVICE_ALT0_VENDOR := Raspberry Pi
DEVICE_ALT0_MODEL := 3B/3B+/3CM
DEVICE_ALT0_VARIANT := (32bit)
DEVICE_ALT1_VENDOR := Raspberry Pi
DEVICE_ALT1_MODEL := 4B
DEVICE_ALT1_VARIANT := (32bit)
DEVICE_DTS := \
bcm2709-rpi-2-b bcm2710-rpi-2-b \
bcm2710-rpi-3-b bcm2710-rpi-3-b-plus \
......@@ -112,7 +119,11 @@ ifeq ($(SUBTARGET),bcm2709)
endif
define Device/rpi-3
DEVICE_MODEL := 2B-1.2/3B/3B+/3CM
DEVICE_MODEL := 3B/3B+/3CM
DEVICE_VARIANT := (64bit)
DEVICE_ALT0_VENDOR := Raspberry Pi
DEVICE_ALT0_MODEL := 2B-1.2
DEVICE_ALT0_VARIANT := (64bit)
KERNEL_IMG := kernel8.img
DEVICE_DTS := \
broadcom/bcm2710-rpi-2-b \
......@@ -136,6 +147,7 @@ endif
define Device/rpi-4
DEVICE_MODEL := 4B
DEVICE_VARIANT := (64bit)
KERNEL_IMG := kernel8.img
DEVICE_DTS := broadcom/bcm2711-rpi-4-b
SUPPORTED_DEVICES := \
......
......@@ -70,7 +70,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -345,6 +345,7 @@ static struct platform_driver *const com
@@ -346,6 +346,7 @@ static struct platform_driver *const com
&vc4_txp_driver,
&vc4_hvs_driver,
&vc4_crtc_driver,
......
......@@ -70,7 +70,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
}
static int bcm2835_spi_setup(struct spi_device *spi)
@@ -1289,6 +1337,7 @@ static int bcm2835_spi_probe(struct plat
@@ -1276,6 +1324,7 @@ static int bcm2835_spi_probe(struct plat
ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
ctlr->num_chipselect = BCM2835_SPI_NUM_CS;
ctlr->setup = bcm2835_spi_setup;
......
......@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -1279,43 +1279,6 @@ static int bcm2835_spi_setup(struct spi_
@@ -1278,31 +1278,6 @@ static int bcm2835_spi_setup(struct spi_
return -EINVAL;
}
......@@ -31,21 +31,9 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
- if (!chip)
- return 0;
-
- /*
- * Retrieve the corresponding GPIO line used for CS.
- * The inversion semantics will be handled by the GPIO core
- * code, so we pass GPIOS_OUT_LOW for "unasserted" and
- * the correct flag for inversion semantics. The SPI_CS_HIGH
- * on spi->mode cannot be checked for polarity in this case
- * as the flag use_gpio_descriptors enforces SPI_CS_HIGH.
- */
- if (of_property_read_bool(spi->dev.of_node, "spi-cs-high"))
- lflags = GPIO_ACTIVE_HIGH;
- else
- lflags = GPIO_ACTIVE_LOW;
- spi->cs_gpiod = gpiochip_request_own_desc(chip, 8 - spi->chip_select,
- DRV_NAME,
- lflags,
- GPIO_LOOKUP_FLAGS_DEFAULT,
- GPIOD_OUT_LOW);
- if (IS_ERR(spi->cs_gpiod))
- return PTR_ERR(spi->cs_gpiod);
......
......@@ -23,7 +23,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
/* Read as many bytes as possible from FIFO */
bcm2835_rd_fifo(bs);
/* Write as many bytes as possible to FIFO */
@@ -1335,7 +1339,8 @@ static int bcm2835_spi_probe(struct plat
@@ -1334,7 +1338,8 @@ static int bcm2835_spi_probe(struct plat
bcm2835_wr(bs, BCM2835_SPI_CS,
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
......
......@@ -12,12 +12,11 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -1230,8 +1230,6 @@ static int bcm2835_spi_setup(struct spi_
@@ -1230,7 +1230,6 @@ static int bcm2835_spi_setup(struct spi_
{
struct spi_controller *ctlr = spi->controller;
struct bcm2835_spi *bs = spi_controller_get_devdata(ctlr);
- struct gpio_chip *chip;
- enum gpio_lookup_flags lflags;
u32 cs;
/*
......@@ -19,7 +19,7 @@ Signed-off-by: Rob Herring <robh@kernel.org>
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -1023,7 +1023,7 @@ bool of_dma_is_coherent(struct device_no
@@ -1025,7 +1025,7 @@ bool of_dma_is_coherent(struct device_no
of_node_put(node);
return true;
}
......
......@@ -104,7 +104,7 @@ Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
}
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -678,7 +678,7 @@ bool swiotlb_map(struct device *dev, phy
@@ -682,7 +682,7 @@ bool swiotlb_map(struct device *dev, phy
/* Ensure that the address returned is DMA'ble */
*dma_addr = __phys_to_dma(dev, *phys);
......
......@@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -368,6 +368,7 @@ static int vc4_platform_drm_remove(struc
@@ -369,6 +369,7 @@ static int vc4_platform_drm_remove(struc
}
static const struct of_device_id vc4_of_match[] = {
......
......@@ -187,16 +187,16 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
int err, i;
sfp = sfp_alloc(&pdev->dev);
@@ -2183,7 +2253,7 @@ static int sfp_probe(struct platform_dev
@@ -2184,7 +2254,7 @@ static int sfp_probe(struct platform_dev
sfp->gpio_irq[i] = gpiod_to_irq(sfp->gpio[i]);
if (!sfp->gpio_irq[i]) {
if (sfp->gpio_irq[i] < 0) {
sfp->gpio_irq[i] = 0;
- poll = true;
+ sfp->need_poll = true;
continue;
}
@@ -2195,11 +2265,11 @@ static int sfp_probe(struct platform_dev
@@ -2196,11 +2266,11 @@ static int sfp_probe(struct platform_dev
dev_name(sfp->dev), sfp);
if (err) {
sfp->gpio_irq[i] = 0;
......
......@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -4884,6 +4884,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -4883,6 +4883,7 @@ int spi_nor_scan(struct spi_nor *nor, co
*/
if (JEDEC_MFR(nor->info) == SNOR_MFR_ATMEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
......
......@@ -25,7 +25,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
nor->params.set_4byte = winbond_set_4byte;
}
@@ -4886,6 +4887,7 @@ int spi_nor_scan(struct spi_nor *nor, co
@@ -4885,6 +4886,7 @@ int spi_nor_scan(struct spi_nor *nor, co
JEDEC_MFR(nor->info) == SNOR_MFR_INTEL ||
JEDEC_MFR(nor->info) == SNOR_MFR_MACRONIX ||
JEDEC_MFR(nor->info) == SNOR_MFR_SST ||
......
......@@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on OF && (ARM || ARM64 || COMPILE_TEST)
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -4464,6 +4464,7 @@ static void spi_nor_info_init_params(str
@@ -4463,6 +4463,7 @@ static void spi_nor_info_init_params(str
struct spi_nor_erase_map *map = &params->erase_map;
const struct flash_info *info = nor->info;
struct device_node *np = spi_nor_get_flash_node(nor);
......@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u8 i, erase_mask;
/* Initialize legacy flash parameters and settings. */
@@ -4527,6 +4528,21 @@ static void spi_nor_info_init_params(str
@@ -4526,6 +4527,21 @@ static void spi_nor_info_init_params(str
*/
erase_mask = 0;
i = 0;
......@@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (info->flags & SECT_4K_PMC) {
erase_mask |= BIT(i);
spi_nor_set_erase_type(&map->erase_type[i], 4096u,
@@ -4538,6 +4554,7 @@ static void spi_nor_info_init_params(str
@@ -4537,6 +4553,7 @@ static void spi_nor_info_init_params(str
SPINOR_OP_BE_4K);
i++;
}
......
......@@ -148,7 +148,7 @@ Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
@@ -4726,9 +4768,13 @@ static int spi_nor_init(struct spi_nor *
@@ -4725,9 +4767,13 @@ static int spi_nor_init(struct spi_nor *
* reboots (e.g., crashes). Warn the user (or hopefully, system
* designer) that this is bad.
*/
......
From: Sven Eckelmann <sven@narfation.org>
Date: Sun, 22 Nov 2020 00:48:33 +0100
Subject: [PATCH RFC] mtd: parser: cmdline: Fix parsing of part-names with colons
Some devices (especially QCA ones) are already using hardcoded partition
names with colons in it. The OpenMesh A62 for example provides following
mtd relevant information via cmdline:
root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait
The change to split only on the last colon between mtd-id and partitions
will cause newpart to see following string for the first partition:
KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive)
Such a partition list cannot be parsed and thus the device fails to boot.
Avoid this behavior by making sure that the start of the first part-name
("(") will also be the last byte the mtd-id split algorithm is using for
its colon search.
Forwarded: https://patchwork.ozlabs.org/project/linux-mtd/patch/20201122001533.985641-1-sven@narfation.org/
Fixes: eb13fa022741 ("mtd: parser: cmdline: Support MTD names containing one or more colons")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
--- a/drivers/mtd/parsers/cmdlinepart.c
+++ b/drivers/mtd/parsers/cmdlinepart.c
@@ -218,7 +218,7 @@ static int mtdpart_setup_real(char *s)
struct cmdline_mtd_partition *this_mtd;
struct mtd_partition *parts;
int mtd_id_len, num_parts;
- char *p, *mtd_id, *semicol;
+ char *p, *mtd_id, *semicol, *open_parenth;
/*
* Replace the first ';' by a NULL char so strrchr can work
@@ -228,6 +228,13 @@ static int mtdpart_setup_real(char *s)
if (semicol)
*semicol = '\0';
+ /* make sure that part-names with ":" will not be handled as
+ * part of the mtd-id with an ":"
+ */
+ open_parenth = strchr(s, '(');
+ if (open_parenth)
+ *open_parenth = '\0';
+
mtd_id = s;
/*
@@ -237,6 +244,10 @@ static int mtdpart_setup_real(char *s)
*/
p = strrchr(s, ':');
+ /* Restore the '(' now. */
+ if (open_parenth)
+ *open_parenth = '(';
+
/* Restore the ';' now. */
if (semicol)
*semicol = ';';
......@@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -2343,6 +2343,10 @@ static int sfp_remove(struct platform_de
@@ -2344,6 +2344,10 @@ static int sfp_remove(struct platform_de
sfp_unregister_socket(sfp->sfp_bus);
......
......@@ -13,7 +13,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -220,6 +220,14 @@
@@ -218,6 +218,14 @@
status = "okay";
};
......@@ -28,7 +28,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
/* Sterling-LWB Bluetooth */
&uart4 {
pinctrl-names = "default";
@@ -411,6 +419,23 @@
@@ -409,6 +417,23 @@
>;
};
......
......@@ -18,7 +18,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -83,19 +83,6 @@
@@ -81,19 +81,6 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
......@@ -38,7 +38,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
};
@@ -231,9 +218,14 @@
@@ -229,9 +216,14 @@
/* Sterling-LWB Bluetooth */
&uart4 {
pinctrl-names = "default";
......@@ -54,7 +54,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
};
/* GPS */
@@ -288,6 +280,12 @@
@@ -286,6 +278,12 @@
>;
};
......@@ -67,7 +67,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
pinctrl_ecspi3: escpi3grp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1
@@ -393,12 +391,6 @@
@@ -391,12 +389,6 @@
>;
};
......
......@@ -14,7 +14,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
--- a/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw5910.dtsi
@@ -81,7 +81,6 @@
@@ -79,7 +79,6 @@
enable-active-high;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
......@@ -22,7 +22,7 @@ Signed-off-by: Shawn Guo <shawnguo@kernel.org>
};
};
@@ -251,7 +250,7 @@
@@ -249,7 +248,7 @@
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
......
......@@ -37,7 +37,7 @@ Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
--- a/drivers/net/ethernet/qualcomm/essedma/edma.c
+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c
@@ -1493,7 +1493,7 @@
@@ -1499,7 +1499,7 @@
int res;
if (skb->protocol == htons(ETH_P_IPV6)) {
......
......@@ -17,7 +17,7 @@ index 724f355..7a16236 100644
/* edma_alloc_tx_ring()
* Allocate Tx descriptors ring
*/
@@ -1014,13 +1006,14 @@ static inline u16 edma_tpd_available(struct edma_common_info *edma_cinfo,
@@ -1016,13 +1008,14 @@ static inline u16 edma_tpd_available(struct edma_common_info *edma_cinfo,
/* edma_tx_queue_get()
* Get the starting number of the queue
*/
......@@ -34,7 +34,7 @@ index 724f355..7a16236 100644
}
/* edma_tx_update_hw_idx()
@@ -1389,8 +1382,9 @@ netdev_tx_t edma_xmit(struct sk_buff *skb,
@@ -1391,8 +1384,9 @@ netdev_tx_t edma_xmit(struct sk_buff *skb,
}
/* this will be one of the 4 TX queues exposed to linux kernel */
......@@ -46,7 +46,7 @@ index 724f355..7a16236 100644
etdr = edma_cinfo->tpd_ring[queue_id];
nq = netdev_get_tx_queue(net_dev, txq_id);
@@ -1871,8 +1865,8 @@ void edma_free_irqs(struct edma_adapter *adapter)
@@ -1875,8 +1869,8 @@ void edma_free_irqs(struct edma_adapter *adapter)
int i, j;
int k = ((edma_cinfo->num_rx_queues == 4) ? 1 : 2);
......@@ -162,7 +162,7 @@ index d53c63b..2d4770c 100644
if (edma_fill_netdev(edma_cinfo, k, i, j)) {
pr_err("Netdev overflow Error\n");
goto err_register;
@@ -1109,9 +1114,12 @@ static int edma_axi_probe(struct platform_device *pdev)
@@ -1105,9 +1110,12 @@ static int edma_axi_probe(struct platform_device *pdev)
/* populate per_core_info, do a napi_Add, request 16 TX irqs,
* 8 RX irqs, do a napi enable
*/
......@@ -176,7 +176,7 @@ index d53c63b..2d4770c 100644
edma_cinfo->edma_percpu_info[i].napi.state = 0;
netif_napi_add(edma_netdev[0],
@@ -1131,7 +1139,7 @@ static int edma_axi_probe(struct platform_device *pdev)
@@ -1127,7 +1135,7 @@ static int edma_axi_probe(struct platform_device *pdev)
/* Request irq per core */
for (j = edma_cinfo->edma_percpu_info[i].tx_start;
......@@ -185,7 +185,7 @@ index d53c63b..2d4770c 100644
sprintf(&edma_tx_irq[j][0], "edma_eth_tx%d", j);
err = request_irq(edma_cinfo->tx_irq[j],
edma_interrupt,
@@ -1253,7 +1261,7 @@ static int edma_axi_probe(struct platform_device *pdev)
@@ -1251,7 +1259,7 @@ static int edma_axi_probe(struct platform_device *pdev)
#endif
err_rmap_add_fail:
edma_free_irqs(adapter[0]);
......@@ -194,7 +194,7 @@ index d53c63b..2d4770c 100644
napi_disable(&edma_cinfo->edma_percpu_info[i].napi);
err_reset:
err_unregister_sysctl_tbl:
@@ -1301,7 +1309,7 @@ static int edma_axi_remove(struct platform_device *pdev)
@@ -1299,7 +1307,7 @@ static int edma_axi_remove(struct platform_device *pdev)
unregister_netdev(edma_netdev[i]);
edma_stop_rx_tx(hw);
......
......@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/qualcomm/essedma/edma.c b/drivers/net/ethernet
index fc274c8..e9d12a4 100644
--- a/drivers/net/ethernet/qualcomm/essedma/edma.c
+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c
@@ -2075,15 +2075,13 @@ int edma_poll(struct napi_struct *napi, int budget)
@@ -2079,15 +2079,13 @@ int edma_poll(struct napi_struct *napi, int budget)
int i, work_done = 0;
u16 rx_pending_fill;
......@@ -21,7 +21,7 @@ index fc274c8..e9d12a4 100644
/* Every core will have a start, which will be computed
* in probe and stored in edma_percpu_info->tx_start variable.
@@ -2098,6 +2096,14 @@ int edma_poll(struct napi_struct *napi, int budget)
@@ -2102,6 +2100,14 @@ int edma_poll(struct napi_struct *napi, int budget)
edma_percpu_info->tx_status &= ~(1 << queue_id);
}
......@@ -36,7 +36,7 @@ index fc274c8..e9d12a4 100644
/* Every core will have a start, which will be computed
* in probe and stored in edma_percpu_info->tx_start variable.
* We will shift the status bit by tx_start to obtain
@@ -2122,15 +2128,6 @@ int edma_poll(struct napi_struct *napi, int budget)
@@ -2126,15 +2132,6 @@ int edma_poll(struct napi_struct *napi, int budget)
}
}
......
......@@ -39,7 +39,7 @@ Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2101,6 +2101,75 @@ put_table:
@@ -2102,6 +2102,75 @@ put_table:
}
/**
......
......@@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2141,6 +2141,7 @@ int dev_pm_opp_adjust_voltage(struct dev
@@ -2142,6 +2142,7 @@ int dev_pm_opp_adjust_voltage(struct dev
struct opp_table *opp_table;
struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV);
int r = 0;
......@@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
/* Find the opp_table */
opp_table = _find_opp_table(dev);
@@ -2170,8 +2171,17 @@ int dev_pm_opp_adjust_voltage(struct dev
@@ -2171,8 +2172,17 @@ int dev_pm_opp_adjust_voltage(struct dev
goto adjust_unlock;
opp->supplies->u_volt = u_volt;
......
......@@ -89,10 +89,10 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
- clk_disable_unprepare(res->core_clk);
- clk_disable_unprepare(res->aux_clk);
- clk_disable_unprepare(res->ref_clk);
regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies);
}
@@ -321,47 +310,45 @@ static int qcom_pcie_init_2_1_0(struct q
writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
@@ -334,47 +323,45 @@ static int qcom_pcie_init_2_1_0(struct q
return ret;
}
......@@ -161,7 +161,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
/* enable PCIe clocks and resets */
val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL);
@@ -393,36 +380,6 @@ static int qcom_pcie_init_2_1_0(struct q
@@ -406,36 +393,6 @@ static int qcom_pcie_init_2_1_0(struct q
val |= PHY_REFCLK_SSP_EN;
writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
......@@ -198,7 +198,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
/* wait for clock acquisition */
usleep_range(1000, 1500);
@@ -435,15 +392,19 @@ static int qcom_pcie_init_2_1_0(struct q
@@ -448,15 +405,19 @@ static int qcom_pcie_init_2_1_0(struct q
return 0;
......
......@@ -16,7 +16,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -355,7 +355,8 @@ static int qcom_pcie_init_2_1_0(struct q
@@ -368,7 +368,8 @@ static int qcom_pcie_init_2_1_0(struct q
val &= ~BIT(0);
writel(val, pcie->parf + PCIE20_PARF_PHY_CTRL);
......@@ -26,7 +26,7 @@ Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
writel(PCS_DEEMPH_TX_DEEMPH_GEN1(24) |
PCS_DEEMPH_TX_DEEMPH_GEN2_3_5DB(24) |
PCS_DEEMPH_TX_DEEMPH_GEN2_6DB(34),
@@ -1315,6 +1316,7 @@ err_pm_runtime_put:
@@ -1328,6 +1329,7 @@ err_pm_runtime_put:
static const struct of_device_id qcom_pcie_match[] = {
{ .compatible = "qcom,pcie-apq8084", .data = &ops_1_0_0 },
{ .compatible = "qcom,pcie-ipq8064", .data = &ops_2_1_0 },
......
......@@ -49,7 +49,7 @@ Backported with light changes:
};
#define to_qcom_pcie(x) dev_get_drvdata((x)->dev)
@@ -384,6 +388,11 @@ static int qcom_pcie_init_2_1_0(struct q
@@ -397,6 +401,11 @@ static int qcom_pcie_init_2_1_0(struct q
/* wait for clock acquisition */
usleep_range(1000, 1500);
......@@ -61,7 +61,7 @@ Backported with light changes:
/* Set the Max TLP size to 2K, instead of using default of 4K */
writel(CFG_REMOTE_RD_REQ_BRIDGE_SIZE_2K,
@@ -1248,6 +1257,10 @@ static int qcom_pcie_probe(struct platfo
@@ -1261,6 +1270,10 @@ static int qcom_pcie_probe(struct platfo
goto err_pm_runtime_put;
}
......
......@@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
depends on ARCH_MOXART || COMPILE_TEST
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium
@@ -50,6 +50,7 @@ obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium
obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o
obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o
obj-$(CONFIG_MDIO_I2C) += mdio-i2c.o
......
From 1960d75e3251659be8276529e4d01cf6993d9f4a Mon Sep 17 00:00:00 2001
From: Ansuel Smith <ansuelsmth@gmail.com>
Date: Tue, 1 Sep 2020 14:21:44 +0200
Subject: [PATCH] PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0
Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined
state if bootm command is used instead of bootipq. This is caused by the
not deinit of PCIe when bootm is called. Reset the PCIe before init
anyway to fix this U-Boot bug.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
Cc: stable@vger.kernel.org # v4.19+
---
drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -296,6 +296,9 @@ static void qcom_pcie_deinit_2_1_0(struc
reset_control_assert(res->por_reset);
reset_control_assert(res->ext_reset);
reset_control_assert(res->phy_reset);
+
+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
+
regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies);
}
@@ -308,6 +311,16 @@ static int qcom_pcie_init_2_1_0(struct q
u32 val;
int ret;
+ /* reset the PCIe interface as uboot can leave it undefined state */
+ reset_control_assert(res->pci_reset);
+ reset_control_assert(res->axi_reset);
+ reset_control_assert(res->ahb_reset);
+ reset_control_assert(res->por_reset);
+ reset_control_assert(res->ext_reset);
+ reset_control_assert(res->phy_reset);
+
+ writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);
+
ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies);
if (ret < 0) {
dev_err(dev, "cannot enable regulators\n");
......@@ -242,6 +242,9 @@ CONFIG_EVENT_TRACING=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_STAT_FS=y
CONFIG_FAILOVER=y
CONFIG_FAT_FS=y
# CONFIG_FEC is not set
......
......@@ -267,6 +267,9 @@ CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXTCON=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_STAT_FS=y
CONFIG_FAILOVER=y
CONFIG_FANOTIFY=y
CONFIG_FAT_FS=y
......@@ -417,10 +420,13 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
# CONFIG_GIANFAR is not set
CONFIG_GLOB=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_IRQCHIP=y
CONFIG_GPIO_GENERIC=y
CONFIG_GPIO_GENERIC_PLATFORM=y
CONFIG_GPIO_MPC8XXX=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
CONFIG_HARDIRQS_SW_RESEND=y
......@@ -839,6 +845,10 @@ CONFIG_SERIAL_FSL_LPUART=y
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_SC16IS7XX=y
CONFIG_SERIAL_SC16IS7XX_CORE=y
# CONFIG_SERIAL_SC16IS7XX_I2C is not set
CONFIG_SERIAL_SC16IS7XX_SPI=y
CONFIG_SERIAL_XILINX_PS_UART=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
CONFIG_SERIO=y
......
......@@ -10,6 +10,7 @@ define Device/Default
FILESYSTEMS := squashfs
IMAGES := firmware.bin sysupgrade.bin
KERNEL := kernel-bin | uImage none
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_NAME := zImage
KERNEL_LOADADDR := 0x80008000
KERNEL_ENTRY_POINT := 0x80008000
......
......@@ -10,6 +10,7 @@ define Device/Default
IMAGES := firmware.bin sysupgrade.bin
FILESYSTEMS := squashfs
KERNEL := kernel-bin | gzip | uImage gzip
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
KERNEL_LOADADDR := 0x80080000
KERNEL_ENTRY_POINT := 0x80080000
DEVICE_DTS = freescale/$(subst _,-,$(1))
......@@ -62,6 +63,9 @@ define Device/fsl_ls1012a-rdb
DEVICE_PACKAGES += \
layerscape-ppfe \
tfa-ls1012a-rdb \
kmod-hwmon-ina2xx \
kmod-iio-fxas21002c-i2c \
kmod-iio-fxos8700-i2c \
kmod-ppfe
IMAGE/firmware.bin := \
ls-clean | \
......
......@@ -32,7 +32,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
+ a specific device.
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1320,6 +1320,34 @@ static ssize_t online_store(struct devic
@@ -1318,6 +1318,34 @@ static ssize_t online_store(struct devic
}
static DEVICE_ATTR_RW(online);
......@@ -67,7 +67,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
int device_add_groups(struct device *dev, const struct attribute_group **groups)
{
return sysfs_create_groups(&dev->kobj, groups);
@@ -1491,8 +1519,20 @@ static int device_add_attrs(struct devic
@@ -1489,8 +1517,20 @@ static int device_add_attrs(struct devic
goto err_remove_dev_groups;
}
......@@ -88,7 +88,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
err_remove_dev_groups:
device_remove_groups(dev, dev->groups);
err_remove_type_groups:
@@ -1510,6 +1550,8 @@ static void device_remove_attrs(struct d
@@ -1508,6 +1548,8 @@ static void device_remove_attrs(struct d
struct class *class = dev->class;
const struct device_type *type = dev->type;
......
......@@ -22,7 +22,7 @@ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -371,6 +371,16 @@ config AT803X_PHY
@@ -367,6 +367,16 @@ config AT803X_PHY
---help---
Currently supports the AT8030 and AT8035 model
......
......@@ -15,7 +15,7 @@ Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -479,6 +479,11 @@ config ICPLUS_PHY
@@ -475,6 +475,11 @@ config ICPLUS_PHY
---help---
Currently supports the IP175C and IP1001 PHYs.
......@@ -29,7 +29,7 @@ Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
---help---
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -88,6 +88,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o
@@ -87,6 +87,7 @@ obj-$(CONFIG_DP83848_PHY) += dp83848.o
obj-$(CONFIG_DP83867_PHY) += dp83867.o
obj-$(CONFIG_FIXED_PHY) += fixed_phy.o
obj-$(CONFIG_ICPLUS_PHY) += icplus.o
......
......@@ -25,7 +25,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -784,16 +784,23 @@ static inline struct flexcan_priv *rx_of
@@ -783,16 +783,23 @@ static inline struct flexcan_priv *rx_of
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);
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
@@ -807,7 +814,7 @@ static unsigned int flexcan_mailbox_read
@@ -806,7 +813,7 @@ static unsigned int flexcan_mailbox_read
code = reg_ctrl & FLEXCAN_MB_CODE_MASK;
if ((code != FLEXCAN_MB_CODE_RX_FULL) &&
(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) {
/* This MB was overrun, we lost data */
@@ -817,11 +824,17 @@ static unsigned int flexcan_mailbox_read
@@ -816,11 +823,17 @@ static unsigned int flexcan_mailbox_read
} else {
reg_iflag1 = priv->read(&regs->iflag1);
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 */
*timestamp = reg_ctrl << 16;
@@ -840,7 +853,7 @@ static unsigned int flexcan_mailbox_read
@@ -839,7 +852,7 @@ static unsigned int flexcan_mailbox_read
*(__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) {
/* Clear IRQ */
if (n < 32)
@@ -857,7 +870,7 @@ static unsigned int flexcan_mailbox_read
@@ -856,7 +869,7 @@ static unsigned int flexcan_mailbox_read
*/
priv->read(&regs->timer);
......
......@@ -17,7 +17,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1570,7 +1570,6 @@ static int flexcan_probe(struct platform
@@ -1569,7 +1569,6 @@ static int flexcan_probe(struct platform
struct net_device *dev;
struct flexcan_priv *priv;
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 flexcan_regs __iomem *regs;
int err, irq;
@@ -1605,12 +1604,11 @@ static int flexcan_probe(struct platform
@@ -1604,12 +1603,11 @@ static int flexcan_probe(struct platform
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
+++ b/drivers/net/can/flexcan.c
@@ -744,8 +744,6 @@ static void flexcan_irq_state(struct net
@@ -743,8 +743,6 @@ static void flexcan_irq_state(struct net
u32 timestamp;
int err;
......@@ -27,7 +27,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
flt = reg_esr & FLEXCAN_ESR_FLT_CONF_MASK;
if (likely(flt == FLEXCAN_ESR_FLT_CONF_ACTIVE)) {
tx_state = unlikely(reg_esr & FLEXCAN_ESR_TX_WRN) ?
@@ -765,6 +763,8 @@ static void flexcan_irq_state(struct net
@@ -764,6 +762,8 @@ static void flexcan_irq_state(struct net
if (likely(new_state == priv->can.state))
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_WARN BIT(6)
#define FLEXCAN_IFLAG_RX_FIFO_AVAILABLE BIT(5)
@@ -880,7 +880,7 @@ static inline u64 flexcan_read_reg_iflag
@@ -879,7 +879,7 @@ static inline u64 flexcan_read_reg_iflag
u32 iflag1, iflag2;
iflag2 = priv->read(&regs->iflag2) & priv->reg_imask2_default &
......@@ -32,7 +32,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
iflag1 = priv->read(&regs->iflag1) & priv->reg_imask1_default;
return (u64)iflag2 << 32 | iflag1;
@@ -930,7 +930,7 @@ static irqreturn_t flexcan_irq(int irq,
@@ -929,7 +929,7 @@ static irqreturn_t flexcan_irq(int irq,
reg_iflag2 = priv->read(&regs->iflag2);
/* 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);
handled = IRQ_HANDLED;
@@ -942,7 +942,7 @@ static irqreturn_t flexcan_irq(int irq,
@@ -941,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq,
/* after sending a RTR frame MB is in RX mode */
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
&priv->tx_mb->can_ctrl);
......@@ -50,7 +50,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
netif_wake_queue(dev);
}
@@ -1321,7 +1321,7 @@ static int flexcan_open(struct net_devic
@@ -1320,7 +1320,7 @@ static int flexcan_open(struct net_devic
priv->tx_mb = flexcan_get_mb(priv, priv->tx_mb_idx);
priv->reg_imask1_default = 0;
......
......@@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -898,13 +898,13 @@ static irqreturn_t flexcan_irq(int irq,
@@ -897,13 +897,13 @@ static irqreturn_t flexcan_irq(int irq,
/* reception interrupt */
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_per;
@@ -879,9 +879,9 @@ static inline u64 flexcan_read_reg_iflag
@@ -878,9 +878,9 @@ static inline u64 flexcan_read_reg_iflag
struct flexcan_regs __iomem *regs = priv->regs;
u32 iflag1, iflag2;
......@@ -61,7 +61,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
return (u64)iflag2 << 32 | iflag1;
}
@@ -1228,8 +1228,8 @@ static int flexcan_chip_start(struct net
@@ -1227,8 +1227,8 @@ static int flexcan_chip_start(struct net
/* enable interrupts atomically */
disable_irq(dev->irq);
priv->write(priv->reg_ctrl_default, &regs->ctrl);
......@@ -72,7 +72,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
enable_irq(dev->irq);
/* print chip status */
@@ -1320,8 +1320,8 @@ static int flexcan_open(struct net_devic
@@ -1319,8 +1319,8 @@ static int flexcan_open(struct net_devic
priv->tx_mb_idx = priv->mb_count - 1;
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;
@@ -1333,12 +1333,12 @@ static int flexcan_open(struct net_devic
@@ -1332,12 +1332,12 @@ static int flexcan_open(struct net_devic
imask = GENMASK_ULL(priv->offload.mb_last,
priv->offload.mb_first);
......
......@@ -24,7 +24,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -879,8 +879,7 @@ static inline u64 flexcan_read_reg_iflag
@@ -878,8 +878,7 @@ static inline u64 flexcan_read_reg_iflag
struct flexcan_regs __iomem *regs = priv->regs;
u32 iflag1, iflag2;
......@@ -34,7 +34,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
iflag1 = priv->read(&regs->iflag1) & priv->rx_mask1;
return (u64)iflag2 << 32 | iflag1;
@@ -1229,7 +1228,7 @@ static int flexcan_chip_start(struct net
@@ -1228,7 +1227,7 @@ static int flexcan_chip_start(struct net
disable_irq(dev->irq);
priv->write(priv->reg_ctrl_default, &regs->ctrl);
priv->write(priv->rx_mask1, &regs->imask1);
......@@ -43,7 +43,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
enable_irq(dev->irq);
/* print chip status */
@@ -1320,9 +1319,6 @@ static int flexcan_open(struct net_devic
@@ -1319,9 +1318,6 @@ static int flexcan_open(struct net_devic
priv->tx_mb_idx = priv->mb_count - 1;
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;
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_USE_OFF_TIMESTAMP) {
@@ -1333,12 +1329,12 @@ static int flexcan_open(struct net_devic
@@ -1332,12 +1328,12 @@ static int flexcan_open(struct net_devic
imask = GENMASK_ULL(priv->offload.mb_last,
priv->offload.mb_first);
......
......@@ -41,7 +41,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
struct clk *clk_ipg;
struct clk *clk_per;
@@ -873,16 +873,15 @@ static struct sk_buff *flexcan_mailbox_r
@@ -872,16 +872,15 @@ static struct sk_buff *flexcan_mailbox_r
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)
@@ -1053,6 +1052,7 @@ static int flexcan_chip_start(struct net
@@ -1052,6 +1051,7 @@ static int flexcan_chip_start(struct net
struct flexcan_priv *priv = netdev_priv(dev);
struct flexcan_regs __iomem *regs = priv->regs;
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;
struct flexcan_mb __iomem *mb;
@@ -1227,8 +1227,9 @@ static int flexcan_chip_start(struct net
@@ -1226,8 +1226,9 @@ static int flexcan_chip_start(struct net
/* enable interrupts atomically */
disable_irq(dev->irq);
priv->write(priv->reg_ctrl_default, &regs->ctrl);
......@@ -82,7 +82,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
enable_irq(dev->irq);
/* print chip status */
@@ -1322,19 +1323,14 @@ static int flexcan_open(struct net_devic
@@ -1321,19 +1322,14 @@ static int flexcan_open(struct net_devic
priv->offload.mailbox_read = flexcan_mailbox_read;
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;
struct clk *clk_ipg;
@@ -891,7 +891,8 @@ static irqreturn_t flexcan_irq(int irq,
@@ -890,7 +890,8 @@ static irqreturn_t flexcan_irq(int irq,
struct flexcan_priv *priv = netdev_priv(dev);
struct flexcan_regs __iomem *regs = priv->regs;
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;
/* reception interrupt */
@@ -925,10 +926,10 @@ static irqreturn_t flexcan_irq(int irq,
@@ -924,10 +925,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);
handled = IRQ_HANDLED;
@@ -940,7 +941,7 @@ static irqreturn_t flexcan_irq(int irq,
@@ -939,7 +940,7 @@ static irqreturn_t flexcan_irq(int irq,
/* after sending a RTR frame MB is in RX mode */
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
&priv->tx_mb->can_ctrl);
......@@ -71,7 +71,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
netif_wake_queue(dev);
}
@@ -1227,7 +1228,7 @@ static int flexcan_chip_start(struct net
@@ -1226,7 +1227,7 @@ static int flexcan_chip_start(struct net
/* enable interrupts atomically */
disable_irq(dev->irq);
priv->write(priv->reg_ctrl_default, &regs->ctrl);
......@@ -80,7 +80,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
priv->write(upper_32_bits(reg_imask), &regs->imask2);
priv->write(lower_32_bits(reg_imask), &regs->imask1);
enable_irq(dev->irq);
@@ -1319,6 +1320,7 @@ static int flexcan_open(struct net_devic
@@ -1318,6 +1319,7 @@ static int flexcan_open(struct net_devic
flexcan_get_mb(priv, FLEXCAN_TX_MB_RESERVED_OFF_FIFO);
priv->tx_mb_idx = priv->mb_count - 1;
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
+++ b/drivers/net/can/flexcan.c
@@ -779,6 +779,23 @@ static void flexcan_irq_state(struct net
@@ -778,6 +778,23 @@ static void flexcan_irq_state(struct net
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)
{
return container_of(offload, struct flexcan_priv, offload);
@@ -873,17 +890,6 @@ static struct sk_buff *flexcan_mailbox_r
@@ -872,17 +889,6 @@ static struct sk_buff *flexcan_mailbox_r
return skb;
}
......
......@@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -791,11 +791,24 @@ static inline u64 flexcan_read64_mask(st
@@ -790,11 +790,24 @@ static inline u64 flexcan_read64_mask(st
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)
{
return container_of(offload, struct flexcan_priv, offload);
@@ -932,7 +945,7 @@ static irqreturn_t flexcan_irq(int irq,
@@ -931,7 +944,7 @@ static irqreturn_t flexcan_irq(int irq,
}
}
......@@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
/* transmission complete interrupt */
if (reg_iflag_tx & priv->tx_mask) {
@@ -947,7 +960,7 @@ static irqreturn_t flexcan_irq(int irq,
@@ -946,7 +959,7 @@ static irqreturn_t flexcan_irq(int irq,
/* after sending a RTR frame MB is in RX mode */
priv->write(FLEXCAN_MB_CODE_TX_INACTIVE,
&priv->tx_mb->can_ctrl);
......
......@@ -16,7 +16,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -884,15 +884,10 @@ static struct sk_buff *flexcan_mailbox_r
@@ -883,15 +883,10 @@ static struct sk_buff *flexcan_mailbox_r
}
mark_as_read:
......
......@@ -15,7 +15,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -628,10 +628,10 @@ static int flexcan_get_berr_counter(cons
@@ -627,10 +627,10 @@ static int flexcan_get_berr_counter(cons
static netdev_tx_t flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
const struct flexcan_priv *priv = netdev_priv(dev);
......@@ -28,7 +28,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
int i;
if (can_dropped_invalid_skb(dev, skb))
@@ -639,18 +639,18 @@ static netdev_tx_t flexcan_start_xmit(st
@@ -638,18 +638,18 @@ static netdev_tx_t flexcan_start_xmit(st
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)]);
}
@@ -822,7 +822,7 @@ static struct sk_buff *flexcan_mailbox_r
@@ -821,7 +821,7 @@ static struct sk_buff *flexcan_mailbox_r
struct flexcan_regs __iomem *regs = priv->regs;
struct flexcan_mb __iomem *mb;
struct sk_buff *skb;
......@@ -62,7 +62,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
u32 reg_ctrl, reg_id, reg_iflag1;
int i;
@@ -859,8 +859,8 @@ static struct sk_buff *flexcan_mailbox_r
@@ -858,8 +858,8 @@ static struct sk_buff *flexcan_mailbox_r
reg_ctrl = priv->read(&mb->can_ctrl);
}
......@@ -73,7 +73,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
skb = ERR_PTR(-ENOMEM);
goto mark_as_read;
}
@@ -870,17 +870,17 @@ static struct sk_buff *flexcan_mailbox_r
@@ -869,17 +869,17 @@ static struct sk_buff *flexcan_mailbox_r
reg_id = priv->read(&mb->can_id);
if (reg_ctrl & FLEXCAN_MB_CNT_IDE)
......
......@@ -93,7 +93,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
};
struct flexcan_devtype_data {
@@ -337,6 +367,30 @@ static const struct can_bittiming_const
@@ -336,6 +366,30 @@ static const struct can_bittiming_const
.brp_inc = 1,
};
......@@ -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
* SoCs, i.e the registers as well as the message buffer areas are
* implemented in a little-endian fashion.
@@ -631,7 +685,7 @@ static netdev_tx_t flexcan_start_xmit(st
@@ -630,7 +684,7 @@ static netdev_tx_t flexcan_start_xmit(st
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
u32 can_id;
u32 data;
......@@ -133,7 +133,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
int i;
if (can_dropped_invalid_skb(dev, skb))
@@ -649,6 +703,9 @@ static netdev_tx_t flexcan_start_xmit(st
@@ -648,6 +702,9 @@ static netdev_tx_t flexcan_start_xmit(st
if (cfd->can_id & CAN_RTR_FLAG)
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)) {
data = be32_to_cpup((__be32 *)&cfd->data[i]);
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
@@ -859,7 +916,10 @@ static struct sk_buff *flexcan_mailbox_r
@@ -858,7 +915,10 @@ static struct sk_buff *flexcan_mailbox_r
reg_ctrl = priv->read(&mb->can_ctrl);
}
......@@ -155,7 +155,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if (unlikely(!skb)) {
skb = ERR_PTR(-ENOMEM);
goto mark_as_read;
@@ -874,9 +934,17 @@ static struct sk_buff *flexcan_mailbox_r
@@ -873,9 +933,17 @@ static struct sk_buff *flexcan_mailbox_r
else
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)) {
__be32 data = cpu_to_be32(priv->read(&mb->data[i / sizeof(u32)]));
@@ -1021,27 +1089,14 @@ static irqreturn_t flexcan_irq(int irq,
@@ -1020,27 +1088,14 @@ static irqreturn_t flexcan_irq(int irq,
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)
reg |= FLEXCAN_CTRL_LPB;
if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
@@ -1052,9 +1107,102 @@ static void flexcan_set_bittiming(struct
@@ -1051,9 +1106,102 @@ static void flexcan_set_bittiming(struct
netdev_dbg(dev, "writing ctrl=0x%08x\n", reg);
priv->write(reg, &regs->ctrl);
......@@ -315,7 +315,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
}
/* flexcan_chip_start
@@ -1066,7 +1214,7 @@ static int flexcan_chip_start(struct net
@@ -1065,7 +1213,7 @@ static int flexcan_chip_start(struct net
{
struct flexcan_priv *priv = netdev_priv(dev);
struct flexcan_regs __iomem *regs = priv->regs;
......@@ -324,7 +324,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
u64 reg_imask;
int err, i;
struct flexcan_mb __iomem *mb;
@@ -1163,6 +1311,26 @@ static int flexcan_chip_start(struct net
@@ -1162,6 +1310,26 @@ static int flexcan_chip_start(struct net
netdev_dbg(dev, "%s: writing ctrl=0x%08x", __func__, reg_ctrl);
priv->write(reg_ctrl, &regs->ctrl);
......@@ -351,7 +351,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if ((priv->devtype_data->quirks & FLEXCAN_QUIRK_ENABLE_EACEN_RRS)) {
reg_ctrl2 = priv->read(&regs->ctrl2);
reg_ctrl2 |= FLEXCAN_CTRL2_EACEN | FLEXCAN_CTRL2_RRS;
@@ -1310,6 +1478,12 @@ static int flexcan_open(struct net_devic
@@ -1309,6 +1477,12 @@ static int flexcan_open(struct net_devic
struct flexcan_priv *priv = netdev_priv(dev);
int err;
......@@ -364,7 +364,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
err = pm_runtime_get_sync(priv->dev);
if (err < 0)
return err;
@@ -1322,7 +1496,10 @@ static int flexcan_open(struct net_devic
@@ -1321,7 +1495,10 @@ static int flexcan_open(struct net_devic
if (err)
goto out_close;
......@@ -376,7 +376,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
priv->mb_count = (sizeof(priv->regs->mb[0]) / priv->mb_size) +
(sizeof(priv->regs->mb[1]) / priv->mb_size);
@@ -1667,6 +1844,18 @@ static int flexcan_probe(struct platform
@@ -1666,6 +1843,18 @@ static int flexcan_probe(struct platform
priv->devtype_data = devtype_data;
priv->reg_xceiver = reg_xceiver;
......
......@@ -13,7 +13,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -703,9 +703,13 @@ static netdev_tx_t flexcan_start_xmit(st
@@ -702,9 +702,13 @@ static netdev_tx_t flexcan_start_xmit(st
if (cfd->can_id & CAN_RTR_FLAG)
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)) {
data = be32_to_cpup((__be32 *)&cfd->data[i]);
priv->write(data, &priv->tx_mb->data[i / sizeof(u32)]);
@@ -936,6 +940,9 @@ static struct sk_buff *flexcan_mailbox_r
@@ -935,6 +939,9 @@ static struct sk_buff *flexcan_mailbox_r
if (reg_ctrl & FLEXCAN_MB_CNT_EDL) {
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 */
#define FLEXCAN_MECR_ECRWRDIS BIT(31)
@@ -1323,6 +1324,7 @@ static int flexcan_chip_start(struct net
@@ -1322,6 +1323,7 @@ static int flexcan_chip_start(struct net
reg_fdctrl = priv->read(&regs->fdctrl) & ~FLEXCAN_FDCTRL_FDRATE;
reg_fdctrl &= ~(FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3));
reg_mcr = priv->read(&regs->mcr) & ~FLEXCAN_MCR_FDEN;
......@@ -39,7 +39,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
/* support BRS when set CAN FD mode
* 64 bytes payload per MB and 7 MBs per RAM block by default
@@ -1332,10 +1334,14 @@ static int flexcan_chip_start(struct net
@@ -1331,10 +1333,14 @@ static int flexcan_chip_start(struct net
reg_fdctrl |= FLEXCAN_FDCTRL_FDRATE;
reg_fdctrl |= FLEXCAN_FDCTRL_MBDSR1(0x3) | FLEXCAN_FDCTRL_MBDSR0(0x3);
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)) {
@@ -1853,7 +1859,7 @@ static int flexcan_probe(struct platform
@@ -1852,7 +1858,7 @@ static int flexcan_probe(struct platform
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_TIMESTAMP_SUPPORT_FD) {
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 */
#define FLEXCAN_FDCBT_FPRESDIV(x) (((x) & 0x3ff) << 20)
@@ -1101,7 +1104,7 @@ static void flexcan_set_bittiming(struct
@@ -1100,7 +1103,7 @@ static void flexcan_set_bittiming(struct
struct can_bittiming *bt = &priv->can.bittiming;
struct can_bittiming *dbt = &priv->can.data_bittiming;
struct flexcan_regs __iomem *regs = priv->regs;
......@@ -40,7 +40,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
reg = priv->read(&regs->ctrl);
reg &= ~(FLEXCAN_CTRL_LPB | FLEXCAN_CTRL_SMP | FLEXCAN_CTRL_LOM);
@@ -1173,6 +1176,19 @@ static void flexcan_set_bittiming(struct
@@ -1172,6 +1175,19 @@ static void flexcan_set_bittiming(struct
FLEXCAN_FDCBT_FPROPSEG(dbt->prop_seg);
priv->write(reg_fdcbt, &regs->fdcbt);
......@@ -60,7 +60,7 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
if (bt->brp != dbt->brp)
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",
@@ -1322,6 +1338,7 @@ static int flexcan_chip_start(struct net
@@ -1321,6 +1337,7 @@ static int flexcan_chip_start(struct net
/* FDCTRL */
if (priv->can.ctrlmode_supported & CAN_CTRLMODE_FD) {
reg_fdctrl = priv->read(&regs->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 = {
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
@@ -1760,6 +1767,7 @@ out_put_node:
@@ -1759,6 +1766,7 @@ out_put_node:
}
static const struct of_device_id flexcan_of_match[] = {
......
......@@ -34,8 +34,8 @@ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+
static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE |
@@ -1776,6 +1783,7 @@ static const struct of_device_id flexcan
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
@@ -1775,6 +1782,7 @@ static const struct of_device_id flexcan
{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_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>
#define DRV_NAME "flexcan"
@@ -1954,9 +1955,7 @@ static int __maybe_unused flexcan_suspen
@@ -1955,9 +1956,7 @@ static int __maybe_unused flexcan_suspen
if (err)
return err;
} else {
......@@ -39,7 +39,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
}
netif_stop_queue(dev);
netif_device_detach(dev);
@@ -1982,7 +1981,9 @@ static int __maybe_unused flexcan_resume
@@ -1983,7 +1982,9 @@ static int __maybe_unused flexcan_resume
if (err)
return err;
} else {
......
......@@ -47,7 +47,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
/* FLEXCAN Bit Timing register (CBT) bits */
#define FLEXCAN_CBT_BTF BIT(31)
@@ -1055,6 +1054,12 @@ static irqreturn_t flexcan_irq(int irq,
@@ -1054,6 +1053,12 @@ static irqreturn_t flexcan_irq(int irq,
reg_esr = priv->read(&regs->esr);
......
......@@ -63,7 +63,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
};
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
@@ -504,6 +516,32 @@ static void flexcan_enable_wakeup_irq(st
@@ -503,6 +515,32 @@ static void flexcan_enable_wakeup_irq(st
priv->write(reg_mcr, &regs->mcr);
}
......@@ -96,7 +96,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv)
{
struct flexcan_regs __iomem *regs = priv->regs;
@@ -513,9 +551,12 @@ static inline int flexcan_enter_stop_mod
@@ -512,9 +550,12 @@ static inline int flexcan_enter_stop_mod
reg_mcr |= FLEXCAN_MCR_SLF_WAK;
priv->write(reg_mcr, &regs->mcr);
......@@ -112,7 +112,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
return flexcan_low_power_enter_ack(priv);
}
@@ -526,8 +567,11 @@ static inline int flexcan_exit_stop_mode
@@ -525,8 +566,11 @@ static inline int flexcan_exit_stop_mode
u32 reg_mcr;
/* remove stop request */
......@@ -126,7 +126,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
reg_mcr = priv->read(&regs->mcr);
@@ -1767,11 +1811,6 @@ static int flexcan_setup_stop_mode(struc
@@ -1766,11 +1810,6 @@ static int flexcan_setup_stop_mode(struc
gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit,
priv->stm.ack_gpr, priv->stm.ack_bit);
......@@ -138,7 +138,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
return 0;
out_put_node:
@@ -1779,6 +1818,30 @@ out_put_node:
@@ -1778,6 +1817,30 @@ out_put_node:
return ret;
}
......@@ -169,7 +169,7 @@ Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
static const struct of_device_id flexcan_of_match[] = {
{ .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, },
{ .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
@@ -1921,9 +1984,19 @@ static int flexcan_probe(struct platform
@@ -1920,9 +1983,19 @@ static int flexcan_probe(struct platform
devm_can_led_init(dev);
if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) {
......
......@@ -25,8 +25,8 @@ Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
//
// Based on code originally by Andrey Volkov <avolkov@varma-el.com>
@@ -385,6 +386,10 @@ static const struct flexcan_devtype_data
FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
@@ -384,6 +385,10 @@ static const struct flexcan_devtype_data
FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
};
+static struct flexcan_devtype_data fsl_s32v234_devtype_data = {
......@@ -36,7 +36,7 @@ Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
static const struct can_bittiming_const flexcan_bittiming_const = {
.name = DRV_NAME,
.tseg1_min = 4,
@@ -1853,6 +1858,8 @@ static const struct of_device_id flexcan
@@ -1852,6 +1857,8 @@ static const struct of_device_id flexcan
{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
{ .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, },
{ .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, },
......
......@@ -64,7 +64,7 @@ Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
if (writable)
pte = kvm_s2pte_mkwrite(pte);
@@ -2361,7 +2363,7 @@ int kvm_arch_prepare_memory_region(struc
@@ -2362,7 +2364,7 @@ int kvm_arch_prepare_memory_region(struc
ret = kvm_phys_addr_ioremap(kvm, gpa, pa,
vm_end - vm_start,
......
......@@ -105,7 +105,7 @@ Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
if (kvm_is_device_pfn(pfn)) {
mem_type = PAGE_S2_DEVICE;
flags |= KVM_S2PTE_FLAG_IS_IOMAP;
@@ -2351,6 +2395,9 @@ int kvm_arch_prepare_memory_region(struc
@@ -2352,6 +2396,9 @@ int kvm_arch_prepare_memory_region(struc
gpa_t gpa = mem->guest_phys_addr +
(vm_start - mem->userspace_addr);
phys_addr_t pa;
......@@ -115,7 +115,7 @@ Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
pa = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT;
pa += vm_start - vma->vm_start;
@@ -2361,9 +2408,13 @@ int kvm_arch_prepare_memory_region(struc
@@ -2362,9 +2409,13 @@ int kvm_arch_prepare_memory_region(struc
goto out;
}
......
......@@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/tty_flip.h>
@@ -2367,6 +2369,54 @@ static struct uart_driver lpuart_reg = {
@@ -2391,6 +2393,54 @@ static struct uart_driver lpuart_reg = {
.cons = LPUART_CONSOLE,
};
......@@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
static int lpuart_probe(struct platform_device *pdev)
{
const struct of_device_id *of_id = of_match_device(lpuart_dt_ids,
@@ -2404,6 +2454,10 @@ static int lpuart_probe(struct platform_
@@ -2428,6 +2478,10 @@ static int lpuart_probe(struct platform_
sport->port.rs485_config = lpuart_config_rs485;
......
......@@ -20,7 +20,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/tty_flip.h>
@@ -1542,8 +1543,17 @@ static void lpuart32_configure(struct lp
@@ -1555,8 +1556,17 @@ static void lpuart32_configure(struct lp
static int lpuart32_startup(struct uart_port *port)
{
struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
......
......@@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -918,7 +918,12 @@ static void lpuart32_rxint(struct lpuart
@@ -931,7 +931,12 @@ static void lpuart32_rxint(struct lpuart
*/
sr = lpuart32_read(&sport->port, UARTSTAT);
rx = lpuart32_read(&sport->port, UARTDATA);
......
......@@ -17,7 +17,7 @@ Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2452,7 +2452,7 @@ static int lpuart_probe(struct platform_
@@ -2476,7 +2476,7 @@ static int lpuart_probe(struct platform_
return PTR_ERR(sport->port.membase);
sport->port.membase += sdata->reg_off;
......
......@@ -60,7 +60,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
/* Rx DMA timeout in ms, which is used to calculate Rx ring buffer size */
#define DMA_RX_TIMEOUT (10)
@@ -253,6 +260,9 @@ struct lpuart_port {
@@ -254,6 +261,9 @@ struct lpuart_port {
unsigned int txfifo_size;
unsigned int rxfifo_size;
......@@ -70,7 +70,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
bool lpuart_dma_tx_use;
bool lpuart_dma_rx_use;
struct dma_chan *dma_tx_chan;
@@ -278,28 +288,38 @@ struct lpuart_soc_data {
@@ -279,33 +289,45 @@ struct lpuart_soc_data {
enum lpuart_type devtype;
char iotype;
u8 reg_off;
......@@ -85,13 +85,20 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
+ .rx_dma_cyclic = true,
};
static const struct lpuart_soc_data ls_data = {
static const struct lpuart_soc_data ls1021a_data = {
.devtype = LS1021A_LPUART,
.iotype = UPIO_MEM32BE,
+ .rx_watermark = 0,
+ .rx_dma_cyclic = true,
};
static const struct lpuart_soc_data ls1028a_data = {
.devtype = LS1028A_LPUART,
.iotype = UPIO_MEM32,
+ .rx_watermark = 0,
+ .rx_dma_cyclic = true,
};
static struct lpuart_soc_data imx7ulp_data = {
.devtype = IMX7ULP_LPUART,
.iotype = UPIO_MEM32,
......@@ -109,15 +116,15 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
};
static const struct of_device_id lpuart_dt_ids[] = {
@@ -313,6 +333,7 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids);
@@ -320,6 +342,7 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids);
/* Forward declare this for the dma callbacks*/
static void lpuart_dma_tx_complete(void *arg);
+static int lpuart_sched_rx_dma(struct lpuart_port *sport);
static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport)
static inline bool is_layerscape_lpuart(struct lpuart_port *sport)
{
@@ -998,19 +1019,15 @@ static irqreturn_t lpuart32_int(int irq,
@@ -1011,19 +1034,15 @@ static irqreturn_t lpuart32_int(int irq,
if ((sts & UARTSTAT_TDRE) && !sport->lpuart_dma_tx_use)
lpuart32_txint(sport);
......@@ -141,7 +148,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
if (lpuart_is_32(sport)) {
unsigned long sr = lpuart32_read(&sport->port, UARTSTAT);
@@ -1062,8 +1079,21 @@ static void lpuart_copy_rx_to_tty(struct
@@ -1075,8 +1094,21 @@ static void lpuart_copy_rx_to_tty(struct
writeb(cr2, sport->port.membase + UARTCR2);
}
}
......@@ -164,7 +171,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
spin_lock_irqsave(&sport->port.lock, flags);
@@ -1126,7 +1156,33 @@ static void lpuart_copy_rx_to_tty(struct
@@ -1139,7 +1171,33 @@ static void lpuart_copy_rx_to_tty(struct
spin_unlock_irqrestore(&sport->port.lock, flags);
tty_flip_buffer_push(port);
......@@ -199,7 +206,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
}
static void lpuart_dma_rx_complete(void *arg)
@@ -1134,6 +1190,8 @@ static void lpuart_dma_rx_complete(void
@@ -1147,6 +1205,8 @@ static void lpuart_dma_rx_complete(void
struct lpuart_port *sport = arg;
lpuart_copy_rx_to_tty(sport);
......@@ -208,7 +215,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
}
static void lpuart_timer_func(struct timer_list *t)
@@ -1141,13 +1199,78 @@ static void lpuart_timer_func(struct tim
@@ -1154,13 +1214,78 @@ static void lpuart_timer_func(struct tim
struct lpuart_port *sport = from_timer(sport, t, lpuart_timer);
lpuart_copy_rx_to_tty(sport);
......@@ -291,7 +298,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
int bits, baud;
struct tty_port *port = &sport->port.state->port;
struct tty_struct *tty = port->tty;
@@ -1167,6 +1290,18 @@ static inline int lpuart_start_rx_dma(st
@@ -1180,6 +1305,18 @@ static inline int lpuart_start_rx_dma(st
sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1));
if (sport->rx_dma_rng_buf_len < 16)
sport->rx_dma_rng_buf_len = 16;
......@@ -310,7 +317,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC);
if (!ring->buf)
@@ -1192,32 +1327,7 @@ static inline int lpuart_start_rx_dma(st
@@ -1205,32 +1342,7 @@ static inline int lpuart_start_rx_dma(st
return ret;
}
......@@ -344,7 +351,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
}
static void lpuart_dma_rx_free(struct uart_port *port)
@@ -1403,8 +1513,10 @@ static void lpuart_setup_watermark(struc
@@ -1416,8 +1528,10 @@ static void lpuart_setup_watermark(struc
writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO);
}
......@@ -356,7 +363,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
/* Restore cr2 */
writeb(cr2_saved, sport->port.membase + UARTCR2);
@@ -1425,6 +1537,7 @@ static void lpuart32_setup_watermark(str
@@ -1438,6 +1552,7 @@ static void lpuart32_setup_watermark(str
{
unsigned long val, ctrl;
unsigned long ctrl_saved;
......@@ -364,7 +371,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
ctrl = lpuart32_read(&sport->port, UARTCTRL);
ctrl_saved = ctrl;
@@ -1436,12 +1549,26 @@ static void lpuart32_setup_watermark(str
@@ -1449,12 +1564,26 @@ static void lpuart32_setup_watermark(str
val = lpuart32_read(&sport->port, UARTFIFO);
val |= UARTFIFO_TXFE | UARTFIFO_RXFE;
val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH;
......@@ -392,7 +399,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
/* Restore cr2 */
lpuart32_write(&sport->port, ctrl_saved, UARTCTRL);
}
@@ -1453,17 +1580,29 @@ static void lpuart32_setup_watermark_ena
@@ -1466,17 +1595,29 @@ static void lpuart32_setup_watermark_ena
lpuart32_setup_watermark(sport);
temp = lpuart32_read(&sport->port, UARTCTRL);
......@@ -423,7 +430,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
static void lpuart_tx_dma_startup(struct lpuart_port *sport)
{
u32 uartbaud;
@@ -1527,19 +1666,23 @@ static int lpuart_startup(struct uart_po
@@ -1540,19 +1681,23 @@ static int lpuart_startup(struct uart_po
return 0;
}
......@@ -454,7 +461,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
if (!sport->lpuart_dma_tx_use)
temp |= UARTCTRL_TIE;
lpuart32_write(&sport->port, temp, UARTCTRL);
@@ -1572,12 +1715,12 @@ static int lpuart32_startup(struct uart_
@@ -1596,12 +1741,12 @@ static int lpuart32_startup(struct uart_
spin_lock_irqsave(&sport->port.lock, flags);
......@@ -469,7 +476,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
lpuart32_configure(sport);
spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -1587,7 +1730,7 @@ static int lpuart32_startup(struct uart_
@@ -1611,7 +1756,7 @@ static int lpuart32_startup(struct uart_
static void lpuart_dma_shutdown(struct lpuart_port *sport)
{
if (sport->lpuart_dma_rx_use) {
......@@ -478,7 +485,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
lpuart_dma_rx_free(&sport->port);
}
@@ -1628,11 +1771,22 @@ static void lpuart32_shutdown(struct uar
@@ -1652,11 +1797,22 @@ static void lpuart32_shutdown(struct uar
spin_lock_irqsave(&port->lock, flags);
......@@ -503,7 +510,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
spin_unlock_irqrestore(&port->lock, flags);
@@ -1729,10 +1883,10 @@ lpuart_set_termios(struct uart_port *por
@@ -1753,10 +1909,10 @@ lpuart_set_termios(struct uart_port *por
* baud rate and restart Rx DMA path.
*
* Since timer function acqures sport->port.lock, need to stop before
......@@ -516,7 +523,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
lpuart_dma_rx_free(&sport->port);
}
@@ -1944,10 +2098,10 @@ lpuart32_set_termios(struct uart_port *p
@@ -1968,10 +2124,10 @@ lpuart32_set_termios(struct uart_port *p
* baud rate and restart Rx DMA path.
*
* Since timer function acqures sport->port.lock, need to stop before
......@@ -529,7 +536,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
lpuart_dma_rx_free(&sport->port);
}
@@ -2456,6 +2610,10 @@ static int lpuart_probe(struct platform_
@@ -2480,6 +2636,10 @@ static int lpuart_probe(struct platform_
sport->port.dev = &pdev->dev;
sport->port.type = PORT_LPUART;
sport->devtype = sdata->devtype;
......@@ -540,7 +547,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
ret = platform_get_irq(pdev, 0);
if (ret < 0)
return ret;
@@ -2618,7 +2776,7 @@ static int lpuart_suspend(struct device
@@ -2642,7 +2802,7 @@ static int lpuart_suspend(struct device
* Rx DMA path before suspend and start Rx DMA path on resume.
*/
if (irq_wake) {
......
......@@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1462,6 +1462,14 @@ static void lpuart32_set_mctrl(struct ua
@@ -1477,6 +1477,14 @@ static void lpuart32_set_mctrl(struct ua
temp |= UARTMODIR_TXCTSE;
lpuart32_write(port, temp, UARTMODIR);
......
......@@ -16,7 +16,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -490,6 +490,10 @@ static void lpuart_dma_tx_complete(void
@@ -505,6 +505,10 @@ static void lpuart_dma_tx_complete(void
unsigned long flags;
spin_lock_irqsave(&sport->port.lock, flags);
......
......@@ -59,9 +59,9 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
#define UARTFIFO_RXIDEN_RDRF 0x3
#define UARTCTRL_IDLECFG 0x7
@@ -335,6 +345,11 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids);
static void lpuart_dma_tx_complete(void *arg);
static int lpuart_sched_rx_dma(struct lpuart_port *sport);
@@ -350,6 +360,11 @@ static inline bool is_layerscape_lpuart(
sport->devtype == LS1028A_LPUART);
}
+static inline bool is_imx7ulp_lpuart(struct lpuart_port *sport)
+{
......@@ -71,7 +71,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport)
{
return sport->devtype == IMX8QXP_LPUART;
@@ -398,6 +413,33 @@ static unsigned int lpuart_get_baud_clk_
@@ -413,6 +428,33 @@ static unsigned int lpuart_get_baud_clk_
#define lpuart_enable_clks(x) __lpuart_enable_clks(x, true)
#define lpuart_disable_clks(x) __lpuart_enable_clks(x, false)
......@@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
static void lpuart_stop_tx(struct uart_port *port)
{
unsigned char temp;
@@ -2702,6 +2744,10 @@ static int lpuart_probe(struct platform_
@@ -2728,6 +2770,10 @@ static int lpuart_probe(struct platform_
if (ret)
goto failed_attach_port;
......@@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
uart_get_rs485_mode(&pdev->dev, &sport->port.rs485);
if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX)
@@ -2725,6 +2771,8 @@ static int lpuart_probe(struct platform_
@@ -2751,6 +2797,8 @@ static int lpuart_probe(struct platform_
return 0;
......
......@@ -22,7 +22,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
#define DRIVER_NAME "fsl-lpuart"
#define DEV_NAME "ttyLP"
@@ -844,6 +845,20 @@ static void lpuart32_start_tx(struct uar
@@ -859,6 +860,20 @@ static void lpuart32_start_tx(struct uar
}
}
......@@ -43,7 +43,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
/* return TIOCSER_TEMT when transmitter is not busy */
static unsigned int lpuart_tx_empty(struct uart_port *port)
{
@@ -2257,6 +2272,7 @@ static const struct uart_ops lpuart_pops
@@ -2283,6 +2298,7 @@ static const struct uart_ops lpuart_pops
.break_ctl = lpuart_break_ctl,
.startup = lpuart_startup,
.shutdown = lpuart_shutdown,
......@@ -51,7 +51,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
.set_termios = lpuart_set_termios,
.type = lpuart_type,
.request_port = lpuart_request_port,
@@ -2281,6 +2297,7 @@ static const struct uart_ops lpuart32_po
@@ -2307,6 +2323,7 @@ static const struct uart_ops lpuart32_po
.break_ctl = lpuart32_break_ctl,
.startup = lpuart32_startup,
.shutdown = lpuart32_shutdown,
......@@ -59,7 +59,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
.set_termios = lpuart32_set_termios,
.type = lpuart_type,
.request_port = lpuart_request_port,
@@ -2740,6 +2757,11 @@ static int lpuart_probe(struct platform_
@@ -2766,6 +2783,11 @@ static int lpuart_probe(struct platform_
if (ret)
goto failed_irq_request;
......@@ -71,7 +71,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
ret = uart_add_one_port(&lpuart_reg, &sport->port);
if (ret)
goto failed_attach_port;
@@ -2774,6 +2796,9 @@ static int lpuart_probe(struct platform_
@@ -2800,6 +2822,9 @@ static int lpuart_probe(struct platform_
failed_reset:
uart_remove_one_port(&lpuart_reg, &sport->port);
failed_attach_port:
......@@ -81,7 +81,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
failed_irq_request:
lpuart_disable_clks(sport);
failed_clock_enable:
@@ -2800,15 +2825,41 @@ static int lpuart_remove(struct platform
@@ -2826,15 +2851,41 @@ static int lpuart_remove(struct platform
if (sport->dma_rx_chan)
dma_release_channel(sport->dma_rx_chan);
......@@ -123,7 +123,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
if (lpuart_is_32(sport)) {
/* disable Rx/Tx and interrupts */
@@ -2822,10 +2873,14 @@ static int lpuart_suspend(struct device
@@ -2848,10 +2899,14 @@ static int lpuart_suspend(struct device
writeb(temp, sport->port.membase + UARTCR2);
}
......@@ -138,7 +138,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
if (sport->lpuart_dma_rx_use) {
/*
@@ -2856,9 +2911,6 @@ static int lpuart_suspend(struct device
@@ -2882,9 +2937,6 @@ static int lpuart_suspend(struct device
dmaengine_terminate_all(sport->dma_tx_chan);
}
......@@ -148,7 +148,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
return 0;
}
@@ -2866,9 +2918,11 @@ static int lpuart_resume(struct device *
@@ -2892,9 +2944,11 @@ static int lpuart_resume(struct device *
{
struct lpuart_port *sport = dev_get_drvdata(dev);
bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
......@@ -162,7 +162,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
if (lpuart_is_32(sport))
lpuart32_setup_watermark_enable(sport);
@@ -2889,13 +2943,23 @@ static int lpuart_resume(struct device *
@@ -2915,13 +2969,23 @@ static int lpuart_resume(struct device *
if (lpuart_is_32(sport))
lpuart32_configure(sport);
......@@ -188,7 +188,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com>
static struct platform_driver lpuart_driver = {
.probe = lpuart_probe,
@@ -2903,7 +2967,7 @@ static struct platform_driver lpuart_dri
@@ -2929,7 +2993,7 @@ static struct platform_driver lpuart_dri
.driver = {
.name = "fsl-lpuart",
.of_match_table = lpuart_dt_ids,
......
......@@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
@@ -1707,10 +1708,23 @@ static void lpuart_rx_dma_startup(struct
@@ -1722,10 +1723,23 @@ static void lpuart_rx_dma_startup(struct
}
}
......@@ -53,7 +53,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
unsigned char temp;
/* determine FIFO size and enable FIFO mode */
@@ -1723,14 +1737,7 @@ static int lpuart_startup(struct uart_po
@@ -1738,14 +1752,7 @@ static int lpuart_startup(struct uart_po
sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) &
UARTPFIFO_FIFOSIZE_MASK);
......@@ -69,7 +69,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
return 0;
}
@@ -1757,11 +1764,27 @@ static void lpuart32_configure(struct lp
@@ -1772,11 +1779,27 @@ static void lpuart32_configure(struct lp
lpuart32_write(&sport->port, temp, UARTCTRL);
}
......@@ -98,9 +98,9 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
unsigned long temp;
int ret;
@@ -1782,17 +1805,8 @@ static int lpuart32_startup(struct uart_
sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) &
UARTFIFO_FIFOSIZE_MASK);
@@ -1808,17 +1831,8 @@ static int lpuart32_startup(struct uart_
sport->port.fifosize = sport->txfifo_size;
}
- spin_lock_irqsave(&sport->port.lock, flags);
-
......@@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
return 0;
}
@@ -2850,108 +2864,205 @@ static int lpuart_runtime_resume(struct
@@ -2876,108 +2890,205 @@ static int lpuart_runtime_resume(struct
return lpuart_enable_clks(sport);
};
......
......@@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2109,11 +2109,12 @@ lpuart32_set_termios(struct uart_port *p
@@ -2135,11 +2135,12 @@ lpuart32_set_termios(struct uart_port *p
{
struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
unsigned long flags;
......@@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
modem = lpuart32_read(&sport->port, UARTMODIR);
/*
* only support CS8 and CS7, and for CS7 must enable PE.
@@ -2150,7 +2151,9 @@ lpuart32_set_termios(struct uart_port *p
@@ -2176,7 +2177,9 @@ lpuart32_set_termios(struct uart_port *p
}
if (termios->c_cflag & CSTOPB)
......@@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
/* parity must be enabled when CS7 to match 8-bits format */
if ((termios->c_cflag & CSIZE) == CS7)
@@ -2220,6 +2223,7 @@ lpuart32_set_termios(struct uart_port *p
@@ -2246,6 +2249,7 @@ lpuart32_set_termios(struct uart_port *p
lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE),
UARTCTRL);
......
From 932dac0380bbf7276d4111c35674679bc9ad6384 Mon Sep 17 00:00:00 2001
From: Vabhav Sharma <vabhav.sharma@nxp.com>
Date: Thu, 31 Oct 2019 19:20:47 +0530
Subject: [PATCH] tty: serial: lpuart: add LS1028A support
NXP LS1028A lpuart is the same IP as LS1021A, but it is
little endian for register accessing instead of big endian
on LS1021A.
So add LS1028A matching data to distiguish the chips.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
---
drivers/tty/serial/fsl_lpuart.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -3,6 +3,7 @@
* Freescale lpuart serial port driver
*
* Copyright 2012-2014 Freescale Semiconductor, Inc.
+ * Copyright 2019 NXP
*/
#if defined(CONFIG_SERIAL_FSL_LPUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
@@ -260,6 +261,7 @@ static DEFINE_IDA(fsl_lpuart_ida);
enum lpuart_type {
VF610_LPUART,
LS1021A_LPUART,
+ LS1028A_LPUART,
IMX7ULP_LPUART,
IMX8QXP_LPUART,
};
@@ -311,13 +313,20 @@ static const struct lpuart_soc_data vf_d
.rx_dma_cyclic = true,
};
-static const struct lpuart_soc_data ls_data = {
+static const struct lpuart_soc_data ls1021a_data = {
.devtype = LS1021A_LPUART,
.iotype = UPIO_MEM32BE,
.rx_watermark = 0,
.rx_dma_cyclic = true,
};
+static const struct lpuart_soc_data ls1028a_data = {
+ .devtype = LS1028A_LPUART,
+ .iotype = UPIO_MEM32,
+ .rx_watermark = 0,
+ .rx_dma_cyclic = true,
+};
+
static struct lpuart_soc_data imx7ulp_data = {
.devtype = IMX7ULP_LPUART,
.iotype = UPIO_MEM32,
@@ -336,7 +345,8 @@ static struct lpuart_soc_data imx8qxp_da
static const struct of_device_id lpuart_dt_ids[] = {
{ .compatible = "fsl,vf610-lpuart", .data = &vf_data, },
- { .compatible = "fsl,ls1021a-lpuart", .data = &ls_data, },
+ { .compatible = "fsl,ls1021a-lpuart", .data = &ls1021a_data, },
+ { .compatible = "fsl,ls1028a-lpuart", .data = &ls1028a_data, },
{ .compatible = "fsl,imx7ulp-lpuart", .data = &imx7ulp_data, },
{ .compatible = "fsl,imx8qxp-lpuart", .data = &imx8qxp_data, },
{ /* sentinel */ }
......@@ -24,7 +24,7 @@ Signed-off-by: Peng Fan <peng.fan@nxp.com>
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2598,7 +2598,9 @@ static int __init lpuart32_early_console
@@ -2614,7 +2614,9 @@ static int __init lpuart32_early_console
if (!device->port.membase)
return -ENODEV;
......
......@@ -54,7 +54,7 @@ Signed-off-by: Peter Chen <peter.chen@nxp.com>
* All 3.1 IP version constants are greater than the 3.0 IP
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3525,6 +3525,10 @@ int dwc3_gadget_init(struct dwc3 *dwc)
@@ -3543,6 +3543,10 @@ int dwc3_gadget_init(struct dwc3 *dwc)
dwc->gadget.sg_supported = true;
dwc->gadget.name = "dwc3-gadget";
dwc->gadget.lpm_capable = true;
......
From 650480191492845c8eb7e0c2e5b1e37cabc59eff Mon Sep 17 00:00:00 2001
From: Pawel Dembicki <paweldembicki@gmail.com>
Date: Fri, 13 Nov 2020 07:17:39 +0100
Subject: [PATCH 1/2] arm64: dts: fsl-ls1012a-rdb: add i2c devices
LS1012A-RDB equipped in some i2c devices:
- 3x GPIO Expander: PCAL9555A (NXP)
- Gyro: FXAS21002 (NXP)
- Accelerometer: FXOS8700 (NXP)
- Current & Power Monitor: INA220 (TI)
This patch add listed devices to dts.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
.../boot/dts/freescale/fsl-ls1012a-rdb.dts | 66 +++++++++++++++++++
1 file changed, 66 insertions(+)
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
@@ -7,6 +7,7 @@
*/
/dts-v1/;
+#include <dt-bindings/interrupt-controller/irq.h>
#include "fsl-ls1012a.dtsi"
/ {
@@ -16,6 +17,25 @@
aliases {
ethernet0 = &pfe_mac0;
ethernet1 = &pfe_mac1;
+ serial0 = &duart0;
+ };
+
+ dummy3v3: dummy_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "dummy_regulator_3v3";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ dummy1v8: dummy_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "dummy_regulator_1v8";
+
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
};
};
@@ -42,6 +62,52 @@
&i2c0 {
status = "okay";
+
+ accelerometer@1e {
+ compatible = "nxp,fxos8700";
+ reg = <0x1e>;
+ interrupt-parent = <&gpio26>;
+ interrupts = <13 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "INT1";
+ };
+
+ gyroscope@20 {
+ compatible = "nxp,fxas21002c";
+ reg = <0x20>;
+ vdd-supply = <&dummy3v3>;
+ vddio-supply = <&dummy1v8>;
+ };
+
+ gpio@24 {
+ compatible = "nxp,pcal9555a";
+ reg = <0x24>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio25: gpio@25 {
+ compatible = "nxp,pcal9555a";
+ reg = <0x25>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio26: gpio@26 {
+ compatible = "nxp,pcal9555a";
+ reg = <0x26>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ current-sensor@40 {
+ compatible = "ti,ina220";
+ reg = <0x40>;
+ shunt-resistor = <2000>;
+ };
};
&sata {
From 12de4b5e7cbcd193d5abb753ca511fe8f2236846 Mon Sep 17 00:00:00 2001
From: Pawel Dembicki <paweldembicki@gmail.com>
Date: Fri, 13 Nov 2020 07:30:03 +0100
Subject: [PATCH 1/1] gpio-pca953x: hack: Allow to use falling trigger
Gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts.
Gpio-pca953x allow only low state trigger. This hack fix the problem.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -879,10 +879,12 @@ static int pca953x_irq_setup(struct pca9
for (i = 0; i < NBANK(chip); i++)
chip->irq_stat[i] &= reg_direction[i];
mutex_init(&chip->irq_lock);
-
+ /* gpio-mpc8xxx driver of Layerscape gpio support only edge interrupts.
+ * This hack fix the problem.
+ */
ret = devm_request_threaded_irq(&client->dev, client->irq,
NULL, pca953x_irq_handler,
- IRQF_TRIGGER_LOW | IRQF_ONESHOT |
+ IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
IRQF_SHARED,
dev_name(&client->dev), chip);
if (ret) {
From 12de4b5e7cbcd193d5abb753ca511fe8f2236846 Mon Sep 17 00:00:00 2001
From: Pawel Dembicki <paweldembicki@gmail.com>
Date: Fri, 13 Nov 2020 07:30:03 +0100
Subject: [PATCH 2/2] arm64: dts: fsl-ls1012a-frdm: add spi-uart device
This patch adds spi-uart controller to LS1012A-FRDM board dts.
Device is equipped in SC16IS740 from NXP.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
.../boot/dts/freescale/fsl-ls1012a-frdm.dts | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
@@ -7,6 +7,7 @@
*/
/dts-v1/;
+#include <dt-bindings/interrupt-controller/irq.h>
#include "fsl-ls1012a.dtsi"
/ {
@@ -16,6 +17,7 @@
aliases {
ethernet0 = &pfe_mac0;
ethernet1 = &pfe_mac1;
+ serial0 = &duart0;
};
sys_mclk: clock-mclk {
@@ -61,6 +63,26 @@
};
};
};
+
+&dspi {
+ status = "okay";
+ bus-num = <0>;
+
+ serial@0 {
+ reg = <0>;
+ compatible = "nxp,sc16is740";
+ spi-max-frequency = <4000000>;
+ clocks = <&sc16is7xx_clk>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+
+ sc16is7xx_clk: sc16is7xx_clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
+ };
+};
&duart0 {
status = "okay";
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -333,6 +333,8 @@ config RTL8367B_PHY
@@ -329,6 +329,8 @@ config RTL8367B_PHY
endif # RTL8366_SMI
......@@ -11,7 +11,7 @@
config SFP
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -110,3 +110,5 @@ obj-$(CONFIG_STE10XP) += ste10Xp.o
@@ -109,3 +109,5 @@ obj-$(CONFIG_STE10XP) += ste10Xp.o
obj-$(CONFIG_TERANETICS_PHY) += teranetics.o
obj-$(CONFIG_VITESSE_PHY) += vitesse.o
obj-$(CONFIG_XILINX_GMII2RGMII) += xilinx_gmii2rgmii.o
......
......@@ -124,7 +124,7 @@
};
reg_1p8v: regulator-1p8v {
@@ -101,23 +115,82 @@
@@ -101,23 +113,82 @@
};
&eth {
......@@ -214,7 +214,7 @@
};
};
};
@@ -185,15 +258,28 @@
@@ -185,15 +256,28 @@
&pcie {
pinctrl-names = "default";
......@@ -244,7 +244,7 @@
/* eMMC is shared pin with parallel NAND */
emmc_pins_default: emmc-pins-default {
mux {
@@ -460,11 +546,11 @@
@@ -460,11 +544,11 @@
};
&sata {
......
......@@ -22,7 +22,7 @@
"mediatek,mt8173-nor";
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -101,7 +101,7 @@
@@ -99,7 +99,7 @@
};
&bch {
......@@ -31,7 +31,7 @@
};
&btif {
@@ -553,6 +553,62 @@
@@ -551,6 +551,62 @@
status = "disable";
};
......
......@@ -20,7 +20,7 @@
"syscon";
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -591,7 +591,7 @@
@@ -589,7 +589,7 @@
reg = <0x140000 0x0080000>;
};
......@@ -29,7 +29,7 @@
label = "Factory";
reg = <0x1c0000 0x0040000>;
};
@@ -648,3 +648,8 @@
@@ -646,3 +646,8 @@
pinctrl-0 = <&watchdog_pins>;
status = "okay";
};
......
......@@ -15,7 +15,7 @@
depends on HAS_IOMEM
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -111,4 +111,5 @@ obj-$(CONFIG_TERANETICS_PHY) += teraneti
@@ -110,4 +110,5 @@ obj-$(CONFIG_TERANETICS_PHY) += teraneti
obj-$(CONFIG_VITESSE_PHY) += vitesse.o
obj-$(CONFIG_XILINX_GMII2RGMII) += xilinx_gmii2rgmii.o
obj-$(CONFIG_MT753X_GSW) += mtk/mt753x/
......
......@@ -389,7 +389,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
<0 0 0 2 &pcie_intc1 1>,
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -256,18 +256,16 @@
@@ -254,18 +254,16 @@
};
};
......
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -591,17 +591,17 @@
@@ -589,17 +589,17 @@
factory: partition@1c0000 {
label = "Factory";
......
......@@ -18,6 +18,9 @@ globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
;;
globalscale,espressobin-ultra)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
;;
marvell,armada-3720-db|\
methode,udpu)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
......
......@@ -11,6 +11,7 @@ platform_check_image() {
case "$(board_name)" in
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-ultra|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
platform_check_image_sdcard "$1"
......@@ -25,6 +26,7 @@ platform_do_upgrade() {
case "$(board_name)" in
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-ultra|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
platform_do_upgrade_sdcard "$1"
......@@ -41,6 +43,7 @@ platform_copy_config() {
case "$(board_name)" in
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-ultra|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
platform_copy_config_sdcard
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册