From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 7 Nov 2012 14:49:16 -0600 Subject: [U-Boot] [Drivers PATCH 17/19] imls: Add support to list images in NAND device In-Reply-To: <5099EE7E.7060208@st.com> (from vipin.kumar@st.com on Tue Nov 6 23:15:42 2012) References: <1352244626.21833.12@snotra> <5099EE7E.7060208@st.com> Message-ID: <1352321356.27741.1@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/06/2012 11:15:42 PM, Vipin Kumar wrote: > On 11/7/2012 5:00 AM, Scott Wood wrote: >> On 11/02/2012 12:40:02 PM, Vipin Kumar wrote: >>> +#if defined(CONFIG_CMD_NAND) >>> + printf("\n"); >>> + nand_info_t *nand; >>> + image_header_t image_header; >>> + image_header_t *header = &image_header; >>> + int nand_dev = nand_curr_device; >>> + unsigned long img_size; >>> + size_t hdr_size, read_len; >>> + loff_t off; >>> + unsigned int crc; >>> + u_char *data; >>> + >>> + /* the following commands operate on the current device */ >>> + if (nand_dev < 0 || nand_dev >= CONFIG_SYS_MAX_NAND_DEVICE) { >>> + puts("\nNo NAND devices available\n"); >>> + return 0; >>> + } >> >> Please move the NAND and NOR code into their own functions. >> > > You mean I can separate the NOR list images code in one routine and > NAND in another? Yes. -Scott