From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 29 Aug 2011 13:56:55 +0200 Subject: [U-Boot] [PATCH 2/2 v4] powerpc/p1023rds: Disable nor flash node and enable nand flash node In-Reply-To: References: <1314602152-9114-1-git-send-email-Chunhe.Lan@freescale.com> <20110829074209.5F19F18C46F8@gemini.denx.de> Message-ID: <20110829115655.36EB2203630@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 Chunhe Lan, In message you wrote: > > > It would be more intuitive to the reader, when the enabled node would > > use an explicit > > > > status = "enabled"; > > > >> +#ifdef CONFIG_NAND_U_BOOT > >> + do_fixup_by_path_string(fdt, "nor_flash", "status", "disabled"); > >> + do_fixup_by_path_string(fdt, "nand_flash", "status", "okay"); > >> +#endif > > > > What does ""okay" mean? This is not documented anywhere. Is this > > supposed to mean "enabled"? Then please write "enabled" - for certain > > configurations it is definitely OK to disable the device. > > In the kernel, whether the status of node is enabled or not, it is > determined by > of_device_is_available( ). well, maybe you take my hint to understand that this is not an optimal implementation? > " return 1" is enabled. > " return 0" is disabled. > So, we do NOT use "enabled" to set status. This is highly counter-intuitive and fragile. Also, you fail to comment on my note about the strange "okay" string in yoru code above - this makes no sense then, either. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 bad reputation UNIX has gotten is totally undeserved, laid on by people who don't understand, who have not gotten in there and tried anything." -- Jim Joyce, owner of Jim Joyce's UNIX Bookstore