summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Makefile2
-rw-r--r--cmd/date.c8
-rw-r--r--cmd/elf.c6
-rw-r--r--cmd/fs.c2
4 files changed, 11 insertions, 7 deletions
diff --git a/cmd/Makefile b/cmd/Makefile
index 15ae4d250f..a127a99539 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -104,7 +104,7 @@ obj-$(CONFIG_CMD_PART) += part.o
ifdef CONFIG_PCI
obj-$(CONFIG_CMD_PCI) += pci.o
endif
-obj-y += pcmcia.o
+obj-$(CONFIG_CMD_PCMCIA) += pcmcia.o
obj-$(CONFIG_CMD_PINMUX) += pinmux.o
obj-$(CONFIG_CMD_PXE) += pxe.o
obj-$(CONFIG_CMD_WOL) += wol.o
diff --git a/cmd/date.c b/cmd/date.c
index 1115b6c8d6..7fa950a902 100644
--- a/cmd/date.c
+++ b/cmd/date.c
@@ -159,18 +159,18 @@ int mk_date (const char *datestr, struct rtc_time *tmp)
int len, val;
char *ptr;
- ptr = strchr (datestr,'.');
- len = strlen (datestr);
+ ptr = strchr(datestr, '.');
+ len = strlen(datestr);
/* Set seconds */
if (ptr) {
int sec;
- *ptr++ = '\0';
+ ptr++;
if ((len - (ptr - datestr)) != 2)
return (-1);
- len = strlen (datestr);
+ len -= 3;
if (cnvrt2 (ptr, &sec))
return (-1);
diff --git a/cmd/elf.c b/cmd/elf.c
index 7bad1f80d4..d883be4193 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -53,7 +53,8 @@ static unsigned long load_elf64_image_phdr(unsigned long addr)
if (phdr->p_filesz != phdr->p_memsz)
memset(dst + phdr->p_filesz, 0x00,
phdr->p_memsz - phdr->p_filesz);
- flush_cache((unsigned long)dst, phdr->p_filesz);
+ flush_cache(rounddown((unsigned long)dst, ARCH_DMA_MINALIGN),
+ roundup(phdr->p_memsz, ARCH_DMA_MINALIGN));
++phdr;
}
@@ -167,7 +168,8 @@ static unsigned long load_elf_image_phdr(unsigned long addr)
if (phdr->p_filesz != phdr->p_memsz)
memset(dst + phdr->p_filesz, 0x00,
phdr->p_memsz - phdr->p_filesz);
- flush_cache((unsigned long)dst, phdr->p_filesz);
+ flush_cache(rounddown((unsigned long)dst, ARCH_DMA_MINALIGN),
+ roundup(phdr->p_memsz, ARCH_DMA_MINALIGN));
++phdr;
}
diff --git a/cmd/fs.c b/cmd/fs.c
index 8064a1c84d..94467671be 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -26,8 +26,10 @@ U_BOOT_CMD(
static int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
+#ifdef CONFIG_CMD_BOOTEFI
efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "",
(argc > 4) ? argv[4] : "");
+#endif
return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY);
}