diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-09-10 22:48:05 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-09-10 22:48:05 +0200 |
commit | 8a40fb148efa442d6526eac46a2001e4c64d28ff (patch) | |
tree | d5c1fc7fcfed24f975f774a6bb05a07677a117be /common/cmd_mem.c | |
parent | 507641d2491980531932b9f25dab37fe5e6c3a1a (diff) | |
download | u-boot-imx-8a40fb148efa442d6526eac46a2001e4c64d28ff.zip u-boot-imx-8a40fb148efa442d6526eac46a2001e4c64d28ff.tar.gz u-boot-imx-8a40fb148efa442d6526eac46a2001e4c64d28ff.tar.bz2 |
move cmd_get_data_size to command.c
add CMD_DATA_SIZE macro to enable it
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r-- | common/cmd_mem.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c index d0a6ca8..672218b 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -37,35 +37,6 @@ #endif #include <watchdog.h> -#if defined(CONFIG_CMD_MEMORY) \ - || defined(CONFIG_CMD_I2C) \ - || defined(CONFIG_CMD_ITEST) \ - || defined(CONFIG_CMD_PCI) \ - || defined(CONFIG_CMD_PORTIO) - -int cmd_get_data_size(char* arg, int default_size) -{ - /* Check for a size specification .b, .w or .l. - */ - int len = strlen(arg); - if (len > 2 && arg[len-2] == '.') { - switch(arg[len-1]) { - case 'b': - return 1; - case 'w': - return 2; - case 'l': - return 4; - case 's': - return -2; - default: - return -1; - } - } - return default_size; -} -#endif - #if defined(CONFIG_CMD_MEMORY) #ifdef CMD_MEM_DEBUG |