From: Wolfgang Denk Date: Sun, 08 Aug 2010 23:51:41 +0200 Subject: [U-Boot] [PATCH v2] AT91SAM9XE add embedded flash support In-Reply-To: <4C400E81.8070208@emk-elektronik.de> References: <4C400E81.8070208@emk-elektronik.de> Message-ID: <20100808215141.3D8F61536EF@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 "Reinhard Meyer (-VC)", In message <4C400E81.8070208@emk-elektronik.de> you wrote: > Add support for the embedded flash in the AT91SAM9XE128/256/512 SoCs: > - Environment can be put into that flash > - U-Boot can be in that flash > - Commands "cp" and "protect" are supported > > Signed-off-by: Reinhard Meyer > + for (i=0; i + tmp = readl(&eefc->frr); /* words 4+nplanes+1.. */ > + flash_info[0].start[i] = addr; > + flash_info[0].protect[i] = 0; > + addr += tmp; > + }; No ';' here. > + if (info->size >= (1 << 20)) { > + i = 20; > + } else { > + i = 10; > + } No braces needed for single line statements. > + printf(" Size: %ld %cB in %d Sectors\n", > + info->size >> i, > + (i == 20) ? 'M' : 'k', > + info->sector_count); Please use available functions to print sizes like that (and always use SI units, i. e. MiB and KiB if that's what you mean). > +int flash_erase (flash_info_t *info, int s_first, int s_last) > +{ > + DEBUGF("erase first=%d last=%d\n", s_first, s_last); > + return 0; > +} Is this complete? 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 What is wanted is not the will to believe, but the will to find out, which is the exact opposite. -- Bertrand Russell, "Skeptical Essays", 1928