usb: gadget: r8a66597-udc: fix cannot connect after rmmod gadget driver
[linux/fpc-iii.git] / arch / microblaze / include / asm / cpuinfo.h
blobd8f013347a9e63c617ccf3d46c78fb582cf42ddf
1 /*
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
16 #include <asm/prom.h>
18 /* CPU Version and FPGA Family code conversion table type */
19 struct cpu_ver_key {
20 const char *s;
21 const unsigned k;
24 extern const struct cpu_ver_key cpu_ver_lookup[];
26 struct family_string_key {
27 const char *s;
28 const unsigned k;
31 extern const struct family_string_key family_string_lookup[];
33 struct cpuinfo {
34 /* Core CPU configuration */
35 u32 use_instr;
36 u32 use_mult;
37 u32 use_fpu;
38 u32 use_exc;
39 u32 ver_code;
40 u32 mmu;
41 u32 endian;
43 /* CPU caches */
44 u32 use_icache;
45 u32 icache_tagbits;
46 u32 icache_write;
47 u32 icache_line_length;
48 u32 icache_size;
49 unsigned long icache_base;
50 unsigned long icache_high;
52 u32 use_dcache;
53 u32 dcache_tagbits;
54 u32 dcache_write;
55 u32 dcache_line_length;
56 u32 dcache_size;
57 u32 dcache_wb;
58 unsigned long dcache_base;
59 unsigned long dcache_high;
61 /* Bus connections */
62 u32 use_dopb;
63 u32 use_iopb;
64 u32 use_dlmb;
65 u32 use_ilmb;
66 u32 num_fsl;
68 /* CPU interrupt line info */
69 u32 irq_edge;
70 u32 irq_positive;
72 u32 area_optimised;
74 /* HW debug support */
75 u32 hw_debug;
76 u32 num_pc_brk;
77 u32 num_rd_brk;
78 u32 num_wr_brk;
79 u32 cpu_clock_freq; /* store real freq of cpu */
81 /* FPGA family */
82 u32 fpga_family_code;
84 /* User define */
85 u32 pvr_user1;
86 u32 pvr_user2;
89 extern struct cpuinfo cpuinfo;
91 /* fwd declarations of the various CPUinfo populators */
92 void setup_cpuinfo(void);
94 void set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu);
95 void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu);
97 static inline unsigned int fcpu(struct device_node *cpu, char *n)
99 const __be32 *val;
100 return (val = of_get_property(cpu, n, NULL)) ?
101 be32_to_cpup(val) : 0;
104 #endif /* _ASM_MICROBLAZE_CPUINFO_H */