diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cli_readline.c | 4 | ||||
-rw-r--r-- | common/console.c | 9 | ||||
-rw-r--r-- | common/fdt_support.c | 17 | ||||
-rw-r--r-- | common/spl/Kconfig | 16 | ||||
-rw-r--r-- | common/usb_storage.c | 16 |
5 files changed, 38 insertions, 24 deletions
diff --git a/common/cli_readline.c b/common/cli_readline.c index 60a232b065..99b631720e 100644 --- a/common/cli_readline.c +++ b/common/cli_readline.c @@ -273,6 +273,10 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len, ichar = getcmd_getch(); + /* ichar=0x0 when error occurs in U-Boot getc */ + if (!ichar) + continue; + if ((ichar == '\n') || (ichar == '\r')) { putc('\n'); break; diff --git a/common/console.c b/common/console.c index 7aa58d0a63..9a94f32192 100644 --- a/common/console.c +++ b/common/console.c @@ -311,12 +311,12 @@ int serial_printf(const char *fmt, ...) int fgetc(int file) { if (file < MAX_FILES) { -#if CONFIG_IS_ENABLED(CONSOLE_MUX) /* * Effectively poll for input wherever it may be available. */ for (;;) { WATCHDOG_RESET(); +#if CONFIG_IS_ENABLED(CONSOLE_MUX) /* * Upper layer may have already called tstc() so * check for that first. @@ -324,6 +324,10 @@ int fgetc(int file) if (tstcdev != NULL) return console_getc(file); console_tstc(file); +#else + if (console_tstc(file)) + return console_getc(file); +#endif #ifdef CONFIG_WATCHDOG /* * If the watchdog must be rate-limited then it should @@ -332,9 +336,6 @@ int fgetc(int file) udelay(1); #endif } -#else - return console_getc(file); -#endif } return -1; diff --git a/common/fdt_support.c b/common/fdt_support.c index d84f5dbade..e6daa67990 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -7,7 +7,6 @@ */ #include <common.h> -#include <inttypes.h> #include <stdio_dev.h> #include <linux/ctype.h> #include <linux/types.h> @@ -1025,8 +1024,7 @@ static u64 of_bus_default_map(fdt32_t *addr, const fdt32_t *range, s = fdt_read_number(range + na + pna, ns); da = fdt_read_number(addr, na); - debug("OF: default map, cp=%" PRIu64 ", s=%" PRIu64 - ", da=%" PRIu64 "\n", cp, s, da); + debug("OF: default map, cp=%llu, s=%llu, da=%llu\n", cp, s, da); if (da < cp || da >= (cp + s)) return OF_BAD_ADDR; @@ -1081,8 +1079,7 @@ static u64 of_bus_isa_map(fdt32_t *addr, const fdt32_t *range, s = fdt_read_number(range + na + pna, ns); da = fdt_read_number(addr + 1, na - 1); - debug("OF: ISA map, cp=%" PRIu64 ", s=%" PRIu64 - ", da=%" PRIu64 "\n", cp, s, da); + debug("OF: ISA map, cp=%llu, s=%llu, da=%llu\n", cp, s, da); if (da < cp || da >= (cp + s)) return OF_BAD_ADDR; @@ -1188,7 +1185,7 @@ static int of_translate_one(const void *blob, int parent, struct of_bus *bus, finish: of_dump_addr("OF: parent translation for:", addr, pna); - debug("OF: with offset: %" PRIu64 "\n", offset); + debug("OF: with offset: %llu\n", offset); /* Translate it into parent bus space */ return pbus->translate(addr, offset, pna); @@ -1518,9 +1515,9 @@ int fdt_verify_alias_address(void *fdt, int anode, const char *alias, u64 addr) dt_addr = fdt_translate_address(fdt, node, reg); if (addr != dt_addr) { - printf("Warning: U-Boot configured device %s at address %" - PRIx64 ",\n but the device tree has it address %" - PRIx64 ".\n", alias, addr, dt_addr); + printf("Warning: U-Boot configured device %s at address %llu,\n" + "but the device tree has it address %llx.\n", + alias, addr, dt_addr); return 0; } @@ -1668,7 +1665,7 @@ int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, if (ret < 0) return ret; - snprintf(name, sizeof(name), "framebuffer@%" PRIx64, base_address); + snprintf(name, sizeof(name), "framebuffer@%llx", base_address); ret = fdt_set_name(fdt, node, name); if (ret < 0) return ret; diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2e79d7d22b..280496fbe0 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -171,7 +171,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR default 0x140 if ARCH_MVEBU default 0x200 if ARCH_SOCFPGA || ARCH_AT91 default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ - OMAP54XX || AM33XX || AM43XX + OMAP54XX || AM33XX || AM43XX || ARCH_K3 default 0x4000 if ARCH_ROCKCHIP help Address on the MMC to load U-Boot from, when the MMC is being used @@ -430,6 +430,14 @@ config SPL_LIBGENERIC_SUPPORT boards. Enable this option to build the code in lib/ as part of an SPL build. +config SPL_DM_MAILBOX + bool "Support Mailbox" + help + Enable support for Mailbox within SPL. This enable the inter + processor communication protocols tobe used within SPL. Enable + this option to build the drivers in drivers/mailbox as part of + SPL build. + config SPL_MMC_SUPPORT bool "Support MMC" depends on MMC @@ -634,6 +642,12 @@ config SPL_RAM_DEVICE be already in memory when SPL takes over, e.g. loaded by the boot ROM. +config SPL_REMOTEPROC + bool "Support REMOTEPROCS" + help + Enable support for REMOTEPROCs in SPL. This permits to load + a remote processor firmware in SPL. + config SPL_RTC_SUPPORT bool "Support RTC drivers" help diff --git a/common/usb_storage.c b/common/usb_storage.c index 9cd64744f8..d92ebb6eb1 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -36,7 +36,6 @@ #include <command.h> #include <dm.h> #include <errno.h> -#include <inttypes.h> #include <mapmem.h> #include <memalign.h> #include <asm/byteorder.h> @@ -1164,8 +1163,8 @@ static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr, start = blknr; blks = blkcnt; - debug("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF " buffer %" - PRIxPTR "\n", block_dev->devnum, start, blks, buf_addr); + debug("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF " buffer %lx\n", + block_dev->devnum, start, blks, buf_addr); do { /* XXX need some comment here */ @@ -1194,8 +1193,7 @@ retry_it: } while (blks != 0); ss->flags &= ~USB_READY; - debug("usb_read: end startblk " LBAF - ", blccnt %x buffer %" PRIxPTR "\n", + debug("usb_read: end startblk " LBAF ", blccnt %x buffer %lx\n", start, smallblks, buf_addr); usb_disable_asynch(0); /* asynch transfer allowed */ @@ -1248,8 +1246,8 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr, start = blknr; blks = blkcnt; - debug("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF " buffer %" - PRIxPTR "\n", block_dev->devnum, start, blks, buf_addr); + debug("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF " buffer %lx\n", + block_dev->devnum, start, blks, buf_addr); do { /* If write fails retry for max retry count else @@ -1280,8 +1278,8 @@ retry_it: } while (blks != 0); ss->flags &= ~USB_READY; - debug("usb_write: end startblk " LBAF ", blccnt %x buffer %" - PRIxPTR "\n", start, smallblks, buf_addr); + debug("usb_write: end startblk " LBAF ", blccnt %x buffer %lx\n", + start, smallblks, buf_addr); usb_disable_asynch(0); /* asynch transfer allowed */ if (blkcnt >= ss->max_xfer_blk) |