x86: Don't export mrccache_update()
[oweals/u-boot.git] / arch / x86 / include / asm / mrccache.h
index 40fda856ff47f9fcce92ecc2faf4b95eb833998a..d6b75290739d25c16334eb71934d147c2d8d5fe1 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _ASM_MRCCACHE_H
 #define _ASM_MRCCACHE_H
 
-#define MRC_DATA_ALIGN         0x1000
+#define MRC_DATA_ALIGN         0x100
 #define MRC_DATA_SIGNATURE     (('M' << 0) | ('R' << 8) | \
                                 ('C' << 16) | ('D'<<24))
 
@@ -27,6 +27,14 @@ struct mrc_region {
        u32     length;
 };
 
+/* Types of MRC data */
+enum mrc_type_t {
+       MRC_TYPE_NORMAL,
+       MRC_TYPE_VAR,
+
+       MRC_TYPE_COUNT,
+};
+
 struct udevice;
 
 /**
@@ -40,21 +48,6 @@ struct udevice;
  */
 struct mrc_data_container *mrccache_find_current(struct mrc_region *entry);
 
-/**
- * mrccache_update() - update the MRC cache with a new record
- *
- * This writes a new record to the end of the MRC cache region. If the new
- * record is the same as the latest record then the write is skipped
- *
- * @sf:                SPI flash to write to
- * @entry:     Position and size of MRC cache in SPI flash
- * @cur:       Record to write
- * @return 0 if updated, -EEXIST if the record is the same as the latest
- * record, -EINVAL if the record is not valid, other error if SPI write failed
- */
-int mrccache_update(struct udevice *sf, struct mrc_region *entry,
-                   struct mrc_data_container *cur);
-
 /**
  * mrccache_reserve() - reserve MRC data on the stack
  *
@@ -84,6 +77,7 @@ int mrccache_reserve(void);
  *   triggers PCI bus enumeration during which insufficient memory issue
  *   might be exposed and it causes subsequent SPI flash probe fails).
  *
+ * @type:      Type of MRC data to use
  * @devp:      Returns pointer to the SPI flash device
  * @entry:     Position and size of MRC cache in SPI flash
  * @return 0 if success, -ENOENT if SPI flash node does not exist in the
@@ -91,7 +85,8 @@ int mrccache_reserve(void);
  * tree, -EINVAL if MRC region properties format is incorrect, other error
  * if SPI flash probe failed.
  */
-int mrccache_get_region(struct udevice **devp, struct mrc_region *entry);
+int mrccache_get_region(enum mrc_type_t type, struct udevice **devp,
+                       struct mrc_region *entry);
 
 /**
  * mrccache_save() - save MRC data to the SPI flash