diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 13:43:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 13:43:56 -0400 |
commit | 660fc1f4d88b0f5e4bb936e4a5a9b95b70df9e58 (patch) | |
tree | a5b5de254f9b4378d77171e2a5d6496ec8e3e3f5 /include | |
parent | 3dd730f2b49f101b90d283c3efc4e6cd826dd8f6 (diff) | |
parent | ce0ad7f0952581ba75ab6aee55bb1ed9bb22cf4f (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/mm: Lockless get_user_pages_fast() for 64-bit (v3)
powerpc: Don't use the wrong thread_struct for ptrace get/set VSX regs
powerpc: Fix ptrace buffer size for VSX
powerpc: Correctly hookup PTRACE_GET/SETVSRREGS for 32 bit processes
ide/powermac: Fix use of uninitialized pointer on media-bay
powerpc: Allow non-hcall return values for lparcfg writes
ipmi/powerpc: Use linux/of_{device,platform}.h instead of asm
powerpc/fsl: proliferate simple-bus compatibility to soc nodes
Documentation: remove old sbc8260 board specific information
cpm2: Rework baud rate generators configuration to support external clocks.
powerpc: rtc_cmos_setup: assign interrupts only if there is i8259 PIC
cpm_uart: Add generic clock API support to set baudrates
cpm_uart: Modem control lines support
powerpc: implement GPIO LIB API on CPM1 Freescale SoC.
cpm2: Implement GPIO LIB API on CPM2 Freescale SoC.
powerpc: Fix 8xx build failure
powerpc: clean up the Book-E HW watchpoint support
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/cpm.h | 3 | ||||
-rw-r--r-- | include/asm-powerpc/cpm2.h | 46 | ||||
-rw-r--r-- | include/asm-powerpc/pgtable-ppc64.h | 2 | ||||
-rw-r--r-- | include/linux/pagemap.h | 23 |
4 files changed, 61 insertions, 13 deletions
diff --git a/include/asm-powerpc/cpm.h b/include/asm-powerpc/cpm.h index 63a55337c2de..24d79e3abd8e 100644 --- a/include/asm-powerpc/cpm.h +++ b/include/asm-powerpc/cpm.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/of.h> | ||
6 | 7 | ||
7 | /* Opcodes common to CPM1 and CPM2 | 8 | /* Opcodes common to CPM1 and CPM2 |
8 | */ | 9 | */ |
@@ -100,4 +101,6 @@ unsigned long cpm_muram_offset(void __iomem *addr); | |||
100 | dma_addr_t cpm_muram_dma(void __iomem *addr); | 101 | dma_addr_t cpm_muram_dma(void __iomem *addr); |
101 | int cpm_command(u32 command, u8 opcode); | 102 | int cpm_command(u32 command, u8 opcode); |
102 | 103 | ||
104 | int cpm2_gpiochip_add32(struct device_node *np); | ||
105 | |||
103 | #endif | 106 | #endif |
diff --git a/include/asm-powerpc/cpm2.h b/include/asm-powerpc/cpm2.h index 2c7fd9cee291..2a6fa0183ac9 100644 --- a/include/asm-powerpc/cpm2.h +++ b/include/asm-powerpc/cpm2.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm/immap_cpm2.h> | 13 | #include <asm/immap_cpm2.h> |
14 | #include <asm/cpm.h> | 14 | #include <asm/cpm.h> |
15 | #include <sysdev/fsl_soc.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_PPC_85xx | 17 | #ifdef CONFIG_PPC_85xx |
17 | #define CPM_MAP_ADDR (get_immrbase() + 0x80000) | 18 | #define CPM_MAP_ADDR (get_immrbase() + 0x80000) |
@@ -93,10 +94,40 @@ extern cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor */ | |||
93 | #define cpm_dpfree cpm_muram_free | 94 | #define cpm_dpfree cpm_muram_free |
94 | #define cpm_dpram_addr cpm_muram_addr | 95 | #define cpm_dpram_addr cpm_muram_addr |
95 | 96 | ||
96 | extern void cpm_setbrg(uint brg, uint rate); | ||
97 | extern void cpm2_fastbrg(uint brg, uint rate, int div16); | ||
98 | extern void cpm2_reset(void); | 97 | extern void cpm2_reset(void); |
99 | 98 | ||
99 | /* Baud rate generators. | ||
100 | */ | ||
101 | #define CPM_BRG_RST ((uint)0x00020000) | ||
102 | #define CPM_BRG_EN ((uint)0x00010000) | ||
103 | #define CPM_BRG_EXTC_INT ((uint)0x00000000) | ||
104 | #define CPM_BRG_EXTC_CLK3_9 ((uint)0x00004000) | ||
105 | #define CPM_BRG_EXTC_CLK5_15 ((uint)0x00008000) | ||
106 | #define CPM_BRG_ATB ((uint)0x00002000) | ||
107 | #define CPM_BRG_CD_MASK ((uint)0x00001ffe) | ||
108 | #define CPM_BRG_DIV16 ((uint)0x00000001) | ||
109 | |||
110 | #define CPM2_BRG_INT_CLK (get_brgfreq()) | ||
111 | #define CPM2_BRG_UART_CLK (CPM2_BRG_INT_CLK/16) | ||
112 | |||
113 | extern void __cpm2_setbrg(uint brg, uint rate, uint clk, int div16, int src); | ||
114 | |||
115 | /* This function is used by UARTS, or anything else that uses a 16x | ||
116 | * oversampled clock. | ||
117 | */ | ||
118 | static inline void cpm_setbrg(uint brg, uint rate) | ||
119 | { | ||
120 | __cpm2_setbrg(brg, rate, CPM2_BRG_UART_CLK, 0, CPM_BRG_EXTC_INT); | ||
121 | } | ||
122 | |||
123 | /* This function is used to set high speed synchronous baud rate | ||
124 | * clocks. | ||
125 | */ | ||
126 | static inline void cpm2_fastbrg(uint brg, uint rate, int div16) | ||
127 | { | ||
128 | __cpm2_setbrg(brg, rate, CPM2_BRG_INT_CLK, div16, CPM_BRG_EXTC_INT); | ||
129 | } | ||
130 | |||
100 | /* Function code bits, usually generic to devices. | 131 | /* Function code bits, usually generic to devices. |
101 | */ | 132 | */ |
102 | #define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */ | 133 | #define CPMFCR_GBL ((u_char)0x20) /* Set memory snooping */ |
@@ -195,17 +226,6 @@ typedef struct smc_uart { | |||
195 | #define SMCM_TX ((unsigned char)0x02) | 226 | #define SMCM_TX ((unsigned char)0x02) |
196 | #define SMCM_RX ((unsigned char)0x01) | 227 | #define SMCM_RX ((unsigned char)0x01) |
197 | 228 | ||
198 | /* Baud rate generators. | ||
199 | */ | ||
200 | #define CPM_BRG_RST ((uint)0x00020000) | ||
201 | #define CPM_BRG_EN ((uint)0x00010000) | ||
202 | #define CPM_BRG_EXTC_INT ((uint)0x00000000) | ||
203 | #define CPM_BRG_EXTC_CLK3_9 ((uint)0x00004000) | ||
204 | #define CPM_BRG_EXTC_CLK5_15 ((uint)0x00008000) | ||
205 | #define CPM_BRG_ATB ((uint)0x00002000) | ||
206 | #define CPM_BRG_CD_MASK ((uint)0x00001ffe) | ||
207 | #define CPM_BRG_DIV16 ((uint)0x00000001) | ||
208 | |||
209 | /* SCCs. | 229 | /* SCCs. |
210 | */ | 230 | */ |
211 | #define SCC_GSMRH_IRP ((uint)0x00040000) | 231 | #define SCC_GSMRH_IRP ((uint)0x00040000) |
diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 5fc78c0be302..74c6f380b805 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h | |||
@@ -461,6 +461,8 @@ void pgtable_cache_init(void); | |||
461 | return pt; | 461 | return pt; |
462 | } | 462 | } |
463 | 463 | ||
464 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long address); | ||
465 | |||
464 | #endif /* __ASSEMBLY__ */ | 466 | #endif /* __ASSEMBLY__ */ |
465 | 467 | ||
466 | #endif /* _ASM_POWERPC_PGTABLE_PPC64_H_ */ | 468 | #endif /* _ASM_POWERPC_PGTABLE_PPC64_H_ */ |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index a39b38ccdc97..69ed3cb1197a 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -143,6 +143,29 @@ static inline int page_cache_get_speculative(struct page *page) | |||
143 | return 1; | 143 | return 1; |
144 | } | 144 | } |
145 | 145 | ||
146 | /* | ||
147 | * Same as above, but add instead of inc (could just be merged) | ||
148 | */ | ||
149 | static inline int page_cache_add_speculative(struct page *page, int count) | ||
150 | { | ||
151 | VM_BUG_ON(in_interrupt()); | ||
152 | |||
153 | #if !defined(CONFIG_SMP) && defined(CONFIG_CLASSIC_RCU) | ||
154 | # ifdef CONFIG_PREEMPT | ||
155 | VM_BUG_ON(!in_atomic()); | ||
156 | # endif | ||
157 | VM_BUG_ON(page_count(page) == 0); | ||
158 | atomic_add(count, &page->_count); | ||
159 | |||
160 | #else | ||
161 | if (unlikely(!atomic_add_unless(&page->_count, count, 0))) | ||
162 | return 0; | ||
163 | #endif | ||
164 | VM_BUG_ON(PageCompound(page) && page != compound_head(page)); | ||
165 | |||
166 | return 1; | ||
167 | } | ||
168 | |||
146 | static inline int page_freeze_refs(struct page *page, int count) | 169 | static inline int page_freeze_refs(struct page *page, int count) |
147 | { | 170 | { |
148 | return likely(atomic_cmpxchg(&page->_count, count, 0) == count); | 171 | return likely(atomic_cmpxchg(&page->_count, count, 0) == count); |