mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
board: qca: arm: common: cmd_bootqca: Update config_selection sequence
Instead of updating the config_names in fdt_blob, the config_names are maintained locally this avoids the fdt_blob resizing Change-Id: Ib1d6fecd973394363012564a8fc9e84d36fc7462 Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
This commit is contained in:
parent
d7746c960a
commit
2bb41b0559
18 changed files with 216 additions and 250 deletions
|
|
@ -155,4 +155,15 @@ extern int dump_entries_s;
|
|||
#define SPI_MAX_ADDR_LEN 4
|
||||
|
||||
#define MAX_BOOT_ARGS_SIZE 64
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
struct config_list {
|
||||
char entry[CONFIG_NAME_MAX_ENTRIES][CONFIG_NAME_MAX_LEN];
|
||||
uint32_t no_of_entries;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
void init_config_list(void);
|
||||
void add_config_entry(const char *config);
|
||||
void add_config_list_from_fdt(void);
|
||||
#endif
|
||||
#endif /* __QCA_COMMON_H_ */
|
||||
|
|
|
|||
|
|
@ -54,4 +54,7 @@ config ART_COMPRESSED
|
|||
config BOARD_TYPES
|
||||
bool "Support board_type member in global data"
|
||||
default y
|
||||
|
||||
config LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
bool "List of config names support"
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -60,4 +60,7 @@ config DPR_EXECUTE
|
|||
config BOARD_TYPES
|
||||
bool "Support board_type member in global data"
|
||||
default y
|
||||
|
||||
config LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
bool "List of config names support"
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@ config BOARD_TYPES
|
|||
bool "Support board_type member in global data"
|
||||
default y
|
||||
|
||||
config LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
bool "List of config names support"
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -34,3 +34,6 @@ config QCA8075_PHY
|
|||
config BOARD_TYPES
|
||||
bool "Support board_type member in global data"
|
||||
default y
|
||||
|
||||
config LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
bool "List of config names support"
|
||||
|
|
|
|||
|
|
@ -21,4 +21,7 @@ config IPQ9574_QCA8075_PHY
|
|||
config BOARD_TYPES
|
||||
bool "Support board_type member in global data"
|
||||
default y
|
||||
|
||||
config LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
bool "List of config names support"
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ extern struct sdhci_host mmc_host;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
struct config_list config_entries;
|
||||
#endif
|
||||
|
||||
env_t *env_ptr;
|
||||
char *env_name_spec;
|
||||
int (*saveenv)(void);
|
||||
|
|
@ -598,3 +602,50 @@ __weak int smem_read_cpu_count()
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
void add_config_entry(const char *config)
|
||||
{
|
||||
if (strlen(config) < CONFIG_NAME_MAX_LEN) {
|
||||
if (config_entries.no_of_entries < CONFIG_NAME_MAX_ENTRIES)
|
||||
strlcpy(config_entries.entry
|
||||
[config_entries.no_of_entries++],
|
||||
config, CONFIG_NAME_MAX_LEN);
|
||||
else
|
||||
printf("add config entry failed ... \n");
|
||||
} else {
|
||||
printf("config: %s exceeds max len(%d) ...\n",
|
||||
config,
|
||||
CONFIG_NAME_MAX_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
void init_config_list(void)
|
||||
{
|
||||
memset(&config_entries, 0, sizeof(config_entries));
|
||||
}
|
||||
|
||||
void add_config_list_from_fdt(void)
|
||||
{
|
||||
int i, strings_count;
|
||||
const char *config = NULL;
|
||||
|
||||
strings_count = fdt_count_strings(gd->fdt_blob, 0,
|
||||
"config_name");
|
||||
if (!strings_count) {
|
||||
printf("Failed to get config_name\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (strings_count > CONFIG_NAME_MAX_ENTRIES) {
|
||||
printf("config_name entries exceeds max len\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < strings_count; i++) {
|
||||
fdt_get_string_index(gd->fdt_blob, 0,
|
||||
"config_name", i, &config);
|
||||
add_config_entry(config);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -87,6 +87,9 @@ typedef struct {
|
|||
#endif
|
||||
|
||||
extern bootm_headers_t images; /* pointers to os/initrd/fdt images */
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
extern struct config_list config_entries;
|
||||
#endif
|
||||
|
||||
static int boot_os(int argc, char *const argv[])
|
||||
{
|
||||
|
|
@ -284,7 +287,12 @@ int config_select(unsigned int addr, char *rcmd, int rcmd_size)
|
|||
return 0;
|
||||
}
|
||||
} else {
|
||||
strings_count = fdt_count_strings(gd->fdt_blob, 0, "config_name");
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
strings_count = config_entries.no_of_entries;
|
||||
#else
|
||||
strings_count = fdt_count_strings(gd->fdt_blob, 0,
|
||||
"config_name");
|
||||
#endif
|
||||
|
||||
if (!strings_count) {
|
||||
printf("Failed to get config_name\n");
|
||||
|
|
@ -292,9 +300,12 @@ int config_select(unsigned int addr, char *rcmd, int rcmd_size)
|
|||
}
|
||||
|
||||
for (i = 0; i < strings_count; i++) {
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
config = config_entries.entry[i];
|
||||
#else
|
||||
fdt_get_string_index(gd->fdt_blob, 0, "config_name",
|
||||
i, &config);
|
||||
|
||||
#endif
|
||||
snprintf((char *)dtb_config_name,
|
||||
sizeof(dtb_config_name), "%s", config);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@
|
|||
|
||||
#define TCSR_SOC_HW_VERSION_REG 0x194D000
|
||||
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
|
||||
ipq_gmac_board_cfg_t gmac_cfg[CONFIG_IPQ_NO_MACS];
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
|
@ -2144,44 +2142,15 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
init_config_list();
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ5018_AP_MP05_1:
|
||||
config_list[config_nos++] = "config@mp05.1";
|
||||
config_list[config_nos++] = "config-mp05.1";
|
||||
add_config_entry("config@mp05.1");
|
||||
add_config_entry("config-mp05.1");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config_nos)
|
||||
{
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
default:
|
||||
add_config_list_from_fdt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
#include <usb.h>
|
||||
#endif
|
||||
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
#define FLASH_SEL_BIT 7
|
||||
#define LINUX_NAND_DTS "/soc/nand@79b0000/"
|
||||
#define LINUX6_1_NAND_DTS "/soc@0/nand@79b0000/"
|
||||
|
|
@ -867,77 +866,48 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
init_config_list();
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_2_C2:
|
||||
config_list[config_nos++] = "config@mi01.2-c2";
|
||||
config_list[config_nos++] = "config-mi01.2-c2";
|
||||
config_list[config_nos++] = "config@rdp484";
|
||||
config_list[config_nos++] = "config-rdp484";
|
||||
add_config_entry("config@mi01.2-c2");
|
||||
add_config_entry("config-mi01.2-c2");
|
||||
add_config_entry("config@rdp484");
|
||||
add_config_entry("config-rdp484");
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_3_C2:
|
||||
config_list[config_nos++] = "config@mi01.3-c2";
|
||||
config_list[config_nos++] = "config-mi01.3-c2";
|
||||
config_list[config_nos++] = "config@rdp477";
|
||||
config_list[config_nos++] = "config-rdp477";
|
||||
add_config_entry("config@mi01.3-c2");
|
||||
add_config_entry("config-mi01.3-c2");
|
||||
add_config_entry("config@rdp477");
|
||||
add_config_entry("config-rdp477");
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_3_C3:
|
||||
config_list[config_nos++] = "config@mi01.3-c3";
|
||||
config_list[config_nos++] = "config-mi01.3-c3";
|
||||
config_list[config_nos++] = "config@rdp486";
|
||||
config_list[config_nos++] = "config-rdp486";
|
||||
add_config_entry("config@mi01.3-c3");
|
||||
add_config_entry("config-mi01.3-c3");
|
||||
add_config_entry("config@rdp486");
|
||||
add_config_entry("config-rdp486");
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_7:
|
||||
config_list[config_nos++] = "config@mi01.7";
|
||||
config_list[config_nos++] = "config-mi01.7";
|
||||
config_list[config_nos++] = "config@rdp473";
|
||||
config_list[config_nos++] = "config-rdp473";
|
||||
add_config_entry("config@mi01.7");
|
||||
add_config_entry("config-mi01.7");
|
||||
add_config_entry("config@rdp473");
|
||||
add_config_entry("config-rdp473");
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI04_1_C2:
|
||||
config_list[config_nos++] = "config@mi04.1-c2";
|
||||
config_list[config_nos++] = "config-mi04.1-c2";
|
||||
config_list[config_nos++] = "config@rdp478";
|
||||
config_list[config_nos++] = "config-rdp478";
|
||||
config_list[config_nos++] = "config@1";
|
||||
add_config_entry("config@mi04.1-c2");
|
||||
add_config_entry("config-mi04.1-c2");
|
||||
add_config_entry("config@rdp478");
|
||||
add_config_entry("config-rdp478");
|
||||
add_config_entry("config@1");
|
||||
break;
|
||||
case MACH_TYPE_IPQ5332_AP_MI01_14:
|
||||
config_list[config_nos++] = "config@mi01.14";
|
||||
config_list[config_nos++] = "config-mi01.14";
|
||||
config_list[config_nos++] = "config@rdp481";
|
||||
config_list[config_nos++] = "config-rdp481";
|
||||
add_config_entry("config@mi01.14");
|
||||
add_config_entry("config-mi01.14");
|
||||
add_config_entry("config@rdp481");
|
||||
add_config_entry("config-rdp481");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config_nos)
|
||||
{
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
default:
|
||||
add_config_list_from_fdt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
|
||||
#define TCSR_SOC_HW_VERSION_REG 0x194D000
|
||||
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
struct sdhci_host mmc_host;
|
||||
extern int ipq6018_edma_init(void *cfg);
|
||||
|
|
@ -1235,56 +1233,27 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
init_config_list();
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ6018_AP_CP01_C2:
|
||||
config_list[config_nos++] = "config@cp01-c2";
|
||||
config_list[config_nos++] = "config-cp01-c2";
|
||||
add_config_entry("config@cp01-c2");
|
||||
add_config_entry("config-cp01-c2");
|
||||
break;
|
||||
case MACH_TYPE_IPQ6018_AP_CP01_C3:
|
||||
config_list[config_nos++] = "config@cp01-c3";
|
||||
config_list[config_nos++] = "config-cp01-c3";
|
||||
add_config_entry("config@cp01-c3");
|
||||
add_config_entry("config-cp01-c3");
|
||||
break;
|
||||
case MACH_TYPE_IPQ6018_AP_CP01_C4:
|
||||
config_list[config_nos++] = "config@cp01-c4";
|
||||
config_list[config_nos++] = "config-cp01-c4";
|
||||
add_config_entry("config@cp01-c4");
|
||||
add_config_entry("config-cp01-c4");
|
||||
break;
|
||||
case MACH_TYPE_IPQ6018_AP_CP01_C5:
|
||||
config_list[config_nos++] = "config@cp01-c5";
|
||||
config_list[config_nos++] = "config-cp01-c5";
|
||||
add_config_entry("config@cp01-c5");
|
||||
add_config_entry("config-cp01-c5");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config_nos)
|
||||
{
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
default:
|
||||
add_config_list_from_fdt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
#define TCSR_SOC_HW_VERSION_REG 0x194D000
|
||||
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define GCNT_PSHOLD 0x004AB000
|
||||
|
|
@ -1383,60 +1381,31 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
init_config_list();
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ807x_AP_HK01_C3:
|
||||
config_list[config_nos++] = "config@hk01.c3";
|
||||
config_list[config_nos++] = "config-hk01.c3";
|
||||
add_config_entry("config@hk01.c3");
|
||||
add_config_entry("config-hk01.c3");
|
||||
break;
|
||||
case MACH_TYPE_IPQ807x_AP_HK01_C6:
|
||||
config_list[config_nos++] = "config@hk01.c6";
|
||||
config_list[config_nos++] = "config-hk01.c6";
|
||||
add_config_entry("config@hk01.c6");
|
||||
add_config_entry("config-hk01.c6");
|
||||
break;
|
||||
case MACH_TYPE_IPQ807x_AP_HK12_C1:
|
||||
config_list[config_nos++] = "config@hk12";
|
||||
config_list[config_nos++] = "config-hk12";
|
||||
add_config_entry("config@hk12");
|
||||
add_config_entry("config-hk12");
|
||||
break;
|
||||
case MACH_TYPE_IPQ807x_AP_AC02:
|
||||
config_list[config_nos++] = "config@ac02";
|
||||
config_list[config_nos++] = "config-ac02";
|
||||
add_config_entry("config@ac02");
|
||||
add_config_entry("config-ac02");
|
||||
break;
|
||||
case MACH_TYPE_IPQ807x_AP_OAK03:
|
||||
config_list[config_nos++] = "config@oak03";
|
||||
config_list[config_nos++] = "config-oak03";
|
||||
add_config_entry("config@oak03");
|
||||
add_config_entry("config-oak03");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config_nos)
|
||||
{
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
default:
|
||||
add_config_list_from_fdt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#define DLOAD_MAGIC_COOKIE 0x10
|
||||
#define DLOAD_DISABLED 0x40
|
||||
#define CONFIG_NAME_MAX_LEN 128
|
||||
|
||||
#define LINUX6_1_NAND_DTS "/soc@0/nand@79b0000/"
|
||||
#define LINUX6_1_MMC_DTS "/soc@0/mmc@7804000/"
|
||||
|
|
@ -1402,94 +1401,65 @@ unsigned int get_dts_machid(unsigned int machid)
|
|||
|
||||
void ipq_uboot_fdt_fixup(void)
|
||||
{
|
||||
int ret, len = 0, config_nos = 0;
|
||||
char config[CONFIG_NAME_MAX_LEN];
|
||||
char *config_list[6] = { NULL };
|
||||
|
||||
init_config_list();
|
||||
switch (gd->bd->bi_arch_number)
|
||||
{
|
||||
case MACH_TYPE_IPQ9574_EMULATION:
|
||||
config_list[config_nos++] = "config@emulation-fbc";
|
||||
config_list[config_nos++] = "config-emulation-fbc";
|
||||
add_config_entry("config@emulation-fbc");
|
||||
add_config_entry("config-emulation-fbc");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C5:
|
||||
config_list[config_nos++] = "config@al02-c5";
|
||||
config_list[config_nos++] = "config-al02-c5";
|
||||
add_config_entry("config@al02-c5");
|
||||
add_config_entry("config-al02-c5");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C6:
|
||||
config_list[config_nos++] = "config@al02-c6";
|
||||
config_list[config_nos++] = "config-al02-c6";
|
||||
config_list[config_nos++] = "config@rdp449";
|
||||
config_list[config_nos++] = "config-rdp449";
|
||||
add_config_entry("config@al02-c6");
|
||||
add_config_entry("config-al02-c6");
|
||||
add_config_entry("config@rdp449");
|
||||
add_config_entry("config-rdp449");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C11:
|
||||
config_list[config_nos++] = "config@al02-c11";
|
||||
config_list[config_nos++] = "config-al02-c11";
|
||||
config_list[config_nos++] = "config@rdp455";
|
||||
config_list[config_nos++] = "config-rdp455";
|
||||
add_config_entry("config@al02-c11");
|
||||
add_config_entry("config-al02-c11");
|
||||
add_config_entry("config@rdp455");
|
||||
add_config_entry("config-rdp455");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C12:
|
||||
config_list[config_nos++] = "config@al02-c12";
|
||||
config_list[config_nos++] = "config-al02-c12";
|
||||
config_list[config_nos++] = "config@rdp455";
|
||||
config_list[config_nos++] = "config-rdp455";
|
||||
add_config_entry("config@al02-c12");
|
||||
add_config_entry("config-al02-c12");
|
||||
add_config_entry("config@rdp455");
|
||||
add_config_entry("config-rdp455");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C14:
|
||||
config_list[config_nos++] = "config-al02-c14";
|
||||
config_list[config_nos++] = "config@al02-c14";
|
||||
add_config_entry("config-al02-c14");
|
||||
add_config_entry("config@al02-c14");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C15:
|
||||
config_list[config_nos++] = "config@al02-c15";
|
||||
config_list[config_nos++] = "config-al02-c15";
|
||||
config_list[config_nos++] = "config@rdp457";
|
||||
config_list[config_nos++] = "config-rdp457";
|
||||
add_config_entry("config@al02-c15");
|
||||
add_config_entry("config-al02-c15");
|
||||
add_config_entry("config@rdp457");
|
||||
add_config_entry("config-rdp457");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C16:
|
||||
config_list[config_nos++] = "config@al02-c16";
|
||||
config_list[config_nos++] = "config-al02-c16";
|
||||
config_list[config_nos++] = "config@rdp456";
|
||||
config_list[config_nos++] = "config-rdp456";
|
||||
add_config_entry("config@al02-c16");
|
||||
add_config_entry("config-al02-c16");
|
||||
add_config_entry("config@rdp456");
|
||||
add_config_entry("config-rdp456");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL02_C20:
|
||||
config_list[config_nos++] = "config@al02-c20";
|
||||
config_list[config_nos++] = "config-al02-c20";
|
||||
config_list[config_nos++] = "config@rdp467";
|
||||
config_list[config_nos++] = "config-rdp467";
|
||||
add_config_entry("config@al02-c20");
|
||||
add_config_entry("config-al02-c20");
|
||||
add_config_entry("config@rdp467");
|
||||
add_config_entry("config-rdp467");
|
||||
break;
|
||||
case MACH_TYPE_IPQ9574_AP_AL03_C2:
|
||||
config_list[config_nos++] = "config@al03-c2";
|
||||
config_list[config_nos++] = "config-al03-c2";
|
||||
config_list[config_nos++] = "config@rdp458";
|
||||
config_list[config_nos++] = "config-rdp458";
|
||||
add_config_entry("config@al03-c2");
|
||||
add_config_entry("config-al03-c2");
|
||||
add_config_entry("config@rdp458");
|
||||
add_config_entry("config-rdp458");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config_nos)
|
||||
{
|
||||
while (config_nos--) {
|
||||
strlcpy(&config[len], config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN - len);
|
||||
len += strnlen(config_list[config_nos],
|
||||
CONFIG_NAME_MAX_LEN) + 1;
|
||||
if (len > CONFIG_NAME_MAX_LEN) {
|
||||
printf("skipping uboot fdt fixup err: "
|
||||
"config name len-overflow\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Open in place with a new length.
|
||||
*/
|
||||
ret = fdt_open_into(gd->fdt_blob, (void *)gd->fdt_blob,
|
||||
fdt_totalsize(gd->fdt_blob) + len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: Cannot expand FDT: %s\n", fdt_strerror(ret));
|
||||
|
||||
ret = fdt_setprop((void *)gd->fdt_blob, 0, "config_name",
|
||||
config, len);
|
||||
if (ret)
|
||||
printf("uboot-fdt-fixup: unable to set config_name(%d)\n", ret);
|
||||
default:
|
||||
add_config_list_from_fdt();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -433,4 +433,11 @@ extern loff_t board_env_size;
|
|||
|
||||
/*#define CONFIG_IPQ_BT_SUPPORT*/
|
||||
|
||||
#define CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
#define CONFIG_NAME_MAX_ENTRIES 2
|
||||
#define CONFIG_NAME_MAX_LEN 32
|
||||
#endif
|
||||
|
||||
#endif /* _IPQ5018_H */
|
||||
|
|
|
|||
|
|
@ -498,4 +498,11 @@ extern loff_t board_env_size;
|
|||
#define CONFIG_BITBANGMII_MULTI
|
||||
#endif
|
||||
|
||||
#define CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
#define CONFIG_NAME_MAX_ENTRIES 5
|
||||
#define CONFIG_NAME_MAX_LEN 32
|
||||
#endif
|
||||
|
||||
#endif /* _IPQ5332_H */
|
||||
|
|
|
|||
|
|
@ -369,4 +369,11 @@ extern loff_t board_env_size;
|
|||
#define CONFIG_IPQ_TZT
|
||||
#define CONFIG_IPQ_FDT_FIXUP
|
||||
|
||||
#define CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
#define CONFIG_NAME_MAX_ENTRIES 2
|
||||
#define CONFIG_NAME_MAX_LEN 32
|
||||
#endif
|
||||
|
||||
#endif /* _IPQ6018_H */
|
||||
|
|
|
|||
|
|
@ -355,5 +355,10 @@ extern loff_t board_env_size;
|
|||
#undef CONFIG_IPQ_ROOTFS_AUTH
|
||||
#define CONFIG_SILENT_CONSOLE
|
||||
|
||||
#endif /* _IPQCDP_H */
|
||||
#define CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
#define CONFIG_NAME_MAX_ENTRIES 4
|
||||
#define CONFIG_NAME_MAX_LEN 32
|
||||
#endif
|
||||
#endif /* _IPQCDP_H */
|
||||
|
|
|
|||
|
|
@ -410,4 +410,10 @@ extern loff_t board_env_size;
|
|||
#define CONFIG_BITBANGMII_MULTI
|
||||
#endif
|
||||
|
||||
#define CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
|
||||
#ifdef CONFIG_LIST_OF_CONFIG_NAMES_SUPPORT
|
||||
#define CONFIG_NAME_MAX_ENTRIES 4
|
||||
#define CONFIG_NAME_MAX_LEN 32
|
||||
#endif
|
||||
#endif /* _IPQ9574_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue