MX31: Add UBI support to QONG module
[platform/kernel/u-boot.git] / disk / part.c
index c777493..b6bae17 100644 (file)
@@ -80,7 +80,10 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
        block_dev_desc_t* (*reloc_get_dev)(int dev);
 
        while (drvr->name) {
-               reloc_get_dev = drvr->get_dev + gd->reloc_off;
+               reloc_get_dev = drvr->get_dev;
+#ifndef CONFIG_RELOC_FIXUP_WORKS
+               reloc_get_dev += gd->reloc_off;
+#endif
                if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
                        return reloc_get_dev(dev);
                drvr++;
@@ -114,6 +117,11 @@ void dev_print (block_dev_desc_t *dev_desc)
        lbaint_t lba512;
 #endif
 
+       if (dev_desc->type == DEV_TYPE_UNKNOWN) {
+               puts ("not available\n");
+               return;
+       }
+
        switch (dev_desc->if_type) {
        case IF_TYPE_SCSI:
                printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
@@ -188,7 +196,7 @@ void dev_print (block_dev_desc_t *dev_desc)
                if (dev_desc->lba48)
                        printf ("            Supports 48-bit addressing\n");
 #endif
-#if defined(CONFIG_SYS_64BIT_LBA) && defined(CONFIG_SYS_64BIT_VSPRINTF)
+#if defined(CONFIG_SYS_64BIT_LBA)
                printf ("            Capacity: %ld.%ld MB = %ld.%ld GB (%Ld x %ld)\n",
                        mb_quot, mb_rem,
                        gb_quot, gb_rem,