[U-Boot] [PATCH v3 27/58] fastboot: sunxi: Update fastboot mmc default device

Jagan Teki jagan at amarulasolutions.com
Sun Aug 19 13:56:44 UTC 2018


Usually eMMC is default mmc device for fastboot.

By enabling DM_MMC, the mmc devices are probed as per
DT status not with respect to MMC_SUNXI_SLOT_EXTRA in
U-Boot proper.

Allwinner SoC has maximum of 4 mmc controllers start from
mmc0...mmc3 on which mmc2 can be used an eMMC controller
eventhough mmc3 some boards used as eMMC.

So, update the default fastboot device as 2 to make the
standard usage irrespective of DT node status.

Other corner cases like different device usage, or specific
mmc node status is not enabled in order in DTS must explicitly
add config on the specific defconfig file.

Cc: Olliver Schinagl <oliver at schinagl.nl>
Cc: Chen-Yu Tsai <wens at csie.org>
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
 configs/A20-OLinuXino-Lime2-eMMC_defconfig   | 1 +
 configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 +
 configs/Sinlinx_SinA33_defconfig             | 1 +
 configs/amarula_a64_relic_defconfig          | 1 +
 configs/parrot_r16_defconfig                 | 1 +
 drivers/fastboot/Kconfig                     | 3 +--
 6 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
index 2851a461e8..8cedf9cf24 100644
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
@@ -30,4 +30,5 @@ CONFIG_SCSI=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
diff --git a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig
index 3bb8c4c7e6..c96d7ada7c 100644
--- a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig
+++ b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig
@@ -30,4 +30,5 @@ CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_SCSI=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
index 7f5aaab5fb..80741b58f9 100644
--- a/configs/Sinlinx_SinA33_defconfig
+++ b/configs/Sinlinx_SinA33_defconfig
@@ -22,5 +22,6 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_FUNCTION_MASS_STORAGE=y
diff --git a/configs/amarula_a64_relic_defconfig b/configs/amarula_a64_relic_defconfig
index b72cbfabc6..caeb3f6008 100644
--- a/configs/amarula_a64_relic_defconfig
+++ b/configs/amarula_a64_relic_defconfig
@@ -12,4 +12,5 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
diff --git a/configs/parrot_r16_defconfig b/configs/parrot_r16_defconfig
index 936f08185f..242886f78e 100644
--- a/configs/parrot_r16_defconfig
+++ b/configs/parrot_r16_defconfig
@@ -20,5 +20,6 @@ CONFIG_CONS_INDEX=5
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_FUNCTION_MASS_STORAGE=y
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index bc25ea1d9c..0e4b50e1cf 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -87,8 +87,7 @@ endchoice
 config FASTBOOT_FLASH_MMC_DEV
 	int "Define FASTBOOT MMC FLASH default device"
 	depends on FASTBOOT_FLASH_MMC
-	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
-	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
+	default 2 if ARCH_SUNXI
 	help
 	  The fastboot "flash" command requires additional information
 	  regarding the non-volatile storage device. Define this to
-- 
2.18.0.321.gffc6fa0e3



More information about the U-Boot mailing list