if (!sunxi_mmc_has_egon_boot_signature(mmc0) &&
            sunxi_mmc_has_egon_boot_signature(mmc1)) {
                /* Booting from emmc / mmc2, swap */
-               mmc0->block_dev.dev = 1;
-               mmc1->block_dev.dev = 0;
+               mmc0->block_dev.devnum = 1;
+               mmc1->block_dev.devnum = 0;
        }
 #endif
 
 
                return 1;
        }
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        bootstage_mark(BOOTSTAGE_ID_IDE_TYPE);
 
        printf("\nLoading from %s device %d, partition %d: "
 
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        if (fat_set_blk_dev(dev_desc, &info) != 0) {
                printf("\n** Unable to use %s %d:%d for fatinfo **\n",
                        argv[1], dev, part);
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
 
        if (fat_set_blk_dev(dev_desc, &info) != 0) {
                printf("\n** Unable to use %s %d:%d for fatwrite **\n",
 
                int led = (IDE_BUS(i) == 0) ? LED_IDE1 : LED_IDE2;
                ide_dev_desc[i].type = DEV_TYPE_UNKNOWN;
                ide_dev_desc[i].if_type = IF_TYPE_IDE;
-               ide_dev_desc[i].dev = i;
+               ide_dev_desc[i].devnum = i;
                ide_dev_desc[i].part_type = PART_TYPE_UNKNOWN;
                ide_dev_desc[i].blksz = 0;
                ide_dev_desc[i].log2blksz =
 #endif
        int device;
 
-       device = dev_desc->dev;
+       device = dev_desc->devnum;
        printf("  Device %d: ", device);
 
        ide_led(DEVICE_LED(device), 1); /* LED on       */
 ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
               void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        ulong n = 0;
        unsigned char c;
        unsigned char pwrsave = 0;      /* power save */
 ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
                const void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        ulong n = 0;
        unsigned char c;
 
        unsigned char c;
        int device;
 
-       device = dev_desc->dev;
+       device = dev_desc->devnum;
        dev_desc->type = DEV_TYPE_UNKNOWN;      /* not yet valid */
        dev_desc->block_read = atapi_read;
 
 ulong atapi_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
                 void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        ulong n = 0;
        unsigned char ccb[12];  /* Command descriptor block */
        ulong cnt;
 
                printf("Failed to create MMC Device\n");
                return 1;
        }
-       printf("%s: %d at %u:%u hz %u mode %u\n", mmc->cfg->name, mmc->block_dev.dev,
-              bus, cs, speed, mode);
+       printf("%s: %d at %u:%u hz %u mode %u\n", mmc->cfg->name,
+              mmc->block_dev.devnum, bus, cs, speed, mode);
        mmc_init(mmc);
        return 0;
 
 
            filename = argv[3];
        }
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        PRINTF("Using device %s %d:%d, directory: %s\n", argv[1], dev, part, filename);
 
        reiserfs_set_blk_dev(dev_desc, &info);
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
 
        printf("Loading file \"%s\" from %s device %d%c%c\n",
                filename, argv[1], dev,
 
 static unsigned long sata_bread(struct blk_desc *block_dev, lbaint_t start,
                                lbaint_t blkcnt, void *dst)
 {
-       return sata_read(block_dev->dev, start, blkcnt, dst);
+       return sata_read(block_dev->devnum, start, blkcnt, dst);
 }
 
 static unsigned long sata_bwrite(struct blk_desc *block_dev, lbaint_t start,
                                 lbaint_t blkcnt, const void *buffer)
 {
-       return sata_write(block_dev->dev, start, blkcnt, buffer);
+       return sata_write(block_dev->devnum, start, blkcnt, buffer);
 }
 
 int __sata_initialize(void)
        for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; i++) {
                memset(&sata_dev_desc[i], 0, sizeof(struct blk_desc));
                sata_dev_desc[i].if_type = IF_TYPE_SATA;
-               sata_dev_desc[i].dev = i;
+               sata_dev_desc[i].devnum = i;
                sata_dev_desc[i].part_type = PART_TYPE_UNKNOWN;
                sata_dev_desc[i].type = DEV_TYPE_HARDDISK;
                sata_dev_desc[i].lba = 0;
 
                scsi_dev_desc[i].revision[0]=0;
                scsi_dev_desc[i].removable = false;
                scsi_dev_desc[i].if_type=IF_TYPE_SCSI;
-               scsi_dev_desc[i].dev=i;
+               scsi_dev_desc[i].devnum = i;
                scsi_dev_desc[i].part_type=PART_TYPE_UNKNOWN;
                scsi_dev_desc[i].block_read=scsi_read;
                scsi_dev_desc[i].block_write = scsi_write;
 static ulong scsi_read(struct blk_desc *block_dev, lbaint_t blknr,
                       lbaint_t blkcnt, void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        lbaint_t start, blks;
        uintptr_t buf_addr;
        unsigned short smallblks = 0;
 static ulong scsi_write(struct blk_desc *block_dev, lbaint_t blknr,
                        lbaint_t blkcnt, const void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        lbaint_t start, blks;
        uintptr_t buf_addr;
        unsigned short smallblks;
 
                ums[ums_count].block_dev = *block_dev;
 
                printf("UMS: LUN %d, dev %d, hwpart %d, sector %#x, count %#x\n",
-                      ums_count, ums[ums_count].block_dev.dev,
+                      ums_count, ums[ums_count].block_dev.devnum,
                       ums[ums_count].block_dev.hwpart,
                       ums[ums_count].start_sector,
                       ums[ums_count].num_sectors);
 
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        printf("Loading file \"%s\" from %s device %d%c%c\n",
                filename, argv[1], dev,
                part ? ':' : ' ', part ? part + '0' : ' ');
 
        if (part < 0)
                return 1;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        if (fat_set_blk_dev(dev_desc, &info) != 0) {
                printf("\n** Unable to use %s %d:%d for saveenv **\n",
                       FAT_ENV_INTERFACE, dev, part);
        if (part < 0)
                goto err_env_relocate;
 
-       dev = dev_desc->dev;
+       dev = dev_desc->devnum;
        if (fat_set_blk_dev(dev_desc, &info) != 0) {
                printf("\n** Unable to use %s %d:%d for loading the env **\n",
                       FAT_ENV_INTERFACE, dev, part);
 
 
        blks = dev_desc->block_write(dev_desc, info->start, blkcnt, buffer);
        if (blks != blkcnt) {
-               error("failed writing to device %d\n", dev_desc->dev);
+               error("failed writing to device %d\n", dev_desc->devnum);
                fastboot_fail(response_str, "failed writing to device");
                return;
        }
 
        blks = dev_desc->block_erase(dev_desc, blks_start, blks_size);
        if (blks != blks_size) {
-               error("failed erasing from device %d", dev_desc->dev);
+               error("failed erasing from device %d", dev_desc->devnum);
                fastboot_fail(response_str, "failed erasing from device");
                return;
        }
 
                        blkdev = &usb_dev_desc[usb_max_devs];
                        memset(blkdev, '\0', sizeof(struct blk_desc));
                        blkdev->if_type = IF_TYPE_USB;
-                       blkdev->dev = usb_max_devs;
+                       blkdev->devnum = usb_max_devs;
                        blkdev->part_type = PART_TYPE_UNKNOWN;
                        blkdev->target = 0xff;
                        blkdev->type = DEV_TYPE_UNKNOWN;
 static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr,
                                   lbaint_t blkcnt, void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        lbaint_t start, blks;
        uintptr_t buf_addr;
        unsigned short smallblks;
 static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr,
                                    lbaint_t blkcnt, const void *buffer)
 {
-       int device = block_dev->dev;
+       int device = block_dev->devnum;
        lbaint_t start, blks;
        uintptr_t buf_addr;
        unsigned short smallblks;
 
                                return dev_desc;
                        if (!select_hwpart)
                                return NULL;
-                       ret = select_hwpart(dev_desc->dev, hwpart);
+                       ret = select_hwpart(dev_desc->devnum, hwpart);
                        if (ret < 0)
                                return NULL;
                        return dev_desc;
                break;
        }
        printf (" device %d  --   Partition Type: %s\n\n",
-                       dev_desc->dev, type);
+                       dev_desc->devnum, type);
 #endif /* any CONFIG_..._PARTITION */
 }
 
        int part;
        disk_partition_t tmpinfo;
 
-#if defined CONFIG_SANDBOX && defined CONFIG_CMD_UBIFS
-#error Only one of CONFIG_SANDBOX and CONFIG_CMD_UBIFS may be selected
-#endif
-
 #ifdef CONFIG_SANDBOX
        /*
         * Special-case a pseudo block device "hostfs", to allow access to the
 
        if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
                                 (ulong *)buffer) != 1) {
                printf ("** Can't read partition table on %d:" LBAFU " **\n",
-                       dev_desc->dev, ext_part_sector);
+                       dev_desc->devnum, ext_part_sector);
                return;
        }
        i=test_block_type(buffer);
        if (dev_desc->block_read(dev_desc, ext_part_sector, 1,
                                 (ulong *)buffer) != 1) {
                printf ("** Can't read partition table on %d:" LBAFU " **\n",
-                       dev_desc->dev, ext_part_sector);
+                       dev_desc->devnum, ext_part_sector);
                return -1;
        }
        if (buffer[DOS_PART_MAGIC_OFFSET] != 0x55 ||
                                case IF_TYPE_IDE:
                                case IF_TYPE_SATA:
                                case IF_TYPE_ATAPI:
-                                       sprintf ((char *)info->name, "hd%c%d",
-                                               'a' + dev_desc->dev, part_num);
+                                       sprintf((char *)info->name, "hd%c%d",
+                                               'a' + dev_desc->devnum,
+                                               part_num);
                                        break;
                                case IF_TYPE_SCSI:
-                                       sprintf ((char *)info->name, "sd%c%d",
-                                               'a' + dev_desc->dev, part_num);
+                                       sprintf((char *)info->name, "sd%c%d",
+                                               'a' + dev_desc->devnum,
+                                               part_num);
                                        break;
                                case IF_TYPE_USB:
-                                       sprintf ((char *)info->name, "usbd%c%d",
-                                               'a' + dev_desc->dev, part_num);
+                                       sprintf((char *)info->name, "usbd%c%d",
+                                               'a' + dev_desc->devnum,
+                                               part_num);
                                        break;
                                case IF_TYPE_DOC:
-                                       sprintf ((char *)info->name, "docd%c%d",
-                                               'a' + dev_desc->dev, part_num);
+                                       sprintf((char *)info->name, "docd%c%d",
+                                               'a' + dev_desc->devnum,
+                                               part_num);
                                        break;
                                default:
-                                       sprintf ((char *)info->name, "xx%c%d",
-                                               'a' + dev_desc->dev, part_num);
+                                       sprintf((char *)info->name, "xx%c%d",
+                                               'a' + dev_desc->devnum,
+                                               part_num);
                                        break;
                        }
                        /* sprintf(info->type, "%d, pt->sys_ind); */
 
        /* Write MBR sector to the MMC device */
        if (dev_desc->block_write(dev_desc, 0, 1, p_mbr) != 1) {
                printf("** Can't write to device %d **\n",
-                       dev_desc->dev);
+                       dev_desc->devnum);
                return -1;
        }
 
        return 0;
 
  err:
-       printf("** Can't write to device %d **\n", dev_desc->dev);
+       printf("** Can't write to device %d **\n", dev_desc->devnum);
        return -1;
 }
 
 
        if(ppr->desctype!=0x01) {
                if(verb)
                        printf ("** First descriptor is NOT a primary desc on %d:%d **\n",
-                               dev_desc->dev, part_num);
+                               dev_desc->devnum, part_num);
                return (-1);
        }
        if(strncmp((char *)ppr->stand_ident,"CD001",5)!=0) {
                if(verb)
                        printf ("** Wrong ISO Ident: %s on %d:%d **\n",
-                               ppr->stand_ident,dev_desc->dev, part_num);
+                               ppr->stand_ident, dev_desc->devnum, part_num);
                return (-1);
        }
        lastsect= ((ppr->firstsek_LEpathtab1_LE & 0x000000ff)<<24) +
                if(ppr->desctype==0xff) {
                        if(verb)
                                printf ("** No valid boot catalog found on %d:%d **\n",
-                                       dev_desc->dev, part_num);
+                                       dev_desc->devnum, part_num);
                        return (-1);
                }
        }
        if(strncmp(pbr->ident_str,"EL TORITO SPECIFICATION",23)!=0) {
                if(verb)
                        printf ("** Wrong El Torito ident: %s on %d:%d **\n",
-                               pbr->ident_str,dev_desc->dev, part_num);
+                               pbr->ident_str, dev_desc->devnum, part_num);
                return (-1);
        }
        bootaddr=le32_to_int(pbr->pointer);
        if (dev_desc->block_read(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) {
                if(verb)
                        printf ("** Can't read Boot Entry at %lX on %d:%d **\n",
-                               bootaddr,dev_desc->dev, part_num);
+                               bootaddr, dev_desc->devnum, part_num);
                return (-1);
        }
        chksum=0;
                chksum+=((chksumbuf[i] &0xff)<<8)+((chksumbuf[i] &0xff00)>>8);
        if(chksum!=0) {
                if(verb)
-                       printf ("** Checksum Error in booting catalog validation entry on %d:%d **\n",
-                               dev_desc->dev, part_num);
+                       printf("** Checksum Error in booting catalog validation entry on %d:%d **\n",
+                              dev_desc->devnum, part_num);
                return (-1);
        }
        if((pve->key[0]!=0x55)||(pve->key[1]!=0xAA)) {
                if(verb)
                        printf ("** Key 0x55 0xAA error on %d:%d **\n",
-                               dev_desc->dev, part_num);
+                               dev_desc->devnum, part_num);
                return(-1);
        }
 #ifdef CHECK_FOR_POWERPC_PLATTFORM
        if(pve->platform!=0x01) {
                if(verb)
                        printf ("** No PowerPC platform CD on %d:%d **\n",
-                               dev_desc->dev, part_num);
+                               dev_desc->devnum, part_num);
                return(-1);
        }
 #endif
                case IF_TYPE_SATA:
                case IF_TYPE_ATAPI:
                        sprintf ((char *)info->name, "hd%c%d",
-                               'a' + dev_desc->dev, part_num);
+                               'a' + dev_desc->devnum, part_num);
                        break;
                case IF_TYPE_SCSI:
                        sprintf ((char *)info->name, "sd%c%d",
-                               'a' + dev_desc->dev, part_num);
+                               'a' + dev_desc->devnum, part_num);
                        break;
                case IF_TYPE_USB:
                        sprintf ((char *)info->name, "usbd%c%d",
-                               'a' + dev_desc->dev, part_num);
+                               'a' + dev_desc->devnum, part_num);
                        break;
                case IF_TYPE_DOC:
                        sprintf ((char *)info->name, "docd%c%d",
-                               'a' + dev_desc->dev, part_num);
+                               'a' + dev_desc->devnum, part_num);
                        break;
                default:
                        sprintf ((char *)info->name, "xx%c%d",
-                               'a' + dev_desc->dev, part_num);
+                               'a' + dev_desc->devnum, part_num);
                        break;
        }
        /* the bootcatalog (including validation Entry) is limited to 2048Bytes
                else {
                        if(verb)
                                printf ("** Partition %d not found on device %d **\n",
-                                       part_num,dev_desc->dev);
+                                       part_num, dev_desc->devnum);
                        return(-1);
                }
        }
         * searched w/o succsess */
        if(verb)
                printf ("** Partition %d not found on device %d **\n",
-                       part_num,dev_desc->dev);
+                       part_num, dev_desc->devnum);
        return(-1);
 found:
        if(pide->boot_ind!=0x88) {
                if(verb)
-                       printf ("** Partition %d is not bootable on device %d **\n",
-                               part_num,dev_desc->dev);
+                       printf("** Partition %d is not bootable on device %d **\n",
+                              part_num, dev_desc->devnum);
                return (-1);
        }
        switch(pide->boot_media) {
        int i;
 
        if (part_get_info_iso_verb(dev_desc, 0, &info, 0) == -1) {
-               printf("** No boot partition found on device %d **\n",dev_desc->dev);
+               printf("** No boot partition found on device %d **\n",
+                      dev_desc->devnum);
                return;
        }
        printf("Part   Start     Sect x Size Type\n");
 
                printf ("%4ld: ", i);
                if (dev_desc->block_read(dev_desc, i, 1, (ulong *)mpart) != 1) {
                        printf ("** Can't read Partition Map on %d:%ld **\n",
-                               dev_desc->dev, i);
+                               dev_desc->devnum, i);
                        return;
                }
 
                if (mpart->signature != MAC_PARTITION_MAGIC) {
-                       printf ("** Bad Signature on %d:%ld - "
-                               "expected 0x%04x, got 0x%04x\n",
-                               dev_desc->dev, i, MAC_PARTITION_MAGIC, mpart->signature);
+                       printf("** Bad Signature on %d:%ld - expected 0x%04x, got 0x%04x\n",
+                              dev_desc->devnum, i, MAC_PARTITION_MAGIC,
+                              mpart->signature);
                        return;
                }
 
                 */
                if (dev_desc->block_read(dev_desc, n, 1, (ulong *)pdb_p) != 1) {
                        printf ("** Can't read Partition Map on %d:%d **\n",
-                               dev_desc->dev, n);
+                               dev_desc->devnum, n);
                        return (-1);
                }
 
                if (pdb_p->signature != MAC_PARTITION_MAGIC) {
-                       printf ("** Bad Signature on %d:%d: "
-                               "expected 0x%04x, got 0x%04x\n",
-                               dev_desc->dev, n, MAC_PARTITION_MAGIC, pdb_p->signature);
+                       printf("** Bad Signature on %d:%d: expected 0x%04x, got 0x%04x\n",
+                              dev_desc->devnum, n, MAC_PARTITION_MAGIC,
+                              pdb_p->signature);
                        return (-1);
                }
 
 
                if ((part < 1) || (part > pdb_p->map_count)) {
                        printf ("** Invalid partition %d:%d [%d:1...%d:%d only]\n",
-                               dev_desc->dev, part,
-                               dev_desc->dev,
-                               dev_desc->dev, pdb_p->map_count);
+                               dev_desc->devnum, part,
+                               dev_desc->devnum,
+                               dev_desc->devnum, pdb_p->map_count);
                        return (-1);
                }
 
 
                                     unsigned long start, lbaint_t blkcnt,
                                     void *buffer)
 {
-       int dev = block_dev->dev;
+       int dev = block_dev->devnum;
        struct host_block_dev *host_dev = find_host_device(dev);
 
        if (!host_dev)
                                      unsigned long start, lbaint_t blkcnt,
                                      const void *buffer)
 {
-       int dev = block_dev->dev;
+       int dev = block_dev->devnum;
        struct host_block_dev *host_dev = find_host_device(dev);
        if (os_lseek(host_dev->fd,
                     start * host_dev->blk_dev.blksz,
        blk_dev->lba = os_lseek(host_dev->fd, 0, OS_SEEK_END) / blk_dev->blksz;
        blk_dev->block_read = host_block_read;
        blk_dev->block_write = host_block_write;
-       blk_dev->dev = dev;
+       blk_dev->devnum = dev;
        blk_dev->part_type = PART_TYPE_UNKNOWN;
        part_init(blk_dev);
 
 
           not yet initialized. In that case, fill it in. */
        if (systemace_dev.blksz == 0) {
                systemace_dev.if_type = IF_TYPE_UNKNOWN;
-               systemace_dev.dev = 0;
+               systemace_dev.devnum = 0;
                systemace_dev.part_type = PART_TYPE_UNKNOWN;
                systemace_dev.type = DEV_TYPE_HARDDISK;
                systemace_dev.blksz = 512;
 
        if (mmc == NULL)
                return -1;
 
-       debug("registered mmc interface number is:%d\n", mmc->block_dev.dev);
+       debug("registered mmc interface number is:%d\n", mmc->block_dev.devnum);
 
        return 0;
 }
 
        list_for_each(entry, &mmc_devices) {
                m = list_entry(entry, struct mmc, link);
 
-               if (m->block_dev.dev == dev_num)
+               if (m->block_dev.devnum == dev_num)
                        return m;
        }
 
 static ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start,
                       lbaint_t blkcnt, void *dst)
 {
-       int dev_num = block_dev->dev;
+       int dev_num = block_dev->devnum;
        int err;
        lbaint_t cur, blocks_todo = blkcnt;
 
        mmc->dsr = 0xffffffff;
        /* Setup the universal parts of the block interface just once */
        mmc->block_dev.if_type = IF_TYPE_MMC;
-       mmc->block_dev.dev = cur_dev_num++;
+       mmc->block_dev.devnum = cur_dev_num++;
        mmc->block_dev.removable = 1;
        mmc->block_dev.block_read = mmc_bread;
        mmc->block_dev.block_write = mmc_bwrite;
                else
                        mmc_type = NULL;
 
-               printf("%s: %d", m->cfg->name, m->block_dev.dev);
+               printf("%s: %d", m->cfg->name, m->block_dev.devnum);
                if (mmc_type)
                        printf(" (%s)", mmc_type);
 
 
 unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start,
                         lbaint_t blkcnt)
 {
-       int dev_num = block_dev->dev;
+       int dev_num = block_dev->devnum;
        int err = 0;
        u32 start_rem, blkcnt_rem;
        struct mmc *mmc = find_mmc_device(dev_num);
 ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
                 const void *src)
 {
-       int dev_num = block_dev->dev;
+       int dev_num = block_dev->devnum;
        lbaint_t cur, blocks_todo = blkcnt;
        int err;
 
 
        uint32_t ctrl0;
        int ret;
 
-       debug("MMC%d: CMD%d\n", mmc->block_dev.dev, cmd->cmdidx);
+       debug("MMC%d: CMD%d\n", mmc->block_dev.devnum, cmd->cmdidx);
 
        /* Check bus busy */
        timeout = MXSMMC_MAX_TIMEOUT;
        }
 
        if (!timeout) {
-               printf("MMC%d: Bus busy timeout!\n", mmc->block_dev.dev);
+               printf("MMC%d: Bus busy timeout!\n", mmc->block_dev.devnum);
                return TIMEOUT;
        }
 
        /* See if card is present */
        if (!mxsmmc_cd(priv)) {
-               printf("MMC%d: No card detected!\n", mmc->block_dev.dev);
+               printf("MMC%d: No card detected!\n", mmc->block_dev.devnum);
                return NO_CARD_ERR;
        }
 
                if (data->flags & MMC_DATA_READ) {
                        ctrl0 |= SSP_CTRL0_READ;
                } else if (priv->mmc_is_wp &&
-                       priv->mmc_is_wp(mmc->block_dev.dev)) {
+                       priv->mmc_is_wp(mmc->block_dev.devnum)) {
                        printf("MMC%d: Can not write a locked card!\n",
-                               mmc->block_dev.dev);
+                               mmc->block_dev.devnum);
                        return UNUSABLE_ERR;
                }
 
 
        if (!timeout) {
                printf("MMC%d: Command %d busy\n",
-                       mmc->block_dev.dev, cmd->cmdidx);
+                       mmc->block_dev.devnum, cmd->cmdidx);
                return TIMEOUT;
        }
 
        /* Check command timeout */
        if (reg & SSP_STATUS_RESP_TIMEOUT) {
                printf("MMC%d: Command %d timeout (status 0x%08x)\n",
-                       mmc->block_dev.dev, cmd->cmdidx, reg);
+                       mmc->block_dev.devnum, cmd->cmdidx, reg);
                return TIMEOUT;
        }
 
        /* Check command errors */
        if (reg & (SSP_STATUS_RESP_CRC_ERR | SSP_STATUS_RESP_ERR)) {
                printf("MMC%d: Command %d error (status 0x%08x)!\n",
-                       mmc->block_dev.dev, cmd->cmdidx, reg);
+                       mmc->block_dev.devnum, cmd->cmdidx, reg);
                return COMM_ERR;
        }
 
                if (ret) {
                        printf("MMC%d: Data timeout with command %d "
                                "(status 0x%08x)!\n",
-                               mmc->block_dev.dev, cmd->cmdidx, reg);
+                               mmc->block_dev.devnum, cmd->cmdidx, reg);
                        return ret;
                }
        } else {
                ret = mxsmmc_send_cmd_dma(priv, data);
                if (ret) {
                        printf("MMC%d: DMA transfer failed\n",
-                               mmc->block_dev.dev);
+                               mmc->block_dev.devnum);
                        return ret;
                }
        }
                (SSP_STATUS_TIMEOUT | SSP_STATUS_DATA_CRC_ERR |
                SSP_STATUS_FIFO_OVRFLW | SSP_STATUS_FIFO_UNDRFLW)) {
                printf("MMC%d: Data error with command %d (status 0x%08x)!\n",
-                       mmc->block_dev.dev, cmd->cmdidx, reg);
+                       mmc->block_dev.devnum, cmd->cmdidx, reg);
                return COMM_ERR;
        }
 
                        SSP_CTRL0_BUS_WIDTH_MASK, priv->buswidth);
 
        debug("MMC%d: Set %d bits bus width\n",
-               mmc->block_dev.dev, mmc->bus_width);
+               mmc->block_dev.devnum, mmc->bus_width);
 }
 
 static int mxsmmc_init(struct mmc *mmc)
 
 
 #if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
        /* PBIAS config needed for MMC1 only */
