From: Pavel Machek Date: Sat, 25 Apr 2015 19:27:13 +0200 Subject: [U-Boot] [PATCH RESEND 2/3] driver/ddr/altera/: Add the sdram calibration portion In-Reply-To: <1429193516-11179-3-git-send-email-dinguyen@opensource.altera.com> References: <1429193516-11179-1-git-send-email-dinguyen@opensource.altera.com> <1429193516-11179-3-git-send-email-dinguyen@opensource.altera.com> Message-ID: <20150425172713.GA16666@pollux.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 Hi! > +++ b/drivers/ddr/altera/Makefile > @@ -0,0 +1,12 @@ > +# > +# (C) Copyright 2000-2003 > +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. Umm. Looks like nothing of Wolfgang's original code is remaining at this point, you can delete this. > +/****************************************************************************** > + ****************************************************************************** > + ** NOTE: Special Rules for Globale Variables ** > + ** ** They are global, not globale. > + ** All global variables that are explicitly initialized (including ** > + ** explicitly initialized to zero), are only initialized once, during ** > + ** configuration time, and not again on reset. This means that they ** > + ** preserve their current contents across resets, which is needed for some ** > + ** special cases involving communication with external modules. In ** > + ** addition, this avoids paying the price to have the memory initialized, ** > + ** even for zeroed data, provided it is explicitly set to zero in the code, ** > + ** and doesn't rely on implicit initialization. ** Is this true for variables in this .c file, or for all of them? > +/* > + * Temporary workaround to place the initial stack pointer at a safe > + * offset from end > + */ > +asm(".global __alt_stack_pointer"); > +asm("__alt_stack_pointer = " __stringify(STACK_POINTER)); How is this different from normal variable? > +/* For HPS running on actual hardware */ > + > +#define DLEVEL 0 DEBUG_LEVEL? > +/* > + * space around comma is required for varargs macro to remove comma if args > + * is empty > + */ > +#define BFM_GBL_SET(field, value) > +#define BFM_GBL_GET(field) ((long unsigned int)0) > +#define BFM_STAGE(stage) > +#define BFM_INC_VFIFO > +#define COV(label) I don't get the comment, or the macros. Can you just remove them? Thanks, Pavel