summaryrefslogtreecommitdiff
path: root/board/keymile
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@ch.abb.com>2020-01-13 17:34:01 +0300
committerTom Rini <trini@konsulko.com>2020-01-23 15:29:58 +0300
commit0e1c0f361edf590fcea9fcab6333d1a142934eeb (patch)
treefa22ac0d5c35d7738a476d135de0f90eec23052c /board/keymile
parent17f084fa8c64c97a68d854bd8611a55f69ac056d (diff)
downloadu-boot-0e1c0f361edf590fcea9fcab6333d1a142934eeb.tar.xz
arm/km: add support for SUSE2
This board is similar to SUV31, but the FPGA is reset concept is quite different. Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> CC: Valentin Longchamp <valentin.longchamp@ch.abb.com> CC: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/keymile')
-rw-r--r--board/keymile/km_arm/Kconfig12
-rw-r--r--board/keymile/km_arm/MAINTAINERS1
-rw-r--r--board/keymile/km_arm/fpga_config.c15
3 files changed, 26 insertions, 2 deletions
diff --git a/board/keymile/km_arm/Kconfig b/board/keymile/km_arm/Kconfig
index be6b162815..4b21db8573 100644
--- a/board/keymile/km_arm/Kconfig
+++ b/board/keymile/km_arm/Kconfig
@@ -7,6 +7,18 @@ config KM_FPGA_CONFIG
help
Include capability to change FPGA configuration.
+config KM_FPGA_FORCE_CONFIG
+ bool "FPGA reconfiguration"
+ default n
+ help
+ If yes we force to reconfigure the FPGA always
+
+config KM_FPGA_NO_RESET
+ bool "FPGA skip reset"
+ default n
+ help
+ If yes we skip triggering a reset of the FPGA
+
config KM_ENV_IS_IN_SPI_NOR
bool "Environment in SPI NOR"
default n
diff --git a/board/keymile/km_arm/MAINTAINERS b/board/keymile/km_arm/MAINTAINERS
index 17926017c3..538f90f48b 100644
--- a/board/keymile/km_arm/MAINTAINERS
+++ b/board/keymile/km_arm/MAINTAINERS
@@ -9,4 +9,5 @@ F: configs/km_kirkwood_pci_defconfig
F: configs/kmcoge5un_defconfig
F: configs/kmnusa_defconfig
F: configs/kmsugp1_defconfig
+F: configs/kmsuse2_defconfig
F: configs/kmsuv31_defconfig
diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c
index 051e167fd5..99bea009fa 100644
--- a/board/keymile/km_arm/fpga_config.c
+++ b/board/keymile/km_arm/fpga_config.c
@@ -82,6 +82,7 @@ static int boco_set_bits(u8 reg, u8 flags)
#define FPGA_INIT_B 0x10
#define FPGA_DONE 0x20
+#ifndef CONFIG_KM_FPGA_FORCE_CONFIG
static int fpga_done(void)
{
int ret = 0;
@@ -100,13 +101,16 @@ static int fpga_done(void)
return regval & FPGA_DONE ? 1 : 0;
}
+#endif /* CONFIG_KM_FPGA_FORCE_CONFIG */
-int skip;
+static int skip;
int trigger_fpga_config(void)
{
int ret = 0;
+ skip = 0;
+#ifndef CONFIG_KM_FPGA_FORCE_CONFIG
/* if the FPGA is already configured, we do not want to
* reconfigure it */
skip = 0;
@@ -115,6 +119,7 @@ int trigger_fpga_config(void)
skip = 1;
return 0;
}
+#endif /* CONFIG_KM_FPGA_FORCE_CONFIG */
if (check_boco2()) {
/* we have a BOCO2, this has to be triggered here */
@@ -188,7 +193,13 @@ int wait_for_fpga_config(void)
return 0;
}
-#if defined(KM_PCIE_RESET_MPP7)
+#if defined(CONFIG_KM_FPGA_NO_RESET)
+int fpga_reset(void)
+{
+ /* no dedicated reset pin for FPGA */
+ return 0;
+}
+#elif defined(KM_PCIE_RESET_MPP7)
#define KM_PEX_RST_GPIO_PIN 7
int fpga_reset(void)