drivers/spi/spi_flash.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: Ie1d01f589289239c453c2cc38cc1e25f903399ea Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37042 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
5fadb46b36
commit
c2a9c42670
@ -12,7 +12,6 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/early_variables.h>
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <boot_device.h>
|
#include <boot_device.h>
|
||||||
#include <boot/coreboot_tables.h>
|
#include <boot/coreboot_tables.h>
|
||||||
@ -522,7 +521,7 @@ int spi_flash_set_write_protected(const struct spi_flash *flash,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t volatile_group_count CAR_GLOBAL;
|
static uint32_t volatile_group_count;
|
||||||
|
|
||||||
int spi_flash_volatile_group_begin(const struct spi_flash *flash)
|
int spi_flash_volatile_group_begin(const struct spi_flash *flash)
|
||||||
{
|
{
|
||||||
@ -532,12 +531,12 @@ int spi_flash_volatile_group_begin(const struct spi_flash *flash)
|
|||||||
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
count = car_get_var(volatile_group_count);
|
count = volatile_group_count;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
ret = chipset_volatile_group_begin(flash);
|
ret = chipset_volatile_group_begin(flash);
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
car_set_var(volatile_group_count, count);
|
volatile_group_count = count;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,10 +548,10 @@ int spi_flash_volatile_group_end(const struct spi_flash *flash)
|
|||||||
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
count = car_get_var(volatile_group_count);
|
count = volatile_group_count;
|
||||||
assert(count == 0);
|
assert(count == 0);
|
||||||
count--;
|
count--;
|
||||||
car_set_var(volatile_group_count, count);
|
volatile_group_count = count;
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
ret = chipset_volatile_group_end(flash);
|
ret = chipset_volatile_group_end(flash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user