summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-21 15:20:42 -0400
committerTom Rini <trini@konsulko.com>2020-04-21 15:20:42 -0400
commitbdcb29960e3a9558803632783b922f26993d219e (patch)
treec0c343ca723b8736b74af172bb47f1007dc2fc5c /include
parent1bf65142b31a48c8e354df603c9f6fa5c8cac389 (diff)
parente174fb7061e7a3f1996f57eb36525c51dd87b5a3 (diff)
downloadu-boot-bdcb29960e3a9558803632783b922f26993d219e.tar.gz
u-boot-bdcb29960e3a9558803632783b922f26993d219e.tar.bz2
u-boot-bdcb29960e3a9558803632783b922f26993d219e.zip
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Backplane support and bug fixes
Diffstat (limited to 'include')
-rw-r--r--include/configs/ls1012afrwy.h7
-rw-r--r--include/phy_interface.h23
2 files changed, 27 insertions, 3 deletions
diff --git a/include/configs/ls1012afrwy.h b/include/configs/ls1012afrwy.h
index 899dfdbdf1..6143e9731e 100644
--- a/include/configs/ls1012afrwy.h
+++ b/include/configs/ls1012afrwy.h
@@ -72,6 +72,7 @@
"kernel_size=0x2800000\0" \
"kernelheader_size=0x40000\0" \
"console=ttyS0,115200\0" \
+ "BOARD=ls1012afrwy\0" \
BOOTENV \
"boot_scripts=ls1012afrwy_boot.scr\0" \
"boot_script_hdr=hdr_ls1012afrwy_bs.out\0" \
@@ -103,20 +104,20 @@
"source ${scriptaddr}\0" \
"installer=load mmc 0:2 $load_addr " \
"/flex_installer_arm64.itb; " \
- "bootm $load_addr#$board\0" \
+ "bootm $load_addr#$BOARD\0" \
"qspi_bootcmd=pfe stop; echo Trying load from qspi..;" \
"sf probe && sf read $load_addr " \
"$kernel_addr $kernel_size; env exists secureboot " \
"&& sf read $kernelheader_addr_r $kernelheader_addr " \
"$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \
- "bootm $load_addr#$board\0" \
+ "bootm $load_addr#$BOARD\0" \
"sd_bootcmd=pfe stop; echo Trying load from sd card..;" \
"mmcinfo; mmc read $load_addr " \
"$kernel_addr_sd $kernel_size_sd ;" \
"env exists secureboot && mmc read $kernelheader_addr_r "\
"$kernelhdr_addr_sd $kernelhdr_size_sd " \
" && esbc_validate ${kernelheader_addr_r};" \
- "bootm $load_addr#$board\0"
+ "bootm $load_addr#$BOARD\0"
#undef CONFIG_BOOTCOMMAND
#ifdef CONFIG_TFABOOT
diff --git a/include/phy_interface.h b/include/phy_interface.h
index 31ca72a81f..882e4af8ff 100644
--- a/include/phy_interface.h
+++ b/include/phy_interface.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2020 NXP
* Andy Fleming <afleming@gmail.com>
*
* This file pretty much stolen from Linux's mii.h/ethtool.h/phy.h
@@ -67,6 +68,15 @@ static const char * const phy_interface_strings[] = {
[PHY_INTERFACE_MODE_NONE] = "",
};
+/* Backplane modes:
+ * are considered a sub-type of phy_interface_t: XGMII
+ * and are specified in "phy-connection-type" with one of the following strings
+ */
+static const char * const backplane_mode_strings[] = {
+ "10gbase-kr",
+ "40gbase-kr4",
+};
+
static inline const char *phy_string_for_interface(phy_interface_t i)
{
/* Default to unknown */
@@ -76,4 +86,17 @@ static inline const char *phy_string_for_interface(phy_interface_t i)
return phy_interface_strings[i];
}
+static inline bool is_backplane_mode(const char *phyconn)
+{
+ int i;
+
+ if (!phyconn)
+ return false;
+ for (i = 0; i < ARRAY_SIZE(backplane_mode_strings); i++) {
+ if (!strcmp(phyconn, backplane_mode_strings[i]))
+ return true;
+ }
+ return false;
+}
+
#endif /* _PHY_INTERFACE_H */