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

This commit is contained in:
Tom Rini 2021-08-22 15:44:53 -04:00
commit 3ee343cd7c
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
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

View file

@ -52,3 +52,4 @@ obj-$(CONFIG_SANDBOX_CLK_CCF) += clk_sandbox_ccf.o
obj-$(CONFIG_STM32H7) += clk_stm32h7.o
obj-$(CONFIG_CLK_VERSAL) += clk_versal.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)
{
struct blk_desc *dev_desc;
struct disk_partition info;
struct disk_partition info = {0};
#ifdef CONFIG_FASTBOOT_MMC_BOOT_SUPPORT
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) {
dev_desc = fastboot_mmc_get_dev(response);
if (dev_desc)
fb_mmc_boot_ops(dev_desc, download_buffer, 1,
fb_mmc_boot_ops(dev_desc, download_buffer, 2,
download_bytes, response);
return;
}
#endif
#if CONFIG_IS_ENABLED(EFI_PARTITION)
#ifndef CONFIG_FASTBOOT_MMC_USER_SUPPORT
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);
if (!dev_desc)
return;
@ -599,7 +594,20 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
}
#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;
if (is_sparse_image(download_buffer)) {
@ -655,7 +663,7 @@ void fastboot_mmc_erase(const char *cmd, char *response)
/* erase EMMC boot2 */
dev_desc = fastboot_mmc_get_dev(response);
if (dev_desc)
fb_mmc_boot_ops(dev_desc, NULL, 1, 0, response);
fb_mmc_boot_ops(dev_desc, NULL, 2, 0, response);
return;
}
#endif

View file

@ -107,7 +107,12 @@ void print_size(uint64_t size, const char *s)
}
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;
}

View file

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