Lines Matching +full:64 +full:- +full:bit

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 # error Please include asm/mips-cps.h rather than asm/mips-cm.h
21 /* The base address of the CM L2-only sync region */
25 * mips_cm_phys_base - retrieve the physical base address of the CM
36 * mips_cm_l2sync_phys_base - retrieve the physical base address of the CM
37 * L2-sync region
40 * L2-cache only region. It provides a default implementation which reads the
49 * mips_cm_is64 - determine CM register width
52 * introducing 64 bit GCRs and all prior CM versions having 32 bit GCRs.
53 * However we may run a kernel built for MIPS32 on a system with 64 bit GCRs,
54 * or vice-versa. This variable indicates the width of the memory accesses
58 * It's set to 0 for 32-bit accesses and 1 for 64-bit accesses.
63 * mips_cm_is_l2_hci_broken - determine if HCI is broken
73 * mips_cm_error_report - Report CM cache errors
82 * mips_cm_probe - probe for a Coherence Manager
85 * is successfully detected, else -errno.
92 return -ENODEV; in mips_cm_probe()
97 * mips_cm_present - determine whether a Coherence Manager is present
111 * mips_cm_update_property - update property from the device tree
123 * mips_cm_has_l2sync - determine whether an L2-only sync region is present
125 * Returns true if the system implements an L2-only sync region, else false.
145 /* Size of the L2-only sync region */
164 /* GCR_CONFIG - Information about the system */
165 GCR_ACCESSOR_RO(64, 0x000, config)
172 /* GCR_BASE - Base address of the Global Configuration Registers (GCRs) */
173 GCR_ACCESSOR_RW(64, 0x008, base)
181 /* GCR_ACCESS - Controls core/IOCU access to GCRs */
185 /* GCR_REV - Indicates the Coherence Manager revision */
199 /* GCR_ERR_CONTROL - Control error checking logic */
201 #define CM_GCR_ERR_CONTROL_L2_ECC_EN BIT(1)
202 #define CM_GCR_ERR_CONTROL_L2_ECC_SUPPORT BIT(0)
204 /* GCR_ERR_MASK - Control which errors are reported as interrupts */
205 GCR_ACCESSOR_RW(64, 0x040, error_mask)
207 /* GCR_ERR_CAUSE - Indicates the type of error that occurred */
208 GCR_ACCESSOR_RW(64, 0x048, error_cause)
213 /* GCR_ERR_ADDR - Indicates the address associated with an error */
214 GCR_ACCESSOR_RW(64, 0x050, error_addr)
216 /* GCR_ERR_MULT - Indicates when multiple errors have occurred */
217 GCR_ACCESSOR_RW(64, 0x058, error_mult)
220 /* GCR_L2_ONLY_SYNC_BASE - Base address of the L2 cache-only sync region */
221 GCR_ACCESSOR_RW(64, 0x070, l2_only_sync_base)
223 #define CM_GCR_L2_ONLY_SYNC_BASE_SYNCEN BIT(0)
225 /* GCR_GIC_BASE - Base address of the Global Interrupt Controller (GIC) */
226 GCR_ACCESSOR_RW(64, 0x080, gic_base)
228 #define CM_GCR_GIC_BASE_GICEN BIT(0)
230 /* GCR_CPC_BASE - Base address of the Cluster Power Controller (CPC) */
231 GCR_ACCESSOR_RW(64, 0x088, cpc_base)
233 #define CM_GCR_CPC_BASE_CPCEN BIT(0)
235 /* GCR_REGn_BASE - Base addresses of CM address regions */
236 GCR_ACCESSOR_RW(64, 0x090, reg0_base)
237 GCR_ACCESSOR_RW(64, 0x0a0, reg1_base)
238 GCR_ACCESSOR_RW(64, 0x0b0, reg2_base)
239 GCR_ACCESSOR_RW(64, 0x0c0, reg3_base)
242 /* GCR_REGn_MASK - Size & destination of CM address regions */
243 GCR_ACCESSOR_RW(64, 0x098, reg0_mask)
244 GCR_ACCESSOR_RW(64, 0x0a8, reg1_mask)
245 GCR_ACCESSOR_RW(64, 0x0b8, reg2_mask)
246 GCR_ACCESSOR_RW(64, 0x0c8, reg3_mask)
249 #define CM_GCR_REGn_MASK_CCAOVREN BIT(4)
250 #define CM_GCR_REGn_MASK_DROPL2 BIT(2)
257 /* GCR_GIC_STATUS - Indicates presence of a Global Interrupt Controller (GIC) */
259 #define CM_GCR_GIC_STATUS_EX BIT(0)
261 /* GCR_CPC_STATUS - Indicates presence of a Cluster Power Controller (CPC) */
263 #define CM_GCR_CPC_STATUS_EX BIT(0)
265 /* GCR_ACCESS - Controls core/IOCU access to GCRs */
269 /* GCR_L2_CONFIG - Indicates L2 cache configuration when Config5.L2C=1 */
271 #define CM_GCR_L2_CONFIG_BYPASS BIT(20)
276 /* GCR_SYS_CONFIG2 - Further information about the system */
280 /* GCR_L2-RAM_CONFIG - Configuration & status of L2 cache RAMs */
281 GCR_ACCESSOR_RW(64, 0x240, l2_ram_config)
282 #define CM_GCR_L2_RAM_CONFIG_PRESENT BIT(31)
283 #define CM_GCR_L2_RAM_CONFIG_HCI_DONE BIT(30)
284 #define CM_GCR_L2_RAM_CONFIG_HCI_SUPPORTED BIT(29)
286 /* GCR_L2_PFT_CONTROL - Controls hardware L2 prefetching */
289 #define CM_GCR_L2_PFT_CONTROL_PFTEN BIT(8)
292 /* GCR_L2_PFT_CONTROL_B - Controls hardware L2 prefetching */
294 #define CM_GCR_L2_PFT_CONTROL_B_CEN BIT(8)
297 /* GCR_L2_TAG_ADDR - Access addresses in L2 cache tags */
298 GCR_ACCESSOR_RW(64, 0x600, l2_tag_addr)
300 /* GCR_L2_TAG_STATE - Access L2 cache tag state */
301 GCR_ACCESSOR_RW(64, 0x608, l2_tag_state)
303 /* GCR_L2_DATA - Access data in L2 cache lines */
304 GCR_ACCESSOR_RW(64, 0x610, l2_data)
306 /* GCR_L2_ECC - Access ECC information from L2 cache lines */
307 GCR_ACCESSOR_RW(64, 0x618, l2_ecc)
309 /* GCR_L2SM_COP - L2 cache op state machine control */
311 #define CM_GCR_L2SM_COP_PRESENT BIT(31)
318 #define CM_GCR_L2SM_COP_RUNNING BIT(5)
331 /* GCR_L2SM_TAG_ADDR_COP - L2 cache op state machine address control */
332 GCR_ACCESSOR_RW(64, 0x628, l2sm_tag_addr_cop)
336 /* GCR_BEV_BASE - Controls the location of the BEV for powered up cores */
337 GCR_ACCESSOR_RW(64, 0x680, bev_base)
339 /* GCR_Cx_RESET_RELEASE - Controls core reset for CM 1.x */
342 /* GCR_Cx_COHERENCE - Controls core coherence */
345 #define CM3_GCR_Cx_COHERENCE_COHEN BIT(0)
347 /* GCR_Cx_CONFIG - Information about a core's configuration */
352 /* GCR_Cx_OTHER - Configure the core-other/redirect GCR block */
355 #define CM_GCR_Cx_OTHER_CLUSTER_EN BIT(31) /* CM >= 3.5 */
356 #define CM_GCR_Cx_OTHER_GIC_EN BIT(30) /* CM >= 3.5 */
367 /* GCR_Cx_RESET_BASE - Configure where powered up cores will fetch from */
369 GCR_CX_ACCESSOR_RW(64, 0x020, reset64_base)
372 #define CM_GCR_Cx_RESET_BASE_MODE BIT(1)
374 /* GCR_Cx_ID - Identify the current core */
379 /* GCR_Cx_RESET_EXT_BASE - Configure behaviour when cores reset or power up */
381 #define CM_GCR_Cx_RESET_EXT_BASE_EVARESET BIT(31)
382 #define CM_GCR_Cx_RESET_EXT_BASE_UEB BIT(30)
385 #define CM_GCR_Cx_RESET_EXT_BASE_PRESENT BIT(0)
388 * mips_cm_l2sync - perform an L2-only sync operation
390 * If an L2-only sync region is present in the system then this function
391 * performs and L2-only sync and returns zero. Otherwise it returns -ENODEV.
396 return -ENODEV; in mips_cm_l2sync()
403 * mips_cm_revision() - return CM revision
417 * mips_cm_max_vp_width() - return the width in bits of VP indices
446 * mips_cm_vp_id() - calculate the hardware VP ID for a CPU
466 * mips_cm_lock_other - lock access to redirect/other region
479 * mips_cm_unlock_other() calls cannot be pre-empted by anything which may
487 * mips_cm_unlock_other - unlock access to redirect/other region
503 * mips_cm_lock_other_cpu - lock access to redirect/other region