-       if (mmc->block_dev.dev == 0)
+       if (mmc->block_dev.devnum == 0)
                omap4_vmmc_pbias_config(mmc);
 #endif
 #if defined(CONFIG_OMAP54XX) && defined(CONFIG_PALMAS_POWER)
-       if (mmc->block_dev.dev == 0)
+       if (mmc->block_dev.devnum == 0)
                omap5_pbias_config(mmc);
 #endif
 
 
        int trans_bytes = 0, is_aligned = 1;
        u32 mask, flags, mode;
        unsigned int time = 0, start_addr = 0;
-       int mmc_dev = mmc->block_dev.dev;
+       int mmc_dev = mmc->block_dev.devnum;
        unsigned start = get_timer(0);
 
        /* Timeout unit - ms */
 
        if (part_get_info(dev_desc, part_no, &info)) {
                if (part_no != 0) {
                        printf("** Partition %d not valid on device %d **\n",
-                                       part_no, dev_desc->dev);
+                                       part_no, dev_desc->devnum);
                        return -1;
                }
 
                printf("Unknown");
        }
 
-       printf("\n  Device %d: ", cur_dev->dev);
+       printf("\n  Device %d: ", cur_dev->devnum);
        dev_print(cur_dev);
 #endif
 
 
 
 struct blk_desc {
        enum if_type    if_type;        /* type of the interface */
-       int             dev;            /* device number */
+       int             devnum;         /* device number */
        unsigned char   part_type;      /* partition type */
        unsigned char   target;         /* target SCSI ID */
        unsigned char   lun;            /* target LUN */