mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-20 07:58:55 +00:00
Merge branch '2020-05-06-master-imports'
- ARM Juno updates - Assorted bugfixes
This commit is contained in:
commit
69bf66ad8c
17 changed files with 199 additions and 90 deletions
|
@ -1162,6 +1162,17 @@ config TARGET_VEXPRESS64_JUNO
|
|||
bool "Support Versatile Express Juno Development Platform"
|
||||
select ARM64
|
||||
select PL01X_SERIAL
|
||||
select DM
|
||||
select OF_CONTROL
|
||||
select OF_BOARD
|
||||
select CLK
|
||||
select DM_SERIAL
|
||||
select ARM_PSCI_FW
|
||||
select PSCI_RESET
|
||||
select DM
|
||||
select BLK
|
||||
select USB
|
||||
select DM_USB
|
||||
|
||||
config TARGET_LS2080A_EMU
|
||||
bool "Support ls2080a_emu"
|
||||
|
|
|
@ -75,6 +75,15 @@ static unsigned long noncached_start;
|
|||
static unsigned long noncached_end;
|
||||
static unsigned long noncached_next;
|
||||
|
||||
void noncached_set_region(void)
|
||||
{
|
||||
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
|
||||
mmu_set_region_dcache_behaviour(noncached_start,
|
||||
noncached_end - noncached_start,
|
||||
DCACHE_OFF);
|
||||
#endif
|
||||
}
|
||||
|
||||
void noncached_init(void)
|
||||
{
|
||||
phys_addr_t start, end;
|
||||
|
@ -91,9 +100,7 @@ void noncached_init(void)
|
|||
noncached_end = end;
|
||||
noncached_next = start;
|
||||
|
||||
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
|
||||
mmu_set_region_dcache_behaviour(noncached_start, size, DCACHE_OFF);
|
||||
#endif
|
||||
noncached_set_region();
|
||||
}
|
||||
|
||||
phys_addr_t noncached_alloc(size_t size, size_t align)
|
||||
|
|
|
@ -9,4 +9,11 @@ config SYS_VENDOR
|
|||
config SYS_CONFIG_NAME
|
||||
default "vexpress_aemv8a"
|
||||
|
||||
config JUNO_DTB_PART
|
||||
string "NOR flash partition holding DTB"
|
||||
default "board.dtb"
|
||||
help
|
||||
The ARM partition name in the NOR flash memory holding the
|
||||
device tree blob to configure U-Boot.
|
||||
|
||||
endif
|
||||
|
|
|
@ -82,9 +82,64 @@ int dram_init_banksize(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Board specific reset that is system reset.
|
||||
*/
|
||||
#ifdef CONFIG_OF_BOARD
|
||||
#define JUNO_FLASH_SEC_SIZE (256 * 1024)
|
||||
static phys_addr_t find_dtb_in_nor_flash(const char *partname)
|
||||
{
|
||||
phys_addr_t sector = CONFIG_SYS_FLASH_BASE;
|
||||
int i;
|
||||
|
||||
for (i = 0;
|
||||
i < CONFIG_SYS_MAX_FLASH_SECT;
|
||||
i++, sector += JUNO_FLASH_SEC_SIZE) {
|
||||
int len = strlen(partname) + 1;
|
||||
int offs;
|
||||
phys_addr_t imginfo;
|
||||
u32 reg;
|
||||
|
||||
reg = readl(sector + JUNO_FLASH_SEC_SIZE - 0x04);
|
||||
/* This makes up the string "HSLFTOOF" flash footer */
|
||||
if (reg != 0x464F4F54U)
|
||||
continue;
|
||||
reg = readl(sector + JUNO_FLASH_SEC_SIZE - 0x08);
|
||||
if (reg != 0x464C5348U)
|
||||
continue;
|
||||
|
||||
for (offs = 0; offs < 32; offs += 4, len -= 4) {
|
||||
reg = readl(sector + JUNO_FLASH_SEC_SIZE - 0x30 + offs);
|
||||
if (strncmp(partname + offs, (char *)®,
|
||||
len > 4 ? 4 : len))
|
||||
break;
|
||||
|
||||
if (len > 4)
|
||||
continue;
|
||||
|
||||
reg = readl(sector + JUNO_FLASH_SEC_SIZE - 0x10);
|
||||
imginfo = sector + JUNO_FLASH_SEC_SIZE - 0x30 - reg;
|
||||
reg = readl(imginfo + 0x54);
|
||||
|
||||
return CONFIG_SYS_FLASH_BASE +
|
||||
reg * JUNO_FLASH_SEC_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
printf("No DTB found\n");
|
||||
|
||||
return ~0;
|
||||
}
|
||||
|
||||
void *board_fdt_blob_setup(void)
|
||||
{
|
||||
phys_addr_t fdt_rom_addr = find_dtb_in_nor_flash(CONFIG_JUNO_DTB_PART);
|
||||
|
||||
if (fdt_rom_addr == ~0UL)
|
||||
return NULL;
|
||||
|
||||
return (void *)fdt_rom_addr;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Actual reset is done via PSCI. */
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -365,6 +365,34 @@ cleanup:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void menu_display_statusline(struct menu *m)
|
||||
{
|
||||
struct bootmenu_entry *entry;
|
||||
struct bootmenu_data *menu;
|
||||
|
||||
if (menu_default_choice(m, (void *)&entry) < 0)
|
||||
return;
|
||||
|
||||
menu = entry->menu;
|
||||
|
||||
printf(ANSI_CURSOR_POSITION, 1, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
printf(ANSI_CURSOR_POSITION, 2, 1);
|
||||
puts(" *** U-Boot Boot Menu ***");
|
||||
puts(ANSI_CLEAR_LINE_TO_END);
|
||||
printf(ANSI_CURSOR_POSITION, 3, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
|
||||
/* First 3 lines are bootmenu header + 2 empty lines between entries */
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 5, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 6, 1);
|
||||
puts(" Press UP/DOWN to move, ENTER to select");
|
||||
puts(ANSI_CLEAR_LINE_TO_END);
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 7, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
}
|
||||
|
||||
static void bootmenu_show(int delay)
|
||||
{
|
||||
int init = 0;
|
||||
|
@ -396,8 +424,9 @@ static void bootmenu_show(int delay)
|
|||
if (!bootmenu)
|
||||
return;
|
||||
|
||||
menu = menu_create(NULL, bootmenu->delay, 1, bootmenu_print_entry,
|
||||
bootmenu_choice_entry, bootmenu);
|
||||
menu = menu_create(NULL, bootmenu->delay, 1, menu_display_statusline,
|
||||
bootmenu_print_entry, bootmenu_choice_entry,
|
||||
bootmenu);
|
||||
if (!menu) {
|
||||
bootmenu_destroy(bootmenu);
|
||||
return;
|
||||
|
@ -445,34 +474,6 @@ cleanup:
|
|||
#endif
|
||||
}
|
||||
|
||||
void menu_display_statusline(struct menu *m)
|
||||
{
|
||||
struct bootmenu_entry *entry;
|
||||
struct bootmenu_data *menu;
|
||||
|
||||
if (menu_default_choice(m, (void *)&entry) < 0)
|
||||
return;
|
||||
|
||||
menu = entry->menu;
|
||||
|
||||
printf(ANSI_CURSOR_POSITION, 1, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
printf(ANSI_CURSOR_POSITION, 2, 1);
|
||||
puts(" *** U-Boot Boot Menu ***");
|
||||
puts(ANSI_CLEAR_LINE_TO_END);
|
||||
printf(ANSI_CURSOR_POSITION, 3, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
|
||||
/* First 3 lines are bootmenu header + 2 empty lines between entries */
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 5, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 6, 1);
|
||||
puts(" Press UP/DOWN to move, ENTER to select");
|
||||
puts(ANSI_CLEAR_LINE_TO_END);
|
||||
printf(ANSI_CURSOR_POSITION, menu->count + 7, 1);
|
||||
puts(ANSI_CLEAR_LINE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_AUTOBOOT_MENU_SHOW
|
||||
int menu_show(int bootdelay)
|
||||
{
|
||||
|
|
|
@ -20,6 +20,10 @@ void __weak invalidate_icache_all(void)
|
|||
puts("No arch specific invalidate_icache_all available!\n");
|
||||
}
|
||||
|
||||
__weak void noncached_set_region(void)
|
||||
{
|
||||
}
|
||||
|
||||
static int do_icache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
switch (argc) {
|
||||
|
@ -64,6 +68,7 @@ static int do_dcache(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
break;
|
||||
case 1:
|
||||
dcache_enable();
|
||||
noncached_set_region();
|
||||
break;
|
||||
case 2:
|
||||
flush_dcache_all();
|
||||
|
|
|
@ -1237,7 +1237,7 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)
|
|||
* Create a menu and add items for all the labels.
|
||||
*/
|
||||
m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10),
|
||||
cfg->prompt, label_print, NULL, NULL);
|
||||
cfg->prompt, NULL, label_print, NULL, NULL);
|
||||
|
||||
if (!m)
|
||||
return NULL;
|
||||
|
|
|
@ -36,6 +36,7 @@ struct menu {
|
|||
int timeout;
|
||||
char *title;
|
||||
int prompt;
|
||||
void (*display_statusline)(struct menu *);
|
||||
void (*item_data_print)(void *);
|
||||
char *(*item_choice)(void *);
|
||||
void *item_choice_data;
|
||||
|
@ -106,10 +107,6 @@ static inline void *menu_item_destroy(struct menu *m,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
__weak void menu_display_statusline(struct menu *m)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Display a menu so the user can make a choice of an item. First display its
|
||||
* title, if any, and then each item in the menu.
|
||||
|
@ -120,7 +117,8 @@ static inline void menu_display(struct menu *m)
|
|||
puts(m->title);
|
||||
putc('\n');
|
||||
}
|
||||
menu_display_statusline(m);
|
||||
if (m->display_statusline)
|
||||
m->display_statusline(m);
|
||||
|
||||
menu_items_iter(m, menu_item_print, NULL);
|
||||
}
|
||||
|
@ -344,6 +342,9 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data)
|
|||
* timeout. If 1, the user will be prompted for input regardless of the value
|
||||
* of timeout.
|
||||
*
|
||||
* display_statusline - If not NULL, will be called to show a statusline when
|
||||
* the menu is displayed.
|
||||
*
|
||||
* item_data_print - If not NULL, will be called for each item when the menu
|
||||
* is displayed, with the pointer to the item's data passed as the argument.
|
||||
* If NULL, each item's key will be printed instead. Since an item's key is
|
||||
|
@ -360,6 +361,7 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data)
|
|||
* insufficient memory available to create the menu.
|
||||
*/
|
||||
struct menu *menu_create(char *title, int timeout, int prompt,
|
||||
void (*display_statusline)(struct menu *),
|
||||
void (*item_data_print)(void *),
|
||||
char *(*item_choice)(void *),
|
||||
void *item_choice_data)
|
||||
|
@ -374,6 +376,7 @@ struct menu *menu_create(char *title, int timeout, int prompt,
|
|||
m->default_item = NULL;
|
||||
m->prompt = prompt;
|
||||
m->timeout = timeout;
|
||||
m->display_statusline = display_statusline;
|
||||
m->item_data_print = item_data_print;
|
||||
m->item_choice = item_choice;
|
||||
m->item_choice_data = item_choice_data;
|
||||
|
|
|
@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
|
|||
CONFIG_BOOTDELAY=1
|
||||
CONFIG_USE_BOOTARGS=y
|
||||
CONFIG_BOOTARGS="console=ttyAMA0,115200n8 root=/dev/sda2 rw rootwait earlycon=pl011,0x7ff80000 debug user_debug=31 androidboot.hardware=juno loglevel=9"
|
||||
CONFIG_OF_BOARD=y
|
||||
# CONFIG_USE_BOOTCOMMAND is not set
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
|
@ -26,11 +27,11 @@ CONFIG_CMD_ARMFLASH=y
|
|||
CONFIG_CMD_CACHE=y
|
||||
# CONFIG_CMD_MISC is not set
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_CMD_USB=y
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_ENV_IS_IN_FLASH=y
|
||||
CONFIG_ENV_ADDR=0xBFC0000
|
||||
CONFIG_DM=y
|
||||
# CONFIG_MMC is not set
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_NOR_FLASH=y
|
||||
|
@ -41,5 +42,7 @@ CONFIG_SYS_FLASH_CFI=y
|
|||
CONFIG_SMC911X=y
|
||||
CONFIG_SMC911X_BASE=0x018000000
|
||||
CONFIG_SMC911X_32_BIT=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_GENERIC=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_GENERIC=y
|
||||
|
|
2
drivers/cache/cache-l2x0.c
vendored
2
drivers/cache/cache-l2x0.c
vendored
|
@ -36,6 +36,8 @@ static void l2c310_of_parse_and_init(struct udevice *dev)
|
|||
if (dev_read_bool(dev, "arm,shared-override"))
|
||||
saved_reg |= L310_SHARED_ATT_OVERRIDE_ENABLE;
|
||||
|
||||
writel(saved_reg, ®s->pl310_aux_ctrl);
|
||||
|
||||
saved_reg = readl(®s->pl310_tag_latency_ctrl);
|
||||
if (!dev_read_u32_array(dev, "arm,tag-latency", tag, 3))
|
||||
saved_reg |= L310_LATENCY_CTRL_RD(tag[0] - 1) |
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
/* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */
|
||||
|
||||
#include <common.h>
|
||||
/* For get_bus_freq() */
|
||||
#include <clock_legacy.h>
|
||||
#include <dm.h>
|
||||
#include <clk.h>
|
||||
#include <errno.h>
|
||||
#include <watchdog.h>
|
||||
#include <asm/io.h>
|
||||
|
@ -149,21 +152,24 @@ static int pl01x_generic_setbrg(struct pl01x_regs *regs, enum pl01x_type type,
|
|||
unsigned int remainder;
|
||||
unsigned int fraction;
|
||||
|
||||
/*
|
||||
* Set baud rate
|
||||
*
|
||||
* IBRD = UART_CLK / (16 * BAUD_RATE)
|
||||
* FBRD = RND((64 * MOD(UART_CLK,(16 * BAUD_RATE)))
|
||||
* / (16 * BAUD_RATE))
|
||||
*/
|
||||
temp = 16 * baudrate;
|
||||
divider = clock / temp;
|
||||
remainder = clock % temp;
|
||||
temp = (8 * remainder) / baudrate;
|
||||
fraction = (temp >> 1) + (temp & 1);
|
||||
/* Without a valid clock rate we cannot set up the baudrate. */
|
||||
if (clock) {
|
||||
/*
|
||||
* Set baud rate
|
||||
*
|
||||
* IBRD = UART_CLK / (16 * BAUD_RATE)
|
||||
* FBRD = RND((64 * MOD(UART_CLK,(16 * BAUD_RATE)))
|
||||
* / (16 * BAUD_RATE))
|
||||
*/
|
||||
temp = 16 * baudrate;
|
||||
divider = clock / temp;
|
||||
remainder = clock % temp;
|
||||
temp = (8 * remainder) / baudrate;
|
||||
fraction = (temp >> 1) + (temp & 1);
|
||||
|
||||
writel(divider, ®s->pl011_ibrd);
|
||||
writel(fraction, ®s->pl011_fbrd);
|
||||
writel(divider, ®s->pl011_ibrd);
|
||||
writel(fraction, ®s->pl011_fbrd);
|
||||
}
|
||||
|
||||
pl011_set_line_control(regs);
|
||||
/* Finally, enable the UART */
|
||||
|
@ -337,17 +343,28 @@ static const struct udevice_id pl01x_serial_id[] ={
|
|||
{}
|
||||
};
|
||||
|
||||
#ifndef CONFIG_PL011_CLOCK
|
||||
#define CONFIG_PL011_CLOCK 0
|
||||
#endif
|
||||
|
||||
int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
|
||||
{
|
||||
struct pl01x_serial_platdata *plat = dev_get_platdata(dev);
|
||||
struct clk clk;
|
||||
fdt_addr_t addr;
|
||||
int ret;
|
||||
|
||||
addr = devfdt_get_addr(dev);
|
||||
if (addr == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
plat->base = addr;
|
||||
plat->clock = dev_read_u32_default(dev, "clock", 1);
|
||||
plat->clock = dev_read_u32_default(dev, "clock", CONFIG_PL011_CLOCK);
|
||||
ret = clk_get_by_index(dev, 0, &clk);
|
||||
if (!ret) {
|
||||
clk_enable(&clk);
|
||||
plat->clock = clk_get_rate(&clk);
|
||||
}
|
||||
plat->type = dev_get_driver_data(dev);
|
||||
plat->skip_init = dev_read_bool(dev, "skip-init");
|
||||
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
#ifndef __VEXPRESS_AEMV8A_H
|
||||
#define __VEXPRESS_AEMV8A_H
|
||||
|
||||
#ifdef CONFIG_TARGET_VEXPRESS64_BASE_FVP
|
||||
#ifndef CONFIG_SEMIHOSTING
|
||||
#error CONFIG_TARGET_VEXPRESS64_BASE_FVP requires CONFIG_SEMIHOSTING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CONFIG_REMAKE_ELF
|
||||
|
||||
/* Link Definitions */
|
||||
|
@ -102,7 +96,7 @@
|
|||
|
||||
/* PL011 Serial Configuration */
|
||||
#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
|
||||
#define CONFIG_PL011_CLOCK 7273800
|
||||
#define CONFIG_PL011_CLOCK 7372800
|
||||
#else
|
||||
#define CONFIG_PL011_CLOCK 24000000
|
||||
#endif
|
||||
|
@ -138,35 +132,33 @@
|
|||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
"kernel_name=norkern\0" \
|
||||
"kernel_alt_name=Image\0" \
|
||||
"kernel_addr=0x80080000\0" \
|
||||
"initrd_name=ramdisk.img\0" \
|
||||
"initrd_addr=0x84000000\0" \
|
||||
"kernel_addr_r=0x80080000\0" \
|
||||
"ramdisk_name=ramdisk.img\0" \
|
||||
"ramdisk_addr_r=0x88000000\0" \
|
||||
"fdtfile=board.dtb\0" \
|
||||
"fdt_alt_name=juno\0" \
|
||||
"fdt_addr=0x83000000\0" \
|
||||
"fdt_high=0xffffffffffffffff\0" \
|
||||
"initrd_high=0xffffffffffffffff\0" \
|
||||
"fdt_addr_r=0x80000000\0" \
|
||||
|
||||
/* Copy the kernel and FDT to DRAM memory and boot */
|
||||
#define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr} ; " \
|
||||
#define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr_r} ;"\
|
||||
"if test $? -eq 1; then "\
|
||||
" echo Loading ${kernel_alt_name} instead of "\
|
||||
"${kernel_name}; "\
|
||||
" afs load ${kernel_alt_name} ${kernel_addr};"\
|
||||
" afs load ${kernel_alt_name} ${kernel_addr_r};"\
|
||||
"fi ; "\
|
||||
"afs load ${fdtfile} ${fdt_addr} ; " \
|
||||
"afs load ${fdtfile} ${fdt_addr_r} ;"\
|
||||
"if test $? -eq 1; then "\
|
||||
" echo Loading ${fdt_alt_name} instead of "\
|
||||
"${fdtfile}; "\
|
||||
" afs load ${fdt_alt_name} ${fdt_addr}; "\
|
||||
" afs load ${fdt_alt_name} ${fdt_addr_r}; "\
|
||||
"fi ; "\
|
||||
"fdt addr ${fdt_addr}; fdt resize; " \
|
||||
"if afs load ${initrd_name} ${initrd_addr} ; "\
|
||||
"fdt addr ${fdt_addr_r}; fdt resize; " \
|
||||
"if afs load ${ramdisk_name} ${ramdisk_addr_r} ; "\
|
||||
"then "\
|
||||
" setenv initrd_param ${initrd_addr}; "\
|
||||
" else setenv initrd_param -; "\
|
||||
" setenv ramdisk_param ${ramdisk_addr_r}; "\
|
||||
" else setenv ramdisk_param -; "\
|
||||
"fi ; " \
|
||||
"booti ${kernel_addr} ${initrd_param} ${fdt_addr}"
|
||||
"booti ${kernel_addr_r} ${ramdisk_param} ${fdt_addr_r}"
|
||||
|
||||
|
||||
#elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
|
||||
|
@ -221,6 +213,11 @@
|
|||
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT
|
||||
#define CONFIG_SYS_MAX_FLASH_BANKS 1
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_HCD
|
||||
#define CONFIG_USB_OHCI_NEW
|
||||
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
|
||||
#endif
|
||||
|
||||
#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
|
||||
#define FLASH_MAX_SECTOR_SIZE 0x00040000
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#ifndef __EEPROM_LEGACY_H
|
||||
#define __EEPROM_LEGACY_H
|
||||
|
||||
#ifdef CONFIG_CMD_EEPROM
|
||||
#if defined(CONFIG_CMD_EEPROM) || defined(CONFIG_ENV_IS_IN_EEPROM)
|
||||
void eeprom_init(int bus);
|
||||
int eeprom_read(uint dev_addr, uint offset, uchar *buffer, uint cnt);
|
||||
int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
|
||||
|
@ -17,8 +17,8 @@ int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
|
|||
* some macros here so we don't have to touch every one of those uses
|
||||
*/
|
||||
#define eeprom_init(bus)
|
||||
#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
|
||||
#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
|
||||
#define eeprom_read(dev_addr, offset, buffer, cnt) (-ENOSYS)
|
||||
#define eeprom_write(dev_addr, offset, buffer, cnt) (-ENOSYS)
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
struct menu;
|
||||
|
||||
struct menu *menu_create(char *title, int timeout, int prompt,
|
||||
void (*display_statusline)(struct menu *),
|
||||
void (*item_data_print)(void *),
|
||||
char *(*item_choice)(void *),
|
||||
void *item_choice_data);
|
||||
|
@ -16,7 +17,6 @@ int menu_default_set(struct menu *m, char *item_key);
|
|||
int menu_get_choice(struct menu *m, void **choice);
|
||||
int menu_item_add(struct menu *m, char *item_key, void *item_data);
|
||||
int menu_destroy(struct menu *m);
|
||||
void menu_display_statusline(struct menu *m);
|
||||
int menu_default_choice(struct menu *m, void **choice);
|
||||
|
||||
/**
|
||||
|
|
|
@ -262,8 +262,8 @@ int rsa_mod_exp_sw(const uint8_t *sig, uint32_t sig_len,
|
|||
if (!prop->public_exponent)
|
||||
key.exponent = RSA_DEFAULT_PUBEXP;
|
||||
else
|
||||
key.exponent =
|
||||
fdt64_to_cpu(*((uint64_t *)(prop->public_exponent)));
|
||||
rsa_convert_big_endian((uint32_t *)&key.exponent,
|
||||
prop->public_exponent, 2);
|
||||
|
||||
if (!key.len || !prop->modulus || !prop->rr) {
|
||||
debug("%s: Missing RSA key info", __func__);
|
||||
|
|
|
@ -35,7 +35,7 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY}
|
|||
${OBJCOPY} -O binary -j ".rodata.default_environment" ${ENV_OBJ_FILE_COPY}
|
||||
|
||||
# Replace default '\0' with '\n' and sort entries
|
||||
tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort -u
|
||||
tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort --field-separator== -k1,1 --stable
|
||||
|
||||
rm ${ENV_OBJ_FILE_COPY}
|
||||
|
||||
|
|
|
@ -435,7 +435,7 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
|
|||
int image_number;
|
||||
int align_size;
|
||||
|
||||
align_size = params->bl_len ? params->bl_len : 1;
|
||||
align_size = params->bl_len ? params->bl_len : 4;
|
||||
fd = mmap_fdt(params->cmdname, fname, 0, &fdt, &sbuf, false, false);
|
||||
if (fd < 0)
|
||||
return -EIO;
|
||||
|
@ -493,6 +493,7 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
|
|||
fdt_pack(fdt);
|
||||
|
||||
new_size = fdt_totalsize(fdt);
|
||||
new_size = ALIGN(new_size, align_size);
|
||||
fdt_set_totalsize(fdt, new_size);
|
||||
debug("Size reduced from %x to %x\n", fit_size, fdt_totalsize(fdt));
|
||||
debug("External data size %x\n", buf_ptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue