Merge branch '2021-08-21-assorted-changes'

This commit is contained in:
Tom Rini
2021-08-22 15:44:53 -04:00
6 changed files with 1146 additions and 23 deletions

View File

@@ -220,4 +220,13 @@ config SANDBOX_CLK_CCF
Enable this option if you want to test the Linux kernel's Common Enable this option if you want to test the Linux kernel's Common
Clock Framework [CCF] code in U-Boot's Sandbox clock driver. Clock Framework [CCF] code in U-Boot's Sandbox clock driver.
config CLK_VERSACLOCK
tristate "Enable VersaClock 5/6 devices"
depends on CLK
depends on CLK_CCF
depends on OF_CONTROL
help
This driver supports the IDT VersaClock 5 and VersaClock 6
programmable clock generators.
endmenu endmenu

View File

@@ -52,3 +52,4 @@ obj-$(CONFIG_SANDBOX_CLK_CCF) += clk_sandbox_ccf.o
obj-$(CONFIG_STM32H7) += clk_stm32h7.o obj-$(CONFIG_STM32H7) += clk_stm32h7.o
obj-$(CONFIG_CLK_VERSAL) += clk_versal.o obj-$(CONFIG_CLK_VERSAL) += clk_versal.o
obj-$(CONFIG_CLK_CDCE9XX) += clk-cdce9xx.o obj-$(CONFIG_CLK_CDCE9XX) += clk-cdce9xx.o
obj-$(CONFIG_CLK_VERSACLOCK) += clk_versaclock.o

1100
drivers/clk/clk_versaclock.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -512,7 +512,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
u32 download_bytes, char *response) u32 download_bytes, char *response)
{ {
struct blk_desc *dev_desc; struct blk_desc *dev_desc;
struct disk_partition info; struct disk_partition info = {0};
#ifdef CONFIG_FASTBOOT_MMC_BOOT_SUPPORT #ifdef CONFIG_FASTBOOT_MMC_BOOT_SUPPORT
if (strcmp(cmd, CONFIG_FASTBOOT_MMC_BOOT1_NAME) == 0) { if (strcmp(cmd, CONFIG_FASTBOOT_MMC_BOOT1_NAME) == 0) {
@@ -525,19 +525,14 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
if (strcmp(cmd, CONFIG_FASTBOOT_MMC_BOOT2_NAME) == 0) { if (strcmp(cmd, CONFIG_FASTBOOT_MMC_BOOT2_NAME) == 0) {
dev_desc = fastboot_mmc_get_dev(response); dev_desc = fastboot_mmc_get_dev(response);
if (dev_desc) if (dev_desc)
fb_mmc_boot_ops(dev_desc, download_buffer, 1, fb_mmc_boot_ops(dev_desc, download_buffer, 2,
download_bytes, response); download_bytes, response);
return; return;
} }
#endif #endif
#if CONFIG_IS_ENABLED(EFI_PARTITION) #if CONFIG_IS_ENABLED(EFI_PARTITION)
#ifndef CONFIG_FASTBOOT_MMC_USER_SUPPORT
if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) { if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) {
#else
if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0 ||
strcmp(cmd, CONFIG_FASTBOOT_MMC_USER_NAME) == 0) {
#endif
dev_desc = fastboot_mmc_get_dev(response); dev_desc = fastboot_mmc_get_dev(response);
if (!dev_desc) if (!dev_desc)
return; return;
@@ -599,7 +594,20 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
} }
#endif #endif
if (fastboot_mmc_get_part_info(cmd, &dev_desc, &info, response) < 0) #if CONFIG_IS_ENABLED(FASTBOOT_MMC_USER_SUPPORT)
if (strcmp(cmd, CONFIG_FASTBOOT_MMC_USER_NAME) == 0) {
dev_desc = fastboot_mmc_get_dev(response);
if (!dev_desc)
return;
strlcpy((char *)&info.name, cmd, sizeof(info.name));
info.size = dev_desc->lba;
info.blksz = dev_desc->blksz;
}
#endif
if (!info.name[0] &&
fastboot_mmc_get_part_info(cmd, &dev_desc, &info, response) < 0)
return; return;
if (is_sparse_image(download_buffer)) { if (is_sparse_image(download_buffer)) {
@@ -655,7 +663,7 @@ void fastboot_mmc_erase(const char *cmd, char *response)
/* erase EMMC boot2 */ /* erase EMMC boot2 */
dev_desc = fastboot_mmc_get_dev(response); dev_desc = fastboot_mmc_get_dev(response);
if (dev_desc) if (dev_desc)
fb_mmc_boot_ops(dev_desc, NULL, 1, 0, response); fb_mmc_boot_ops(dev_desc, NULL, 2, 0, response);
return; return;
} }
#endif #endif

View File

@@ -107,7 +107,12 @@ void print_size(uint64_t size, const char *s)
} }
if (!c) { if (!c) {
printf("%llu Bytes%s", size, s); /*
* SPL tiny-printf is not capable for printing uint64_t.
* We have just checked that the size is small enought to fit
* unsigned int safely.
*/
printf("%u Bytes%s", (unsigned int)size, s);
return; return;
} }

View File

@@ -9,8 +9,9 @@
*/ */
#include <common.h> #include <common.h>
#include <stdarg.h> #include <log.h>
#include <serial.h> #include <serial.h>
#include <stdarg.h>
#include <linux/ctype.h> #include <linux/ctype.h>
struct printf_info { struct printf_info {
@@ -269,20 +270,19 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
} }
break; break;
case 'p': case 'p':
#ifdef DEBUG if (CONFIG_IS_ENABLED(NET_SUPPORT) || _DEBUG) {
pointer(info, fmt, va_arg(va, void *)); pointer(info, fmt, va_arg(va, void *));
/* /*
* Skip this because it pulls in _ctype which is * Skip this because it pulls in _ctype which is
* 256 bytes, and we don't generally implement * 256 bytes, and we don't generally implement
* pointer anyway * pointer anyway
*/ */
while (isalnum(fmt[0])) while (isalnum(fmt[0]))
fmt++; fmt++;
break; break;
#else }
islong = true; islong = true;
/* no break */ /* no break */
#endif
case 'x': case 'x':
if (islong) { if (islong) {
num = va_arg(va, unsigned long); num = va_arg(va, unsigned long);