From: Wolfgang Denk Date: Wed, 07 Feb 2018 09:52:12 +0100 Subject: [U-Boot] [PATCH] env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it In-Reply-To: <1517564875-10237-1-git-send-email-faiz_abbas@ti.com> References: <1517564875-10237-1-git-send-email-faiz_abbas@ti.com> Message-ID: <20180207085212.387EB2406CC@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Faiz Abbas, In message <1517564875-10237-1-git-send-email-faiz_abbas@ti.com> you wrote: > When booting from a non-MMC device, the MMC sub-system may not be > initialized when the environment is first accessed. > We need to make sure that the MMC sub-system is ready in even a non-MMC > boot case. > > Therefore, initialize mmc during .init() of environment. Do I understand correctly that you will always initialize the MMC sub-system if it is a candidate for reading the environment, even when the environment is read from elsewhere? In this case I hereby NAK this patch. U-Boot shall always use lazy initialization and never ever initialize hardware which it does not really use - see especially item 2 at [1]. [1] http://www.denx.de/wiki/U-Boot/DesignPrinciples Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The management question ... is not _whether_ to build a pilot system and throw it away. You _will_ do that. The only question is whether to plan in advance to build a throwaway, or to promise to deliver the throwaway to customers. - Fred Brooks, "The Mythical Man Month"