mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-24 11:59:46 +09:00
Blackfin: enable support for nested interrupts
During cpu init, make sure we initialize the CEC properly so that interrupts can fire and be handled while U-Boot is running. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
39782727e1
commit
70c4c032ea
@ -75,7 +75,7 @@ ENTRY(_start)
|
|||||||
|
|
||||||
serial_early_puts("Init Registers");
|
serial_early_puts("Init Registers");
|
||||||
|
|
||||||
/* Disable nested interrupts and enable CYCLES for udelay() */
|
/* Disable self-nested interrupts and enable CYCLES for udelay() */
|
||||||
R0 = CCEN | 0x30;
|
R0 = CCEN | 0x30;
|
||||||
SYSCFG = R0;
|
SYSCFG = R0;
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ ENTRY(_start)
|
|||||||
|
|
||||||
/* Now lower ourselves from the highest interrupt level to
|
/* Now lower ourselves from the highest interrupt level to
|
||||||
* the lowest. We do this by masking all interrupts but 15,
|
* the lowest. We do this by masking all interrupts but 15,
|
||||||
* setting the 15 handler to "board_init_f", raising the 15
|
* setting the 15 handler to ".Lenable_nested", raising the 15
|
||||||
* interrupt, and then returning from the highest interrupt
|
* interrupt, and then returning from the highest interrupt
|
||||||
* level to the dummy "jump" until the interrupt controller
|
* level to the dummy "jump" until the interrupt controller
|
||||||
* services the pending 15 interrupt.
|
* services the pending 15 interrupt.
|
||||||
@ -190,8 +190,8 @@ ENTRY(_start)
|
|||||||
r1 = r6;
|
r1 = r6;
|
||||||
p0.l = LO(EVT15);
|
p0.l = LO(EVT15);
|
||||||
p0.h = HI(EVT15);
|
p0.h = HI(EVT15);
|
||||||
p1.l = _cpu_init_f;
|
p1.l = .Lenable_nested;
|
||||||
p1.h = _cpu_init_f;
|
p1.h = .Lenable_nested;
|
||||||
[p0] = p1;
|
[p0] = p1;
|
||||||
p2.l = LO(IMASK);
|
p2.l = LO(IMASK);
|
||||||
p2.h = HI(IMASK);
|
p2.h = HI(IMASK);
|
||||||
@ -204,6 +204,12 @@ ENTRY(_start)
|
|||||||
reti = p4;
|
reti = p4;
|
||||||
rti;
|
rti;
|
||||||
|
|
||||||
|
/* Enable nested interrupts before continuing with cpu init */
|
||||||
|
.Lenable_nested:
|
||||||
|
cli r7;
|
||||||
|
[--sp] = reti;
|
||||||
|
jump.l _cpu_init_f;
|
||||||
|
|
||||||
.LWAIT_HERE:
|
.LWAIT_HERE:
|
||||||
jump .LWAIT_HERE;
|
jump .LWAIT_HERE;
|
||||||
ENDPROC(_start)
|
ENDPROC(_start)
|
||||||
|
Loading…
Reference in New Issue
Block a user