From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Thu, 15 Nov 2012 17:54:28 -0600 Subject: [U-Boot] driver/mtd:IFC NAND:Initialise internal SRAM before any write In-Reply-To: <1347524765-19174-1-git-send-email-prabhakar@freescale.com> References: <1347524765-19174-1-git-send-email-prabhakar@freescale.com> Message-ID: <20121115235428.GA20031@buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Sep 12, 2012 at 10:26:05PM -0000, Prabhakar Kushwaha wrote: > IFC-1.1.0 uses 28nm techenology for SRAM. This tech has known limitaion for > SRAM i.e. "byte select" is not supported. Hence Read Modify Write is > implemented in IFC for any "system side write" into sram buffer. Reading an > uninitialized memory results in ECC Error from sram wrapper. > > Hence we must initialize/prefill SRAM buffer by any data before writing > anything in SRAM from system side. To initialize SRAM user can use "READID" > NAND command with read bytes equal to SRAM size. It will be a one time > activity post boot > > Signed-off-by: Prabhakar Kushwaha > > --- > Based upon git://git.denx.de/u-boot.git (branch master) > > This patchs depends upon following patch > http://patchwork.ozlabs.org/patch/178332/ > > drivers/mtd/nand/fsl_ifc_nand.c | 62 ++++++++++++++++++++++++++++++++++++++- > 1 file changed, 61 insertions(+), 1 deletion(-) > > diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c > index a518526..140fdc7 100644 > --- a/drivers/mtd/nand/fsl_ifc_nand.c > +++ b/drivers/mtd/nand/fsl_ifc_nand.c > @@ -30,6 +30,7 @@ > #include > #include > > +#define FSL_IFC_V1_1_0 0x01010000 > #define MAX_BANKS 4 > #define ERR_BYTE 0xFF /* Value returned for read bytes > when read failed */ > @@ -738,11 +739,66 @@ static void fsl_ifc_select_chip(struct mtd_info *mtd, int chip) > { > } > > +static void fsl_ifc_sram_init() fsl_ifc_nand.c:742:13: warning: function declaration isn't a prototype Fixed and applied to u-boot-nand-flash -Scott