aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch')
-rw-r--r--target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch259
1 files changed, 259 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch b/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch
new file mode 100644
index 0000000000..807c81aaee
--- /dev/null
+++ b/target/linux/bcm63xx/patches-5.10/391-MIPS-BCM63XX-do-not-register-uart.patch
@@ -0,0 +1,259 @@
+--- a/arch/mips/bcm63xx/Makefile
++++ b/arch/mips/bcm63xx/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
+ setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
+- dev-rng.o dev-uart.o dev-wdt.o \
++ dev-rng.o dev-wdt.o \
+ dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \
+ sprom.o
+ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
+--- a/arch/mips/bcm63xx/dev-uart.c
++++ /dev/null
+@@ -1,76 +0,0 @@
+-/*
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file "COPYING" in the main directory of this archive
+- * for more details.
+- *
+- * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
+- */
+-
+-#include <linux/init.h>
+-#include <linux/kernel.h>
+-#include <linux/platform_device.h>
+-#include <bcm63xx_cpu.h>
+-
+-static struct resource uart0_resources[] = {
+- {
+- /* start & end filled at runtime */
+- .flags = IORESOURCE_MEM,
+- },
+- {
+- /* start filled at runtime */
+- .flags = IORESOURCE_IRQ,
+- },
+-};
+-
+-static struct resource uart1_resources[] = {
+- {
+- /* start & end filled at runtime */
+- .flags = IORESOURCE_MEM,
+- },
+- {
+- /* start filled at runtime */
+- .flags = IORESOURCE_IRQ,
+- },
+-};
+-
+-static struct platform_device bcm63xx_uart_devices[] = {
+- {
+- .name = "bcm63xx_uart",
+- .id = 0,
+- .num_resources = ARRAY_SIZE(uart0_resources),
+- .resource = uart0_resources,
+- },
+-
+- {
+- .name = "bcm63xx_uart",
+- .id = 1,
+- .num_resources = ARRAY_SIZE(uart1_resources),
+- .resource = uart1_resources,
+- }
+-};
+-
+-int __init bcm63xx_uart_register(unsigned int id)
+-{
+- if (id >= ARRAY_SIZE(bcm63xx_uart_devices))
+- return -ENODEV;
+-
+- if (id == 1 && (!BCMCPU_IS_3368() && !BCMCPU_IS_6358() &&
+- !BCMCPU_IS_6368()))
+- return -ENODEV;
+-
+- if (id == 0) {
+- uart0_resources[0].start = bcm63xx_regset_address(RSET_UART0);
+- uart0_resources[0].end = uart0_resources[0].start +
+- RSET_UART_SIZE - 1;
+- uart0_resources[1].start = bcm63xx_get_irq_number(IRQ_UART0);
+- }
+-
+- if (id == 1) {
+- uart1_resources[0].start = bcm63xx_regset_address(RSET_UART1);
+- uart1_resources[0].end = uart1_resources[0].start +
+- RSET_UART_SIZE - 1;
+- uart1_resources[1].start = bcm63xx_get_irq_number(IRQ_UART1);
+- }
+-
+- return platform_device_register(&bcm63xx_uart_devices[id]);
+-}
+--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
++++ /dev/null
+@@ -1,7 +0,0 @@
+-/* SPDX-License-Identifier: GPL-2.0 */
+-#ifndef BCM63XX_DEV_UART_H_
+-#define BCM63XX_DEV_UART_H_
+-
+-int bcm63xx_uart_register(unsigned int id);
+-
+-#endif /* BCM63XX_DEV_UART_H_ */
+--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
++++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+@@ -32,8 +32,6 @@ struct board_info {
+ unsigned int has_ohci0:1;
+ unsigned int has_ehci0:1;
+ unsigned int has_usbd:1;
+- unsigned int has_uart0:1;
+- unsigned int has_uart1:1;
+ unsigned int use_fallback_sprom:1;
+
+ /* ethernet config */
+--- a/arch/mips/bcm63xx/boards/board_common.c
++++ b/arch/mips/bcm63xx/boards/board_common.c
+@@ -20,7 +20,6 @@
+ #include <asm/prom.h>
+ #include <bcm63xx_board.h>
+ #include <bcm63xx_cpu.h>
+-#include <bcm63xx_dev_uart.h>
+ #include <bcm63xx_regs.h>
+ #include <bcm63xx_io.h>
+ #include <bcm63xx_gpio.h>
+@@ -188,12 +187,6 @@ int __init board_register_devices(void)
+
+ bcm63xx_gpio_init();
+
+- if (board.has_uart0)
+- bcm63xx_uart_register(0);
+-
+- if (board.has_uart1)
+- bcm63xx_uart_register(1);
+-
+ if (board.has_pccard)
+ bcm63xx_pcmcia_register();
+
+--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
+@@ -34,8 +34,6 @@ static struct board_info __initdata boar
+ .ephy_reset_gpio = 36,
+ .ephy_reset_gpio_flags = GPIO_ACTIVE_LOW,
+ .has_pci = 1,
+- .has_uart0 = 1,
+- .has_uart1 = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -62,7 +60,6 @@ static struct board_info __initdata boar
+ .expected_cpu_id = 0x6328,
+
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_usbd = 0,
+@@ -111,7 +108,6 @@ static struct board_info __initdata boar
+ .expected_cpu_id = 0x6338,
+
+ .has_ohci0 = 1,
+- .has_uart0 = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {
+@@ -153,8 +149,6 @@ static struct board_info __initdata boar
+ .name = "96338W",
+ .expected_cpu_id = 0x6338,
+
+- .has_uart0 = 1,
+-
+ .has_enet0 = 1,
+ .enet0 = {
+ .force_speed_100 = 1,
+@@ -199,8 +193,6 @@ static struct board_info __initdata boar
+ static struct board_info __initdata board_96345gw2 = {
+ .name = "96345GW2",
+ .expected_cpu_id = 0x6345,
+-
+- .has_uart0 = 1,
+ };
+ #endif /* CONFIG_BCM63XX_CPU_6345 */
+
+@@ -213,7 +205,6 @@ static struct board_info __initdata boar
+ .expected_cpu_id = 0x6348,
+
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -260,7 +251,6 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pccard = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -312,7 +302,6 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pccard = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -363,7 +352,6 @@ static struct board_info __initdata boar
+
+ .has_ohci0 = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -415,7 +403,6 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pccard = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -457,7 +444,6 @@ static struct board_info __initdata boar
+
+ .has_ohci0 = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -479,7 +465,6 @@ static struct board_info __initdata boar
+
+ .has_ohci0 = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -508,7 +493,6 @@ static struct board_info __initdata boar
+ .has_ohci0 = 1,
+ .has_pccard = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -560,7 +544,6 @@ static struct board_info __initdata boar
+ .num_usbh_ports = 2,
+ .has_pccard = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+ .use_fallback_sprom = 1,
+
+ .has_enet0 = 1,
+@@ -606,7 +589,6 @@ static struct board_info __initdata boar
+ .has_ehci0 = 1,
+ .has_ohci0 = 1,
+ .has_pci = 1,
+- .has_uart0 = 1,
+
+ .has_enet0 = 1,
+ .enet0 = {