mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
MIPS: octeon: Add detection of UBNT Edgeroute Lite devices
The U-Boot of Ubiquiti Edgerouter Lite don't provide a DT to the kernel. Use MIPS_MACHINE mechanism to provide one. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
2cc5829e31
commit
bfe97f12a0
|
|
@ -1,2 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb
|
||||
dtb-$(CONFIG_OCTEON_BOARD_UBNT) += ubnt_e100.dtb
|
||||
|
|
|
|||
|
|
@ -89,4 +89,9 @@ config OCTEON_ILM
|
|||
To compile this driver as a module, choose M here. The module
|
||||
will be called octeon-ilm
|
||||
|
||||
config OCTEON_BOARD_UBNT
|
||||
bool "Support Ubiquiti Devices"
|
||||
help
|
||||
Enable this for missing Ubiquit device trees and quirks
|
||||
|
||||
endif # CAVIUM_OCTEON_SOC
|
||||
|
|
|
|||
|
|
@ -18,3 +18,5 @@ obj-y += executive/
|
|||
obj-$(CONFIG_MTD) += flash_setup.o
|
||||
obj-$(CONFIG_SMP) += smp.o
|
||||
obj-$(CONFIG_OCTEON_ILM) += oct_ilm.o
|
||||
|
||||
obj-$(CONFIG_OCTEON_BOARD_UBNT) += board-ubnt.o
|
||||
|
|
|
|||
16
arch/mips/cavium-octeon/board-ubnt.c
Normal file
16
arch/mips/cavium-octeon/board-ubnt.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <asm/machine.h>
|
||||
#include <asm/octeon/octeon.h>
|
||||
|
||||
static __init bool ubnt_e100_detect(void)
|
||||
{
|
||||
return cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_UBNT_E100;
|
||||
}
|
||||
|
||||
extern const char __dtb_ubnt_e100_begin[];
|
||||
|
||||
MIPS_MACHINE(ubnt_e100) = {
|
||||
.fdt = __dtb_ubnt_e100_begin,
|
||||
.detect = ubnt_e100_detect,
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user