14 #ifndef _ASM_X86_NUMACHIP_NUMACHIP_CSR_H
15 #define _ASM_X86_NUMACHIP_NUMACHIP_CSR_H
20 #include <linux/swab.h>
21 #include <asm/types.h>
22 #include <asm/processor.h>
24 #define CSR_NODE_SHIFT 16
25 #define CSR_NODE_BITS(p) (((unsigned long)(p)) << CSR_NODE_SHIFT)
26 #define CSR_NODE_MASK 0x0fff
29 #define CSR_OFFSET_MASK 0x7fffUL
32 #define NUMACHIP_GCSR_BASE 0x3fff00000000ULL
33 #define NUMACHIP_GCSR_LIM 0x3fff0fffffffULL
34 #define NUMACHIP_GCSR_SIZE (NUMACHIP_GCSR_LIM - NUMACHIP_GCSR_BASE + 1)
41 #define NUMACHIP_LCSR_BASE 0x3ffffe000000ULL
42 #define NUMACHIP_LCSR_LIM 0x3fffffffffffULL
43 #define NUMACHIP_LCSR_SIZE (NUMACHIP_LCSR_LIM - NUMACHIP_LCSR_BASE + 1)
45 static inline void *gcsr_address(
int node,
unsigned long offset)
51 static inline void *lcsr_address(
unsigned long offset)
57 static inline unsigned int read_gcsr(
int node,
unsigned long offset)
62 static inline void write_gcsr(
int node,
unsigned long offset,
unsigned int val)
67 static inline unsigned int read_lcsr(
unsigned long offset)
72 static inline void write_lcsr(
unsigned long offset,
unsigned int val)
81 #define CSR_G0_STATE_CLEAR (0x000 + (0 << 12))
96 #define CSR_G0_NODE_IDS (0x008 + (0 << 12))
110 #define CSR_G3_EXT_IRQ_GEN (0x030 + (3 << 12))
125 #define CSR_G3_EXT_IRQ_STATUS (0x034 + (3 << 12))
137 #define CSR_G3_EXT_IRQ_DEST (0x038 + (3 << 12))
150 #define CSR_G3_NC_ATT_MAP_SELECT (0x7fc + (3 << 12))
164 #define CSR_G3_NC_ATT_MAP_SELECT_0 (0x800 + (3 << 12))