source: rtems/bsps/arm/beagle/start/bspreset.c @ 9964895

5
Last change on this file since 9964895 was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

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.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2 * Copyright (c) 2014 Ben Gras <beng@shrike-systems.com>. All rights reserved.
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
8
9#include <bsp.h>
10#include <bsp/bootcard.h>
11
12#define AM335X_CM_BASE 0x44E00000
13#define AM335X_CM_SIZE 0x1000
14
15#define AM335X_PRM_DEVICE_OFFSET 0xf00
16#define AM335X_PRM_RSTCTRL_REG 0x00
17#define AM335X_RST_GLOBAL_WARM_SW_BIT 0
18
19#define DM37XX_CM_BASE 0x48307000
20#define DM37XX_CM_SIZE 0x1000
21#define DM37XX_PRM_RSTCTRL_REG 0x250
22#define DM37XX_RST_DPLL3_BIT 2
23
24void bsp_reset(void)
25{
26#if IS_DM3730
27  static uint32_t reset_base = DM37XX_CM_BASE;
28  while (true) {
29    mmio_set((reset_base + DM37XX_PRM_RSTCTRL_REG),
30             (1 << DM37XX_RST_DPLL3_BIT));
31  }
32#endif
33
34#if IS_AM335X
35  static uint32_t reset_base = AM335X_CM_BASE;
36  while (true) {
37    mmio_set((reset_base + AM335X_PRM_DEVICE_OFFSET +
38              AM335X_PRM_RSTCTRL_REG),
39             (1 << AM335X_RST_GLOBAL_WARM_SW_BIT));
40  }
41#endif
42}
Note: See TracBrowser for help on using the repository browser.