summaryrefslogtreecommitdiff
path: root/board/hymod/input.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-10-27 11:03:00 -0400
committerTom Rini <trini@ti.com>2014-10-27 11:03:00 -0400
commit0cf876154922118d8fb1b4c30f527c95a113bef3 (patch)
tree83eb6a7966a1949526e1e6066470952162f51c1d /board/hymod/input.c
parent0ce4af99c07acebf4fce9a91f1099d2460629293 (diff)
parentf06f9a1fb1cd332435b9e8660355f57d7d3f98d8 (diff)
downloadu-boot-imx-0cf876154922118d8fb1b4c30f527c95a113bef3.zip
u-boot-imx-0cf876154922118d8fb1b4c30f527c95a113bef3.tar.gz
u-boot-imx-0cf876154922118d8fb1b4c30f527c95a113bef3.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
Diffstat (limited to 'board/hymod/input.c')
-rw-r--r--board/hymod/input.c91
1 files changed, 0 insertions, 91 deletions
diff --git a/board/hymod/input.c b/board/hymod/input.c
deleted file mode 100644
index a9035d3..0000000
--- a/board/hymod/input.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * (C) Copyright 2003
- * Murray Jensen, CSIRO-MIT, <Murray.Jensen@csiro.au>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#include <bootretry.h>
-#include <cli.h>
-
-int
-hymod_get_serno (const char *prompt)
-{
- for (;;) {
- int n, serno;
- char *p;
-
- bootretry_reset_cmd_timeout();
-
- n = cli_readline(prompt);
-
- if (n < 0)
- return (n);
-
- if (n == 0)
- continue;
-
- serno = (int) simple_strtol (console_buffer, &p, 10);
-
- if (p > console_buffer && *p == '\0' && serno > 0)
- return (serno);
-
- printf ("Invalid number (%s) - please re-enter\n",
- console_buffer);
- }
-}
-
-int
-hymod_get_ethaddr (void)
-{
- for (;;) {
- int n;
-
- bootretry_reset_cmd_timeout();
-
- n = cli_readline("Enter board ethernet address: ");
-
- if (n < 0)
- return (n);
-
- if (n == 0)
- continue;
-
- if (n == 17) {
- int i;
- char *p, *q;
-
- /* see if it looks like an ethernet address */
-
- p = console_buffer;
-
- for (i = 0; i < 6; i++) {
- char term = (i == 5 ? '\0' : ':');
-
- (void)simple_strtol (p, &q, 16);
-
- if ((q - p) != 2 || *q++ != term)
- break;
-
- p = q;
- }
-
- if (i == 6) {
- /* it looks ok - set it */
- printf ("Setting ethernet addr to %s\n",
- console_buffer);
-
- setenv ("ethaddr", console_buffer);
-
- puts ("Remember to do a 'saveenv' to "
- "make it permanent\n");
-
- return (0);
- }
- }
-
- printf ("Invalid ethernet addr (%s) - please re-enter\n",
- console_buffer);
- }
-}