mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-12 22:33:18 +00:00
95b7a8fd12
Introduce a minimal cpuinfo structure to hold cache related info. The instruction/data cache size and cache line size are initialized early in the boot to default Kconfig values. They will be overwritten with data from PVR/dtb if the microblaze UCLASS_CPU driver is enabled. The cpuinfo struct was placed in global_data to allow the microblaze UCLASS_CPU driver to also run before relocation (initialized global data should be read-only before relocation). gd_cpuinfo() helper macro was added to avoid volatile "-Wdiscarded-qualifiers" warnings when using the pointer directly. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Link: https://lore.kernel.org/r/20220531181435.3473549-10-ovpanait@gmail.com Signed-off-by: Michal Simek <michal.simek@amd.com> (s/bralid/brlid/)
24 lines
534 B
C
24 lines
534 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2004 Atmark Techno, Inc.
|
|
*
|
|
* Yasushi SHOJI <yashi@atmark-techno.com>
|
|
*/
|
|
|
|
#ifndef __ASM_GBL_DATA_H
|
|
#define __ASM_GBL_DATA_H
|
|
|
|
#include <asm/cpuinfo.h>
|
|
|
|
/* Architecture-specific global data */
|
|
struct arch_global_data {
|
|
struct microblaze_cpuinfo cpuinfo;
|
|
};
|
|
|
|
#include <asm-generic/global_data.h>
|
|
|
|
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r31")
|
|
|
|
#define gd_cpuinfo() ((struct microblaze_cpuinfo *)&gd->arch.cpuinfo)
|
|
|
|
#endif /* __ASM_GBL_DATA_H */
|