diff options
| author | Robert Marko <[email protected]> | 2024-05-14 12:17:50 +0200 |
|---|---|---|
| committer | Caleb Connolly <[email protected]> | 2024-07-05 12:04:46 +0200 |
| commit | e8e39d6cd542672ab2d6897f84f5f6d66383e69e (patch) | |
| tree | 6a11418cd44cb3209ab8a9adc2886c4c5a906a4e | |
| parent | 86cc0122072a771163e0dfe0cc957714674bcc27 (diff) | |
mach-ipq40xx: add CPU specific code
Provide basic DRAM info population from DT, cache setting and the
board_init stub.
Signed-off-by: Robert Marko <[email protected]>
Acked-by: Caleb Connolly <[email protected]>
Signed-off-by: Caleb Connolly <[email protected]>
| -rw-r--r-- | arch/arm/mach-ipq40xx/Makefile | 7 | ||||
| -rw-r--r-- | arch/arm/mach-ipq40xx/cpu.c | 43 |
2 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-ipq40xx/Makefile b/arch/arm/mach-ipq40xx/Makefile new file mode 100644 index 00000000000..d611de99330 --- /dev/null +++ b/arch/arm/mach-ipq40xx/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2024 Sartura Ltd. +# +# Author: Robert Marko <[email protected]> + +obj-y += cpu.o diff --git a/arch/arm/mach-ipq40xx/cpu.c b/arch/arm/mach-ipq40xx/cpu.c new file mode 100644 index 00000000000..92c34d61118 --- /dev/null +++ b/arch/arm/mach-ipq40xx/cpu.c @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * CPU code for Qualcomm IPQ40xx SoC + * + * Copyright (c) 2024 Sartura Ltd. + * + * Author: Robert Marko <[email protected]> + */ + +#include <cpu_func.h> +#include <init.h> + +int dram_init(void) +{ + int ret; + + ret = fdtdec_setup_memory_banksize(); + if (ret) + return ret; + return fdtdec_setup_mem_size_base(); +} + +/* + * Enable/Disable D-cache. + * I-cache is already enabled in start.S + */ +void enable_caches(void) +{ + dcache_enable(); +} + +void disable_caches(void) +{ + dcache_disable(); +} + +/* + * In case boards need specific init code, they can override this stub. + */ +int __weak board_init(void) +{ + return 0; +} |
