mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-09 16:56:58 +02:00
Merge branch '2023-05-16-remove-misuse-of-env-is-nowhere' into next
To quote the author:
When using a list of writeable variables, the initial values come from
the built-in default environment since commit 5ab8105836
("env: Complete generic support for writable list"). Remove unnecessary
misuse of the env is nowhere driver as default environment.
This commit is contained in:
commit
f9c58e0f1a
@ -30,7 +30,6 @@
|
|||||||
#include <bmp_logo.h>
|
#include <bmp_logo.h>
|
||||||
#include <dm/root.h>
|
#include <dm/root.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <env_internal.h>
|
|
||||||
#include <i2c_eeprom.h>
|
#include <i2c_eeprom.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <micrel.h>
|
#include <micrel.h>
|
||||||
@ -529,22 +528,3 @@ int embedded_dtb_select(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum env_location env_get_location(enum env_operation op, int prio)
|
|
||||||
{
|
|
||||||
if (op == ENVOP_SAVE || op == ENVOP_ERASE)
|
|
||||||
return ENVL_SPI_FLASH;
|
|
||||||
|
|
||||||
switch (prio) {
|
|
||||||
case 0:
|
|
||||||
return ENVL_NOWHERE;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
return ENVL_SPI_FLASH;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return ENVL_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ENVL_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include <dm/platform_data/serial_mxc.h>
|
#include <dm/platform_data/serial_mxc.h>
|
||||||
#include <dm/device-internal.h>
|
#include <dm/device-internal.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <env_internal.h>
|
|
||||||
#include <hang.h>
|
#include <hang.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
@ -236,22 +235,6 @@ static void unset_early_gpio(void)
|
|||||||
gpio_set_value(GPIO_TOUCH_RESET, 1);
|
gpio_set_value(GPIO_TOUCH_RESET, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum env_location env_get_location(enum env_operation op, int prio)
|
|
||||||
{
|
|
||||||
if (op == ENVOP_SAVE || op == ENVOP_ERASE)
|
|
||||||
return ENVL_MMC;
|
|
||||||
|
|
||||||
switch (prio) {
|
|
||||||
case 0:
|
|
||||||
return ENVL_NOWHERE;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
return ENVL_MMC;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ENVL_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
int board_late_init(void)
|
int board_late_init(void)
|
||||||
{
|
{
|
||||||
struct board_info *binfo = detect_board();
|
struct board_info *binfo = detect_board();
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clock_legacy.h>
|
#include <clock_legacy.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
#include <env_internal.h>
|
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
@ -222,19 +221,3 @@ int get_serial_clock(void)
|
|||||||
{
|
{
|
||||||
return 333333330;
|
return 333333330;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum env_location env_get_location(enum env_operation op, int prio)
|
|
||||||
{
|
|
||||||
if (op == ENVOP_SAVE || op == ENVOP_ERASE)
|
|
||||||
return ENVL_FLASH;
|
|
||||||
|
|
||||||
switch (prio) {
|
|
||||||
case 0:
|
|
||||||
return ENVL_NOWHERE;
|
|
||||||
case 1:
|
|
||||||
return ENVL_FLASH;
|
|
||||||
default:
|
|
||||||
return ENVL_UNKNOWN;
|
|
||||||
}
|
|
||||||
return ENVL_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
@ -59,7 +59,6 @@ CONFIG_OF_CONTROL=y
|
|||||||
CONFIG_DTB_RESELECT=y
|
CONFIG_DTB_RESELECT=y
|
||||||
CONFIG_MULTI_DTB_FIT=y
|
CONFIG_MULTI_DTB_FIT=y
|
||||||
CONFIG_ENV_OVERWRITE=y
|
CONFIG_ENV_OVERWRITE=y
|
||||||
CONFIG_ENV_IS_NOWHERE=y
|
|
||||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||||
CONFIG_ENV_SPI_EARLY=y
|
CONFIG_ENV_SPI_EARLY=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
|
@ -59,7 +59,6 @@ CONFIG_OF_CONTROL=y
|
|||||||
CONFIG_DTB_RESELECT=y
|
CONFIG_DTB_RESELECT=y
|
||||||
CONFIG_MULTI_DTB_FIT=y
|
CONFIG_MULTI_DTB_FIT=y
|
||||||
CONFIG_ENV_OVERWRITE=y
|
CONFIG_ENV_OVERWRITE=y
|
||||||
CONFIG_ENV_IS_NOWHERE=y
|
|
||||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||||
CONFIG_ENV_SPI_EARLY=y
|
CONFIG_ENV_SPI_EARLY=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
|
@ -77,7 +77,6 @@ CONFIG_SPL_OF_CONTROL=y
|
|||||||
CONFIG_MULTI_DTB_FIT=y
|
CONFIG_MULTI_DTB_FIT=y
|
||||||
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
|
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
|
||||||
CONFIG_ENV_OVERWRITE=y
|
CONFIG_ENV_OVERWRITE=y
|
||||||
CONFIG_ENV_IS_NOWHERE=y
|
|
||||||
CONFIG_ENV_IS_IN_MMC=y
|
CONFIG_ENV_IS_IN_MMC=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
CONFIG_SYS_MMC_ENV_PART=1
|
CONFIG_SYS_MMC_ENV_PART=1
|
||||||
|
@ -68,7 +68,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe000000.nor_flash,nand0=socrates_nand"
|
|||||||
CONFIG_MTDPARTS_DEFAULT="mtdparts=fe000000.nor_flash:13312k(system1),13312k(system2),5120k(data),128k(env),128k(env-red),768k(u-boot);socrates_nand:256M(ubi-data1),-(ubi-data2)"
|
CONFIG_MTDPARTS_DEFAULT="mtdparts=fe000000.nor_flash:13312k(system1),13312k(system2),5120k(data),128k(env),128k(env-red),768k(u-boot);socrates_nand:256M(ubi-data1),-(ubi-data2)"
|
||||||
# CONFIG_CMD_IRQ is not set
|
# CONFIG_CMD_IRQ is not set
|
||||||
CONFIG_OF_CONTROL=y
|
CONFIG_OF_CONTROL=y
|
||||||
CONFIG_ENV_IS_NOWHERE=y
|
|
||||||
CONFIG_ENV_IS_IN_FLASH=y
|
CONFIG_ENV_IS_IN_FLASH=y
|
||||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
CONFIG_ENV_ADDR_REDUND=0xFFF00000
|
CONFIG_ENV_ADDR_REDUND=0xFFF00000
|
||||||
|
2
env/env.c
vendored
2
env/env.c
vendored
@ -217,9 +217,7 @@ int env_load(void)
|
|||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
gd->env_load_prio = prio;
|
gd->env_load_prio = prio;
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(ENV_APPEND)
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
} else if (ret == -ENOMSG) {
|
} else if (ret == -ENOMSG) {
|
||||||
/* Handle "bad CRC" case */
|
/* Handle "bad CRC" case */
|
||||||
if (best_prio == -1)
|
if (best_prio == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user