From e190eb13890128302ea6541216415a6f925ebf77 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Tue, 11 Dec 2018 13:11:51 +0100 Subject: [PATCH] brcm63xx: fix ethernet switch core reset mask for BCM6368 The reset mask for the bcm6368 switch core was left at 0 due to a copy & paste error. Fix this by setting it to the correct value. Signed-off-by: Jonas Gorski (backported from e08ef42b24fc33735683587e7566c643607af580) (rebased patches) Signed-off-by: Jo-Philipp Wich --- ...3XX-fix-switch-core-reset-on-BCM6368.patch | 26 +++++++++++++++++++ ...3XX-fix-switch-core-reset-on-BCM6368.patch | 26 +++++++++++++++++++ .../patches-4.9/400-bcm963xx_flashmap.patch | 6 ++--- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 target/linux/brcm63xx/patches-4.14/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch create mode 100644 target/linux/brcm63xx/patches-4.9/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch diff --git a/target/linux/brcm63xx/patches-4.14/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch b/target/linux/brcm63xx/patches-4.14/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch new file mode 100644 index 0000000000..3914865c89 --- /dev/null +++ b/target/linux/brcm63xx/patches-4.14/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch @@ -0,0 +1,26 @@ +From f1af8bb8e0879a3c2d9679a7274c2774335e9876 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Wed, 14 Nov 2018 12:06:41 +0100 +Subject: [PATCH] MIPS: BCM63XX: fix switch core reset on BCM6368 + +The Ethernet Switch core mask was set to 0, causing the switch core to +be not reset on BCM6368 on boot. Provide the proper mask so the switch +core gets reset to a known good state. + +Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper") +Signed-off-by: Jonas Gorski +--- + arch/mips/bcm63xx/reset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/mips/bcm63xx/reset.c ++++ b/arch/mips/bcm63xx/reset.c +@@ -120,7 +120,7 @@ + #define BCM6368_RESET_DSL 0 + #define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK + #define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK +-#define BCM6368_RESET_ENETSW 0 ++#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK + #define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK + #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK + #define BCM6368_RESET_PCIE 0 diff --git a/target/linux/brcm63xx/patches-4.9/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch b/target/linux/brcm63xx/patches-4.9/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch new file mode 100644 index 0000000000..307ac7bb27 --- /dev/null +++ b/target/linux/brcm63xx/patches-4.9/150-MIPS-BCM63XX-fix-switch-core-reset-on-BCM6368.patch @@ -0,0 +1,26 @@ +From f1af8bb8e0879a3c2d9679a7274c2774335e9876 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Wed, 14 Nov 2018 12:06:41 +0100 +Subject: [PATCH] MIPS: BCM63XX: fix switch core reset on BCM6368 + +The Ethernet Switch core mask was set to 0, causing the switch core to +be not reset on BCM6368 on boot. Provide the proper mask so the switch +core gets reset to a known good state. + +Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper") +Signed-off-by: Jonas Gorski +--- + arch/mips/bcm63xx/reset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/mips/bcm63xx/reset.c ++++ b/arch/mips/bcm63xx/reset.c +@@ -119,7 +119,7 @@ + #define BCM6368_RESET_DSL 0 + #define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK + #define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK +-#define BCM6368_RESET_ENETSW 0 ++#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK + #define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK + #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK + #define BCM6368_RESET_PCIE 0 diff --git a/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch index c693ace363..6b4f0f1383 100644 --- a/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch +++ b/target/linux/brcm63xx/patches-4.9/400-bcm963xx_flashmap.patch @@ -23,7 +23,7 @@ Signed-off-by: Axel Gembe .width = 2, --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c -@@ -72,6 +72,7 @@ static int parse_redboot_partitions(stru +@@ -73,6 +73,7 @@ static int parse_redboot_partitions(stru int nulllen = 0; int numslots; unsigned long offset; @@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED static char nullstring[] = "unallocated"; #endif -@@ -176,6 +177,16 @@ static int parse_redboot_partitions(stru +@@ -177,6 +178,16 @@ static int parse_redboot_partitions(stru goto out; } @@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe for (i = 0; i < numslots; i++) { struct fis_list *new_fl, **prev; -@@ -196,10 +207,10 @@ static int parse_redboot_partitions(stru +@@ -197,10 +208,10 @@ static int parse_redboot_partitions(stru goto out; } new_fl->img = &buf[i]; -- 2.30.2