]> git.sur5r.net Git - u-boot/blobdiff - disk/part.c
Merge with git://www.denx.de/git/u-boot.git
[u-boot] / disk / part.c
old mode 100644 (file)
new mode 100755 (executable)
index f1026c5..255b140
@@ -64,13 +64,17 @@ static const struct block_drvr block_drvr[] = {
        { },
 };
 
+DECLARE_GLOBAL_DATA_PTR;
+
 block_dev_desc_t *get_dev(char* ifname, int dev)
 {
        const struct block_drvr *drvr = block_drvr;
+       block_dev_desc_t* (*reloc_get_dev)(int dev);
 
        while (drvr->name) {
+               reloc_get_dev = drvr->get_dev + gd->reloc_off;
                if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
-                       return drvr->get_dev(dev);
+                       return reloc_get_dev(dev);
                drvr++;
        }
        return NULL;
@@ -175,6 +179,8 @@ void dev_print (block_dev_desc_t *dev_desc)
 #if ((CONFIG_COMMANDS & CFG_CMD_IDE)   || \
      (CONFIG_COMMANDS & CFG_CMD_SCSI)  || \
      (CONFIG_COMMANDS & CFG_CMD_USB)   || \
+     defined(CONFIG_MMC)               || \
+     (defined(CONFIG_MMC) && defined(CONFIG_LPC2292)) || \
      defined(CONFIG_SYSTEMACE)          )
 
 #if defined(CONFIG_MAC_PARTITION) || \
@@ -214,7 +220,8 @@ void init_part (block_dev_desc_t * dev_desc)
 }
 
 
-int get_partition_info (block_dev_desc_t *dev_desc, int part, disk_partition_t *info)
+int get_partition_info (block_dev_desc_t *dev_desc, int part
+                                       , disk_partition_t *info)
 {
                switch (dev_desc->part_type) {
 #ifdef CONFIG_MAC_PARTITION
@@ -320,7 +327,8 @@ void print_part (block_dev_desc_t * dev_desc)
 
 
 #else  /* neither MAC nor DOS nor ISO partition configured */
-# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION nor CONFIG_ISO_PARTITION configured!
+# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION
+# error nor CONFIG_ISO_PARTITION configured!
 #endif
 
 #endif /* (CONFIG_COMMANDS & CFG_CMD_IDE) || CONFIG_COMMANDS & CFG_CMD_SCSI) */