[PATCH 01/23] raspberrypi: Use shared bspreset.c
Gedare Bloom
gedare at rtems.org
Thu Sep 4 16:18:35 UTC 2014
On Thu, Sep 4, 2014 at 12:16 PM, Gedare Bloom <gedare at rtems.org> wrote:
> On Wed, Sep 3, 2014 at 11:25 AM, Joel Sherrill
> <joel.sherrill at oarcorp.com> wrote:
>> ---
>> c/src/lib/libbsp/arm/csb337/startup/bspreset.c | 1 +
>> c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 2 +-
>> .../lib/libbsp/arm/raspberrypi/startup/bspreset.c | 35 ------------
>> testsuites/sptests/spintr_err01/init.c | 65 +++++++++++-----------
>> 4 files changed, 34 insertions(+), 69 deletions(-)
>> delete mode 100644 c/src/lib/libbsp/arm/raspberrypi/startup/bspreset.c
>>
>> diff --git a/c/src/lib/libbsp/arm/csb337/startup/bspreset.c b/c/src/lib/libbsp/arm/csb337/startup/bspreset.c
>> index 1167d92..940ff7f 100644
>> --- a/c/src/lib/libbsp/arm/csb337/startup/bspreset.c
>> +++ b/c/src/lib/libbsp/arm/csb337/startup/bspreset.c
>> @@ -17,6 +17,7 @@ void bsp_reset(void)
>> {
>> rtems_interrupt_level level;
>>
>> + (void) level;
>> rtems_interrupt_disable(level);
> Is it ok to put (void) level; and then use level?
Nevermind I see this is to eliminate a different warning. Also,
http://stackoverflow.com/questions/8071579/hide-gcc-warning-set-but-not-used
>
>>
>> /* Enable the watchdog timer, then wait for the world to end. */
>> diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
>> index a8d98b4..cda8510 100644
>> --- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
>> +++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
>> @@ -92,7 +92,7 @@ libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
>> libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c
>>
>> # Startup
>> -libbsp_a_SOURCES += startup/bspreset.c
>> +libbsp_a_SOURCES += ../../shared/bspreset_loop.c
>> libbsp_a_SOURCES += startup/bspstart.c
>>
>> # IRQ
>> diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/bspreset.c b/c/src/lib/libbsp/arm/raspberrypi/startup/bspreset.c
>> deleted file mode 100644
>> index 4b3c732..0000000
>> --- a/c/src/lib/libbsp/arm/raspberrypi/startup/bspreset.c
>> +++ /dev/null
>> @@ -1,35 +0,0 @@
>> -/**
>> - * @file
>> - *
>> - * @ingroup arm_start
>> - *
>> - * @brief Raspberry Pi reset code.
>> - */
>> -
>> -/*
>> - * Copyright (c) 2013 by Alan Cudmore
>> - * Based on work by:
>> - * Copyright (c) 2009
>> - * embedded brains GmbH
>> - * Obere Lagerstr. 30
>> - * D-82178 Puchheim
>> - * Germany
>> - * <rtems at embedded-brains.de>
>> - *
>> - * The license and distribution terms for this file may be
>> - * found in the file LICENSE in this distribution or at
>> - *
>> - * http://www.rtems.org/license/LICENSE
>> - *
>> - */
>> -
>> -#include <rtems.h>
>> -
>> -#include <bsp/bootcard.h>
>> -
>> -void bsp_reset( void)
>> -{
>> - while (true) {
>> - /* Do nothing */
>> - }
>> -}
>> diff --git a/testsuites/sptests/spintr_err01/init.c b/testsuites/sptests/spintr_err01/init.c
>> index 84ebfdb..490a0e6 100644
>> --- a/testsuites/sptests/spintr_err01/init.c
>> +++ b/testsuites/sptests/spintr_err01/init.c
>> @@ -20,11 +20,8 @@ rtems_task Init(
>> rtems_task_argument argument
>> )
>> {
>> - rtems_status_code status;
>> -
>> TEST_BEGIN();
>> - #if ((CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE) || \
>> - defined(_C3x) || defined(_C4x))
>> + #if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
>> puts(
>> "TA1 - rtems_interrupt_catch - "
>> "bad handler RTEMS_INVALID_ADDRESS -- SKIPPED"
>> @@ -32,36 +29,38 @@ rtems_task Init(
>> puts(
>> "TA1 - rtems_interrupt_catch - "
>> "old isr RTEMS_INVALID_ADDRESS - SKIPPED" );
>> -#else
>> - rtems_isr_entry old_service_routine;
>> - status = rtems_interrupt_catch(
>> - Service_routine,
>> - CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 1,
>> - &old_service_routine
>> - );
>> - fatal_directive_status(
>> - status,
>> - RTEMS_INVALID_NUMBER,
>> - "rtems_interrupt_catch with invalid vector"
>> - );
>> - puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
>> + #else
>> + rtems_status_code status;
>>
>> - status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
>> - fatal_directive_status(
>> - status,
>> - RTEMS_INVALID_ADDRESS,
>> - "rtems_interrupt_catch with invalid handler"
>> - );
>> - puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
>> + rtems_isr_entry old_service_routine;
>> + status = rtems_interrupt_catch(
>> + Service_routine,
>> + CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 1,
>> + &old_service_routine
>> + );
>> + fatal_directive_status(
>> + status,
>> + RTEMS_INVALID_NUMBER,
>> + "rtems_interrupt_catch with invalid vector"
>> + );
>> + puts( "TA1 - rtems_interrupt_catch - RTEMS_INVALID_NUMBER" );
>> +
>> + status = rtems_interrupt_catch( NULL, 3, &old_service_routine );
>> + fatal_directive_status(
>> + status,
>> + RTEMS_INVALID_ADDRESS,
>> + "rtems_interrupt_catch with invalid handler"
>> + );
>> + puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" );
>> +
>> + status = rtems_interrupt_catch( Service_routine, 3, NULL );
>> + fatal_directive_status(
>> + status,
>> + RTEMS_INVALID_ADDRESS,
>> + "rtems_interrupt_catch with invalid old isr pointer"
>> + );
>> + puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
>> + #endif
>>
>> - status = rtems_interrupt_catch( Service_routine, 3, NULL );
>> - fatal_directive_status(
>> - status,
>> - RTEMS_INVALID_ADDRESS,
>> - "rtems_interrupt_catch with invalid old isr pointer"
>> - );
>> - puts( "TA1 - rtems_interrupt_catch - old isr RTEMS_INVALID_ADDRESS" );
>> -#endif
>> -
>> TEST_END();
>> }
>> --
>> 1.9.3
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list