summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c40
-rw-r--r--board/keymile/Kconfig12
-rw-r--r--board/keymile/km83xx/km83xx.c2
-rw-r--r--board/keymile/secu1/MAINTAINERS2
-rw-r--r--board/keymile/secu1/Makefile2
-rw-r--r--board/keymile/secu1/socfpga.c2
6 files changed, 43 insertions, 17 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index c9abe3cc6df..f42d395098b 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -81,6 +81,11 @@
*/
DECLARE_GLOBAL_DATA_PTR;
+#define KS_CCR 0x08
+#define KS_CCR_EEPROM BIT(9)
+#define KS_BE0 BIT(12)
+#define KS_BE1 BIT(13)
+
int setup_mac_address(void)
{
unsigned char enetaddr[6];
@@ -97,12 +102,39 @@ int setup_mac_address(void)
if (off < 0) {
/* ethernet1 is not present in the system */
skip_eth1 = true;
- } else {
- ret = eth_env_get_enetaddr("eth1addr", enetaddr);
- if (ret) /* eth1addr is already set */
- skip_eth1 = true;
+ goto out_set_ethaddr;
+ }
+
+ ret = eth_env_get_enetaddr("eth1addr", enetaddr);
+ if (ret) {
+ /* eth1addr is already set */
+ skip_eth1 = true;
+ goto out_set_ethaddr;
+ }
+
+ ret = fdt_node_check_compatible(gd->fdt_blob, off, "micrel,ks8851-mll");
+ if (ret)
+ goto out_set_ethaddr;
+
+ /*
+ * KS8851 with EEPROM may use custom MAC from EEPROM, read
+ * out the KS8851 CCR register to determine whether EEPROM
+ * is present. If EEPROM is present, it must contain valid
+ * MAC address.
+ */
+ u32 reg, ccr;
+ reg = fdt_get_base_address(gd->fdt_blob, off);
+ if (!reg)
+ goto out_set_ethaddr;
+
+ writew(KS_BE0 | KS_BE1 | KS_CCR, reg + 2);
+ ccr = readw(reg);
+ if (ccr & KS_CCR_EEPROM) {
+ skip_eth1 = true;
+ goto out_set_ethaddr;
}
+out_set_ethaddr:
if (skip_eth0 && skip_eth1)
return 0;
diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index e20c0174363..e5906906f3a 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -37,26 +37,20 @@ config KM_RESERVED_PRAM
config KM_CRAMFS_ADDR
hex "CRAMFS Address"
- default 0x2400000 if ARCH_KIRKWOOD
- default 0xC00000 if MPC83xx
- default 0x2000000 if MPC85xx
+ default 0x3000000
depends on !ARCH_SOCFPGA
help
Start address of the CRAMFS containing the Linux kernel.
config KM_KERNEL_ADDR
hex "Kernel Load Address"
- default 0x2000000 if ARCH_KIRKWOOD
- default 0x400000 if MPC83xx
- default 0x1000000 if MPC85xx || ARCH_SOCFPGA
+ default 0x2000000
help
Address where to load Linux kernel in RAM.
config KM_FDT_ADDR
hex "FDT Load Address"
- default 0x23E0000 if ARCH_KIRKWOOD || ARCH_SOCFPGA
- default 0xB80000 if MPC83xx
- default 0x1F80000 if MPC85xx
+ default 0x2FC0000
help
Address where to load flattened device tree in RAM.
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 86697159405..9eb000cca4d 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -185,7 +185,7 @@ int dram_init(void)
int checkboard(void)
{
- puts("Board: ABB " CONFIG_SYS_CONFIG_NAME);
+ puts("Board: Hitachi " CONFIG_SYS_CONFIG_NAME);
if (piggy_present())
puts(" with PIGGY.");
diff --git a/board/keymile/secu1/MAINTAINERS b/board/keymile/secu1/MAINTAINERS
index 6ef1528412b..3e40eef3cc8 100644
--- a/board/keymile/secu1/MAINTAINERS
+++ b/board/keymile/secu1/MAINTAINERS
@@ -1,4 +1,4 @@
-ABB SECU1 BOARD
+Hitachi Power Grids SECU1 BOARD
M: Holger Brunck <holger.brunck@hitachi-powergrids.com>
S: Maintained
F: include/configs/socfpga_arria5_secu1.h
diff --git a/board/keymile/secu1/Makefile b/board/keymile/secu1/Makefile
index 4704d59e48c..69531807ecc 100644
--- a/board/keymile/secu1/Makefile
+++ b/board/keymile/secu1/Makefile
@@ -1,5 +1,5 @@
#
-# (C) Copyright 2020 ABB
+# (C) Copyright 2020 Hitachi Power Grids
#
# SPDX-License-Identifier: GPL-2.0+
#
diff --git a/board/keymile/secu1/socfpga.c b/board/keymile/secu1/socfpga.c
index dc04a21abea..6a4cb21786a 100644
--- a/board/keymile/secu1/socfpga.c
+++ b/board/keymile/secu1/socfpga.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright (C) 2017-2020 ABB
+ * Copyright (C) 2017-2020 Hitachi Power Grids
*/
#include <common.h>
#include <i2c.h>