gonzui


Format: Advanced Search

mtkernel_3/kernel/sysdepend/cpu/rza2m/cpu_clock.cbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.05
    4:  *
    5:  *    Copyright (C) 2006-2021 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.2.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2021/11.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: #include <sys/machine.h>
   15: #ifdef CPU_RZA2M
   16: 
   17: /*
   18:  *      cpu_clock.c (RZ/A2M)
   19:  *      Clock Setting
   20:  */
   21: 
   22: #include <tk/tkernel.h>
   23: 
   24: #include "sysdepend.h"
   25: 
   26: /*
   27:  *  Startup System Clock (CPG settings)
   28:  */
   29: EXPORT void startup_clock(void)
   30: {
   31:         _UW    dummy_32b;
   32:         _UB    dummy_8b;
   33: 
   34:         /* standby_mode_en bit of Power Control Register setting */
   35:         *(_UW*)PL310_POWER_CTL |= 0x0001;
   36:         dummy_32b = in_w(PL310_POWER_CTL);
   37:         (void)dummy_32b;               /* Warning avoidance */
   38: 
   39:         /* CPG Setting */
   40:         out_h(CPG_FRQCR, CPG_FRQCR_INIVAL);
   41: 
   42:         /* Writing to On-Chip Data-Retention RAM is enabled. */
   43:         out_b(CPG_SYSCR3,0x0F);
   44:         dummy_8b = in_b(CPG_SYSCR3);
   45:         (void)dummy_8b;                /* Warning avoidance */
   46: }
   47: 
   48: EXPORT void shutdown_clock(void)
   49: {
   50: 
   51: }
   52: 
   53: #endif /* CPU_RZA2M */