From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 27 Oct 2011 16:13:53 -0700 Subject: [U-Boot] [PATCH 2/2] OMAP3: Add SPL support to Beagleboard In-Reply-To: <4EA9E4E1.6040603@compulab.co.il> References: <1319663618-10005-1-git-send-email-trini@ti.com> <1319663618-10005-3-git-send-email-trini@ti.com> <4EA9CA9D.6010209@compulab.co.il> <4EA9CD2F.1060306@ti.com> <4EA9E4E1.6040603@compulab.co.il> Message-ID: <4EA9E5B1.3080801@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/27/2011 04:10 PM, Igor Grinberg wrote: > On 10/27/2011 11:29 PM, Tom Rini wrote: >> On 10/27/2011 02:18 PM, Igor Grinberg wrote: >>> On 10/26/2011 11:13 PM, Tom Rini wrote: [snip] >>>> +/* nand_command: Send a flash command to the flash chip */ >>>> +static void nand_command(unsigned char command) >>>> +{ >>>> + WRITE_NAND_COMMAND(command, NAND_ADDR); >>>> + >>>> + if (command == NAND_CMD_RESET) { >>>> + unsigned char ret_val; >>>> + nand_command(NAND_CMD_STATUS); >>>> + do { >>>> + ret_val = READ_NAND(NAND_ADDR);/* wait till ready */ >>>> + } while ((ret_val & 0x40) != 0x40); >>> You should be using some kind of timeout, so you will not stuck in here >>> without being noticed. >> OK. I've been wondering if we shouldn't somehow make a >> not-tied-to-full-mtd nand_command more available since I suspect a few >> other boards will be in a similar situation, for probing early on. > > That would be much better solution. (Background if you've otherwise ignored the thread, on some omap3 boards we need to take a whack at NAND to see what DDR we have) OK, so, Scott, where would you suggest we put a very trivial set of nand infrastructure we need outside of the scope of loading u-boot itself from NAND ? -- Tom