[U-Boot] [PATCH 21/25] fastboot: sunxi: Update fastboot mmc default device
Maxime Ripard
maxime.ripard at bootlin.com
Tue Jul 17 11:56:33 UTC 2018
On Mon, Jul 16, 2018 at 03:42:47PM +0530, Jagan Teki wrote:
> On Mon, Jul 16, 2018 at 3:16 PM, Maxime Ripard
> <maxime.ripard at bootlin.com> wrote:
> > On Mon, Jul 16, 2018 at 01:49:52PM +0530, Jagan Teki wrote:
> >> Usually eMMC is default env fat device for environment,
> >> if MMC_SUNXI_SLOT_EXTRA != 1 Sunxi always probed emmc
> >> device as 1. but with DM_MMC it can be more possible to
> >> probe eMMC as device 2 since for most of the sunxi platforms
> >> eMMC is configured mmc2.
> >>
> >> So update the fastboot mmc default device as 2 if DM_MMC and
> >> MMC_SUNXI_SLOT_EXTRA != 1 slot is 2 defined but some boards
> >> may not use all possible mmc devices or partly disabled in DT,
> >> for those update the device in board specific defconfig.
> >>
> >> 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/Sinlinx_SinA33_defconfig | 1 +
> >> configs/amarula_a64_relic_defconfig | 1 +
> >> drivers/fastboot/Kconfig | 3 ++-
> >> 4 files changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> >> index 5657fc2594..20ea254191 100644
> >> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> >> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
> >> @@ -29,4 +29,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 394534b8b5..7841219a65 100644
> >> --- a/configs/Sinlinx_SinA33_defconfig
> >> +++ b/configs/Sinlinx_SinA33_defconfig
> >> @@ -21,5 +21,6 @@ CONFIG_DFU_RAM=y
> >> CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> >> CONFIG_USB_EHCI_HCD=y
> >> CONFIG_USB_MUSB_GADGET=y
> >> +CONFIG_FASTBOOT_FLASH_MMC_DEV=1
> >
> > Your commit doesn't make any sense: the SinaA33 and the Lime2 both
> > have the eMMC on MMC2, and you claim you want to update the default to
> > point to MMC2, but you're changing both these boards to point to MMC1
> > instead?
>
> If DM_MMC and SLOT != 1 => default device 2 which is updated by
> kconfig, this is with all relevant mmc nodes are enabled but these
> two boards mmc1 is not enabled so emmc will detected in device 1
So it purely relies on luck and the fact that we don't have a wifi
device enabled yet? It seems pretty fragile, doesn't it?
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180717/151232b8/attachment.sig>
More information about the U-Boot
mailing list