[PATCH 30] LEON3: halt boot if IRQ controller not found
Daniel Hellstrom
daniel at gaisler.com
Fri Apr 6 07:00:04 UTC 2012
On 04/05/2012 05:30 PM, Joel Sherrill wrote:
> This looks OK with just one question.
>
> Is printk() available for use here to have a message?
Unfortunately not. I might try to fix this in the future, I have been thinking of moving IRQCTRL initialization and timer discovery (for frequency detection) away from amba_initialize(). I see no
point in initializing the IRQ controller from amba.c, then I could perhaps detect the debug-UART earlier, I will keep it in mind.
Daniel
>
> On 04/05/2012 10:23 AM, Daniel Hellstrom wrote:
>> Signed-off-by: Daniel Hellstrom<daniel at gaisler.com>
>> ---
>> c/src/lib/libbsp/sparc/leon3/amba/amba.c | 13 +++++++++----
>> 1 files changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/c/src/lib/libbsp/sparc/leon3/amba/amba.c b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
>> index 03af226..e334aec 100644
>> --- a/c/src/lib/libbsp/sparc/leon3/amba/amba.c
>> +++ b/c/src/lib/libbsp/sparc/leon3/amba/amba.c
>> @@ -44,13 +44,18 @@ void amba_initialize(void)
>> /* Scan the AMBA Plug&Play info at the default LEON3 area */
>> amba_scan(&amba_conf,LEON3_IO_AREA,NULL);
>>
>> - /* Find LEON3 Interrupt controler */
>> + /* Find LEON3 Interrupt controller */
>> i = amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_IRQMP,&dev);
>> - if ( i> 0 ){
>> - /* Found APB IRQ_MP Interrupt Controller */
>> - LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) dev.start;
>> + if (i<= 0){
>> + /* PANIC IRQ controller not found!
>> + *
>> + * What else can we do but stop ...
>> + */
>> + asm volatile( "mov 1, %g1; ta 0x0" );
>> }
>>
>> + LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) dev.start;
>> +
>> /* Init Extended IRQ controller if available */
>> leon3_ext_irq_init();
>>
>
>
More information about the devel
mailing list