blob: e45cfd5d8a3885683dd6b1d0eea03084dc6dfdb5 [file] [log] [blame]
Neil Armstrong40513892024-09-20 15:33:33 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2016 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 */
6
7#include <dm.h>
8#include <env.h>
9#include <init.h>
10#include <net.h>
11#include <efi_loader.h>
12#include <asm/io.h>
13#include <asm/arch/eth.h>
14
15struct efi_fw_image fw_images[] = {
16 {
17 .fw_name = u"AML_A311D_CC_BOOT",
18 .image_index = 1,
19 },
20};
21
22struct efi_capsule_update_info update_info = {
23 .dfu_string = "sf 0:0=u-boot-bin raw 0 0x10000",
24 .num_images = ARRAY_SIZE(fw_images),
25 .images = fw_images,
26};
27
28
29#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
30void set_dfu_alt_info(char *interface, char *devstr)
31{
32 if (strcmp(interface, "ram") == 0)
33 env_set("dfu_alt_info", "fitimage ram 0x08080000 0x4000000");
34 else if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
35 env_set("dfu_alt_info", update_info.dfu_string);
36}
37#endif
38
39int misc_init_r(void)
40{
41 meson_generate_serial_ethaddr();
42
43 return 0;
44}