#ifndef __ASSEMBLY__
#include <asm/processor.h>
+#include <asm/mrccache.h>
enum pei_boot_mode_t {
PEI_BOOT_NONE = 0,
/* MRC training data to save for the next boot */
char *mrc_output;
unsigned int mrc_output_len;
+ struct mrc_data_container *mrc_cache;
ulong table; /* Table pointer from previous loader */
int turbo_state; /* Current turbo state */
struct irq_routing_table *pirq_routing_table;
cache->reserved = 0;
memcpy(cache->data, gd->arch.mrc_output, cache->data_size);
- /* gd->arch.mrc_output now points to the container */
- gd->arch.mrc_output = (char *)cache;
+ gd->arch.mrc_cache = cache;
}
int mrccache_reserve(void)
int mrccache_save(void)
{
- struct mrc_data_container *data;
+ struct mrc_data_container *cache;
struct mrc_region entry;
struct udevice *sf;
int ret;
ret = device_probe(sf);
if (ret)
goto err_entry;
- data = (struct mrc_data_container *)gd->arch.mrc_output;
- ret = mrccache_update(sf, &entry, data);
+ cache = gd->arch.mrc_cache;
+ ret = mrccache_update(sf, &entry, cache);
if (!ret) {
- debug("Saved MRC data with checksum %04x\n", data->checksum);
+ debug("Saved MRC data with checksum %04x\n", cache->checksum);
} else if (ret == -EEXIST) {
debug("MRC data is the same as last time, skipping save\n");
ret = 0;