raspberrypi: Use shared bspreset.c

This commit is contained in:
Joel Sherrill
2014-09-02 18:00:44 -05:00
parent 5f9c208084
commit be4992b193
4 changed files with 34 additions and 69 deletions

View File

@@ -17,6 +17,7 @@ void bsp_reset(void)
{ {
rtems_interrupt_level level; rtems_interrupt_level level;
(void) level;
rtems_interrupt_disable(level); rtems_interrupt_disable(level);
/* Enable the watchdog timer, then wait for the world to end. */ /* Enable the watchdog timer, then wait for the world to end. */

View File

@@ -92,7 +92,7 @@ libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c libbsp_a_SOURCES += ../shared/arm-cp15-set-ttb-entries.c
# Startup # Startup
libbsp_a_SOURCES += startup/bspreset.c libbsp_a_SOURCES += ../../shared/bspreset_loop.c
libbsp_a_SOURCES += startup/bspstart.c libbsp_a_SOURCES += startup/bspstart.c
# IRQ # IRQ

View File

@@ -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@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 */
}
}

View File

@@ -20,11 +20,8 @@ rtems_task Init(
rtems_task_argument argument rtems_task_argument argument
) )
{ {
rtems_status_code status;
TEST_BEGIN(); TEST_BEGIN();
#if ((CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE) || \ #if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
defined(_C3x) || defined(_C4x))
puts( puts(
"TA1 - rtems_interrupt_catch - " "TA1 - rtems_interrupt_catch - "
"bad handler RTEMS_INVALID_ADDRESS -- SKIPPED" "bad handler RTEMS_INVALID_ADDRESS -- SKIPPED"
@@ -32,36 +29,38 @@ rtems_task Init(
puts( puts(
"TA1 - rtems_interrupt_catch - " "TA1 - rtems_interrupt_catch - "
"old isr RTEMS_INVALID_ADDRESS - SKIPPED" ); "old isr RTEMS_INVALID_ADDRESS - SKIPPED" );
#else #else
rtems_isr_entry old_service_routine; rtems_status_code status;
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 ); rtems_isr_entry old_service_routine;
fatal_directive_status( status = rtems_interrupt_catch(
status, Service_routine,
RTEMS_INVALID_ADDRESS, CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER + 1,
"rtems_interrupt_catch with invalid handler" &old_service_routine
); );
puts( "TA1 - rtems_interrupt_catch - bad handler RTEMS_INVALID_ADDRESS" ); 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(); TEST_END();
} }