2 * Generic support for queying CPU info
4 * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2007-2009 PetaLogix
6 * Copyright (C) 2007 John Williams <jwilliams@itee.uq.edu.au>
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
13 #ifndef _ASM_MICROBLAZE_CPUINFO_H
14 #define _ASM_MICROBLAZE_CPUINFO_H
18 /* CPU Version and FPGA Family code conversion table type */
24 extern const struct cpu_ver_key cpu_ver_lookup
[];
26 struct family_string_key
{
31 extern const struct family_string_key family_string_lookup
[];
34 /* Core CPU configuration */
48 unsigned long icache_base
;
49 unsigned long icache_high
;
56 unsigned long dcache_base
;
57 unsigned long dcache_high
;
66 /* CPU interrupt line info */
72 /* HW debug support */
77 u32 cpu_clock_freq
; /* store real freq of cpu */
78 u32 freq_div_hz
; /* store freq/HZ */
88 extern struct cpuinfo cpuinfo
;
90 /* fwd declarations of the various CPUinfo populators */
91 void setup_cpuinfo(void);
93 void set_cpuinfo_static(struct cpuinfo
*ci
, struct device_node
*cpu
);
94 void set_cpuinfo_pvr_full(struct cpuinfo
*ci
, struct device_node
*cpu
);
96 static inline unsigned int fcpu(struct device_node
*cpu
, char *n
)
99 return (val
= (int *) of_get_property(cpu
, n
, NULL
)) ? *val
: 0;
102 #endif /* _ASM_MICROBLAZE_CPUINFO_H */