Merge tag 'v2024.10-rc3' into next
Prepare v2024.10-rc3
This commit is contained in:
12
env/sf.c
vendored
12
env/sf.c
vendored
@@ -38,14 +38,24 @@ static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
__weak int spi_get_env_dev(void)
|
||||
{
|
||||
#ifdef CONFIG_ENV_SPI_BUS
|
||||
return CONFIG_ENV_SPI_BUS;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int setup_flash_device(struct spi_flash **env_flash)
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(DM_SPI_FLASH)
|
||||
struct udevice *new;
|
||||
int ret;
|
||||
int dev = spi_get_env_dev();
|
||||
|
||||
/* speed and mode will be read from DT */
|
||||
ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
|
||||
ret = spi_flash_probe_bus_cs(dev, CONFIG_ENV_SPI_CS,
|
||||
&new);
|
||||
if (ret) {
|
||||
env_set_default("spi_flash_probe_bus_cs() failed", 0);
|
||||
|
16
env/ubi.c
vendored
16
env/ubi.c
vendored
@@ -53,7 +53,7 @@ static int env_ubi_save(void)
|
||||
if (gd->env_valid == ENV_VALID) {
|
||||
puts("Writing to redundant UBI... ");
|
||||
if (ubi_volume_write(CONFIG_ENV_UBI_VOLUME_REDUND,
|
||||
(void *)env_new, CONFIG_ENV_SIZE)) {
|
||||
(void *)env_new, 0, CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to write env to %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART,
|
||||
CONFIG_ENV_UBI_VOLUME_REDUND);
|
||||
@@ -62,7 +62,7 @@ static int env_ubi_save(void)
|
||||
} else {
|
||||
puts("Writing to UBI... ");
|
||||
if (ubi_volume_write(CONFIG_ENV_UBI_VOLUME,
|
||||
(void *)env_new, CONFIG_ENV_SIZE)) {
|
||||
(void *)env_new, 0, CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to write env to %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART,
|
||||
CONFIG_ENV_UBI_VOLUME);
|
||||
@@ -92,7 +92,7 @@ static int env_ubi_save(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ubi_volume_write(CONFIG_ENV_UBI_VOLUME, (void *)env_new,
|
||||
if (ubi_volume_write(CONFIG_ENV_UBI_VOLUME, (void *)env_new, 0,
|
||||
CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to write env to %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
|
||||
@@ -134,14 +134,14 @@ static int env_ubi_load(void)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1,
|
||||
read1_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)tmp_env1, 0,
|
||||
CONFIG_ENV_SIZE);
|
||||
if (read1_fail)
|
||||
printf("\n** Unable to read env from %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
|
||||
|
||||
read2_fail = ubi_volume_read(CONFIG_ENV_UBI_VOLUME_REDUND,
|
||||
(void *)tmp_env2, CONFIG_ENV_SIZE);
|
||||
(void *)tmp_env2, 0, CONFIG_ENV_SIZE);
|
||||
if (read2_fail)
|
||||
printf("\n** Unable to read redundant env from %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME_REDUND);
|
||||
@@ -171,7 +171,7 @@ static int env_ubi_load(void)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) {
|
||||
if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, 0, CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to read env from %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
|
||||
env_set_default(NULL, 0);
|
||||
@@ -196,7 +196,7 @@ static int env_ubi_erase(void)
|
||||
memset(env_buf, 0x0, CONFIG_ENV_SIZE);
|
||||
|
||||
if (ubi_volume_write(CONFIG_ENV_UBI_VOLUME,
|
||||
(void *)env_buf, CONFIG_ENV_SIZE)) {
|
||||
(void *)env_buf, 0, CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to erase env to %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART,
|
||||
CONFIG_ENV_UBI_VOLUME);
|
||||
@@ -204,7 +204,7 @@ static int env_ubi_erase(void)
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_SYS_REDUNDAND_ENVIRONMENT)) {
|
||||
if (ubi_volume_write(ENV_UBI_VOLUME_REDUND,
|
||||
(void *)env_buf, CONFIG_ENV_SIZE)) {
|
||||
(void *)env_buf, 0, CONFIG_ENV_SIZE)) {
|
||||
printf("\n** Unable to erase env to %s:%s **\n",
|
||||
CONFIG_ENV_UBI_PART,
|
||||
ENV_UBI_VOLUME_REDUND);
|
||||
|
Reference in New Issue
Block a user