aboutsummaryrefslogtreecommitdiffstats
path: root/src/sam3/sam4_cache.c
blob: 75459660150e2893394c502e0807196a32e5c073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SAM4 cache enable
//
// Copyright (C) 2018  Kevin O'Connor <kevin@koconnor.net>
//
// This file may be distributed under the terms of the GNU GPLv3 license.

#include "sam4e.h" // CMCC
#include "sched.h" // DECL_INIT

void
sam4_cache_init(void)
{
    if (!(CMCC->CMCC_SR & CMCC_SR_CSTS))
        CMCC->CMCC_CTRL = CMCC_CTRL_CEN;
}
DECL_INIT(sam4_cache_init);