summaryrefslogtreecommitdiff
path: root/src/drivers/spi
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/spi')
-rw-r--r--src/drivers/spi/spi_flash.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 7b5266a280..f0d01593f3 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -12,7 +12,6 @@
* GNU General Public License for more details.
*/
-#include <arch/early_variables.h>
#include <assert.h>
#include <boot_device.h>
#include <boot/coreboot_tables.h>
@@ -522,7 +521,7 @@ int spi_flash_set_write_protected(const struct spi_flash *flash,
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)
{
@@ -532,12 +531,12 @@ int spi_flash_volatile_group_begin(const struct spi_flash *flash)
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
return ret;
- count = car_get_var(volatile_group_count);
+ count = volatile_group_count;
if (count == 0)
ret = chipset_volatile_group_begin(flash);
count++;
- car_set_var(volatile_group_count, count);
+ volatile_group_count = count;
return ret;
}
@@ -549,10 +548,10 @@ int spi_flash_volatile_group_end(const struct spi_flash *flash)
if (!CONFIG(SPI_FLASH_HAS_VOLATILE_GROUP))
return ret;
- count = car_get_var(volatile_group_count);
+ count = volatile_group_count;
assert(count == 0);
count--;
- car_set_var(volatile_group_count, count);
+ volatile_group_count = count;
if (count == 0)
ret = chipset_volatile_group_end(flash);