diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2018-10-19 13:27:40 +0200 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2018-11-26 14:40:51 +0100 |
commit | d54e03b612e4e8dcb406b95a8a6a2f8fd7fb055b (patch) | |
tree | 0d72e7d8e7c5a85c8617a93bc08a93f8642b346e /board/amlogic | |
parent | 302987b6c56dba7e694b0ac8233e2b0c2aa107e6 (diff) |
board: amlogic: factorise gxbb boards
The nanopi-k2 and the odroid-c2 are similar enough to be supported
by the same u-boot board. This change use odroid-c2 u-boot board
for the nanopi-k2 as well. Dedicated defconfig are kept to customize
the names and device tree.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'board/amlogic')
-rw-r--r-- | board/amlogic/nanopi-k2/Kconfig | 12 | ||||
-rw-r--r-- | board/amlogic/nanopi-k2/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/amlogic/nanopi-k2/Makefile | 7 | ||||
-rw-r--r-- | board/amlogic/nanopi-k2/nanopi-k2.c | 55 | ||||
-rw-r--r-- | board/amlogic/odroid-c2/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/amlogic/odroid-c2/README.nanopi-k2 (renamed from board/amlogic/nanopi-k2/README) | 0 | ||||
-rw-r--r-- | board/amlogic/odroid-c2/README.odroid-c2 (renamed from board/amlogic/odroid-c2/README) | 0 |
7 files changed, 1 insertions, 80 deletions
diff --git a/board/amlogic/nanopi-k2/Kconfig b/board/amlogic/nanopi-k2/Kconfig deleted file mode 100644 index 374bda200c..0000000000 --- a/board/amlogic/nanopi-k2/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_NANOPI_K2 - -config SYS_BOARD - default "nanopi-k2" - -config SYS_VENDOR - default "amlogic" - -config SYS_CONFIG_NAME - default "nanopi-k2" - -endif diff --git a/board/amlogic/nanopi-k2/MAINTAINERS b/board/amlogic/nanopi-k2/MAINTAINERS deleted file mode 100644 index 0452bd1fa1..0000000000 --- a/board/amlogic/nanopi-k2/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -NANOPI-K2 -M: Neil Armstrong <narmstrong@baylibre.com> -S: Maintained -F: board/amlogic/nanopi-k2/ -F: include/configs/nanopi-k2.h -F: configs/nanopi-k2_defconfig diff --git a/board/amlogic/nanopi-k2/Makefile b/board/amlogic/nanopi-k2/Makefile deleted file mode 100644 index 7d9b666e76..0000000000 --- a/board/amlogic/nanopi-k2/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# (C) Copyright 2018 Thomas McKahan -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y := nanopi-k2.o diff --git a/board/amlogic/nanopi-k2/nanopi-k2.c b/board/amlogic/nanopi-k2/nanopi-k2.c deleted file mode 100644 index ae29dd6fa4..0000000000 --- a/board/amlogic/nanopi-k2/nanopi-k2.c +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2018 Thomas McKahan - */ - -#include <common.h> -#include <dm.h> -#include <environment.h> -#include <asm/io.h> -#include <asm/arch/gx.h> -#include <asm/arch/sm.h> -#include <asm/arch/eth.h> -#include <asm/arch/mem.h> - -#define EFUSE_SN_OFFSET 20 -#define EFUSE_SN_SIZE 16 -#define EFUSE_MAC_OFFSET 52 -#define EFUSE_MAC_SIZE 6 - -int board_init(void) -{ - return 0; -} - -int misc_init_r(void) -{ - u8 mac_addr[EFUSE_MAC_SIZE]; - char serial[EFUSE_SN_SIZE]; - ssize_t len; - - meson_gx_eth_init(PHY_INTERFACE_MODE_RGMII, 0); - - if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { - len = meson_sm_read_efuse(EFUSE_MAC_OFFSET, - mac_addr, EFUSE_MAC_SIZE); - if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) - eth_env_set_enetaddr("ethaddr", mac_addr); - } - - if (!env_get("serial#")) { - len = meson_sm_read_efuse(EFUSE_SN_OFFSET, serial, - EFUSE_SN_SIZE); - if (len == EFUSE_SN_SIZE) - env_set("serial#", serial); - } - - return 0; -} - -int ft_board_setup(void *blob, bd_t *bd) -{ - meson_gx_init_reserved_memory(blob); - - return 0; -} diff --git a/board/amlogic/odroid-c2/MAINTAINERS b/board/amlogic/odroid-c2/MAINTAINERS index 699850fd0c..fd74d53bfe 100644 --- a/board/amlogic/odroid-c2/MAINTAINERS +++ b/board/amlogic/odroid-c2/MAINTAINERS @@ -1,5 +1,6 @@ ODROID-C2 M: Beniamino Galvani <b.galvani@gmail.com> +M: Neil Armstrong <narmstrong@baylibre.com> S: Maintained F: board/amlogic/odroid-c2/ F: include/configs/odroid-c2.h diff --git a/board/amlogic/nanopi-k2/README b/board/amlogic/odroid-c2/README.nanopi-k2 index d450d3c2b2..d450d3c2b2 100644 --- a/board/amlogic/nanopi-k2/README +++ b/board/amlogic/odroid-c2/README.nanopi-k2 diff --git a/board/amlogic/odroid-c2/README b/board/amlogic/odroid-c2/README.odroid-c2 index bed48c5728..bed48c5728 100644 --- a/board/amlogic/odroid-c2/README +++ b/board/amlogic/odroid-c2/README.odroid-c2 |