diff options
-rw-r--r-- | arch/powerpc/platforms/cell/setup.c | 10 | ||||
-rw-r--r-- | include/asm-powerpc/cell-regs.h | 48 |
2 files changed, 56 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index b8d95ad736..5343e3844e 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -83,12 +83,22 @@ static void cell_progress(char *s, unsigned short hex) | |||
83 | 83 | ||
84 | static int __init cell_publish_devices(void) | 84 | static int __init cell_publish_devices(void) |
85 | { | 85 | { |
86 | int node; | ||
87 | |||
86 | if (!machine_is(cell)) | 88 | if (!machine_is(cell)) |
87 | return 0; | 89 | return 0; |
88 | 90 | ||
89 | /* Publish OF platform devices for southbridge IOs */ | 91 | /* Publish OF platform devices for southbridge IOs */ |
90 | of_platform_bus_probe(NULL, NULL, NULL); | 92 | of_platform_bus_probe(NULL, NULL, NULL); |
91 | 93 | ||
94 | /* There is no device for the MIC memory controller, thus we create | ||
95 | * a platform device for it to attach the EDAC driver to. | ||
96 | */ | ||
97 | for_each_online_node(node) { | ||
98 | if (cbe_get_cpu_mic_tm_regs(cbe_node_to_cpu(node)) == NULL) | ||
99 | continue; | ||
100 | platform_device_register_simple("cbe-mic", node, NULL, 0); | ||
101 | } | ||
92 | return 0; | 102 | return 0; |
93 | } | 103 | } |
94 | device_initcall(cell_publish_devices); | 104 | device_initcall(cell_publish_devices); |
diff --git a/include/asm-powerpc/cell-regs.h b/include/asm-powerpc/cell-regs.h index b24025f2ac..fd6fd00434 100644 --- a/include/asm-powerpc/cell-regs.h +++ b/include/asm-powerpc/cell-regs.h | |||
@@ -244,16 +244,60 @@ struct cbe_mic_tm_regs { | |||
244 | u64 slow_fast_timer_0; /* 0x0090 */ | 244 | u64 slow_fast_timer_0; /* 0x0090 */ |
245 | u64 slow_next_timer_0; /* 0x0098 */ | 245 | u64 slow_next_timer_0; /* 0x0098 */ |
246 | 246 | ||
247 | u8 pad_0x00a0_0x01c0[0x01c0 - 0x0a0]; /* 0x00a0 */ | 247 | u8 pad_0x00a0_0x00f8[0x00f8 - 0x00a0]; /* 0x00a0 */ |
248 | u64 mic_df_ecc_address_0; /* 0x00f8 */ | ||
249 | |||
250 | u8 pad_0x0100_0x01b8[0x01b8 - 0x0100]; /* 0x0100 */ | ||
251 | u64 mic_df_ecc_address_1; /* 0x01b8 */ | ||
248 | 252 | ||
249 | u64 mic_ctl_cnfg_1; /* 0x01c0 */ | 253 | u64 mic_ctl_cnfg_1; /* 0x01c0 */ |
250 | #define CBE_MIC_DISABLE_PWR_SAV_1 0x8000000000000000LL | 254 | #define CBE_MIC_DISABLE_PWR_SAV_1 0x8000000000000000LL |
255 | |||
251 | u64 pad_0x01c8; /* 0x01c8 */ | 256 | u64 pad_0x01c8; /* 0x01c8 */ |
252 | 257 | ||
253 | u64 slow_fast_timer_1; /* 0x01d0 */ | 258 | u64 slow_fast_timer_1; /* 0x01d0 */ |
254 | u64 slow_next_timer_1; /* 0x01d8 */ | 259 | u64 slow_next_timer_1; /* 0x01d8 */ |
255 | 260 | ||
256 | u8 pad_0x01e0_0x1000[0x1000 - 0x01e0]; /* 0x01e0 */ | 261 | u8 pad_0x01e0_0x0208[0x0208 - 0x01e0]; /* 0x01e0 */ |
262 | u64 mic_exc; /* 0x0208 */ | ||
263 | #define CBE_MIC_EXC_BLOCK_SCRUB 0x0800000000000000ULL | ||
264 | #define CBE_MIC_EXC_FAST_SCRUB 0x0100000000000000ULL | ||
265 | |||
266 | u64 mic_mnt_cfg; /* 0x0210 */ | ||
267 | #define CBE_MIC_MNT_CFG_CHAN_0_POP 0x0002000000000000ULL | ||
268 | #define CBE_MIC_MNT_CFG_CHAN_1_POP 0x0004000000000000ULL | ||
269 | |||
270 | u64 mic_df_config; /* 0x0218 */ | ||
271 | #define CBE_MIC_ECC_DISABLE_0 0x4000000000000000ULL | ||
272 | #define CBE_MIC_ECC_REP_SINGLE_0 0x2000000000000000ULL | ||
273 | #define CBE_MIC_ECC_DISABLE_1 0x0080000000000000ULL | ||
274 | #define CBE_MIC_ECC_REP_SINGLE_1 0x0040000000000000ULL | ||
275 | |||
276 | u8 pad_0x0220_0x0230[0x0230 - 0x0220]; /* 0x0220 */ | ||
277 | u64 mic_fir; /* 0x0230 */ | ||
278 | #define CBE_MIC_FIR_ECC_SINGLE_0_ERR 0x0200000000000000ULL | ||
279 | #define CBE_MIC_FIR_ECC_MULTI_0_ERR 0x0100000000000000ULL | ||
280 | #define CBE_MIC_FIR_ECC_SINGLE_1_ERR 0x0080000000000000ULL | ||
281 | #define CBE_MIC_FIR_ECC_MULTI_1_ERR 0x0040000000000000ULL | ||
282 | #define CBE_MIC_FIR_ECC_ERR_MASK 0xffff000000000000ULL | ||
283 | #define CBE_MIC_FIR_ECC_SINGLE_0_CTE 0x0000020000000000ULL | ||
284 | #define CBE_MIC_FIR_ECC_MULTI_0_CTE 0x0000010000000000ULL | ||
285 | #define CBE_MIC_FIR_ECC_SINGLE_1_CTE 0x0000008000000000ULL | ||
286 | #define CBE_MIC_FIR_ECC_MULTI_1_CTE 0x0000004000000000ULL | ||
287 | #define CBE_MIC_FIR_ECC_CTE_MASK 0x0000ffff00000000ULL | ||
288 | #define CBE_MIC_FIR_ECC_SINGLE_0_RESET 0x0000000002000000ULL | ||
289 | #define CBE_MIC_FIR_ECC_MULTI_0_RESET 0x0000000001000000ULL | ||
290 | #define CBE_MIC_FIR_ECC_SINGLE_1_RESET 0x0000000000800000ULL | ||
291 | #define CBE_MIC_FIR_ECC_MULTI_1_RESET 0x0000000000400000ULL | ||
292 | #define CBE_MIC_FIR_ECC_RESET_MASK 0x00000000ffff0000ULL | ||
293 | #define CBE_MIC_FIR_ECC_SINGLE_0_SET 0x0000000000000200ULL | ||
294 | #define CBE_MIC_FIR_ECC_MULTI_0_SET 0x0000000000000100ULL | ||
295 | #define CBE_MIC_FIR_ECC_SINGLE_1_SET 0x0000000000000080ULL | ||
296 | #define CBE_MIC_FIR_ECC_MULTI_1_SET 0x0000000000000040ULL | ||
297 | #define CBE_MIC_FIR_ECC_SET_MASK 0x000000000000ffffULL | ||
298 | u64 mic_fir_debug; /* 0x0238 */ | ||
299 | |||
300 | u8 pad_0x0240_0x1000[0x1000 - 0x0240]; /* 0x0240 */ | ||
257 | }; | 301 | }; |
258 | 302 | ||
259 | extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); | 303 | extern struct cbe_mic_tm_regs __iomem *cbe_get_mic_tm_regs(struct device_node *np); |