Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Does this work reliably? Is there finally a patch upstream that creates
> fixed numbers for MMC/SD block devices?

I have a *hack* that in my kernel that names the SD-Card to "sdblk0" and
my eMMC to "mmcblk0". That that is completely unacceptable for upstream,
I never even tried it. :-)


Index: linux-4.3/drivers/mmc/card/block.c
===================================================================
--- linux-4.3.orig/drivers/mmc/card/block.c	2015-12-09 17:17:57.264650273 +0100
+++ linux-4.3/drivers/mmc/card/block.c	2015-12-10 08:46:41.874985403 +0100
@@ -2259,14 +2259,16 @@ static struct mmc_blk_data *mmc_blk_allo
 	 * messages to tell when the card is present.
 	 */
 
-	snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
-		 "mmcblk%u%s", md->name_idx, subname ? subname : "");
-
-	if (mmc_card_mmc(card))
+	if (mmc_card_mmc(card)) {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "mmcblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue,
 					     card->ext_csd.data_sector_size);
-	else
+	} else {
+		snprintf(md->disk->disk_name, sizeof(md->disk->disk_name),
+			 "sdblk0%s", subname ? subname : "");
 		blk_queue_logical_block_size(md->queue.queue, 512);
+	}
 
 	set_capacity(md->disk, size);
 

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux