Merge Official Source
This commit is contained in:
commit
24f85b15d7
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcpd
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Make dnsmasq reread hostfile by sending SIGHUP signal
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||
. /lib/functions/procd.sh
|
||||
|
||||
procd_send_signal dnsmasq
|
||||
|
||||
@ -8,7 +8,7 @@ obj.wrg = wrg.o md5.o
|
||||
obj.wrgg = wrgg.o md5.o
|
||||
obj.tpl = tpl_ramips_recoveryflag.o
|
||||
obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg)
|
||||
obj.ath79 = $(obj.seama)
|
||||
obj.ath79 = $(obj.seama) $(obj.wrgg)
|
||||
obj.gemini = $(obj.wrgg)
|
||||
obj.brcm = trx.o
|
||||
obj.bcm47xx = $(obj.brcm)
|
||||
|
||||
@ -84,7 +84,7 @@ PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
|
||||
|
||||
staging_dir/host/.prereq-build: include/prereq-build.mk
|
||||
mkdir -p tmp
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq IB=1 2>/dev/null || { \
|
||||
echo "Prerequisite check failed. Use FORCE=1 to override."; \
|
||||
false; \
|
||||
}
|
||||
@ -168,6 +168,7 @@ prepare_rootfs: FORCE
|
||||
build_image: FORCE
|
||||
@echo
|
||||
@echo Building images...
|
||||
rm -rf $(BUILD_DIR)/json_info_files/
|
||||
$(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \
|
||||
$(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)")
|
||||
|
||||
|
||||
@ -171,6 +171,7 @@ CONFIG_MTD_SPLIT_LZMA_FW=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_SPLIT_TPLINK_FW=y
|
||||
CONFIG_MTD_SPLIT_UIMAGE_FW=y
|
||||
CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_MTD_VIRT_CONCAT=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
|
||||
@ -178,6 +178,7 @@ CONFIG_MTD_SPLIT_LZMA_FW=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_SPLIT_TPLINK_FW=y
|
||||
CONFIG_MTD_SPLIT_UIMAGE_FW=y
|
||||
CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_MTD_VIRT_CONCAT=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
|
||||
176
target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
Normal file
176
target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts
Normal file
@ -0,0 +1,176 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "qca955x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "dlink,dap-2695-a1", "qca,qca9558";
|
||||
model = "D-link DAP-2695-A1";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_red;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_red;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_green: power_green {
|
||||
label = "d-link:green:power";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_power_red: power_red {
|
||||
label = "d-link:red:power";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi2g {
|
||||
label = "d-link:green:wifi2g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "mx25l12805d";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "bdcfg";
|
||||
reg = <0x040000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "rgdb";
|
||||
reg = <0x050000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "langpack";
|
||||
reg = <0x060000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@70000 {
|
||||
compatible = "wrg";
|
||||
label = "firmware";
|
||||
reg = <0x070000 0xf00000>;
|
||||
};
|
||||
|
||||
partition@f70000 {
|
||||
label = "captival";
|
||||
reg = <0xf70000 0x070000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@fe0000 {
|
||||
label = "certificate";
|
||||
reg = <0xfe0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
|
||||
qca,ar8327-initvals = <
|
||||
0x04 0x07600000 /* PORT0_PAD_CTRL */
|
||||
0x0c 0x00080080 /* PORT6_PAD_CTRL */
|
||||
0x7c 0x0000007e /* PORT0_STATUS */
|
||||
0x94 0x0000007e /* PORT6_STATUS */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&phy0>;
|
||||
phy-mode = "rgmii";
|
||||
pll-data = <0x56000000 0x00000101 0x00001616>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0>;
|
||||
phy-mode = "sgmii";
|
||||
pll-data = <0x03000101 0x00000101 0x00001616>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
};
|
||||
@ -136,6 +136,9 @@ ath79_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth0" "2:wan" "3:lan" "4:lan"
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
|
||||
;;
|
||||
dlink,dir-825-b1)
|
||||
ucidef_set_interface_wan "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
@ -361,6 +364,9 @@ ath79_setup_macs()
|
||||
devolo,magic-2-wifi)
|
||||
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
|
||||
;;
|
||||
dlink,dir-825-b1)
|
||||
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
|
||||
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
|
||||
|
||||
@ -14,6 +14,10 @@ case "$FIRMWARE" in
|
||||
avm,fritz450e)
|
||||
caldata_extract_reverse "urlader" 0x1541 0x440
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(mtd_get_mac_ascii bdcfg "wlanmac")
|
||||
;;
|
||||
dlink,dir-505|\
|
||||
dlink,dir-825-c1|\
|
||||
dlink,dir-835-a1)
|
||||
|
||||
@ -40,6 +40,10 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) -1)
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
|
||||
;;
|
||||
dlink,dir-859-a1)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
|
||||
|
||||
@ -6,9 +6,17 @@ fix_seama_header() {
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
|
||||
}
|
||||
|
||||
fixwrgg() {
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
|
||||
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixwrgg firmware
|
||||
}
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
dlink,dap-2695-a1)
|
||||
fixwrgg
|
||||
;;
|
||||
qihoo,c301)
|
||||
fix_seama_header
|
||||
;;
|
||||
|
||||
@ -8,6 +8,10 @@ preinit_set_mac_address() {
|
||||
avm,fritz450e)
|
||||
ip link set dev eth0 address $(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
dlink,dap-2695-a1)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii bdcfg "lanmac")
|
||||
ip link set dev eth1 address $(mtd_get_mac_ascii bdcfg "wanmac")
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env0 ethaddr)
|
||||
;;
|
||||
|
||||
@ -6,6 +6,7 @@ include ./common-yuncore.mk
|
||||
DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION
|
||||
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
|
||||
DEVICE_VARS += KERNEL_INITRAMFS_PREFIX
|
||||
DEVICE_VARS += DAP_SIGNATURE
|
||||
|
||||
define Build/add-elecom-factory-initramfs
|
||||
$(eval edimax_model=$(word 1,$(1)))
|
||||
@ -49,6 +50,14 @@ define Build/cybertan-trx
|
||||
-rm $@-empty.bin
|
||||
endef
|
||||
|
||||
define Build/mkwrggimg
|
||||
$(STAGING_DIR_HOST)/bin/mkwrggimg -b \
|
||||
-i $@ -o $@.imghdr -d /dev/mtdblock/1 \
|
||||
-m $(DEVICE_MODEL)-$(DEVICE_VARIANT) -s $(DAP_SIGNATURE) \
|
||||
-v $(VERSION_DIST) -B $(REVISION)
|
||||
mv $@.imghdr $@
|
||||
endef
|
||||
|
||||
define Build/nec-enc
|
||||
$(STAGING_DIR_HOST)/bin/nec-enc \
|
||||
-i $@ -o $@.new -k $(1)
|
||||
@ -88,6 +97,10 @@ define Build/teltonika-fw-fake-checksum
|
||||
dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
|
||||
endef
|
||||
|
||||
define Build/wrgg-pad-rootfs
|
||||
$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
|
||||
endef
|
||||
|
||||
define Device/seama
|
||||
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | seama
|
||||
@ -458,6 +471,26 @@ define Device/devolo_magic-2-wifi
|
||||
endef
|
||||
TARGET_DEVICES += devolo_magic-2-wifi
|
||||
|
||||
define Device/dlink_dap-2695-a1
|
||||
SOC := qca9558
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DAP-2965
|
||||
DEVICE_VARIANT := A1
|
||||
IMAGES := factory.img sysupgrade.bin
|
||||
IMAGE_SIZE := 15360k
|
||||
IMAGE/default := append-kernel | pad-offset 65536 160
|
||||
IMAGE/factory.img := $$(IMAGE/default) | append-rootfs | wrgg-pad-rootfs | \
|
||||
mkwrggimg | check-size
|
||||
IMAGE/sysupgrade.bin := $$(IMAGE/default) | mkwrggimg | append-rootfs | \
|
||||
wrgg-pad-rootfs | append-metadata | check-size
|
||||
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
|
||||
DAP_SIGNATURE := wapac02_dkbs_dap2695
|
||||
SUPPORTED_DEVICES += dap-2695-a1
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dap-2695-a1
|
||||
|
||||
define Device/dlink_dir-505
|
||||
SOC := ar9330
|
||||
DEVICE_VENDOR := D-Link
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
From 130bbde4809b011faf64f99dddc14b4b01f440c3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Tue, 12 May 2020 09:57:32 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: fix hamming oob layout
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
First 2 bytes are used in large-page nand.
|
||||
|
||||
Fixes: ef5eeea6e911 ("mtd: nand: brcm: switch to mtd_ooblayout_ops")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200512075733.745374-2-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -1019,11 +1019,14 @@ static int brcmnand_hamming_ooblayout_fr
|
||||
if (!section) {
|
||||
/*
|
||||
* Small-page NAND use byte 6 for BBI while large-page
|
||||
- * NAND use byte 0.
|
||||
+ * NAND use bytes 0 and 1.
|
||||
*/
|
||||
- if (cfg->page_size > 512)
|
||||
- oobregion->offset++;
|
||||
- oobregion->length--;
|
||||
+ if (cfg->page_size > 512) {
|
||||
+ oobregion->offset += 2;
|
||||
+ oobregion->length -= 2;
|
||||
+ } else {
|
||||
+ oobregion->length--;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,43 @@
|
||||
From d00358d7a1c50718232799e1ee10955bcd73795a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Tue, 12 May 2020 09:57:33 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: improve hamming oob layout
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The current code generates 8 oob sections:
|
||||
S1 1-5
|
||||
ECC 6-8
|
||||
S2 9-15
|
||||
S3 16-21
|
||||
ECC 22-24
|
||||
S4 25-31
|
||||
S5 32-37
|
||||
ECC 38-40
|
||||
S6 41-47
|
||||
S7 48-53
|
||||
ECC 54-56
|
||||
S8 57-63
|
||||
|
||||
Change it by merging continuous sections:
|
||||
S1 1-5
|
||||
ECC 6-8
|
||||
S2 9-21
|
||||
ECC 22-24
|
||||
S3 25-37
|
||||
ECC 38-40
|
||||
S4 41-53
|
||||
ECC 54-56
|
||||
S5 57-63
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200512075733.745374-3-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 35 +++++++++++-------------
|
||||
1 file changed, 16 insertions(+), 19 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -1003,33 +1003,30 @@ static int brcmnand_hamming_ooblayout_fr
|
||||
@ -1,3 +1,24 @@
|
||||
From dcb351c03f2fa6a599de1061b174167e03ee312b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Tue, 12 May 2020 10:24:51 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: correctly verify erased pages
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The current code checks that the whole OOB area is erased.
|
||||
This is a problem when JFFS2 cleanmarkers are added to the OOB, since it will
|
||||
fail due to the usable OOB bytes not being 0xff.
|
||||
Correct this by only checking that data and ECC bytes aren't 0xff.
|
||||
|
||||
Fixes: 02b88eea9f9c ("mtd: brcmnand: Add check for erased page bitflips")
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200512082451.771212-1-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 19 +++++++++++--------
|
||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -1787,28 +1787,31 @@ static int brcmnand_read_by_pio(struct m
|
||||
@ -1,3 +1,22 @@
|
||||
From 4fd639092b17d4252368b6009573339aeab5c7bd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Fri, 22 May 2020 14:15:20 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: rename v4 registers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
These registers are also used on v3.3.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-2-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -269,8 +269,8 @@ enum brcmnand_reg {
|
||||
@ -0,0 +1,34 @@
|
||||
From 3d3fb3c5be9ce07fa85d8f67fb3922e4613b955b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Fri, 22 May 2020 14:15:21 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: fix CS0 layout
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Only v3.3-v5.0 have a different CS0 layout.
|
||||
Controllers before v3.3 use the same layout for every CS.
|
||||
|
||||
Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-3-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -537,8 +537,9 @@ static int brcmnand_revision_init(struct
|
||||
} else {
|
||||
ctrl->cs_offsets = brcmnand_cs_offsets;
|
||||
|
||||
- /* v5.0 and earlier has a different CS0 offset layout */
|
||||
- if (ctrl->nand_version <= 0x0500)
|
||||
+ /* v3.3-5.0 have a different CS0 offset layout */
|
||||
+ if (ctrl->nand_version >= 0x0303 &&
|
||||
+ ctrl->nand_version <= 0x0500)
|
||||
ctrl->cs0_offsets = brcmnand_cs_offsets_cs0;
|
||||
}
|
||||
|
||||
@ -1,3 +1,21 @@
|
||||
From eeeac9cbc4ca5b8c245972f3a765d1cb5b7ef038 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Fri, 22 May 2020 14:15:22 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: rename page sizes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Current pages sizes apply to controllers after v3.4
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-4-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -502,7 +502,7 @@ static int brcmnand_revision_init(struct
|
||||
@ -1,3 +1,22 @@
|
||||
From 7e7c7df5d50fe06469be106967fc5b5d62be8868 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Fri, 22 May 2020 14:15:24 +0200
|
||||
Subject: [PATCH] mtd: rawnand: brcmnand: support v2.1-v2.2 controllers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
v2.1: tested on Netgear DGND3700v1 (BCM6368)
|
||||
v2.2: tested on Netgear DGND3700v2 (BCM6362)
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
|
||||
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-6-noltari@gmail.com
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 85 +++++++++++++++++++++---
|
||||
1 file changed, 76 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -196,6 +196,7 @@ struct brcmnand_controller {
|
||||
@ -1,21 +0,0 @@
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -1019,11 +1019,14 @@ static int brcmnand_hamming_ooblayout_fr
|
||||
if (!section) {
|
||||
/*
|
||||
* Small-page NAND use byte 6 for BBI while large-page
|
||||
- * NAND use byte 0.
|
||||
+ * NAND use bytes 0 and 1.
|
||||
*/
|
||||
- if (cfg->page_size > 512)
|
||||
- oobregion->offset++;
|
||||
- oobregion->length--;
|
||||
+ if (cfg->page_size > 512) {
|
||||
+ oobregion->offset += 2;
|
||||
+ oobregion->length -= 2;
|
||||
+ } else {
|
||||
+ oobregion->length--;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -537,8 +537,9 @@ static int brcmnand_revision_init(struct
|
||||
} else {
|
||||
ctrl->cs_offsets = brcmnand_cs_offsets;
|
||||
|
||||
- /* v5.0 and earlier has a different CS0 offset layout */
|
||||
- if (ctrl->nand_version <= 0x0500)
|
||||
+ /* v3.3-5.0 have a different CS0 offset layout */
|
||||
+ if (ctrl->nand_version >= 0x0303 &&
|
||||
+ ctrl->nand_version <= 0x0500)
|
||||
ctrl->cs0_offsets = brcmnand_cs_offsets_cs0;
|
||||
}
|
||||
|
||||
@ -781,7 +781,6 @@ static int rtl8367b_extif_set_mode(struct rtl8366_smi *smi, int id,
|
||||
/* set port mode */
|
||||
switch (mode) {
|
||||
case RTL8367_EXTIF_MODE_RGMII:
|
||||
case RTL8367_EXTIF_MODE_RGMII_33V:
|
||||
REG_RMW(smi, RTL8367B_CHIP_DEBUG0_REG,
|
||||
RTL8367B_DEBUG0_SEL33(id),
|
||||
RTL8367B_DEBUG0_SEL33(id));
|
||||
|
||||
@ -39,6 +39,9 @@ enum rtl8367_extif_mode {
|
||||
RTL8367_EXTIF_MODE_TMII_PHY,
|
||||
RTL8367_EXTIF_MODE_GMII,
|
||||
RTL8367_EXTIF_MODE_RGMII_33V,
|
||||
RTL8367B_EXTIF_MODE_RMII_MAC = 7,
|
||||
RTL8367B_EXTIF_MODE_RMII_PHY,
|
||||
RTL8367B_EXTIF_MODE_RGMII_33V,
|
||||
};
|
||||
|
||||
struct rtl8367_extif_config {
|
||||
|
||||
@ -12,7 +12,6 @@ ramips_setup_interfaces()
|
||||
aigale,ai-br100|\
|
||||
alfa-network,ac1200rm|\
|
||||
asus,rt-n12p|\
|
||||
dlink,dir-810l|\
|
||||
dlink,dwr-116-a1|\
|
||||
dlink,dwr-921-c1|\
|
||||
dlink,dwr-922-e2|\
|
||||
@ -109,6 +108,11 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "6@eth0"
|
||||
;;
|
||||
dlink,dir-810l|\
|
||||
zbtlink,zbt-we2026)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
|
||||
;;
|
||||
dlink,dwr-118-a1)
|
||||
ucidef_add_switch "switch0" \
|
||||
"1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0"
|
||||
@ -214,10 +218,6 @@ ramips_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan" "6t@eth0"
|
||||
;;
|
||||
zbtlink,zbt-we2026)
|
||||
ucidef_add_switch "switch0" \
|
||||
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0"
|
||||
;;
|
||||
zyxel,keenetic-viva)
|
||||
ucidef_add_switch "switch1" \
|
||||
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "7t@eth0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user