powerpc/82xx/km: add testpin detection for mgcoge3ne
On mgcoge3ne we also want to start the test application if the testpin
is asserted. But we don't have a full POST test support yet. So simply
add a function to read the testpin value.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index b9aff1a..8de129d 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -354,8 +354,11 @@
#if defined(CONFIG_POST)
testpin = post_hotkeys_pressed();
- s = getenv("test_bank");
#endif
+#if defined(CONFIG_MGCOGE3NE)
+ testpin = get_testpin();
+#endif
+ s = getenv("test_bank");
/* when test_bank is not set, act as if testpin is not asserted */
testboot = (testpin != 0) && (s);
if (verbose) {
diff --git a/board/keymile/common/common.h b/board/keymile/common/common.h
index dcfefc4..c74f569 100644
--- a/board/keymile/common/common.h
+++ b/board/keymile/common/common.h
@@ -134,6 +134,8 @@
int fpga_reset(void);
int toggle_eeprom_spi_bus(void);
+int get_testpin(void);
+
int set_km_env(void);
int fdt_set_node_and_value(void *blob,
char *nodename,