diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Makefile | 2 | ||||
-rw-r--r-- | cmd/date.c | 8 | ||||
-rw-r--r-- | cmd/elf.c | 6 | ||||
-rw-r--r-- | cmd/fs.c | 2 |
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); @@ -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; } @@ -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); } |