summaryrefslogtreecommitdiff
path: root/common/cmd_immap.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_immap.c')
-rw-r--r--common/cmd_immap.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index 9db5f2cc46..559d7b4c30 100644
--- a/common/cmd_immap.c
+++ b/common/cmd_immap.c
@@ -318,11 +318,20 @@ int
do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
uint rcode = 0;
+ iopin_t iopin;
static uint port = 0;
static uint pin = 0;
static uint value = 0;
- static enum { DIR, PAR, SOR, ODR, DAT, INT } cmd = DAT;
- iopin_t iopin;
+ static enum {
+ DIR,
+ PAR,
+ SOR,
+ ODR,
+ DAT,
+#if defined(CONFIG_8xx)
+ INT
+#endif
+ } cmd = DAT;
if (argc != 5) {
puts ("iopset PORT PIN CMD VALUE\n");
@@ -374,6 +383,7 @@ do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (rcode == 0) {
iopin.port = port;
iopin.pin = pin;
+ iopin.flag = 0;
switch (cmd) {
case DIR:
if (value)