diff options
Diffstat (limited to 'common/cmd_immap.c')
-rw-r--r-- | common/cmd_immap.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/common/cmd_immap.c b/common/cmd_immap.c index abf5590..9db5f2c 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 |