File indexing completed on 2025-05-11 08:23:04
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <bsp/bootcard.h>
0010 #include <bsp/raspberrypi.h>
0011 #include <bsp.h>
0012
0013 void bsp_reset( rtems_fatal_source source, rtems_fatal_code code )
0014 {
0015 uint32_t rstc;
0016
0017 (void) source;
0018 (void) code;
0019
0020 BCM2835_REG(BCM2835_PM_WDOG) = BCM2835_PM_PASSWD_MAGIC | 20;
0021 rstc = BCM2835_REG(BCM2835_PM_RSTC);
0022 rstc &= ~BCM2835_PM_RSTC_WRCFG;
0023 rstc |= BCM2835_PM_PASSWD_MAGIC | BCM2835_PM_RSTC_WRCFG_FULL;
0024 BCM2835_REG(BCM2835_PM_RSTC) = rstc;
0025 BCM2835_REG(BCM2835_PM_WDOG) = BCM2835_PM_PASSWD_MAGIC | 1;
0026
0027 while (1) ;
0028 }