From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 05 Mar 2010 13:23:11 -0600 Subject: [U-Boot] What is CONFIG_HAS_DATAFLASH? In-Reply-To: <20100305191744.90796E4716D@gemini.denx.de> References: <20100305191744.90796E4716D@gemini.denx.de> Message-ID: <4B915A1F.90206@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Timur Tabi, > > In message you wrote: >> Can someone tell me what CONFIG_HAS_DATAFLASH does? > > I know this sounds like an act of darin, but how about having a look > at the README ? > > [And I really wonder why you did not find the documentation there.] CONFIG_HAS_DATAFLASH Defining this option enables DataFlash features and allows to read/write in Dataflash via the standard commands cp, md... This doesn't tell me anything. >> The reason I ask is that I'm trying to use >> CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, but I noticed that the "md" > > Why would you want to do that? This is only needed in very special > situations which involve a state of hardware that can be best > described as broken. You're right. The board I need to support is broken, IMHO. Fortunately, CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS provides a reasonably elegant fix. >> command does not use the flash_readX primitives when I ask it to >> display memory from a flash address. In examining do_mem_md(), I >> noticed CONFIG_HAS_DATAFLASH. > > Did you? I don't see any CONFIG_HAS_DATAFLASH anywhere in cmd_mem.c int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { ulong addr, length; #if defined(CONFIG_HAS_DATAFLASH) ulong nbytes, linebytes; #endif I'm not imagining things. > And this is expected - the "md" command is, as the name suggests, > intended for Memory Dumps. "Memory" is defined as something that can > be read by just putting the address on the address bus and reading > the corresponding data from the data bus, without need for any > additional code or access protocols. On hardware where > CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS is needed, you cannot really > apply the term "memory" to such a flash device - it is a storage > device, but not more. Fair enough, but I was hoping there'd be an easy way to get md to work. -- Timur Tabi Linux kernel developer at Freescale