aes: add a define for the size of a block
[oweals/u-boot.git] / cmd / cache.c
index 233f428054e5d79bd56f2965360e3957ab3f924a..27dcec093169e1294235e4ef31770b4bfdd65d6c 100644 (file)
@@ -9,6 +9,7 @@
  */
 #include <common.h>
 #include <command.h>
+#include <cpu_func.h>
 #include <linux/compiler.h>
 
 static int parse_argv(const char *);
@@ -22,7 +23,7 @@ void __weak invalidate_icache_all(void)
 static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        switch (argc) {
-       case 2:                 /* on / off     */
+       case 2:                 /* on / off / flush */
                switch (parse_argv(argv[1])) {
                case 0:
                        icache_disable();
@@ -33,6 +34,8 @@ static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                case 2:
                        invalidate_icache_all();
                        break;
+               default:
+                       return CMD_RET_USAGE;
                }
                break;
        case 1:                 /* get status */
@@ -54,7 +57,7 @@ void __weak flush_dcache_all(void)
 static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        switch (argc) {
-       case 2:                 /* on / off */
+       case 2:                 /* on / off / flush */
                switch (parse_argv(argv[1])) {
                case 0:
                        dcache_disable();
@@ -65,6 +68,8 @@ static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                case 2:
                        flush_dcache_all();
                        break;
+               default:
+                       return CMD_RET_USAGE;
                }
                break;
        case 1:                 /* get status */