aboutsummaryrefslogtreecommitdiff
path: root/common/cmd_immap.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.(none)>2005-09-26 00:44:15 +0200
committerWolfgang Denk <wd@pollux.(none)>2005-09-26 00:44:15 +0200
commite6f222815c118c1249c763705c49867004727c5b (patch)
tree914cbce18d45f224a4f927356f6d301d73ae3362 /common/cmd_immap.c
parenta912733e9b86f787f8efe6c805662476be9c1e24 (diff)
Add iopset command on mpc8xx
Patch by Daniel Eisenhut, 25 Mar 2005
Diffstat (limited to 'common/cmd_immap.c')
-rw-r--r--common/cmd_immap.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index abf5590b4..9db5f2cc4 100644
--- a/common/cmd_immap.c
+++ b/common/cmd_immap.c
@@ -34,6 +34,7 @@
#if defined(CONFIG_8xx)
#include <asm/8xx_immap.h>
#include <commproc.h>
+#include <asm/iopin_8xx.h>
#elif defined(CONFIG_8260)
#include <asm/immap_8260.h>
#include <asm/cpm_8260.h>
@@ -316,12 +317,11 @@ do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int
do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
-#if defined(CONFIG_8260)
uint rcode = 0;
static uint port = 0;
static uint pin = 0;
static uint value = 0;
- static enum { DIR, PAR, SOR, ODR, DAT } cmd = DAT;
+ static enum { DIR, PAR, SOR, ODR, DAT, INT } cmd = DAT;
iopin_t iopin;
if (argc != 5) {
@@ -356,6 +356,11 @@ do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
case 's':
cmd = SOR;
break;
+#if defined(CONFIG_8xx)
+ case 'i':
+ cmd = INT;
+ break;
+#endif
default:
printf ("iopset: unknown command %s\n", argv[3]);
rcode = 1;
@@ -400,14 +405,18 @@ do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
else
iopin_set_low (&iopin);
break;
+#if defined(CONFIG_8xx)
+ case INT:
+ if (value)
+ iopin_set_falledge (&iopin);
+ else
+ iopin_set_anyedge (&iopin);
+ break;
+#endif
}
}
return rcode;
-#else
- unimplemented (cmdtp, flag, argc, argv);
- return 0;
-#endif
}
int