Skip to content

Commit

Permalink
Merge pull request #186 from sifive/ccache-constructor
Browse files Browse the repository at this point in the history
Use METAL_CONSTRUCTOR in the sifive,ccache driver
  • Loading branch information
nategraff-sifive authored Sep 19, 2019
2 parents 16394ea + 8a8f708 commit d811e39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/sifive_ccache0.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifdef METAL_SIFIVE_CCACHE0

#include <metal/drivers/sifive_ccache0.h>
#include <metal/init.h>
#include <metal/io.h>
#include <metal/machine.h>
#include <stdint.h>
Expand All @@ -15,8 +16,7 @@

void __metal_driver_sifive_ccache0_init(struct metal_cache *l2, int ways);

static void metal_driver_sifive_ccache0_init(void) __attribute__((constructor));
static void metal_driver_sifive_ccache0_init(void) {
METAL_CONSTRUCTOR(metal_driver_sifive_ccache0_init) {
#ifdef __METAL_DT_SIFIVE_CCACHE0_HANDLE
/* Get the handle for the L2 cache controller */
struct metal_cache *l2 = __METAL_DT_SIFIVE_CCACHE0_HANDLE;
Expand Down

0 comments on commit d811e39

Please sign in to comment.