On Tue, Jul 17, 2018 at 5:24 PM, Maxime Ripard <maxime.rip...@bootlin.com> wrote: > On Mon, Jul 16, 2018 at 03:46:10PM +0530, Jagan Teki wrote: >> On Mon, Jul 16, 2018 at 3:17 PM, Maxime Ripard >> <maxime.rip...@bootlin.com> wrote: >> > On Mon, Jul 16, 2018 at 01:49:53PM +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 env default device as 2 if DM_MMC and >> >> MMC_SUNXI_SLOT_EXTRA != 1 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 <oli...@schinagl.nl> >> >> Cc: Hans de Goede <hdego...@redhat.com> >> >> Cc: Marcus Cooper <codekip...@gmail.com> >> >> Cc: Stefan Mavrodiev <ste...@olimex.com> >> >> Cc: Paul Kocialkowski <cont...@paulk.fr> >> >> Cc: Chen-Yu Tsai <w...@csie.org> >> >> Signed-off-by: Jagan Teki <ja...@amarulasolutions.com> >> >> --- >> >> configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + >> >> configs/A20-OLinuXino_MICRO-eMMC_defconfig | 1 + >> >> configs/A20-OLinuXino_MICRO_defconfig | 1 + >> >> configs/A20-Olimex-SOM-EVB_defconfig | 1 + >> >> configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 + >> >> configs/Mele_M3_defconfig | 1 + >> >> configs/Orangepi_mini_defconfig | 1 + >> >> configs/Sinlinx_SinA33_defconfig | 1 + >> >> configs/Yones_Toptech_BD1078_defconfig | 1 + >> >> configs/amarula_a64_relic_defconfig | 1 + >> >> env/Kconfig | 3 ++- >> >> 11 files changed, 12 insertions(+), 1 deletion(-) >> >> >> >> diff --git a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> index 20ea254191..98a8ceb178 100644 >> >> --- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> +++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PC17" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_I2C1_ENABLE=y >> >> diff --git a/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> b/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> index f7e7cbab0a..1552960d88 100644 >> >> --- a/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> +++ b/configs/A20-OLinuXino_MICRO-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_I2C1_ENABLE=y >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_SATAPWR="PB8" >> >> diff --git a/configs/A20-OLinuXino_MICRO_defconfig >> >> b/configs/A20-OLinuXino_MICRO_defconfig >> >> index 8dcbdc08f9..b5f1b7efe2 100644 >> >> --- a/configs/A20-OLinuXino_MICRO_defconfig >> >> +++ b/configs/A20-OLinuXino_MICRO_defconfig >> >> @@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC3_CD_PIN="PH11" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=3 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_I2C1_ENABLE=y >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_SATAPWR="PB8" >> >> diff --git a/configs/A20-Olimex-SOM-EVB_defconfig >> >> b/configs/A20-Olimex-SOM-EVB_defconfig >> >> index a06499e2d0..58f6fbad91 100644 >> >> --- a/configs/A20-Olimex-SOM-EVB_defconfig >> >> +++ b/configs/A20-Olimex-SOM-EVB_defconfig >> >> @@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC3_CD_PIN="PH0" >> >> CONFIG_MMC3_PINS="PH" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=3 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PB9" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_SATAPWR="PC3" >> >> diff --git a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> index 3bb8c4c7e6..ac4f841c4e 100644 >> >> --- a/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> +++ b/configs/A20-Olimex-SOM204-EVB-eMMC_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_VBUS_PIN="PC17" >> >> CONFIG_USB0_VBUS_DET="PH5" >> >> CONFIG_I2C1_ENABLE=y >> >> diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig >> >> index 9f48bd91e0..93a2395aee 100644 >> >> --- a/configs/Mele_M3_defconfig >> >> +++ b/configs/Mele_M3_defconfig >> >> @@ -5,6 +5,7 @@ CONFIG_MACH_SUN7I=y >> >> CONFIG_DRAM_CLK=384 >> >> CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_VIDEO_VGA=y >> >> CONFIG_VIDEO_COMPOSITE=y >> >> CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-m3" >> >> diff --git a/configs/Orangepi_mini_defconfig >> >> b/configs/Orangepi_mini_defconfig >> >> index 46f27be254..d562273bef 100644 >> >> --- a/configs/Orangepi_mini_defconfig >> >> +++ b/configs/Orangepi_mini_defconfig >> >> @@ -7,6 +7,7 @@ CONFIG_MACPWR="PH23" >> >> CONFIG_MMC0_CD_PIN="PH10" >> >> CONFIG_MMC3_CD_PIN="PH11" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=3 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB1_VBUS_PIN="PH26" >> >> CONFIG_USB2_VBUS_PIN="PH22" >> >> CONFIG_VIDEO_COMPOSITE=y >> >> diff --git a/configs/Sinlinx_SinA33_defconfig >> >> b/configs/Sinlinx_SinA33_defconfig >> >> index 7841219a65..061f27c9db 100644 >> >> --- a/configs/Sinlinx_SinA33_defconfig >> >> +++ b/configs/Sinlinx_SinA33_defconfig >> >> @@ -6,6 +6,7 @@ CONFIG_DRAM_CLK=552 >> >> CONFIG_DRAM_ZQ=15291 >> >> CONFIG_MMC0_CD_PIN="PB4" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=2 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> >> CONFIG_USB0_ID_DET="PH8" >> >> >> >> CONFIG_VIDEO_LCD_MODE="x:1024,y:600,depth:18,pclk_khz:66000,le:90,ri:160,up:3,lo:127,hs:70,vs:20,sync:3,vmode:0" >> >> CONFIG_VIDEO_LCD_DCLK_PHASE=0 >> >> diff --git a/configs/Yones_Toptech_BD1078_defconfig >> >> b/configs/Yones_Toptech_BD1078_defconfig >> >> index c49cbcbc3c..cad5618d54 100644 >> >> --- a/configs/Yones_Toptech_BD1078_defconfig >> >> +++ b/configs/Yones_Toptech_BD1078_defconfig >> >> @@ -7,6 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1" >> >> CONFIG_MMC1_CD_PIN="PH2" >> >> CONFIG_MMC1_PINS="PH" >> >> CONFIG_MMC_SUNXI_SLOT_EXTRA=1 >> >> +CONFIG_ENV_FAT_DEVICE_AND_PART="1:auto" >> > >> > Again, you're breaking all these boards while saying you want to fix >> > them. >> >> Let me know what is breaking here, I'm trying to update the env >> device like before even if the order or detection follow as per DT. > > If the number is the one coming from the DT, then with DM_MMC, the ID > will change for them as well and they will have the FAT device become > 2 if they have an eMMC. Which is why you're changing the default. > > However, you're also changing the defconfig so that the number remain > the same, so you'll end up with the previous id being used, 1, which > is not the eMMC one.
ie what I'm trying here. Say for example A20-OLinuXino-LIME2-eMMC board based on the kconfig with 2 SLOTS and DM_MMC defined the default fat device is 2 but since the sun7i-a20-olinuxino-lime2-emmc.dts has only mmc0 and mmc2 (which is eMMC) due to missing mmc1 the eMMC will probed on device 1 ie what I'm trying to update in defconfig. > A proper fix would be to simply changing the default. No idea how can we support this, how about give device input to saveenv command. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot