blob: 92c34d611186cb4eeb657a246f024c410b48793d [file] [log] [blame]
Robert Marko32d8c892024-05-14 12:17:50 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * CPU code for Qualcomm IPQ40xx SoC
4 *
5 * Copyright (c) 2024 Sartura Ltd.
6 *
7 * Author: Robert Marko <robert.marko@sartura.hr>
8 */
9
10#include <cpu_func.h>
11#include <init.h>
12
13int dram_init(void)
14{
15 int ret;
16
17 ret = fdtdec_setup_memory_banksize();
18 if (ret)
19 return ret;
20 return fdtdec_setup_mem_size_base();
21}
22
23/*
24 * Enable/Disable D-cache.
25 * I-cache is already enabled in start.S
26 */
27void enable_caches(void)
28{
29 dcache_enable();
30}
31
32void disable_caches(void)
33{
34 dcache_disable();
35}
36
37/*
38 * In case boards need specific init code, they can override this stub.
39 */
40int __weak board_init(void)
41{
42 return 0;
43}