Changeset b32a9cd in rtems


Ignore:
Timestamp:
Jan 12, 2016, 1:44:10 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
76a51c68
Parents:
2916a33
git-author:
Sebastian Huber <sebastian.huber@…> (01/12/16 13:44:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/19/16 07:36:19)
Message:

bsps/arm: Use common ARMv7-M bsp_reset()

Location:
c/src/lib/libbsp/arm
Files:
1 deleted
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lm3s69xx/Makefile.am

    r2916a33 rb32a9cd  
    7575# Startup
    7676libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
     77libbsp_a_SOURCES += ../shared/armv7m/startup/bspreset.c
    7778libbsp_a_SOURCES += startup/bspstart.c
    7879libbsp_a_SOURCES += startup/bspstarthook.c
    79 libbsp_a_SOURCES += startup/bspreset.c
    8080libbsp_a_SOURCES += startup/io.c
    8181libbsp_a_SOURCES += startup/syscon.c
  • c/src/lib/libbsp/arm/lpc176x/Makefile.am

    r2916a33 rb32a9cd  
    103103# Startup
    104104libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
    105 libbsp_a_SOURCES += startup/bspreset.c
     105libbsp_a_SOURCES += ../shared/armv7m/startup/bspreset.c
    106106libbsp_a_SOURCES += startup/bspstart.c
    107107
  • c/src/lib/libbsp/arm/lpc24xx/Makefile.am

    r2916a33 rb32a9cd  
    106106# Startup
    107107libbsp_a_SOURCES += ../shared/startup/bsp-start-memcpy.S
    108 libbsp_a_SOURCES += startup/bspreset.c
     108libbsp_a_SOURCES += ../shared/armv7m/startup/bspreset.c
     109libbsp_a_SOURCES += startup/bspreset-armv4.c
    109110libbsp_a_SOURCES += startup/bspstart.c
    110111
  • c/src/lib/libbsp/arm/lpc24xx/startup/bspreset-armv4.c

    r2916a33 rb32a9cd  
    2828#include <bsp/start.h>
    2929
     30#ifdef ARM_MULTILIB_ARCH_V4
     31
    3032BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
    3133{
     
    3537  rtems_interrupt_disable(level);
    3638
    37   #if defined(ARM_MULTILIB_ARCH_V4)
    38     /* Trigger watchdog reset */
    39     WDCLKSEL = 0;
    40     WDTC = 0xff;
    41     WDMOD = 0x3;
    42     WDFEED = 0xaa;
    43     WDFEED = 0x55;
    44   #elif defined(ARM_MULTILIB_ARCH_V7M)
    45     _ARMV7M_SCB->aircr = ARMV7M_SCB_AIRCR_VECTKEY
    46       | ARMV7M_SCB_AIRCR_SYSRESETREQ;
    47   #endif
     39  /* Trigger watchdog reset */
     40  WDCLKSEL = 0;
     41  WDTC = 0xff;
     42  WDMOD = 0x3;
     43  WDFEED = 0xaa;
     44  WDFEED = 0x55;
    4845
    4946  while (true) {
     
    5148  }
    5249}
     50
     51#endif /* ARM_MULTILIB_ARCH_V4 */
  • c/src/lib/libbsp/arm/shared/armv7m/startup/bspreset.c

    r2916a33 rb32a9cd  
    11/*
    2  * Copyright © 2013 Eugeniy Meshcheryakov <eugen@debian.org>
    3  *
    4  * Copyright (c) 2011 Sebastian Huber.  All rights reserved.
     2 * Copyright (c) 2015 embedded brains GmbH.  All rights reserved.
    53 *
    64 *  embedded brains GmbH
    7  *  Obere Lagerstr. 30
     5 *  Dornierstr. 4
    86 *  82178 Puchheim
    97 *  Germany
     
    1513 */
    1614
    17 
    1815#include <rtems.h>
    1916#include <rtems/score/armv7m.h>
    2017
    2118#include <bsp/bootcard.h>
     19#include <bsp/start.h>
    2220
    23 void bsp_reset(void)
     21#ifdef ARM_MULTILIB_ARCH_V7M
     22
     23BSP_START_TEXT_SECTION __attribute__((flatten)) void bsp_reset(void)
    2424{
    2525  rtems_interrupt_level level;
    2626
     27  rtems_interrupt_local_disable(level);
    2728  (void) level;
    28   rtems_interrupt_disable(level);
    2929
    3030  _ARMV7M_SCB->aircr = ARMV7M_SCB_AIRCR_VECTKEY
    3131    | ARMV7M_SCB_AIRCR_SYSRESETREQ;
    3232
    33   while (true)
    34     /* Do nothing */;
     33  while (true) {
     34    /* Do nothing */
     35  }
    3536}
     37
     38#endif /* ARM_MULTILIB_ARCH_V7M */
Note: See TracChangeset for help on using the changeset viewer.