All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 22/25] env: sunxi: Update default env fat device
Date: Tue, 17 Jul 2018 13:54:29 +0200	[thread overview]
Message-ID: <20180717115429.7lnj2iv2zmlydeie@flea.home> (raw)
In-Reply-To: <CAD6G_RRecTo1ucyJcAi5q_JNM7U=MZEwprqBqviZ80npkkgXEQ@mail.gmail.com>

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.ripard@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 <oliver@schinagl.nl>
> >> Cc: Hans de Goede <hdegoede@redhat.com>
> >> Cc: Marcus Cooper <codekipper@gmail.com>
> >> Cc: Stefan Mavrodiev <stefan@olimex.com>
> >> Cc: Paul Kocialkowski <contact@paulk.fr>
> >> Cc: Chen-Yu Tsai <wens@csie.org>
> >> Signed-off-by: Jagan Teki <jagan@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.

A proper fix would be to simply changing the default.

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/a11e1644/attachment-0001.sig>

  reply	other threads:[~2018-07-17 11:54 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16  8:19 [U-Boot] [PATCH 00/25] sunxi: Enable DM_MMC for U-Boot proper Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 01/25] ARM: dts: sun4i: Sync A10 MMC nodes from Linux Jagan Teki
2018-07-16  9:30   ` Maxime Ripard
2018-07-16 10:28     ` Jagan Teki
2018-07-16 13:37       ` Maxime Ripard
2018-07-16  8:19 ` [U-Boot] [PATCH 02/25] ARM: dts: sun4i: Sync A10 board dts mmc0 node " Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 03/25] ARM: dts: sun4i: Add mmc0 node for iNet 3F Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 04/25] ARM: dts: sun4i: Add mmc0 node for iNet 3W Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 05/25] dm: mmc: sunxi: Refactor ahb gate and clock setup Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 06/25] dm: mmc: sunxi: Add ahb reset0 register write Jagan Teki
2018-07-16  9:39   ` Maxime Ripard
2018-07-16  9:55     ` Jagan Teki
2018-07-16 10:02       ` Maxime Ripard
2018-07-16 10:39         ` Jagan Teki
2018-07-16 13:36           ` Maxime Ripard
2018-07-16  8:19 ` [U-Boot] [PATCH 07/25] ARM: dts: sun7i: Sync A20 MMC nodes from Linux Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 08/25] ARM: dts: sun7i: Add mmc0 node for Primo73 tablet Jagan Teki
2018-07-16  9:40   ` Maxime Ripard
2018-07-16 10:03     ` Jagan Teki
2018-07-16 10:09       ` Chen-Yu Tsai
2018-07-16  8:19 ` [U-Boot] [PATCH 09/25] ARM: dts: sun7i: Add mmc0 node for Ainol AW1 Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 10/25] ARM: dts: sun7i: Add mmc0 node for Mele M5 Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 11/25] ARM: dts: sun7i: Add mmc0 node for Toptech BD1078 Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 12/25] sunxi: A20: Enable DM_MMC Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 13/25] mmc: sunxi: Add mmc, emmc H5/A64 compatible Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 14/25] sunxi: H3_H5: Enable DM_MMC Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 15/25] sunxi: A64: " Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 16/25] ARM: dts: sun8i: Update A83T dts(i) files from Linux Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 17/25] mmc: sunxi: Add A83T emmc compatible Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 18/25] sunxi: A83T: Enable DM_MMC Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 19/25] ARM: dts: sun8i: Update R40 dts(i) files from Linux Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 20/25] sunxi: V40: Enable DM_MMC Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 21/25] fastboot: sunxi: Update fastboot mmc default device Jagan Teki
2018-07-16  9:46   ` Maxime Ripard
2018-07-16 10:12     ` Jagan Teki
2018-07-16 11:11       ` Alex Kiernan
2018-07-17 11:57         ` Maxime Ripard
2018-07-18 19:15           ` Alex Kiernan
2018-07-19 13:26             ` Maxime Ripard
2018-07-19 18:11               ` Jagan Teki
2018-07-20  7:39                 ` Maxime Ripard
2018-07-19 18:43               ` Alex Kiernan
2018-07-20  7:34                 ` Maxime Ripard
2018-07-17 11:56       ` Maxime Ripard
2018-07-16  8:19 ` [U-Boot] [PATCH 22/25] env: sunxi: Update default env fat device Jagan Teki
2018-07-16  9:47   ` Maxime Ripard
2018-07-16 10:16     ` Jagan Teki
2018-07-17 11:54       ` Maxime Ripard [this message]
2018-07-19 18:21         ` Jagan Teki
2018-07-16  8:19 ` [U-Boot] [PATCH 23/25] sunxi: Use mmc_bootdev=2 for MMC2 boot Jagan Teki
2018-07-16  9:48   ` Maxime Ripard
2018-07-16 10:21     ` Jagan Teki
2018-07-17 11:55       ` Maxime Ripard
2018-07-16  8:19 ` [U-Boot] [DO NOT MERGE PATCH 24/25] sunxi: A13/A31: Enable DM_MMC Jagan Teki
2018-07-16  8:19 ` [U-Boot] [DO NOT MERGE PATCH 25/25] sunxi: A23/A33/V3S: " Jagan Teki
2018-07-16  8:35 ` [U-Boot] [PATCH 00/25] sunxi: Enable DM_MMC for U-Boot proper Chen-Yu Tsai
2018-07-16  9:52   ` Maxime Ripard
2018-07-16 11:08     ` Andre Przywara
2018-07-16 11:42       ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180717115429.7lnj2iv2zmlydeie@flea.home \
    --to=maxime.ripard@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.