mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-19 23:28:16 +01:00
stm32mp: add soc.c file
Add a new file soc.c for common functions between stm32mp1 and stm32mp2 family and move print_cpuinfo() in this new file. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
This commit is contained in:
parent
c20e0fc7d6
commit
1af148da84
@ -6,6 +6,7 @@
|
|||||||
obj-y += dram_init.o
|
obj-y += dram_init.o
|
||||||
obj-y += syscon.o
|
obj-y += syscon.o
|
||||||
obj-y += bsec.o
|
obj-y += bsec.o
|
||||||
|
obj-y += soc.o
|
||||||
|
|
||||||
obj-$(CONFIG_STM32MP15x) += stm32mp1/
|
obj-$(CONFIG_STM32MP15x) += stm32mp1/
|
||||||
obj-$(CONFIG_STM32MP13x) += stm32mp1/
|
obj-$(CONFIG_STM32MP13x) += stm32mp1/
|
||||||
|
19
arch/arm/mach-stm32mp/soc.c
Normal file
19
arch/arm/mach-stm32mp/soc.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2024, STMicroelectronics - All Rights Reserved
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <env.h>
|
||||||
|
#include <asm/arch/sys_proto.h>
|
||||||
|
#include <dm/device.h>
|
||||||
|
|
||||||
|
/* used when CONFIG_DISPLAY_CPUINFO is activated */
|
||||||
|
int print_cpuinfo(void)
|
||||||
|
{
|
||||||
|
char name[SOC_NAME_SIZE];
|
||||||
|
|
||||||
|
get_soc_name(name);
|
||||||
|
printf("CPU: %s\n", name);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -158,17 +158,6 @@ void enable_caches(void)
|
|||||||
dcache_enable();
|
dcache_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used when CONFIG_DISPLAY_CPUINFO is activated */
|
|
||||||
int print_cpuinfo(void)
|
|
||||||
{
|
|
||||||
char name[SOC_NAME_SIZE];
|
|
||||||
|
|
||||||
get_soc_name(name);
|
|
||||||
printf("CPU: %s\n", name);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setup_boot_mode(void)
|
static void setup_boot_mode(void)
|
||||||
{
|
{
|
||||||
const u32 serial_addr[] = {
|
const u32 serial_addr[] = {
|
||||||
|
@ -67,17 +67,6 @@ void enable_caches(void)
|
|||||||
dcache_enable();
|
dcache_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used when CONFIG_DISPLAY_CPUINFO is activated */
|
|
||||||
int print_cpuinfo(void)
|
|
||||||
{
|
|
||||||
char name[SOC_NAME_SIZE];
|
|
||||||
|
|
||||||
get_soc_name(name);
|
|
||||||
printf("CPU: %s\n", name);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int arch_misc_init(void)
|
int arch_misc_init(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user