Changeset 13d9029 in rtems


Ignore:
Timestamp:
Dec 4, 2014, 5:21:11 PM (5 years ago)
Author:
Ben Gras <beng@…>
Branches:
4.11, master
Children:
e870941
Parents:
4251b88
git-author:
Ben Gras <beng@…> (12/04/14 17:21:11)
git-committer:
Ben Gras <beng@…> (12/05/14 03:05:45)
Message:

beagle bsp: disable watchdog on am335x

On recent u-boots, the watchdog is turned on / left enabled. The
Beaglebone Black rev. C ships with such a u-boot internally so any
application booting from it must disable the watchdog.

Therefore this change is needed to boot an RTEMS app out-of-the-box
on a BBB Rev C - otherwise the user button must be held during boot
(to bypass the stock uboot) or the internal uboot must be updated. To
allow for a better out-of-the-box experience, we just turn off the
watchdog.

Location:
c/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/beagle/clock.c

    r4251b88 r13d9029  
    252252  /* also initilize the free runnning timer */
    253253  omap3_frclock_init();
     254
     255#if IS_AM335X
     256  /* Disable AM335X watchdog */
     257  mmio_write(AM335X_WDT_BASE+AM335X_WDT_WSPR, 0xAAAA);
     258  while(mmio_read(AM335X_WDT_BASE+AM335X_WDT_WWPS) != 0) ;
     259  mmio_write(AM335X_WDT_BASE+AM335X_WDT_WSPR, 0x5555);
     260  while(mmio_read(AM335X_WDT_BASE+AM335X_WDT_WWPS) != 0) ;
     261#endif
     262
    254263}
    255264
  • c/src/lib/libcpu/arm/shared/include/am335x.h

    r4251b88 r13d9029  
    275275#define AM335X_TIMER_TCAR2            0x058
    276276    /* Second captured value of counter register */
     277#define AM335X_WDT_BASE                0x44E35000
     278    /* Watchdog timer */
     279#define AM335X_WDT_WWPS                0x34
     280    /* Command posted status */
     281#define AM335X_WDT_WSPR                0x48
     282    /* Activate/deactivate sequence */
Note: See TracChangeset for help on using the changeset viewer.