From: Wolfgang Denk Date: Wed, 29 Jan 2014 21:06:59 +0100 Subject: [U-Boot] [PATCH v2 2/9] arc: add cpu files In-Reply-To: <1391011745-22239-3-git-send-email-abrodkin@synopsys.com> References: <1391011745-22239-1-git-send-email-abrodkin@synopsys.com> <1391011745-22239-3-git-send-email-abrodkin@synopsys.com> Message-ID: <20140129200659.CCC92384E2B@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 Alexey Brodkin, In message <1391011745-22239-3-git-send-email-abrodkin@synopsys.com> you wrote: > Signed-off-by: Alexey Brodkin > > Cc: Mischa Jonker > Cc: Francois Bedard > > No changes for v2. This belongs into the comment section (below the "---" line), not into the commit message. > --- ... > +int icache_status(void) > +{ > + return (read_aux_reg(ARC_REG_IC_CTRL) & IC_CTRL_CACHE_DISABLE) != > + IC_CTRL_CACHE_DISABLE; > +} > + > +void icache_enable(void) > +{ > + write_aux_reg(ARC_REG_IC_CTRL, read_aux_reg(ARC_REG_IC_CTRL) & > + ~IC_CTRL_CACHE_DISABLE); > +} I missed this in patch # 1 - why do you need these read_aux_reg() / write_aux_reg() macros? Why cannot you use standard I/O accessors instead? > +/* STATUS32 register bits related to Interrupt Handling */ > +#define STATUS_E1_BIT 1 /* Int 1 enable */ > +#define STATUS_E2_BIT 2 /* Int 2 enable */ > +#define STATUS_A1_BIT 3 /* Int 1 active */ > +#define STATUS_A2_BIT 4 /* Int 2 active */ > + > +#define STATUS_E1_MASK (1< +#define STATUS_E2_MASK (1< +#define STATUS_A1_MASK (1< +#define STATUS_A2_MASK (1< +int disable_interrupts(void) > +{ > + int status = read_aux_reg(ARC_REG_STATUS32); > + int state = (status | STATUS_E1_MASK | STATUS_E2_MASK) ? 1 : 0; > + status &= ~(STATUS_E1_MASK | STATUS_E2_MASK); > + __asm__("flag %0" : : "r" (status)); > + return state; > +} Please insert blankk line between declarations and code. Please fix globally. > +void enable_interrupts(void) > +{ > + unsigned int status = read_aux_reg(ARC_REG_STATUS32); > + status |= STATUS_E1_MASK | STATUS_E2_MASK; > + __asm__("flag %0" : : "r" (status)); > +} > + > +/* > + * Common routine to print scratch regs (r0-r12) or callee regs (r13-r25) > + * -Prints 3 regs per line and a CR. Comment and code disagree: You print "\n", not "\r" ! 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 GUIs are virtually useless. Learn tools. They're configurable, scriptable, automatable, cron-able, interoperable, etc. We don't need no brain-dead winslurping monolithic claptrap. -- Tom Christiansen in 371140df at csnews