X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fcommon.h;h=ecf7fcaf7b65f2cb98be8ae822474e21628e454e;hb=ff52e3b4306dc1f7f1c3e60802fba84acad66ce8;hp=a5764d80552fc4c73b55e9a96ee11dc4f8b682be;hpb=5038d7f189267004d924e827cf51d7520d65e42b;p=oweals%2Fu-boot.git diff --git a/include/common.h b/include/common.h index a5764d8055..ecf7fcaf7b 100644 --- a/include/common.h +++ b/include/common.h @@ -83,6 +83,9 @@ typedef volatile unsigned char vu_char; #include #include +/* Bring in printf format macros if inttypes.h is included */ +#define __STDC_FORMAT_MACROS + #ifdef __LP64__ #define CONFIG_SYS_SUPPORT_64BIT_DATA #endif @@ -250,7 +253,19 @@ int cpu_init(void); /* */ phys_size_t initdram (int); int display_options (void); -void print_size(unsigned long long, const char *); + +/** + * print_size() - Print a size with a suffic + * + * print sizes as "xxx KiB", "xxx.y KiB", "xxx MiB", "xxx.y MiB", + * xxx GiB, xxx.y GiB, etc as needed; allow for optional trailing string + * (like "\n") + * + * @size: Size to print + * @suffix String to print after the size + */ +void print_size(uint64_t size, const char *suffix); + int print_buffer(ulong addr, const void *data, uint width, uint count, uint linelen); @@ -763,7 +778,7 @@ void invalidate_dcache_all(void); void invalidate_icache_all(void); /* arch/$(ARCH)/lib/ticks.S */ -unsigned long long get_ticks(void); +uint64_t get_ticks(void); void wait_ticks (unsigned long); /* arch/$(ARCH)/lib/time.c */