
Dear Alexey Brodkin,
In message 1391011745-22239-3-git-send-email-abrodkin@synopsys.com you wrote:
Signed-off-by: Alexey Brodkin abrodkin@synopsys.com
Cc: Mischa Jonker mjonker@synopsys.com Cc: Francois Bedard fbedard@synopsys.com
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<<STATUS_E1_BIT) +#define STATUS_E2_MASK (1<<STATUS_E2_BIT) +#define STATUS_A1_MASK (1<<STATUS_A1_BIT) +#define STATUS_A2_MASK (1<<STATUS_A2_BIT)
See before.
+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