1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2012-2014 Broadcom Corporation
5 #include <linux/init.h>
6 #include <linux/printk.h>
7 #include <asm/hardware/cache-l2x0.h>
9 #include "bcm_kona_smc.h"
10 #include "kona_l2_cache.h"
12 void __init
kona_l2_cache_init(void)
17 ret
= bcm_kona_smc_init();
19 pr_info("Secure API not available (%d). Skipping L2 init.\n",
24 result
= bcm_kona_smc(SSAPI_ENABLE_L2_CACHE
, 0, 0, 0, 0);
25 if (result
!= SEC_ROM_RET_OK
) {
26 pr_err("Secure Monitor call failed (%u)! Skipping L2 init.\n",
32 * The aux_val and aux_mask have no effect since L2 cache is already
33 * enabled. Pass 0s for aux_val and 1s for aux_mask for default value.
35 ret
= l2x0_of_init(0, ~0);
37 pr_err("Couldn't enable L2 cache: %d\n", ret
);