aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-17 19:07:23 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-02-17 20:40:16 +0100
commitf323dec4f866d9ea75eae11c6762d0144d100628 (patch)
treec40f33e9a89e935b32e6a1520f02019200e7cc17 /target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
parent5bb9954826229782d4d285d65dfcca8a1c9e20d9 (diff)
downloadupstream-f323dec4f866d9ea75eae11c6762d0144d100628.tar.gz
upstream-f323dec4f866d9ea75eae11c6762d0144d100628.tar.bz2
upstream-f323dec4f866d9ea75eae11c6762d0144d100628.zip
bcm63xx: add kernel 5.10 support
Runtime-tested on Comtrend AR-5387un. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch')
-rw-r--r--target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch140
1 files changed, 140 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch b/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
new file mode 100644
index 0000000000..688a74ca04
--- /dev/null
+++ b/target/linux/bcm63xx/patches-5.10/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
@@ -0,0 +1,140 @@
+From 83131acbfb59760a19f3711c09526e191c8aad54 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Tue, 29 Jul 2014 21:52:56 +0200
+Subject: [PATCH 03/10] MIPS: BCM63XX: make fallback sprom optional
+
+Some devices do not provide enough mac addresses to populate wifi in
+addition to ethernet.
+
+Use having pci enabled as a rough heuristic which boards should have it
+enabled.
+
+Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c | 12 ++++++++++++
+ arch/mips/bcm63xx/boards/board_common.c | 5 +++--
+ arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 1 +
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -63,6 +63,7 @@ static struct board_info __initdata boar
+
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_usbd = 0,
+ .usbd = {
+@@ -213,6 +214,7 @@ static struct board_info __initdata boar
+
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -259,6 +261,7 @@ static struct board_info __initdata boar
+ .has_pccard = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -310,6 +313,7 @@ static struct board_info __initdata boar
+ .has_pccard = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -360,6 +364,7 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -411,6 +416,7 @@ static struct board_info __initdata boar
+ .has_pccard = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -430,6 +436,7 @@ static struct board_info __initdata boar
+ .expected_cpu_id = 0x6348,
+
+ .has_pci = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -451,6 +458,7 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -472,6 +480,7 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -500,6 +509,7 @@ static struct board_info __initdata boar
+ .has_pccard = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -551,6 +561,7 @@ static struct board_info __initdata boar
+ .has_pccard = 1,
+ .has_pci = 1,
+ .has_uart0 = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -617,6 +628,7 @@ static struct board_info __initdata boar
+ .has_ehci0 = 1,
+ .has_ohci0 = 1,
+ .has_pci = 1,
++ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+--- a/arch/mips/bcm63xx/boards/board_common.c
++++ b/arch/mips/bcm63xx/boards/board_common.c
+@@ -183,8 +183,9 @@ int __init board_register_devices(void)
+ * do this after registering enet devices
+ */
+
+- if (board_get_mac_address(board.fallback_sprom.mac_addr) ||
+- bcm63xx_register_fallback_sprom(&board.fallback_sprom))
++ if (board.use_fallback_sprom &&
++ (board_get_mac_address(board.fallback_sprom.mac_addr) ||
++ bcm63xx_register_fallback_sprom(&board.fallback_sprom)))
+ pr_err(PFX "failed to register fallback SPROM\n");
+
+ bcm63xx_spi_register();
+--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
++++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+@@ -33,6 +33,7 @@ struct board_info {
+ unsigned int has_usbd:1;
+ unsigned int has_uart0:1;
+ unsigned int has_uart1:1;
++ unsigned int use_fallback_sprom:1;
+
+ /* ethernet config */
+ struct bcm63xx_enet_platform_data enet0;