Lines Matching +full:cm +full:- +full:name
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
18 #define CPS_ACCESSOR_A(unit, off, name) \ argument
19 static inline void *addr_##unit##_##name(void) \
24 #define CPS_ACCESSOR_R(unit, sz, name) \ argument
25 static inline uint##sz##_t read_##unit##_##name(void) \
31 return __raw_readl(addr_##unit##_##name()); \
35 return __raw_readq(addr_##unit##_##name()); \
37 val64 = __raw_readl(addr_##unit##_##name() + 4); \
39 val64 |= __raw_readl(addr_##unit##_##name()); \
47 #define CPS_ACCESSOR_W(unit, sz, name) \ argument
48 static inline void write_##unit##_##name(uint##sz##_t val) \
52 __raw_writel(val, addr_##unit##_##name()); \
57 __raw_writeq(val, addr_##unit##_##name()); \
62 addr_##unit##_##name() + 4); \
63 __raw_writel(val, addr_##unit##_##name()); \
72 #define CPS_ACCESSOR_M(unit, sz, name) \ argument
73 static inline void change_##unit##_##name(uint##sz##_t mask, \
76 uint##sz##_t reg_val = read_##unit##_##name(); \
79 write_##unit##_##name(reg_val); \
82 static inline void set_##unit##_##name(uint##sz##_t val) \
84 change_##unit##_##name(val, val); \
87 static inline void clear_##unit##_##name(uint##sz##_t val) \
89 change_##unit##_##name(val, 0); \
92 #define CPS_ACCESSOR_RO(unit, sz, off, name) \ argument
93 CPS_ACCESSOR_A(unit, off, name) \
94 CPS_ACCESSOR_R(unit, sz, name)
96 #define CPS_ACCESSOR_WO(unit, sz, off, name) \ argument
97 CPS_ACCESSOR_A(unit, off, name) \
98 CPS_ACCESSOR_W(unit, sz, name)
100 #define CPS_ACCESSOR_RW(unit, sz, off, name) \ argument
101 CPS_ACCESSOR_A(unit, off, name) \
102 CPS_ACCESSOR_R(unit, sz, name) \
103 CPS_ACCESSOR_W(unit, sz, name) \
104 CPS_ACCESSOR_M(unit, sz, name)
106 #include <asm/mips-cm.h>
107 #include <asm/mips-cpc.h>
108 #include <asm/mips-gic.h>
111 * mips_cps_numclusters - return the number of clusters present in the system
124 * mips_cps_cluster_config - return (GCR|CPC)_CONFIG from a cluster
137 * Prior to CM 3.5 we don't have the notion of multiple in mips_cps_cluster_config()
145 * From CM 3.5 onwards we read the CPC_CONFIG mirror of in mips_cps_cluster_config()
147 * powered up allowing us not to need to power up the CM. in mips_cps_cluster_config()
158 * mips_cps_numcores - return the number of cores present in a cluster
175 * mips_cps_numiocu - return the number of IOCUs present in a cluster
191 * mips_cps_numvps - return the number of VPs (threads) supported by a core
197 * kernel do not support hardware mutlti-threading this returns 1.
214 * Prior to CM 3.5 we can only have one cluster & don't have in mips_cps_numvps()
220 * From CM 3.5 onwards we read CPC_Cx_CONFIG because the CPC is in mips_cps_numvps()
222 * up the cluster's CM here. in mips_cps_numvps()
233 * mips_cps_multicluster_cpus() - Detect whether CPUs are in multiple clusters
235 * Determine whether the system includes CPUs in multiple clusters - ie.
236 * whether we can treat the system as single or multi-cluster as far as CPUs
238 * whether multiple clusters are present - it is possible for there to be
248 * CPUs are numbered sequentially by cluster - ie. CPUs 0..X will be in in mips_cps_multicluster_cpus()
255 last_cl = cpu_cluster(&cpu_data[nr_cpu_ids - 1]); in mips_cps_multicluster_cpus()
260 * mips_cps_first_online_in_cluster() - Detect if CPU is first online in cluster
263 * cluster - that is, whether there are any other online CPUs in the local