mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 19:05:51 +01:00
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 <robert.marko@sartura.hr> Acked-by: Caleb Connolly <caleb.connolly@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
committed by
Caleb Connolly
parent
86cc012207
commit
e8e39d6cd5
7
arch/arm/mach-ipq40xx/Makefile
Normal file
7
arch/arm/mach-ipq40xx/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (c) 2024 Sartura Ltd.
|
||||
#
|
||||
# Author: Robert Marko <robert.marko@sartura.hr>
|
||||
|
||||
obj-y += cpu.o
|
||||
43
arch/arm/mach-ipq40xx/cpu.c
Normal file
43
arch/arm/mach-ipq40xx/cpu.c
Normal file
@@ -0,0 +1,43 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* CPU code for Qualcomm IPQ40xx SoC
|
||||
*
|
||||
* Copyright (c) 2024 Sartura Ltd.
|
||||
*
|
||||
* Author: Robert Marko <robert.marko@sartura.hr>
|
||||
*/
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user