]> Git Repo - J-u-boot.git/blobdiff - drivers/block/blkcache.c
pci: layerscape: Fix the LUT and msi-map mismatch issue
[J-u-boot.git] / drivers / block / blkcache.c
index 1fa64989d3f2fcc5c9e0b3e6991f72b1fc5d96d5..b53420a3a88c2a242e7361388f62e1976e3a0873 100644 (file)
@@ -4,13 +4,19 @@
  * Author: Eric Nelson<[email protected]>
  *
  */
-#include <config.h>
 #include <common.h>
+#include <blk.h>
+#include <log.h>
 #include <malloc.h>
 #include <part.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 #include <linux/list.h>
 
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
 struct block_cache_node {
        struct list_head lh;
        int iftype;
@@ -28,6 +34,18 @@ static struct block_cache_stats _stats = {
        .max_entries = 32
 };
 
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
+int blkcache_init(void)
+{
+       struct list_head *head = &block_cache;
+
+       head->next = (uintptr_t)head->next + gd->reloc_off;
+       head->prev = (uintptr_t)head->prev + gd->reloc_off;
+
+       return 0;
+}
+#endif
+
 static struct block_cache_node *cache_find(int iftype, int devnum,
                                           lbaint_t start, lbaint_t blkcnt,
                                           unsigned long blksz)
This page took 0.026231 seconds and 4 git commands to generate.