commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=a2c26ae305aa77a2d29c4348621f11341ed8f1c9 branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2012R1
put coreb in idle after bootup if coreb support is selected Signed-off-by: Steven Miao <[email protected]> --- arch/blackfin/kernel/setup.c | 14 ++++++++++ arch/blackfin/mach-bf609/coreb_start.S | 43 +------------------------------- arch/blackfin/mach-bf609/pm.c | 42 ------------------------------- 3 files changed, 15 insertions(+), 84 deletions(-) diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 582ba86..7d8bd27 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -210,7 +210,21 @@ void __init bfin_relocate_l1_mem(void) #if defined(CONFIG_BFIN_COREB) && defined(CONFIG_BF60x) + /* unlock coreb and load a dummy startup code to coreb L1, then + * reset coreb, put coreb in idle + */ coreb_enable(); + + if (L1_CODE_LENGTH && text_l1_len) + early_dma_memcpy((void *)COREB_L1_CODE_START, _text_l1_lma, + text_l1_len); + + bfin_write32(RCU0_CRCTL, 0x2); + + while (!(bfin_read32(RCU0_CRSTAT) & 0x2)) + continue; + + bfin_write32(RCU0_CRCTL, 0); #endif /* if necessary, copy L1 text to L1 instruction SRAM */ diff --git a/arch/blackfin/mach-bf609/coreb_start.S b/arch/blackfin/mach-bf609/coreb_start.S index 74e0270..d1f6a6f 100644 --- a/arch/blackfin/mach-bf609/coreb_start.S +++ b/arch/blackfin/mach-bf609/coreb_start.S @@ -57,49 +57,8 @@ ENTRY(_coreb_trampoline_start) fp = sp; usp = sp; - p1.h = HI(0xff700000); - p1.l = LO(0xff700000) - r0.l = 0xDEAD; - [p1] = r0; - - p0.l = lo(EVT15); - p0.h = hi(EVT15); - p1.l = _coreb_start; - p1.h = _coreb_start; - [p0] = p1; - csync; - - p0.l = lo(IMASK); - p0.h = hi(IMASK); - p1.l = IMASK_IVG15; - p1.h = 0x0; - [p0] = p1; - csync; - - raise 15; - - p0.l = .LWAIT_HERE; - p0.h = .LWAIT_HERE; - reti = p0; - nop;nop;nop; - rti; .LWAIT_HERE: + idle; jump .LWAIT_HERE; ENDPROC(_coreb_trampoline_start) ENTRY(_coreb_trampoline_end) - -ENTRY(_core1_evt11) - [--sp] = SYSCFG; - [--sp] = P0; /*orig_p0*/ - [--sp] = R0; /*orig_r0*/ - [--sp] = (R7:0,P5:0); - p0.h = _core1_evt_handle; - p0.l = _core1_evt_handle; - call (p0); - (R7:0,P5:0) = [SP++]; - sp += 8; /* Skip orig_r0/orig_p0 */ - csync; - SYSCFG = [sp++]; - csync; - rti; -ENDPROC(_core1_evt11) diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c index 0621818..153cc63 100644 --- a/arch/blackfin/mach-bf609/pm.c +++ b/arch/blackfin/mach-bf609/pm.c @@ -313,48 +313,6 @@ static irqreturn_t dpm0_isr(int irq, void *dev_id) return IRQ_HANDLED; } -#ifdef CONFIG_BFIN_COREB -void core1_evt_handle(void) -{ - unsigned int sid = bfin_read_SEC_SCI(1, SEC_CSID); - - bfin_write_SEC_SCI(1, SEC_CSID, sid); - SSYNC(); - bfin_sec_raise_irq(IRQ_SID(IRQ_SOFT0)); - bfin_write32(SEC_END, sid); -} - -asmlinkage void core1_evt11(void); - -void coreb_start(void) -{ - unsigned long ilat; - unsigned long bfin_irq_flags; - unsigned int i = 0; - - /* enable interrupt */ - __asm__ ("[--sp] = reti;"); - - ilat = bfin_read_ILAT(); - CSYNC(); - bfin_write_ILAT(ilat); - CSYNC(); - - bfin_write_EVT11(core1_evt11 - L1_CODE_START + COREB_L1_CODE_START); - - SSYNC(); - bfin_irq_flags = IMASK_IVG11; - bfin_sti(bfin_irq_flags); - - while (1) { - if (i++ > 10000000) { - bfin_sec_raise_irq(IRQ_SID(IRQ_SOFT0)); - i = 0; - } - } -} -#endif - static int __init bf609_init_pm(void) { int irq;
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
