Robert Marko | 32d8c89 | 2024-05-14 12:17:50 +0200 | [diff] [blame] | 1 | // 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 | |
| 13 | int 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 | */ |
| 27 | void enable_caches(void) |
| 28 | { |
| 29 | dcache_enable(); |
| 30 | } |
| 31 | |
| 32 | void disable_caches(void) |
| 33 | { |
| 34 | dcache_disable(); |
| 35 | } |
| 36 | |
| 37 | /* |
| 38 | * In case boards need specific init code, they can override this stub. |
| 39 | */ |
| 40 | int __weak board_init(void) |
| 41 | { |
| 42 | return 0; |
| 43 | } |