mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-19 03:08:31 +00:00
4baa0ab67d
This patch adds support for initialising & maintaining L2 caches on MIPS systems. The L2 cache configuration may be advertised through either coprocessor 0 or the MIPS Coherence Manager depending upon the system, and support for both is included. If the L2 can be bypassed then we bypass it early in boot & initialise the L1 caches first, such that we can start making use of the L1 instruction cache as early as possible. Otherwise we initialise the L2 first such that the L1s have no opportunity to generate access to the uninitialised L2. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
37 lines
771 B
C
37 lines
771 B
C
/*
|
|
* (C) Copyright 2002-2010
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __ASM_GBL_DATA_H
|
|
#define __ASM_GBL_DATA_H
|
|
|
|
#include <asm/regdef.h>
|
|
|
|
/* Architecture-specific global data */
|
|
struct arch_global_data {
|
|
#ifdef CONFIG_DYNAMIC_IO_PORT_BASE
|
|
unsigned long io_port_base;
|
|
#endif
|
|
#ifdef CONFIG_ARCH_ATH79
|
|
unsigned long id;
|
|
unsigned long soc;
|
|
unsigned long rev;
|
|
unsigned long ver;
|
|
#endif
|
|
#ifdef CONFIG_SYS_CACHE_SIZE_AUTO
|
|
unsigned short l1i_line_size;
|
|
unsigned short l1d_line_size;
|
|
#endif
|
|
#ifdef CONFIG_MIPS_L2_CACHE
|
|
unsigned short l2_line_size;
|
|
#endif
|
|
};
|
|
|
|
#include <asm-generic/global_data.h>
|
|
|
|
#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0")
|
|
|
|
#endif /* __ASM_GBL_DATA_H */
|