bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.
This commit is contained in:
Sebastian Huber
2018-04-20 10:35:35 +02:00
parent fbcd7c8fa6
commit 9964895866
653 changed files with 559 additions and 560 deletions

View File

@@ -0,0 +1,26 @@
/**
* @file
*
* @ingroup raspberrypi
*
* @brief Raspberry pi restart chip function
*/
#include <bsp/bootcard.h>
#include <bsp/raspberrypi.h>
#include <bsp.h>
#include <rtems.h>
void bsp_reset(void)
{
uint32_t rstc;
BCM2835_REG(BCM2835_PM_WDOG) = BCM2835_PM_PASSWD_MAGIC | 20;
rstc = BCM2835_REG(BCM2835_PM_RSTC);
rstc &= ~BCM2835_PM_RSTC_WRCFG;
rstc |= BCM2835_PM_PASSWD_MAGIC | BCM2835_PM_RSTC_WRCFG_FULL;
BCM2835_REG(BCM2835_PM_RSTC) = rstc;
BCM2835_REG(BCM2835_PM_WDOG) = BCM2835_PM_PASSWD_MAGIC | 1;
while (1) ;
}