[PATCH 30] LEON3: halt boot if IRQ controller not found

Joel Sherrill joel.sherrill at OARcorp.com
Fri Apr 6 14:08:31 UTC 2012


Committed.

Thanks.

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();
>


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list