mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 23:50:26 +09:00
arm: powerpc: Tidy up code style for interrupt functions
Remove the unwanted space before the bracket. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
1eb69ae498
commit
9d3915b2df
@ -30,7 +30,7 @@ int cleanup_before_linux (void)
|
|||||||
* we turn off caches etc ...
|
* we turn off caches etc ...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disable_interrupts ();
|
disable_interrupts();
|
||||||
|
|
||||||
/* turn off I/D-cache */
|
/* turn off I/D-cache */
|
||||||
icache_disable();
|
icache_disable();
|
||||||
|
@ -28,7 +28,7 @@ int cleanup_before_linux (void)
|
|||||||
* we turn off caches etc ...
|
* we turn off caches etc ...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disable_interrupts ();
|
disable_interrupts();
|
||||||
|
|
||||||
/* turn off I/D-cache */
|
/* turn off I/D-cache */
|
||||||
icache_disable();
|
icache_disable();
|
||||||
|
@ -28,7 +28,7 @@ int cleanup_before_linux (void)
|
|||||||
* we turn off caches etc ...
|
* we turn off caches etc ...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disable_interrupts ();
|
disable_interrupts();
|
||||||
|
|
||||||
|
|
||||||
/* turn off I/D-cache */
|
/* turn off I/D-cache */
|
||||||
|
@ -29,7 +29,7 @@ int cleanup_before_linux (void)
|
|||||||
* we turn off caches etc ...
|
* we turn off caches etc ...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disable_interrupts ();
|
disable_interrupts();
|
||||||
|
|
||||||
/* ARM926E-S needs the protection unit enabled for the icache to have
|
/* ARM926E-S needs the protection unit enabled for the icache to have
|
||||||
* been enabled - left for possible later use
|
* been enabled - left for possible later use
|
||||||
|
@ -30,7 +30,7 @@ int cleanup_before_linux (void)
|
|||||||
* just disable everything that can disturb booting linux
|
* just disable everything that can disturb booting linux
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disable_interrupts ();
|
disable_interrupts();
|
||||||
|
|
||||||
/* turn off I-cache */
|
/* turn off I-cache */
|
||||||
icache_disable();
|
icache_disable();
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int interrupt_init (void)
|
int interrupt_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* setup up stacks if necessary
|
* setup up stacks if necessary
|
||||||
@ -35,11 +35,11 @@ int interrupt_init (void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_interrupts (void)
|
void enable_interrupts(void)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int disable_interrupts (void)
|
int disable_interrupts(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ static __inline__ void set_sr (unsigned short sr)
|
|||||||
/*
|
/*
|
||||||
* Install and free an interrupt handler
|
* Install and free an interrupt handler
|
||||||
*/
|
*/
|
||||||
void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
|
void irq_install_handler(int vec, interrupt_handler_t * handler, void *arg)
|
||||||
{
|
{
|
||||||
if ((vec < 0) || (vec >= NR_IRQS)) {
|
if ((vec < 0) || (vec >= NR_IRQS)) {
|
||||||
printf ("irq_install_handler: wrong interrupt vector %d\n",
|
printf ("irq_install_handler: wrong interrupt vector %d\n",
|
||||||
@ -54,7 +54,7 @@ void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
|
|||||||
irq_vecs[vec].arg = arg;
|
irq_vecs[vec].arg = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void irq_free_handler (int vec)
|
void irq_free_handler(int vec)
|
||||||
{
|
{
|
||||||
if ((vec < 0) || (vec >= NR_IRQS)) {
|
if ((vec < 0) || (vec >= NR_IRQS)) {
|
||||||
return;
|
return;
|
||||||
@ -64,7 +64,7 @@ void irq_free_handler (int vec)
|
|||||||
irq_vecs[vec].arg = NULL;
|
irq_vecs[vec].arg = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_interrupts (void)
|
void enable_interrupts(void)
|
||||||
{
|
{
|
||||||
unsigned short sr;
|
unsigned short sr;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ void enable_interrupts (void)
|
|||||||
set_sr (sr & ~0x0700);
|
set_sr (sr & ~0x0700);
|
||||||
}
|
}
|
||||||
|
|
||||||
int disable_interrupts (void)
|
int disable_interrupts(void)
|
||||||
{
|
{
|
||||||
unsigned short sr;
|
unsigned short sr;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ struct irq_action {
|
|||||||
|
|
||||||
static struct irq_action vecs[32];
|
static struct irq_action vecs[32];
|
||||||
|
|
||||||
int disable_interrupts (void)
|
int disable_interrupts(void)
|
||||||
{
|
{
|
||||||
int val = rdctl (CTL_STATUS);
|
int val = rdctl (CTL_STATUS);
|
||||||
wrctl (CTL_STATUS, val & ~STATUS_IE);
|
wrctl (CTL_STATUS, val & ~STATUS_IE);
|
||||||
@ -36,7 +36,7 @@ void enable_interrupts( void )
|
|||||||
wrctl (CTL_STATUS, val | STATUS_IE);
|
wrctl (CTL_STATUS, val | STATUS_IE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void external_interrupt (struct pt_regs *regs)
|
void external_interrupt(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned irqs;
|
unsigned irqs;
|
||||||
struct irq_action *act;
|
struct irq_action *act;
|
||||||
@ -73,7 +73,7 @@ static void def_hdlr (void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
|
void irq_install_handler(int irq, interrupt_handler_t *hdlr, void *arg)
|
||||||
{
|
{
|
||||||
|
|
||||||
int flag;
|
int flag;
|
||||||
@ -84,7 +84,7 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
|
|||||||
return;
|
return;
|
||||||
act = &vecs[irq];
|
act = &vecs[irq];
|
||||||
|
|
||||||
flag = disable_interrupts ();
|
flag = disable_interrupts();
|
||||||
if (hdlr) {
|
if (hdlr) {
|
||||||
act->handler = hdlr;
|
act->handler = hdlr;
|
||||||
act->arg = arg;
|
act->arg = arg;
|
||||||
@ -95,11 +95,11 @@ void irq_install_handler (int irq, interrupt_handler_t *hdlr, void *arg)
|
|||||||
ena &= ~(1 << irq); /* disable */
|
ena &= ~(1 << irq); /* disable */
|
||||||
}
|
}
|
||||||
wrctl (CTL_IENABLE, ena);
|
wrctl (CTL_IENABLE, ena);
|
||||||
if (flag) enable_interrupts ();
|
if (flag) enable_interrupts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int interrupt_init (void)
|
int interrupt_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ int interrupt_init (void)
|
|||||||
vecs[i].count = 0;
|
vecs[i].count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_interrupts ();
|
enable_interrupts();
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ void watchdog_reset (void)
|
|||||||
immr->wdt.swsrr = 0xaa39;
|
immr->wdt.swsrr = 0xaa39;
|
||||||
|
|
||||||
if (re_enable)
|
if (re_enable)
|
||||||
enable_interrupts ();
|
enable_interrupts();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ void interrupt_init_cpu (unsigned *decrementer_count)
|
|||||||
* Handle external interrupts
|
* Handle external interrupts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void external_interrupt (struct pt_regs *regs)
|
void external_interrupt(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,12 +45,12 @@ void external_interrupt (struct pt_regs *regs)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
irq_install_handler (int irq, interrupt_handler_t * handler, void *arg)
|
irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void irq_free_handler (int irq)
|
void irq_free_handler(int irq)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,5 +108,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
*/
|
*/
|
||||||
void external_interrupt(struct pt_regs *regs)
|
void external_interrupt(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
puts("external_interrupt (oops!)\n");
|
puts("external_interrupt(oops!)\n");
|
||||||
}
|
}
|
||||||
|
@ -38,13 +38,13 @@ static __inline__ void set_dec (unsigned long val)
|
|||||||
}
|
}
|
||||||
#endif /* !CONFIG_MPC83XX_TIMER */
|
#endif /* !CONFIG_MPC83XX_TIMER */
|
||||||
|
|
||||||
void enable_interrupts (void)
|
void enable_interrupts(void)
|
||||||
{
|
{
|
||||||
set_msr (get_msr () | MSR_EE);
|
set_msr (get_msr () | MSR_EE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns flag if MSR_EE was set before */
|
/* returns flag if MSR_EE was set before */
|
||||||
int disable_interrupts (void)
|
int disable_interrupts(void)
|
||||||
{
|
{
|
||||||
ulong msr = get_msr ();
|
ulong msr = get_msr ();
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ int disable_interrupts (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_MPC83XX_TIMER
|
#ifndef CONFIG_MPC83XX_TIMER
|
||||||
int interrupt_init (void)
|
int interrupt_init(void)
|
||||||
{
|
{
|
||||||
/* call cpu specific function from $(CPU)/interrupts.c */
|
/* call cpu specific function from $(CPU)/interrupts.c */
|
||||||
interrupt_init_cpu (&decrementer_count);
|
interrupt_init_cpu (&decrementer_count);
|
||||||
@ -67,7 +67,7 @@ int interrupt_init (void)
|
|||||||
|
|
||||||
static volatile ulong timestamp = 0;
|
static volatile ulong timestamp = 0;
|
||||||
|
|
||||||
void timer_interrupt (struct pt_regs *regs)
|
void timer_interrupt(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
/* call cpu specific function from $(CPU)/interrupts.c */
|
/* call cpu specific function from $(CPU)/interrupts.c */
|
||||||
timer_interrupt_cpu (regs);
|
timer_interrupt_cpu (regs);
|
||||||
|
@ -6,16 +6,16 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
int interrupt_init (void)
|
int interrupt_init(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_interrupts (void)
|
void enable_interrupts(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int disable_interrupts (void){
|
int disable_interrupts(void){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
|
|||||||
|
|
||||||
cflag = icache_status();
|
cflag = icache_status();
|
||||||
icache_disable();
|
icache_disable();
|
||||||
iflag = disable_interrupts ();
|
iflag = disable_interrupts();
|
||||||
|
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
|
|||||||
udelay (10000);
|
udelay (10000);
|
||||||
|
|
||||||
if (iflag)
|
if (iflag)
|
||||||
enable_interrupts ();
|
enable_interrupts();
|
||||||
|
|
||||||
if (cflag)
|
if (cflag)
|
||||||
icache_enable();
|
icache_enable();
|
||||||
@ -270,7 +270,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
|
|||||||
|
|
||||||
cflag = icache_status();
|
cflag = icache_status();
|
||||||
icache_disable();
|
icache_disable();
|
||||||
iflag = disable_interrupts ();
|
iflag = disable_interrupts();
|
||||||
|
|
||||||
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
|
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
|
||||||
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
|
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
|
||||||
@ -301,7 +301,7 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
|
|||||||
rc = ERR_PROG_ERROR;
|
rc = ERR_PROG_ERROR;
|
||||||
|
|
||||||
if (iflag)
|
if (iflag)
|
||||||
enable_interrupts ();
|
enable_interrupts();
|
||||||
|
|
||||||
if (cflag)
|
if (cflag)
|
||||||
icache_enable();
|
icache_enable();
|
||||||
|
Loading…
Reference in New Issue
Block a user