diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-01-20 19:00:44 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-01-20 19:00:44 -0500 |
commit | 50f4df4e6a7ae111fd9b8fada4155675a4410e99 (patch) | |
tree | a174a42f1f38660d0c4d3c4e81e5bb1e14fab0d1 /arch/powerpc/include | |
parent | 12fcdba1b7ae8b25696433f420b775aeb556d89b (diff) | |
parent | b49d81ded47e9d01f7128fce50d224ccc2150960 (diff) |
Merge remote branch 'kumar/next' into merge
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/immap_qe.h | 21 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg_booke.h | 14 |
3 files changed, 31 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h index 4e10f508570a..0edb6842b13d 100644 --- a/arch/powerpc/include/asm/immap_qe.h +++ b/arch/powerpc/include/asm/immap_qe.h | |||
@@ -467,13 +467,22 @@ struct qe_immap { | |||
467 | extern struct qe_immap __iomem *qe_immr; | 467 | extern struct qe_immap __iomem *qe_immr; |
468 | extern phys_addr_t get_qe_base(void); | 468 | extern phys_addr_t get_qe_base(void); |
469 | 469 | ||
470 | static inline unsigned long immrbar_virt_to_phys(void *address) | 470 | /* |
471 | * Returns the offset within the QE address space of the given pointer. | ||
472 | * | ||
473 | * Note that the QE does not support 36-bit physical addresses, so if | ||
474 | * get_qe_base() returns a number above 4GB, the caller will probably fail. | ||
475 | */ | ||
476 | static inline phys_addr_t immrbar_virt_to_phys(void *address) | ||
471 | { | 477 | { |
472 | if ( ((u32)address >= (u32)qe_immr) && | 478 | void *q = (void *)qe_immr; |
473 | ((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) ) | 479 | |
474 | return (unsigned long)(address - (u32)qe_immr + | 480 | /* Is it a MURAM address? */ |
475 | (u32)get_qe_base()); | 481 | if ((address >= q) && (address < (q + QE_IMMAP_SIZE))) |
476 | return (unsigned long)virt_to_phys(address); | 482 | return get_qe_base() + (address - q); |
483 | |||
484 | /* It's an address returned by kmalloc */ | ||
485 | return virt_to_phys(address); | ||
477 | } | 486 | } |
478 | 487 | ||
479 | #endif /* __KERNEL__ */ | 488 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index ff0005eec7dd..125fc1ad665d 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -283,6 +283,7 @@ | |||
283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ | 283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ |
284 | 284 | ||
285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ | 285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ |
286 | #ifdef CONFIG_6xx | ||
286 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ | 287 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ |
287 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ | 288 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ |
288 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ | 289 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ |
@@ -292,6 +293,7 @@ | |||
292 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ | 293 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ |
293 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ | 294 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ |
294 | #define HID1_PS (1<<16) /* 750FX PLL selection */ | 295 | #define HID1_PS (1<<16) /* 750FX PLL selection */ |
296 | #endif | ||
295 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ | 297 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ |
296 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ | 298 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ |
297 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 299 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 667a498eaee1..e68c69bf741a 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -246,6 +246,20 @@ | |||
246 | store or cache line push */ | 246 | store or cache line push */ |
247 | #endif | 247 | #endif |
248 | 248 | ||
249 | /* Bit definitions for the HID1 */ | ||
250 | #ifdef CONFIG_E500 | ||
251 | /* e500v1/v2 */ | ||
252 | #define HID1_PLL_CFG_MASK 0xfc000000 /* PLL_CFG input pins */ | ||
253 | #define HID1_RFXE 0x00020000 /* Read fault exception enable */ | ||
254 | #define HID1_R1DPE 0x00008000 /* R1 data bus parity enable */ | ||
255 | #define HID1_R2DPE 0x00004000 /* R2 data bus parity enable */ | ||
256 | #define HID1_ASTME 0x00002000 /* Address bus streaming mode enable */ | ||
257 | #define HID1_ABE 0x00001000 /* Address broadcast enable */ | ||
258 | #define HID1_MPXTT 0x00000400 /* MPX re-map transfer type */ | ||
259 | #define HID1_ATS 0x00000080 /* Atomic status */ | ||
260 | #define HID1_MID_MASK 0x0000000f /* MID input pins */ | ||
261 | #endif | ||
262 | |||
249 | /* Bit definitions for the DBSR. */ | 263 | /* Bit definitions for the DBSR. */ |
250 | /* | 264 | /* |
251 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. | 265 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. |