diff options
Diffstat (limited to 'include')
132 files changed, 2261 insertions, 568 deletions
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h index 525b4f6a7ace..acf55b483472 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/include/asm-alpha/core_mcpcia.h | |||
@@ -261,7 +261,7 @@ struct el_MCPCIA_uncorrected_frame_mcheck { | |||
261 | } | 261 | } |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | static inline int __mcpcia_is_mmio(unsigned long addr) | 264 | extern inline int __mcpcia_is_mmio(unsigned long addr) |
265 | { | 265 | { |
266 | return (addr & 0x80000000UL) == 0; | 266 | return (addr & 0x80000000UL) == 0; |
267 | } | 267 | } |
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index 90e6b5d6c214..46bfff58f670 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h | |||
@@ -356,13 +356,13 @@ struct el_t2_frame_corrected { | |||
356 | #define vip volatile int * | 356 | #define vip volatile int * |
357 | #define vuip volatile unsigned int * | 357 | #define vuip volatile unsigned int * |
358 | 358 | ||
359 | static inline u8 t2_inb(unsigned long addr) | 359 | extern inline u8 t2_inb(unsigned long addr) |
360 | { | 360 | { |
361 | long result = *(vip) ((addr << 5) + T2_IO + 0x00); | 361 | long result = *(vip) ((addr << 5) + T2_IO + 0x00); |
362 | return __kernel_extbl(result, addr & 3); | 362 | return __kernel_extbl(result, addr & 3); |
363 | } | 363 | } |
364 | 364 | ||
365 | static inline void t2_outb(u8 b, unsigned long addr) | 365 | extern inline void t2_outb(u8 b, unsigned long addr) |
366 | { | 366 | { |
367 | unsigned long w; | 367 | unsigned long w; |
368 | 368 | ||
@@ -371,13 +371,13 @@ static inline void t2_outb(u8 b, unsigned long addr) | |||
371 | mb(); | 371 | mb(); |
372 | } | 372 | } |
373 | 373 | ||
374 | static inline u16 t2_inw(unsigned long addr) | 374 | extern inline u16 t2_inw(unsigned long addr) |
375 | { | 375 | { |
376 | long result = *(vip) ((addr << 5) + T2_IO + 0x08); | 376 | long result = *(vip) ((addr << 5) + T2_IO + 0x08); |
377 | return __kernel_extwl(result, addr & 3); | 377 | return __kernel_extwl(result, addr & 3); |
378 | } | 378 | } |
379 | 379 | ||
380 | static inline void t2_outw(u16 b, unsigned long addr) | 380 | extern inline void t2_outw(u16 b, unsigned long addr) |
381 | { | 381 | { |
382 | unsigned long w; | 382 | unsigned long w; |
383 | 383 | ||
@@ -386,12 +386,12 @@ static inline void t2_outw(u16 b, unsigned long addr) | |||
386 | mb(); | 386 | mb(); |
387 | } | 387 | } |
388 | 388 | ||
389 | static inline u32 t2_inl(unsigned long addr) | 389 | extern inline u32 t2_inl(unsigned long addr) |
390 | { | 390 | { |
391 | return *(vuip) ((addr << 5) + T2_IO + 0x18); | 391 | return *(vuip) ((addr << 5) + T2_IO + 0x18); |
392 | } | 392 | } |
393 | 393 | ||
394 | static inline void t2_outl(u32 b, unsigned long addr) | 394 | extern inline void t2_outl(u32 b, unsigned long addr) |
395 | { | 395 | { |
396 | *(vuip) ((addr << 5) + T2_IO + 0x18) = b; | 396 | *(vuip) ((addr << 5) + T2_IO + 0x18) = b; |
397 | mb(); | 397 | mb(); |
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr) | |||
435 | set_hae(msb); \ | 435 | set_hae(msb); \ |
436 | } | 436 | } |
437 | 437 | ||
438 | static DEFINE_SPINLOCK(t2_hae_lock); | 438 | extern spinlock_t t2_hae_lock; |
439 | 439 | ||
440 | /* | 440 | /* |
441 | * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since | 441 | * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since |
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 38f18cf18c9d..e971ab000f95 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * register not being up-to-date with respect to the hardware | 35 | * register not being up-to-date with respect to the hardware |
36 | * value. | 36 | * value. |
37 | */ | 37 | */ |
38 | static inline void __set_hae(unsigned long new_hae) | 38 | extern inline void __set_hae(unsigned long new_hae) |
39 | { | 39 | { |
40 | unsigned long flags; | 40 | unsigned long flags; |
41 | local_irq_save(flags); | 41 | local_irq_save(flags); |
@@ -49,7 +49,7 @@ static inline void __set_hae(unsigned long new_hae) | |||
49 | local_irq_restore(flags); | 49 | local_irq_restore(flags); |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline void set_hae(unsigned long new_hae) | 52 | extern inline void set_hae(unsigned long new_hae) |
53 | { | 53 | { |
54 | if (new_hae != alpha_mv.hae_cache) | 54 | if (new_hae != alpha_mv.hae_cache) |
55 | __set_hae(new_hae); | 55 | __set_hae(new_hae); |
@@ -176,7 +176,7 @@ REMAP2(u64, writeq, volatile) | |||
176 | #undef REMAP1 | 176 | #undef REMAP1 |
177 | #undef REMAP2 | 177 | #undef REMAP2 |
178 | 178 | ||
179 | static inline void __iomem *generic_ioportmap(unsigned long a) | 179 | extern inline void __iomem *generic_ioportmap(unsigned long a) |
180 | { | 180 | { |
181 | return alpha_mv.mv_ioportmap(a); | 181 | return alpha_mv.mv_ioportmap(a); |
182 | } | 182 | } |
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h index 6a5be1f7debf..86c08a02d239 100644 --- a/include/asm-alpha/mmu_context.h +++ b/include/asm-alpha/mmu_context.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | 25 | ||
26 | extern inline unsigned long | 26 | static inline unsigned long |
27 | __reload_thread(struct pcb_struct *pcb) | 27 | __reload_thread(struct pcb_struct *pcb) |
28 | { | 28 | { |
29 | register unsigned long a0 __asm__("$16"); | 29 | register unsigned long a0 __asm__("$16"); |
@@ -114,7 +114,7 @@ extern unsigned long last_asn; | |||
114 | #define __MMU_EXTERN_INLINE | 114 | #define __MMU_EXTERN_INLINE |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | static inline unsigned long | 117 | extern inline unsigned long |
118 | __get_new_mm_context(struct mm_struct *mm, long cpu) | 118 | __get_new_mm_context(struct mm_struct *mm, long cpu) |
119 | { | 119 | { |
120 | unsigned long asn = cpu_last_asn(cpu); | 120 | unsigned long asn = cpu_last_asn(cpu); |
@@ -226,7 +226,7 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) | |||
226 | # endif | 226 | # endif |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | extern inline int | 229 | static inline int |
230 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 230 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
231 | { | 231 | { |
232 | int i; | 232 | int i; |
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c19..3495e8e00d70 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,6 +1,78 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | #include <linux/compiler.h> | ||
4 | #include <linux/threads.h> | ||
3 | 5 | ||
4 | #include <asm-generic/percpu.h> | 6 | /* |
7 | * Determine the real variable name from the name visible in the | ||
8 | * kernel sources. | ||
9 | */ | ||
10 | #define per_cpu_var(var) per_cpu__##var | ||
11 | |||
12 | #ifdef CONFIG_SMP | ||
13 | |||
14 | /* | ||
15 | * per_cpu_offset() is the offset that has to be added to a | ||
16 | * percpu variable to get to the instance for a certain processor. | ||
17 | */ | ||
18 | extern unsigned long __per_cpu_offset[NR_CPUS]; | ||
19 | |||
20 | #define per_cpu_offset(x) (__per_cpu_offset[x]) | ||
21 | |||
22 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ||
23 | #ifdef CONFIG_DEBUG_PREEMPT | ||
24 | #define my_cpu_offset per_cpu_offset(smp_processor_id()) | ||
25 | #else | ||
26 | #define my_cpu_offset __my_cpu_offset | ||
27 | #endif | ||
28 | |||
29 | #ifndef MODULE | ||
30 | #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset)) | ||
31 | #define PER_CPU_ATTRIBUTES | ||
32 | #else | ||
33 | /* | ||
34 | * To calculate addresses of locally defined variables, GCC uses 32-bit | ||
35 | * displacement from the GP. Which doesn't work for per cpu variables in | ||
36 | * modules, as an offset to the kernel per cpu area is way above 4G. | ||
37 | * | ||
38 | * This forces allocation of a GOT entry for per cpu variable using | ||
39 | * ldq instruction with a 'literal' relocation. | ||
40 | */ | ||
41 | #define SHIFT_PERCPU_PTR(var, offset) ({ \ | ||
42 | extern int simple_identifier_##var(void); \ | ||
43 | unsigned long __ptr, tmp_gp; \ | ||
44 | asm ( "br %1, 1f \n\ | ||
45 | 1: ldgp %1, 0(%1) \n\ | ||
46 | ldq %0, per_cpu__" #var"(%1)\t!literal" \ | ||
47 | : "=&r"(__ptr), "=&r"(tmp_gp)); \ | ||
48 | (typeof(&per_cpu_var(var)))(__ptr + (offset)); }) | ||
49 | |||
50 | #define PER_CPU_ATTRIBUTES __used | ||
51 | |||
52 | #endif /* MODULE */ | ||
53 | |||
54 | /* | ||
55 | * A percpu variable may point to a discarded regions. The following are | ||
56 | * established ways to produce a usable pointer from the percpu variable | ||
57 | * offset. | ||
58 | */ | ||
59 | #define per_cpu(var, cpu) \ | ||
60 | (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu))) | ||
61 | #define __get_cpu_var(var) \ | ||
62 | (*SHIFT_PERCPU_PTR(var, my_cpu_offset)) | ||
63 | #define __raw_get_cpu_var(var) \ | ||
64 | (*SHIFT_PERCPU_PTR(var, __my_cpu_offset)) | ||
65 | |||
66 | #else /* ! SMP */ | ||
67 | |||
68 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | ||
69 | #define __get_cpu_var(var) per_cpu_var(var) | ||
70 | #define __raw_get_cpu_var(var) per_cpu_var(var) | ||
71 | |||
72 | #define PER_CPU_ATTRIBUTES | ||
73 | |||
74 | #endif /* SMP */ | ||
75 | |||
76 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name) | ||
5 | 77 | ||
6 | #endif /* __ALPHA_PERCPU_H */ | 78 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index ed221d6408fc..afe20fa58c99 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -184,7 +184,7 @@ enum amask_enum { | |||
184 | __amask; }) | 184 | __amask; }) |
185 | 185 | ||
186 | #define __CALL_PAL_R0(NAME, TYPE) \ | 186 | #define __CALL_PAL_R0(NAME, TYPE) \ |
187 | static inline TYPE NAME(void) \ | 187 | extern inline TYPE NAME(void) \ |
188 | { \ | 188 | { \ |
189 | register TYPE __r0 __asm__("$0"); \ | 189 | register TYPE __r0 __asm__("$0"); \ |
190 | __asm__ __volatile__( \ | 190 | __asm__ __volatile__( \ |
@@ -196,7 +196,7 @@ static inline TYPE NAME(void) \ | |||
196 | } | 196 | } |
197 | 197 | ||
198 | #define __CALL_PAL_W1(NAME, TYPE0) \ | 198 | #define __CALL_PAL_W1(NAME, TYPE0) \ |
199 | static inline void NAME(TYPE0 arg0) \ | 199 | extern inline void NAME(TYPE0 arg0) \ |
200 | { \ | 200 | { \ |
201 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 201 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
202 | __asm__ __volatile__( \ | 202 | __asm__ __volatile__( \ |
@@ -207,7 +207,7 @@ static inline void NAME(TYPE0 arg0) \ | |||
207 | } | 207 | } |
208 | 208 | ||
209 | #define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ | 209 | #define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ |
210 | static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ | 210 | extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \ |
211 | { \ | 211 | { \ |
212 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 212 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
213 | register TYPE1 __r17 __asm__("$17") = arg1; \ | 213 | register TYPE1 __r17 __asm__("$17") = arg1; \ |
@@ -219,7 +219,7 @@ static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ | |||
219 | } | 219 | } |
220 | 220 | ||
221 | #define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ | 221 | #define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ |
222 | static inline RTYPE NAME(TYPE0 arg0) \ | 222 | extern inline RTYPE NAME(TYPE0 arg0) \ |
223 | { \ | 223 | { \ |
224 | register RTYPE __r0 __asm__("$0"); \ | 224 | register RTYPE __r0 __asm__("$0"); \ |
225 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 225 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
@@ -232,7 +232,7 @@ static inline RTYPE NAME(TYPE0 arg0) \ | |||
232 | } | 232 | } |
233 | 233 | ||
234 | #define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ | 234 | #define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ |
235 | static inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ | 235 | extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ |
236 | { \ | 236 | { \ |
237 | register RTYPE __r0 __asm__("$0"); \ | 237 | register RTYPE __r0 __asm__("$0"); \ |
238 | register TYPE0 __r16 __asm__("$16") = arg0; \ | 238 | register TYPE0 __r16 __asm__("$16") = arg0; \ |
diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h index e8df1e7aae6b..c00106bac521 100644 --- a/include/asm-alpha/vga.h +++ b/include/asm-alpha/vga.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define VT_BUF_HAVE_MEMSETW | 13 | #define VT_BUF_HAVE_MEMSETW |
14 | #define VT_BUF_HAVE_MEMCPYW | 14 | #define VT_BUF_HAVE_MEMCPYW |
15 | 15 | ||
16 | extern inline void scr_writew(u16 val, volatile u16 *addr) | 16 | static inline void scr_writew(u16 val, volatile u16 *addr) |
17 | { | 17 | { |
18 | if (__is_ioaddr(addr)) | 18 | if (__is_ioaddr(addr)) |
19 | __raw_writew(val, (volatile u16 __iomem *) addr); | 19 | __raw_writew(val, (volatile u16 __iomem *) addr); |
@@ -21,7 +21,7 @@ extern inline void scr_writew(u16 val, volatile u16 *addr) | |||
21 | *addr = val; | 21 | *addr = val; |
22 | } | 22 | } |
23 | 23 | ||
24 | extern inline u16 scr_readw(volatile const u16 *addr) | 24 | static inline u16 scr_readw(volatile const u16 *addr) |
25 | { | 25 | { |
26 | if (__is_ioaddr(addr)) | 26 | if (__is_ioaddr(addr)) |
27 | return __raw_readw((volatile const u16 __iomem *) addr); | 27 | return __raw_readw((volatile const u16 __iomem *) addr); |
@@ -29,7 +29,7 @@ extern inline u16 scr_readw(volatile const u16 *addr) | |||
29 | return *addr; | 29 | return *addr; |
30 | } | 30 | } |
31 | 31 | ||
32 | extern inline void scr_memsetw(u16 *s, u16 c, unsigned int count) | 32 | static inline void scr_memsetw(u16 *s, u16 c, unsigned int count) |
33 | { | 33 | { |
34 | if (__is_ioaddr(s)) | 34 | if (__is_ioaddr(s)) |
35 | memsetw_io((u16 __iomem *) s, c, count); | 35 | memsetw_io((u16 __iomem *) s, c, count); |
diff --git a/include/asm-arm/arch-at91/at91_pmc.h b/include/asm-arm/arch-at91/at91_pmc.h index c2b13c280155..2001e81f2267 100644 --- a/include/asm-arm/arch-at91/at91_pmc.h +++ b/include/asm-arm/arch-at91/at91_pmc.h | |||
@@ -39,10 +39,14 @@ | |||
39 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | 39 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ |
40 | 40 | ||
41 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */ | 41 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */ |
42 | #define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */ | ||
43 | #define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */ | ||
44 | #define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */ | ||
45 | #define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI PLL Start-up Time */ | ||
42 | 46 | ||
43 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ | 47 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ |
44 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | 48 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ |
45 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [AT91SAM926x only] */ | 49 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [SAM9x, CAP9] */ |
46 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ | 50 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ |
47 | 51 | ||
48 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ | 52 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ |
@@ -97,6 +101,7 @@ | |||
97 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ | 101 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ |
98 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | 102 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ |
99 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | 103 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ |
104 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */ | ||
100 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | 105 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ |
101 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | 106 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ |
102 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ | 107 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ |
diff --git a/include/asm-arm/arch-at91/at91cap9.h b/include/asm-arm/arch-at91/at91cap9.h index bac83adb5050..6f14d9053ac7 100644 --- a/include/asm-arm/arch-at91/at91cap9.h +++ b/include/asm-arm/arch-at91/at91cap9.h | |||
@@ -118,7 +118,7 @@ | |||
118 | #define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */ | 118 | #define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */ |
119 | 119 | ||
120 | #define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */ | 120 | #define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */ |
121 | #define AT91CAP9_UDPHS_BASE 0x00600000 /* USB High Speed Device Port */ | 121 | #define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */ |
122 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ | 122 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ |
123 | 123 | ||
124 | #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 | 124 | #define CONFIG_DRAM_BASE AT91_CHIPSELECT_6 |
diff --git a/include/asm-arm/arch-at91/at91cap9_matrix.h b/include/asm-arm/arch-at91/at91cap9_matrix.h index a641686b6c3d..ddbd4873c842 100644 --- a/include/asm-arm/arch-at91/at91cap9_matrix.h +++ b/include/asm-arm/arch-at91/at91cap9_matrix.h | |||
@@ -106,6 +106,11 @@ | |||
106 | #define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */ | 106 | #define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */ |
107 | #define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */ | 107 | #define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */ |
108 | 108 | ||
109 | #define AT91_MATRIX_UDPHS (AT91_MATRIX + 0x118) /* USBHS Special Function Register [AT91CAP9 only] */ | ||
110 | #define AT91_MATRIX_SELECT_UDPHS (0 << 31) /* select High Speed UDP */ | ||
111 | #define AT91_MATRIX_SELECT_UDP (1 << 31) /* select standard UDP */ | ||
112 | #define AT91_MATRIX_UDPHS_BYPASS_LOCK (1 << 30) /* bypass lock bit */ | ||
113 | |||
109 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */ | 114 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */ |
110 | #define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ | 115 | #define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ |
111 | #define AT91_MATRIX_EBI_CS1A_SMC (0 << 1) | 116 | #define AT91_MATRIX_EBI_CS1A_SMC (0 << 1) |
diff --git a/include/asm-arm/arch-at91/at91sam9260.h b/include/asm-arm/arch-at91/at91sam9260.h index c8934fe34dc5..889872a3f2a9 100644 --- a/include/asm-arm/arch-at91/at91sam9260.h +++ b/include/asm-arm/arch-at91/at91sam9260.h | |||
@@ -6,6 +6,8 @@ | |||
6 | * Common definitions. | 6 | * Common definitions. |
7 | * Based on AT91SAM9260 datasheet revision A (Preliminary). | 7 | * Based on AT91SAM9260 datasheet revision A (Preliminary). |
8 | * | 8 | * |
9 | * Includes also definitions for AT91SAM9XE and AT91SAM9G families | ||
10 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
11 | * the Free Software Foundation; either version 2 of the License, or | 13 | * the Free Software Foundation; either version 2 of the License, or |
@@ -123,5 +125,14 @@ | |||
123 | #define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */ | 125 | #define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */ |
124 | #define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 126 | #define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
125 | 127 | ||
128 | #define AT91SAM9G20_ROM_BASE 0x00100000 /* Internal ROM base address */ | ||
129 | #define AT91SAM9G20_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */ | ||
130 | |||
131 | #define AT91SAM9G20_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */ | ||
132 | #define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */ | ||
133 | #define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */ | ||
134 | #define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */ | ||
135 | |||
136 | #define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */ | ||
126 | 137 | ||
127 | #endif | 138 | #endif |
diff --git a/include/asm-arm/arch-at91/at91sam9rl.h b/include/asm-arm/arch-at91/at91sam9rl.h index 16d2832f6c0a..622e56f81d42 100644 --- a/include/asm-arm/arch-at91/at91sam9rl.h +++ b/include/asm-arm/arch-at91/at91sam9rl.h | |||
@@ -110,6 +110,6 @@ | |||
110 | #define AT91SAM9RL_ROM_SIZE (2 * SZ_16K) /* Internal ROM size (32Kb) */ | 110 | #define AT91SAM9RL_ROM_SIZE (2 * SZ_16K) /* Internal ROM size (32Kb) */ |
111 | 111 | ||
112 | #define AT91SAM9RL_LCDC_BASE 0x00500000 /* LCD Controller */ | 112 | #define AT91SAM9RL_LCDC_BASE 0x00500000 /* LCD Controller */ |
113 | #define AT91SAM9RL_UDPHS_BASE 0x00600000 /* USB Device HS controller */ | 113 | #define AT91SAM9RL_UDPHS_FIFO 0x00600000 /* USB Device HS controller */ |
114 | 114 | ||
115 | #endif | 115 | #endif |
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index dc189f01c5b3..94de788da76e 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
37 | #include <linux/leds.h> | 37 | #include <linux/leds.h> |
38 | #include <linux/spi/spi.h> | 38 | #include <linux/spi/spi.h> |
39 | #include <linux/usb/atmel_usba_udc.h> | ||
39 | 40 | ||
40 | /* USB Device */ | 41 | /* USB Device */ |
41 | struct at91_udc_data { | 42 | struct at91_udc_data { |
@@ -45,6 +46,9 @@ struct at91_udc_data { | |||
45 | }; | 46 | }; |
46 | extern void __init at91_add_device_udc(struct at91_udc_data *data); | 47 | extern void __init at91_add_device_udc(struct at91_udc_data *data); |
47 | 48 | ||
49 | /* USB High Speed Device */ | ||
50 | extern void __init at91_add_device_usba(struct usba_platform_data *data); | ||
51 | |||
48 | /* Compact Flash */ | 52 | /* Compact Flash */ |
49 | struct at91_cf_data { | 53 | struct at91_cf_data { |
50 | u8 irq_pin; /* I/O IRQ */ | 54 | u8 irq_pin; /* I/O IRQ */ |
@@ -73,7 +77,7 @@ struct at91_eth_data { | |||
73 | }; | 77 | }; |
74 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | 78 | extern void __init at91_add_device_eth(struct at91_eth_data *data); |
75 | 79 | ||
76 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91CAP9) | 80 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) |
77 | #define eth_platform_data at91_eth_data | 81 | #define eth_platform_data at91_eth_data |
78 | #endif | 82 | #endif |
79 | 83 | ||
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h index 7145166826a2..52df794205cb 100644 --- a/include/asm-arm/arch-at91/cpu.h +++ b/include/asm-arm/arch-at91/cpu.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define ARCH_ID_AT91SAM9260 0x019803a0 | 21 | #define ARCH_ID_AT91SAM9260 0x019803a0 |
22 | #define ARCH_ID_AT91SAM9261 0x019703a0 | 22 | #define ARCH_ID_AT91SAM9261 0x019703a0 |
23 | #define ARCH_ID_AT91SAM9263 0x019607a0 | 23 | #define ARCH_ID_AT91SAM9263 0x019607a0 |
24 | #define ARCH_ID_AT91SAM9G20 0x019905a0 | ||
24 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 | 25 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 |
25 | #define ARCH_ID_AT91CAP9 0x039A03A0 | 26 | #define ARCH_ID_AT91CAP9 0x039A03A0 |
26 | 27 | ||
@@ -63,6 +64,12 @@ static inline unsigned long at91_arch_identify(void) | |||
63 | #define cpu_is_at91sam9260() (0) | 64 | #define cpu_is_at91sam9260() (0) |
64 | #endif | 65 | #endif |
65 | 66 | ||
67 | #ifdef CONFIG_ARCH_AT91SAM9G20 | ||
68 | #define cpu_is_at91sam9g20() (at91_cpu_identify() == ARCH_ID_AT91SAM9G20) | ||
69 | #else | ||
70 | #define cpu_is_at91sam9g20() (0) | ||
71 | #endif | ||
72 | |||
66 | #ifdef CONFIG_ARCH_AT91SAM9261 | 73 | #ifdef CONFIG_ARCH_AT91SAM9261 |
67 | #define cpu_is_at91sam9261() (at91_cpu_identify() == ARCH_ID_AT91SAM9261) | 74 | #define cpu_is_at91sam9261() (at91_cpu_identify() == ARCH_ID_AT91SAM9261) |
68 | #else | 75 | #else |
diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h index 2c826d8247a3..016a3a3f6633 100644 --- a/include/asm-arm/arch-at91/hardware.h +++ b/include/asm-arm/arch-at91/hardware.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #if defined(CONFIG_ARCH_AT91RM9200) | 19 | #if defined(CONFIG_ARCH_AT91RM9200) |
20 | #include <asm/arch/at91rm9200.h> | 20 | #include <asm/arch/at91rm9200.h> |
21 | #elif defined(CONFIG_ARCH_AT91SAM9260) | 21 | #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20) |
22 | #include <asm/arch/at91sam9260.h> | 22 | #include <asm/arch/at91sam9260.h> |
23 | #elif defined(CONFIG_ARCH_AT91SAM9261) | 23 | #elif defined(CONFIG_ARCH_AT91SAM9261) |
24 | #include <asm/arch/at91sam9261.h> | 24 | #include <asm/arch/at91sam9261.h> |
diff --git a/include/asm-arm/arch-at91/timex.h b/include/asm-arm/arch-at91/timex.h index f1933b0fa43f..298d8313cdac 100644 --- a/include/asm-arm/arch-at91/timex.h +++ b/include/asm-arm/arch-at91/timex.h | |||
@@ -27,14 +27,29 @@ | |||
27 | 27 | ||
28 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) | 28 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) |
29 | 29 | ||
30 | #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9261) | 30 | #elif defined(CONFIG_ARCH_AT91SAM9260) |
31 | |||
32 | #if defined(CONFIG_MACH_USB_A9260) || defined(CONFIG_MACH_QIL_A9260) | ||
33 | #define AT91SAM9_MASTER_CLOCK 90000000 | ||
34 | #else | ||
35 | #define AT91SAM9_MASTER_CLOCK 99300000 | ||
36 | #endif | ||
37 | |||
38 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | ||
39 | |||
40 | #elif defined(CONFIG_ARCH_AT91SAM9261) | ||
31 | 41 | ||
32 | #define AT91SAM9_MASTER_CLOCK 99300000 | 42 | #define AT91SAM9_MASTER_CLOCK 99300000 |
33 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
34 | 44 | ||
35 | #elif defined(CONFIG_ARCH_AT91SAM9263) | 45 | #elif defined(CONFIG_ARCH_AT91SAM9263) |
36 | 46 | ||
47 | #if defined(CONFIG_MACH_USB_A9263) | ||
48 | #define AT91SAM9_MASTER_CLOCK 90000000 | ||
49 | #else | ||
37 | #define AT91SAM9_MASTER_CLOCK 99959500 | 50 | #define AT91SAM9_MASTER_CLOCK 99959500 |
51 | #endif | ||
52 | |||
38 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 53 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
39 | 54 | ||
40 | #elif defined(CONFIG_ARCH_AT91SAM9RL) | 55 | #elif defined(CONFIG_ARCH_AT91SAM9RL) |
@@ -42,6 +57,11 @@ | |||
42 | #define AT91SAM9_MASTER_CLOCK 100000000 | 57 | #define AT91SAM9_MASTER_CLOCK 100000000 |
43 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 58 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
44 | 59 | ||
60 | #elif defined(CONFIG_ARCH_AT91SAM9G20) | ||
61 | |||
62 | #define AT91SAM9_MASTER_CLOCK 132096000 | ||
63 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | ||
64 | |||
45 | #elif defined(CONFIG_ARCH_AT91CAP9) | 65 | #elif defined(CONFIG_ARCH_AT91CAP9) |
46 | 66 | ||
47 | #define AT91CAP9_MASTER_CLOCK 100000000 | 67 | #define AT91CAP9_MASTER_CLOCK 100000000 |
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h index daad8ee2d194..74610c2c63d4 100644 --- a/include/asm-arm/arch-ebsa285/hardware.h +++ b/include/asm-arm/arch-ebsa285/hardware.h | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <asm/arch/memory.h> | 15 | #include <asm/arch/memory.h> |
16 | 16 | ||
17 | #ifdef CONFIG_ARCH_FOOTBRIDGE | ||
18 | /* Virtual Physical Size | 17 | /* Virtual Physical Size |
19 | * 0xff800000 0x40000000 1MB X-Bus | 18 | * 0xff800000 0x40000000 1MB X-Bus |
20 | * 0xff000000 0x7c000000 1MB PCI I/O space | 19 | * 0xff000000 0x7c000000 1MB PCI I/O space |
@@ -50,31 +49,6 @@ | |||
50 | #define PCIMEM_SIZE 0x01000000 | 49 | #define PCIMEM_SIZE 0x01000000 |
51 | #define PCIMEM_BASE 0xf0000000 | 50 | #define PCIMEM_BASE 0xf0000000 |
52 | 51 | ||
53 | #elif defined(CONFIG_ARCH_CO285) | ||
54 | /* | ||
55 | * This is the COEBSA285 cut-down mapping | ||
56 | */ | ||
57 | #define PCIMEM_SIZE 0x80000000 | ||
58 | #define PCIMEM_BASE 0x80000000 | ||
59 | |||
60 | #define WFLUSH_SIZE 0x01000000 | ||
61 | #define WFLUSH_BASE 0x7d000000 | ||
62 | |||
63 | #define ARMCSR_SIZE 0x00100000 | ||
64 | #define ARMCSR_BASE 0x7cf00000 | ||
65 | |||
66 | #define XBUS_SIZE 0x00020000 | ||
67 | #define XBUS_BASE 0x7cee0000 | ||
68 | |||
69 | #define PCIO_SIZE 0x00010000 | ||
70 | #define PCIO_BASE 0x7ced0000 | ||
71 | |||
72 | #else | ||
73 | |||
74 | #error "Undefined footbridge architecture" | ||
75 | |||
76 | #endif | ||
77 | |||
78 | #define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000)) | 52 | #define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000)) |
79 | #define XBUS_LED_AMBER (1 << 0) | 53 | #define XBUS_LED_AMBER (1 << 0) |
80 | #define XBUS_LED_GREEN (1 << 1) | 54 | #define XBUS_LED_GREEN (1 << 1) |
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h index cbd7ae64bcc9..9019a3bf5ab9 100644 --- a/include/asm-arm/arch-ebsa285/memory.h +++ b/include/asm-arm/arch-ebsa285/memory.h | |||
@@ -42,8 +42,6 @@ extern unsigned long __bus_to_virt(unsigned long); | |||
42 | 42 | ||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #if defined(CONFIG_ARCH_FOOTBRIDGE) | ||
46 | |||
47 | /* Task size and page offset at 3GB */ | 45 | /* Task size and page offset at 3GB */ |
48 | #define TASK_SIZE UL(0xbf000000) | 46 | #define TASK_SIZE UL(0xbf000000) |
49 | #define PAGE_OFFSET UL(0xc0000000) | 47 | #define PAGE_OFFSET UL(0xc0000000) |
@@ -53,23 +51,6 @@ extern unsigned long __bus_to_virt(unsigned long); | |||
53 | */ | 51 | */ |
54 | #define FLUSH_BASE 0xf9000000 | 52 | #define FLUSH_BASE 0xf9000000 |
55 | 53 | ||
56 | #elif defined(CONFIG_ARCH_CO285) | ||
57 | |||
58 | /* Task size and page offset at 1.5GB */ | ||
59 | #define TASK_SIZE UL(0x5f000000) | ||
60 | #define PAGE_OFFSET UL(0x60000000) | ||
61 | |||
62 | /* | ||
63 | * Cache flushing area. | ||
64 | */ | ||
65 | #define FLUSH_BASE 0x7e000000 | ||
66 | |||
67 | #else | ||
68 | |||
69 | #error "Undefined footbridge architecture" | ||
70 | |||
71 | #endif | ||
72 | |||
73 | /* | 54 | /* |
74 | * Physical DRAM offset. | 55 | * Physical DRAM offset. |
75 | */ | 56 | */ |
diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h index 02598200997d..e487d7e8c8a6 100644 --- a/include/asm-arm/arch-ebsa285/vmalloc.h +++ b/include/asm-arm/arch-ebsa285/vmalloc.h | |||
@@ -7,8 +7,4 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #ifdef CONFIG_ARCH_FOOTBRIDGE | ||
11 | #define VMALLOC_END (PAGE_OFFSET + 0x30000000) | 10 | #define VMALLOC_END (PAGE_OFFSET + 0x30000000) |
12 | #else | ||
13 | #define VMALLOC_END (PAGE_OFFSET + 0x20000000) | ||
14 | #endif | ||
diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h index 5b1066da4e1f..44d89c35539a 100644 --- a/include/asm-arm/arch-imx/imx-dma.h +++ b/include/asm-arm/arch-imx/imx-dma.h | |||
@@ -88,7 +88,7 @@ int imx_dma_request(imx_dmach_t dma_ch, const char *name); | |||
88 | 88 | ||
89 | void imx_dma_free(imx_dmach_t dma_ch); | 89 | void imx_dma_free(imx_dmach_t dma_ch); |
90 | 90 | ||
91 | int imx_dma_request_by_prio(imx_dmach_t *pdma_ch, const char *name, imx_dma_prio prio); | 91 | imx_dmach_t imx_dma_request_by_prio(const char *name, imx_dma_prio prio); |
92 | 92 | ||
93 | 93 | ||
94 | #endif /* _ASM_ARCH_IMX_DMA_H */ | 94 | #endif /* _ASM_ARCH_IMX_DMA_H */ |
diff --git a/include/asm-arm/arch-iop13xx/dma.h b/include/asm-arm/arch-iop13xx/dma.h index 2e15da53ff79..d79846fbb394 100644 --- a/include/asm-arm/arch-iop13xx/dma.h +++ b/include/asm-arm/arch-iop13xx/dma.h | |||
@@ -1,3 +1,3 @@ | |||
1 | #ifndef _IOP13XX_DMA_H | 1 | #ifndef _IOP13XX_DMA_H |
2 | #define _IOP13XX_DMA_H_ | 2 | #define _IOP13XX_DMA_H |
3 | #endif | 3 | #endif |
diff --git a/include/asm-arm/arch-iop32x/gpio.h b/include/asm-arm/arch-iop32x/gpio.h new file mode 100644 index 000000000000..708f4ec9db1d --- /dev/null +++ b/include/asm-arm/arch-iop32x/gpio.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_ARCH_IOP32X_GPIO_H | ||
2 | #define __ASM_ARCH_IOP32X_GPIO_H | ||
3 | |||
4 | #include <asm/hardware/iop3xx-gpio.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm/arch-iop33x/gpio.h b/include/asm-arm/arch-iop33x/gpio.h new file mode 100644 index 000000000000..ddd55bba9bb9 --- /dev/null +++ b/include/asm-arm/arch-iop33x/gpio.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_ARCH_IOP33X_GPIO_H | ||
2 | #define __ASM_ARCH_IOP33X_GPIO_H | ||
3 | |||
4 | #include <asm/hardware/iop3xx-gpio.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm/arch-ixp4xx/fsg.h b/include/asm-arm/arch-ixp4xx/fsg.h new file mode 100644 index 000000000000..c0100cc7981c --- /dev/null +++ b/include/asm-arm/arch-ixp4xx/fsg.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp4xx/fsg.h | ||
3 | * | ||
4 | * Freecom FSG-3 platform specific definitions | ||
5 | * | ||
6 | * Author: Rod Whitby <rod@whitby.id.au> | ||
7 | * Author: Tomasz Chmielewski <mangoo@wpkg.org> | ||
8 | * Maintainers: http://www.nslu2-linux.org | ||
9 | * | ||
10 | * Based on coyote.h by | ||
11 | * Copyright 2004 (c) MontaVista, Software, Inc. | ||
12 | * | ||
13 | * This file is licensed under the terms of the GNU General Public | ||
14 | * License version 2. This program is licensed "as is" without any | ||
15 | * warranty of any kind, whether express or implied. | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_HARDWARE_H__ | ||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | ||
20 | #endif | ||
21 | |||
22 | #define FSG_SDA_PIN 12 | ||
23 | #define FSG_SCL_PIN 13 | ||
24 | |||
25 | /* | ||
26 | * FSG PCI IRQs | ||
27 | */ | ||
28 | #define FSG_PCI_MAX_DEV 3 | ||
29 | #define FSG_PCI_IRQ_LINES 3 | ||
30 | |||
31 | |||
32 | /* PCI controller GPIO to IRQ pin mappings */ | ||
33 | #define FSG_PCI_INTA_PIN 6 | ||
34 | #define FSG_PCI_INTB_PIN 7 | ||
35 | #define FSG_PCI_INTC_PIN 5 | ||
36 | |||
37 | /* Buttons */ | ||
38 | |||
39 | #define FSG_SB_GPIO 4 /* sync button */ | ||
40 | #define FSG_RB_GPIO 9 /* reset button */ | ||
41 | #define FSG_UB_GPIO 10 /* usb button */ | ||
42 | |||
43 | /* LEDs */ | ||
44 | |||
45 | #define FSG_LED_WLAN_BIT 0 | ||
46 | #define FSG_LED_WAN_BIT 1 | ||
47 | #define FSG_LED_SATA_BIT 2 | ||
48 | #define FSG_LED_USB_BIT 4 | ||
49 | #define FSG_LED_RING_BIT 5 | ||
50 | #define FSG_LED_SYNC_BIT 7 | ||
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h index 73e8dc36f6a4..fa723a627854 100644 --- a/include/asm-arm/arch-ixp4xx/hardware.h +++ b/include/asm-arm/arch-ixp4xx/hardware.h | |||
@@ -45,5 +45,6 @@ | |||
45 | #include "nslu2.h" | 45 | #include "nslu2.h" |
46 | #include "nas100d.h" | 46 | #include "nas100d.h" |
47 | #include "dsmg600.h" | 47 | #include "dsmg600.h" |
48 | #include "fsg.h" | ||
48 | 49 | ||
49 | #endif /* _ASM_ARCH_HARDWARE_H */ | 50 | #endif /* _ASM_ARCH_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h index 11801605047b..674af4a84147 100644 --- a/include/asm-arm/arch-ixp4xx/irqs.h +++ b/include/asm-arm/arch-ixp4xx/irqs.h | |||
@@ -128,4 +128,11 @@ | |||
128 | #define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7 | 128 | #define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7 |
129 | #define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6 | 129 | #define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6 |
130 | 130 | ||
131 | /* | ||
132 | * Freecom FSG-3 Board IRQs | ||
133 | */ | ||
134 | #define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6 | ||
135 | #define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7 | ||
136 | #define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5 | ||
137 | |||
131 | #endif | 138 | #endif |
diff --git a/include/asm-arm/arch-kirkwood/debug-macro.S b/include/asm-arm/arch-kirkwood/debug-macro.S new file mode 100644 index 000000000000..f55fb8ad9ee4 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/debug-macro.S | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/debug-macro.S | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <asm/arch/kirkwood.h> | ||
10 | |||
11 | .macro addruart,rx | ||
12 | mrc p15, 0, \rx, c1, c0 | ||
13 | tst \rx, #1 @ MMU enabled? | ||
14 | ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE | ||
15 | ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE | ||
16 | orr \rx, \rx, #0x00012000 | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 2 | ||
20 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-kirkwood/dma.h b/include/asm-arm/arch-kirkwood/dma.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/include/asm-arm/arch-kirkwood/dma.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/include/asm-arm/arch-kirkwood/entry-macro.S b/include/asm-arm/arch-kirkwood/entry-macro.S new file mode 100644 index 000000000000..fc6a43d9355c --- /dev/null +++ b/include/asm-arm/arch-kirkwood/entry-macro.S | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell Kirkwood platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/arch/kirkwood.h> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | ldr \base, =IRQ_VIRT_BASE | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | @ check low interrupts | ||
25 | ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] | ||
26 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | ||
27 | mov \irqnr, #31 | ||
28 | ands \irqstat, \irqstat, \tmp | ||
29 | bne 1001f | ||
30 | |||
31 | @ if no low interrupts set, check high interrupts | ||
32 | ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | ||
33 | ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF] | ||
34 | mov \irqnr, #63 | ||
35 | ands \irqstat, \irqstat, \tmp | ||
36 | |||
37 | @ find first active interrupt source | ||
38 | 1001: clzne \irqstat, \irqstat | ||
39 | subne \irqnr, \irqnr, \irqstat | ||
40 | .endm | ||
diff --git a/include/asm-arm/arch-kirkwood/hardware.h b/include/asm-arm/arch-kirkwood/hardware.h new file mode 100644 index 000000000000..e695719771a5 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/hardware.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/hardware.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "kirkwood.h" | ||
13 | |||
14 | #define pcibios_assign_all_busses() 1 | ||
15 | |||
16 | #define PCIBIOS_MIN_IO 0x00001000 | ||
17 | #define PCIBIOS_MIN_MEM 0x01000000 | ||
18 | #define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */ | ||
19 | |||
20 | |||
21 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/io.h b/include/asm-arm/arch-kirkwood/io.h new file mode 100644 index 000000000000..0ef6e95f5d5b --- /dev/null +++ b/include/asm-arm/arch-kirkwood/io.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "kirkwood.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE) | ||
19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); | ||
20 | } | ||
21 | |||
22 | #define __io(a) __io(a) | ||
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/irqs.h b/include/asm-arm/arch-kirkwood/irqs.h new file mode 100644 index 000000000000..2e7b5da6335c --- /dev/null +++ b/include/asm-arm/arch-kirkwood/irqs.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell Kirkwood SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | #include "kirkwood.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | ||
17 | * Low Interrupt Controller | ||
18 | */ | ||
19 | #define IRQ_KIRKWOOD_HIGH_SUM 0 | ||
20 | #define IRQ_KIRKWOOD_BRIDGE 1 | ||
21 | #define IRQ_KIRKWOOD_HOST2CPU 2 | ||
22 | #define IRQ_KIRKWOOD_CPU2HOST 3 | ||
23 | #define IRQ_KIRKWOOD_XOR_00 5 | ||
24 | #define IRQ_KIRKWOOD_XOR_01 6 | ||
25 | #define IRQ_KIRKWOOD_XOR_10 7 | ||
26 | #define IRQ_KIRKWOOD_XOR_11 8 | ||
27 | #define IRQ_KIRKWOOD_PCIE 9 | ||
28 | #define IRQ_KIRKWOOD_GE00_SUM 11 | ||
29 | #define IRQ_KIRKWOOD_GE01_SUM 15 | ||
30 | #define IRQ_KIRKWOOD_USB 19 | ||
31 | #define IRQ_KIRKWOOD_SATA 21 | ||
32 | #define IRQ_KIRKWOOD_CRYPTO 22 | ||
33 | #define IRQ_KIRKWOOD_SPI 23 | ||
34 | #define IRQ_KIRKWOOD_I2S 24 | ||
35 | #define IRQ_KIRKWOOD_TS_0 26 | ||
36 | #define IRQ_KIRKWOOD_SDIO 28 | ||
37 | #define IRQ_KIRKWOOD_TWSI 29 | ||
38 | #define IRQ_KIRKWOOD_AVB 30 | ||
39 | #define IRQ_KIRKWOOD_TDMI 31 | ||
40 | |||
41 | /* | ||
42 | * High Interrupt Controller | ||
43 | */ | ||
44 | #define IRQ_KIRKWOOD_UART_0 33 | ||
45 | #define IRQ_KIRKWOOD_UART_1 34 | ||
46 | #define IRQ_KIRKWOOD_GPIO_LOW_0_7 35 | ||
47 | #define IRQ_KIRKWOOD_GPIO_LOW_8_15 36 | ||
48 | #define IRQ_KIRKWOOD_GPIO_LOW_16_23 37 | ||
49 | #define IRQ_KIRKWOOD_GPIO_LOW_24_31 38 | ||
50 | #define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39 | ||
51 | #define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40 | ||
52 | #define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41 | ||
53 | |||
54 | /* | ||
55 | * KIRKWOOD General Purpose Pins | ||
56 | */ | ||
57 | #define IRQ_KIRKWOOD_GPIO_START 64 | ||
58 | #define NR_GPIO_IRQS GPIO_MAX | ||
59 | |||
60 | #define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS) | ||
61 | |||
62 | |||
63 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/kirkwood.h b/include/asm-arm/arch-kirkwood/kirkwood.h new file mode 100644 index 000000000000..bb31b315c350 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/kirkwood.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/kirkwood.h | ||
3 | * | ||
4 | * Generic definitions for Marvell Kirkwood SoC flavors: | ||
5 | * 88F6180, 88F6192 and 88F6281. | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_KIRKWOOD_H | ||
13 | #define __ASM_ARCH_KIRKWOOD_H | ||
14 | |||
15 | /* | ||
16 | * Marvell Kirkwood address maps. | ||
17 | * | ||
18 | * phys | ||
19 | * e0000000 PCIe Memory space | ||
20 | * f1000000 on-chip peripheral registers | ||
21 | * f2000000 PCIe I/O space | ||
22 | * f3000000 NAND controller address window | ||
23 | * | ||
24 | * virt phys size | ||
25 | * fee00000 f1000000 1M on-chip peripheral registers | ||
26 | * fef00000 f2000000 1M PCIe I/O space | ||
27 | */ | ||
28 | |||
29 | #define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000 | ||
30 | #define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K | ||
31 | * is the minimal window size | ||
32 | */ | ||
33 | |||
34 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 | ||
35 | #define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000 | ||
36 | #define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000 | ||
37 | #define KIRKWOOD_PCIE_IO_SIZE SZ_1M | ||
38 | |||
39 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 | ||
40 | #define KIRKWOOD_REGS_VIRT_BASE 0xfee00000 | ||
41 | #define KIRKWOOD_REGS_SIZE SZ_1M | ||
42 | |||
43 | #define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000 | ||
44 | #define KIRKWOOD_PCIE_MEM_SIZE SZ_128M | ||
45 | |||
46 | /* | ||
47 | * MBUS bridge registers. | ||
48 | */ | ||
49 | #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) | ||
50 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | ||
51 | #define CPU_RESET 0x00000002 | ||
52 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | ||
53 | #define SOFT_RESET_OUT_EN 0x00000004 | ||
54 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | ||
55 | #define SOFT_RESET 0x00000001 | ||
56 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
57 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
58 | #define BRIDGE_INT_TIMER0 0x0002 | ||
59 | #define BRIDGE_INT_TIMER1 0x0004 | ||
60 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | ||
61 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | ||
62 | #define IRQ_CAUSE_LOW_OFF 0x0000 | ||
63 | #define IRQ_MASK_LOW_OFF 0x0004 | ||
64 | #define IRQ_CAUSE_HIGH_OFF 0x0010 | ||
65 | #define IRQ_MASK_HIGH_OFF 0x0014 | ||
66 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | ||
67 | #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128) | ||
68 | #define L2_WRITETHROUGH 0x00000010 | ||
69 | |||
70 | /* | ||
71 | * Register Map | ||
72 | */ | ||
73 | #define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000) | ||
74 | #define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500) | ||
75 | |||
76 | #define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000) | ||
77 | #define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000) | ||
78 | #define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030) | ||
79 | #define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034) | ||
80 | #define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300) | ||
81 | #define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600) | ||
82 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | ||
83 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | ||
84 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | ||
85 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | ||
86 | |||
87 | #define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000) | ||
88 | |||
89 | #define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000) | ||
90 | |||
91 | #define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000) | ||
92 | #define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000) | ||
93 | |||
94 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) | ||
95 | |||
96 | |||
97 | #define GPIO_MAX 50 | ||
98 | |||
99 | |||
100 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/memory.h b/include/asm-arm/arch-kirkwood/memory.h new file mode 100644 index 000000000000..e5108f408ce6 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/system.h b/include/asm-arm/arch-kirkwood/system.h new file mode 100644 index 000000000000..8dde7e379855 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/system.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/system.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_SYSTEM_H | ||
10 | #define __ASM_ARCH_SYSTEM_H | ||
11 | |||
12 | #include <asm/arch/hardware.h> | ||
13 | #include <asm/arch/kirkwood.h> | ||
14 | |||
15 | static inline void arch_idle(void) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | /* | ||
23 | * Enable soft reset to assert RSTOUTn. | ||
24 | */ | ||
25 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
26 | |||
27 | /* | ||
28 | * Assert soft reset. | ||
29 | */ | ||
30 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
31 | |||
32 | while (1) | ||
33 | ; | ||
34 | } | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-kirkwood/timex.h b/include/asm-arm/arch-kirkwood/timex.h new file mode 100644 index 000000000000..82122e134e3c --- /dev/null +++ b/include/asm-arm/arch-kirkwood/timex.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/timex.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | ||
10 | |||
11 | #define KIRKWOOD_TCLK 166666667 | ||
diff --git a/include/asm-arm/arch-kirkwood/uncompress.h b/include/asm-arm/arch-kirkwood/uncompress.h new file mode 100644 index 000000000000..a9062b6d7680 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/uncompress.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <asm/arch/kirkwood.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-kirkwood/vmalloc.h b/include/asm-arm/arch-kirkwood/vmalloc.h new file mode 100644 index 000000000000..41852c6e77f3 --- /dev/null +++ b/include/asm-arm/arch-kirkwood/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-kirkwood/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000 | ||
diff --git a/include/asm-arm/arch-loki/debug-macro.S b/include/asm-arm/arch-loki/debug-macro.S new file mode 100644 index 000000000000..585502e96513 --- /dev/null +++ b/include/asm-arm/arch-loki/debug-macro.S | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/debug-macro.S | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <asm/arch/loki.h> | ||
10 | |||
11 | .macro addruart,rx | ||
12 | mrc p15, 0, \rx, c1, c0 | ||
13 | tst \rx, #1 @ MMU enabled? | ||
14 | ldreq \rx, =LOKI_REGS_PHYS_BASE | ||
15 | ldrne \rx, =LOKI_REGS_VIRT_BASE | ||
16 | orr \rx, \rx, #0x00012000 | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 2 | ||
20 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-loki/dma.h b/include/asm-arm/arch-loki/dma.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/include/asm-arm/arch-loki/dma.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/include/asm-arm/arch-loki/entry-macro.S b/include/asm-arm/arch-loki/entry-macro.S new file mode 100644 index 000000000000..693257cdbeb8 --- /dev/null +++ b/include/asm-arm/arch-loki/entry-macro.S | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/arch/loki.h> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | ldr \base, =IRQ_VIRT_BASE | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | ldr \irqstat, [\base, #IRQ_CAUSE_OFF] | ||
25 | ldr \tmp, [\base, #IRQ_MASK_OFF] | ||
26 | mov \irqnr, #0 | ||
27 | ands \irqstat, \irqstat, \tmp | ||
28 | clzne \irqnr, \irqstat | ||
29 | rsbne \irqnr, \irqnr, #31 | ||
30 | .endm | ||
diff --git a/include/asm-arm/arch-loki/hardware.h b/include/asm-arm/arch-loki/hardware.h new file mode 100644 index 000000000000..f65b01c733b6 --- /dev/null +++ b/include/asm-arm/arch-loki/hardware.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/hardware.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "loki.h" | ||
13 | |||
14 | |||
15 | #endif | ||
diff --git a/include/asm-arm/arch-loki/io.h b/include/asm-arm/arch-loki/io.h new file mode 100644 index 000000000000..e7418a915e75 --- /dev/null +++ b/include/asm-arm/arch-loki/io.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "loki.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE) | ||
19 | + LOKI_PCIE0_IO_VIRT_BASE); | ||
20 | } | ||
21 | |||
22 | #define __io(a) __io(a) | ||
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/include/asm-arm/arch-loki/irqs.h b/include/asm-arm/arch-loki/irqs.h new file mode 100644 index 000000000000..7e4971438072 --- /dev/null +++ b/include/asm-arm/arch-loki/irqs.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell Loki (88RC8480) SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | #include "loki.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | ||
17 | * Interrupt Controller | ||
18 | */ | ||
19 | #define IRQ_LOKI_PCIE_A_CPU_DRBL 0 | ||
20 | #define IRQ_LOKI_CPU_PCIE_A_DRBL 1 | ||
21 | #define IRQ_LOKI_PCIE_B_CPU_DRBL 2 | ||
22 | #define IRQ_LOKI_CPU_PCIE_B_DRBL 3 | ||
23 | #define IRQ_LOKI_COM_A_ERR 6 | ||
24 | #define IRQ_LOKI_COM_A_IN 7 | ||
25 | #define IRQ_LOKI_COM_A_OUT 8 | ||
26 | #define IRQ_LOKI_COM_B_ERR 9 | ||
27 | #define IRQ_LOKI_COM_B_IN 10 | ||
28 | #define IRQ_LOKI_COM_B_OUT 11 | ||
29 | #define IRQ_LOKI_DMA_A 12 | ||
30 | #define IRQ_LOKI_DMA_B 13 | ||
31 | #define IRQ_LOKI_SAS_A 14 | ||
32 | #define IRQ_LOKI_SAS_B 15 | ||
33 | #define IRQ_LOKI_DDR 16 | ||
34 | #define IRQ_LOKI_XOR 17 | ||
35 | #define IRQ_LOKI_BRIDGE 18 | ||
36 | #define IRQ_LOKI_PCIE_A_ERR 20 | ||
37 | #define IRQ_LOKI_PCIE_A_INT 21 | ||
38 | #define IRQ_LOKI_PCIE_B_ERR 22 | ||
39 | #define IRQ_LOKI_PCIE_B_INT 23 | ||
40 | #define IRQ_LOKI_GBE_A_INT 24 | ||
41 | #define IRQ_LOKI_GBE_B_INT 25 | ||
42 | #define IRQ_LOKI_DEV_ERR 26 | ||
43 | #define IRQ_LOKI_UART0 27 | ||
44 | #define IRQ_LOKI_UART1 28 | ||
45 | #define IRQ_LOKI_TWSI 29 | ||
46 | #define IRQ_LOKI_GPIO_23_0 30 | ||
47 | #define IRQ_LOKI_GPIO_25_24 31 | ||
48 | |||
49 | /* | ||
50 | * Loki General Purpose Pins | ||
51 | */ | ||
52 | #define IRQ_LOKI_GPIO_START 32 | ||
53 | #define NR_GPIO_IRQS GPIO_MAX | ||
54 | |||
55 | #define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS) | ||
56 | |||
57 | |||
58 | #endif | ||
diff --git a/include/asm-arm/arch-loki/loki.h b/include/asm-arm/arch-loki/loki.h new file mode 100644 index 000000000000..5dd05ee0a4e6 --- /dev/null +++ b/include/asm-arm/arch-loki/loki.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/loki.h | ||
3 | * | ||
4 | * Generic definitions for Marvell Loki (88RC8480) SoC flavors | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_LOKI_H | ||
12 | #define __ASM_ARCH_LOKI_H | ||
13 | |||
14 | /* | ||
15 | * Marvell Loki (88RC8480) address maps. | ||
16 | * | ||
17 | * phys | ||
18 | * d0000000 on-chip peripheral registers | ||
19 | * e0000000 PCIe 0 Memory space | ||
20 | * e8000000 PCIe 1 Memory space | ||
21 | * f0000000 PCIe 0 I/O space | ||
22 | * f0100000 PCIe 1 I/O space | ||
23 | * | ||
24 | * virt phys size | ||
25 | * fed00000 d0000000 1M on-chip peripheral registers | ||
26 | * fee00000 f0000000 64K PCIe 0 I/O space | ||
27 | * fef00000 f0100000 64K PCIe 1 I/O space | ||
28 | */ | ||
29 | |||
30 | #define LOKI_REGS_PHYS_BASE 0xd0000000 | ||
31 | #define LOKI_REGS_VIRT_BASE 0xfed00000 | ||
32 | #define LOKI_REGS_SIZE SZ_1M | ||
33 | |||
34 | #define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000 | ||
35 | #define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000 | ||
36 | #define LOKI_PCIE0_IO_BUS_BASE 0x00000000 | ||
37 | #define LOKI_PCIE0_IO_SIZE SZ_64K | ||
38 | |||
39 | #define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000 | ||
40 | #define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000 | ||
41 | #define LOKI_PCIE1_IO_BUS_BASE 0x00000000 | ||
42 | #define LOKI_PCIE1_IO_SIZE SZ_64K | ||
43 | |||
44 | #define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000 | ||
45 | #define LOKI_PCIE0_MEM_SIZE SZ_128M | ||
46 | |||
47 | #define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000 | ||
48 | #define LOKI_PCIE1_MEM_SIZE SZ_128M | ||
49 | |||
50 | /* | ||
51 | * Register Map | ||
52 | */ | ||
53 | #define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000) | ||
54 | #define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000) | ||
55 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | ||
56 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | ||
57 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | ||
58 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | ||
59 | |||
60 | #define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000) | ||
61 | #define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x)) | ||
62 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | ||
63 | #define SOFT_RESET_OUT_EN 0x00000004 | ||
64 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | ||
65 | #define SOFT_RESET 0x00000001 | ||
66 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
67 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
68 | #define BRIDGE_INT_TIMER0 0x0002 | ||
69 | #define BRIDGE_INT_TIMER1 0x0004 | ||
70 | #define BRIDGE_INT_TIMER1_CLR 0x0004 | ||
71 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | ||
72 | #define IRQ_CAUSE_OFF 0x0000 | ||
73 | #define IRQ_MASK_OFF 0x0004 | ||
74 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | ||
75 | |||
76 | #define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000) | ||
77 | |||
78 | #define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000) | ||
79 | |||
80 | #define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000) | ||
81 | |||
82 | #define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000) | ||
83 | |||
84 | #define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000) | ||
85 | #define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000) | ||
86 | |||
87 | #define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000) | ||
88 | #define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000) | ||
89 | |||
90 | #define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000) | ||
91 | #define DDR_REG(x) (DDR_VIRT_BASE | (x)) | ||
92 | |||
93 | |||
94 | #define GPIO_MAX 8 | ||
95 | |||
96 | |||
97 | #endif | ||
diff --git a/include/asm-arm/arch-loki/memory.h b/include/asm-arm/arch-loki/memory.h new file mode 100644 index 000000000000..835101e49875 --- /dev/null +++ b/include/asm-arm/arch-loki/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-loki/system.h b/include/asm-arm/arch-loki/system.h new file mode 100644 index 000000000000..a3568ac8ec35 --- /dev/null +++ b/include/asm-arm/arch-loki/system.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/system.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_SYSTEM_H | ||
10 | #define __ASM_ARCH_SYSTEM_H | ||
11 | |||
12 | #include <asm/arch/hardware.h> | ||
13 | #include <asm/arch/loki.h> | ||
14 | |||
15 | static inline void arch_idle(void) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | /* | ||
23 | * Enable soft reset to assert RSTOUTn. | ||
24 | */ | ||
25 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
26 | |||
27 | /* | ||
28 | * Assert soft reset. | ||
29 | */ | ||
30 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
31 | |||
32 | while (1) | ||
33 | ; | ||
34 | } | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-loki/timex.h b/include/asm-arm/arch-loki/timex.h new file mode 100644 index 000000000000..940014f97cae --- /dev/null +++ b/include/asm-arm/arch-loki/timex.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/timex.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | ||
10 | |||
11 | #define LOKI_TCLK 180000000 | ||
diff --git a/include/asm-arm/arch-loki/uncompress.h b/include/asm-arm/arch-loki/uncompress.h new file mode 100644 index 000000000000..89a0cf88d3a5 --- /dev/null +++ b/include/asm-arm/arch-loki/uncompress.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <asm/arch/loki.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-loki/vmalloc.h b/include/asm-arm/arch-loki/vmalloc.h new file mode 100644 index 000000000000..f5be06220491 --- /dev/null +++ b/include/asm-arm/arch-loki/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-loki/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000 | ||
diff --git a/include/asm-arm/arch-msm/irqs.h b/include/asm-arm/arch-msm/irqs.h index 565430cfaa7e..e62a108b1857 100644 --- a/include/asm-arm/arch-msm/irqs.h +++ b/include/asm-arm/arch-msm/irqs.h | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef __ASM_ARCH_MSM_IRQS_H | 17 | #ifndef __ASM_ARCH_MSM_IRQS_H |
18 | #define __ASM_ARCH_MSM_IRQS_H | ||
18 | 19 | ||
19 | /* MSM ARM11 Interrupt Numbers */ | 20 | /* MSM ARM11 Interrupt Numbers */ |
20 | /* See 80-VE113-1 A, pp219-221 */ | 21 | /* See 80-VE113-1 A, pp219-221 */ |
diff --git a/include/asm-arm/arch-msm/timex.h b/include/asm-arm/arch-msm/timex.h index 154b23fb3599..8724487ab4c9 100644 --- a/include/asm-arm/arch-msm/timex.h +++ b/include/asm-arm/arch-msm/timex.h | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __ASM_ARCH_MSM_TIMEX_H | 16 | #ifndef __ASM_ARCH_MSM_TIMEX_H |
17 | #define __ASM_ARCH_MSM_TIMEX_H | ||
17 | 18 | ||
18 | #define CLOCK_TICK_RATE 1000000 | 19 | #define CLOCK_TICK_RATE 1000000 |
19 | 20 | ||
diff --git a/include/asm-arm/arch-mv78xx0/debug-macro.S b/include/asm-arm/arch-mv78xx0/debug-macro.S new file mode 100644 index 000000000000..d0595bd645e5 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/debug-macro.S | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/debug-macro.S | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <asm/arch/mv78xx0.h> | ||
10 | |||
11 | .macro addruart,rx | ||
12 | mrc p15, 0, \rx, c1, c0 | ||
13 | tst \rx, #1 @ MMU enabled? | ||
14 | ldreq \rx, =MV78XX0_REGS_PHYS_BASE | ||
15 | ldrne \rx, =MV78XX0_REGS_VIRT_BASE | ||
16 | orr \rx, \rx, #0x00012000 | ||
17 | .endm | ||
18 | |||
19 | #define UART_SHIFT 2 | ||
20 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-mv78xx0/dma.h b/include/asm-arm/arch-mv78xx0/dma.h new file mode 100644 index 000000000000..40a8c178f10d --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/dma.h | |||
@@ -0,0 +1 @@ | |||
/* empty */ | |||
diff --git a/include/asm-arm/arch-mv78xx0/entry-macro.S b/include/asm-arm/arch-mv78xx0/entry-macro.S new file mode 100644 index 000000000000..e9a606b12669 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/entry-macro.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Marvell MV78xx0 platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <asm/arch/mv78xx0.h> | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | ldr \base, =IRQ_VIRT_BASE | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
24 | @ check low interrupts | ||
25 | ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] | ||
26 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | ||
27 | mov \irqnr, #31 | ||
28 | ands \irqstat, \irqstat, \tmp | ||
29 | |||
30 | @ if no low interrupts set, check high interrupts | ||
31 | ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | ||
32 | ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF] | ||
33 | moveq \irqnr, #63 | ||
34 | andeqs \irqstat, \irqstat, \tmp | ||
35 | |||
36 | @ find first active interrupt source | ||
37 | clzne \irqstat, \irqstat | ||
38 | subne \irqnr, \irqnr, \irqstat | ||
39 | .endm | ||
diff --git a/include/asm-arm/arch-mv78xx0/hardware.h b/include/asm-arm/arch-mv78xx0/hardware.h new file mode 100644 index 000000000000..8e17926086c6 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/hardware.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/hardware.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_HARDWARE_H | ||
10 | #define __ASM_ARCH_HARDWARE_H | ||
11 | |||
12 | #include "mv78xx0.h" | ||
13 | |||
14 | #define pcibios_assign_all_busses() 1 | ||
15 | |||
16 | #define PCIBIOS_MIN_IO 0x00001000 | ||
17 | #define PCIBIOS_MIN_MEM 0x01000000 | ||
18 | #define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */ | ||
19 | |||
20 | |||
21 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/io.h b/include/asm-arm/arch-mv78xx0/io.h new file mode 100644 index 000000000000..415d4c98e3d1 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/io.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "mv78xx0.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0)) | ||
19 | + MV78XX0_PCIE_IO_VIRT_BASE(0)); | ||
20 | } | ||
21 | |||
22 | #define __io(a) __io(a) | ||
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/irqs.h b/include/asm-arm/arch-mv78xx0/irqs.h new file mode 100644 index 000000000000..75930450cd65 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/irqs.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Marvell MV78xx0 SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | #include "mv78xx0.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | ||
17 | * MV78xx0 Low Interrupt Controller | ||
18 | */ | ||
19 | #define IRQ_MV78XX0_ERR 0 | ||
20 | #define IRQ_MV78XX0_SPI 1 | ||
21 | #define IRQ_MV78XX0_I2C_0 2 | ||
22 | #define IRQ_MV78XX0_I2C_1 3 | ||
23 | #define IRQ_MV78XX0_IDMA_0 4 | ||
24 | #define IRQ_MV78XX0_IDMA_1 5 | ||
25 | #define IRQ_MV78XX0_IDMA_2 6 | ||
26 | #define IRQ_MV78XX0_IDMA_3 7 | ||
27 | #define IRQ_MV78XX0_TIMER_0 8 | ||
28 | #define IRQ_MV78XX0_TIMER_1 9 | ||
29 | #define IRQ_MV78XX0_TIMER_2 10 | ||
30 | #define IRQ_MV78XX0_TIMER_3 11 | ||
31 | #define IRQ_MV78XX0_UART_0 12 | ||
32 | #define IRQ_MV78XX0_UART_1 13 | ||
33 | #define IRQ_MV78XX0_UART_2 14 | ||
34 | #define IRQ_MV78XX0_UART_3 15 | ||
35 | #define IRQ_MV78XX0_USB_0 16 | ||
36 | #define IRQ_MV78XX0_USB_1 17 | ||
37 | #define IRQ_MV78XX0_USB_2 18 | ||
38 | #define IRQ_MV78XX0_CRYPTO 19 | ||
39 | #define IRQ_MV78XX0_SDIO_0 20 | ||
40 | #define IRQ_MV78XX0_SDIO_1 21 | ||
41 | #define IRQ_MV78XX0_XOR_0 22 | ||
42 | #define IRQ_MV78XX0_XOR_1 23 | ||
43 | #define IRQ_MV78XX0_I2S_0 24 | ||
44 | #define IRQ_MV78XX0_I2S_1 25 | ||
45 | #define IRQ_MV78XX0_SATA 26 | ||
46 | #define IRQ_MV78XX0_TDMI 27 | ||
47 | |||
48 | /* | ||
49 | * MV78xx0 High Interrupt Controller | ||
50 | */ | ||
51 | #define IRQ_MV78XX0_PCIE_00 32 | ||
52 | #define IRQ_MV78XX0_PCIE_01 33 | ||
53 | #define IRQ_MV78XX0_PCIE_02 34 | ||
54 | #define IRQ_MV78XX0_PCIE_03 35 | ||
55 | #define IRQ_MV78XX0_PCIE_10 36 | ||
56 | #define IRQ_MV78XX0_PCIE_11 37 | ||
57 | #define IRQ_MV78XX0_PCIE_12 38 | ||
58 | #define IRQ_MV78XX0_PCIE_13 39 | ||
59 | #define IRQ_MV78XX0_GE00_SUM 40 | ||
60 | #define IRQ_MV78XX0_GE00_RX 41 | ||
61 | #define IRQ_MV78XX0_GE00_TX 42 | ||
62 | #define IRQ_MV78XX0_GE00_MISC 43 | ||
63 | #define IRQ_MV78XX0_GE01_SUM 44 | ||
64 | #define IRQ_MV78XX0_GE01_RX 45 | ||
65 | #define IRQ_MV78XX0_GE01_TX 46 | ||
66 | #define IRQ_MV78XX0_GE01_MISC 47 | ||
67 | #define IRQ_MV78XX0_GE10_SUM 48 | ||
68 | #define IRQ_MV78XX0_GE10_RX 49 | ||
69 | #define IRQ_MV78XX0_GE10_TX 50 | ||
70 | #define IRQ_MV78XX0_GE10_MISC 51 | ||
71 | #define IRQ_MV78XX0_GE11_SUM 52 | ||
72 | #define IRQ_MV78XX0_GE11_RX 53 | ||
73 | #define IRQ_MV78XX0_GE11_TX 54 | ||
74 | #define IRQ_MV78XX0_GE11_MISC 55 | ||
75 | #define IRQ_MV78XX0_GPIO_0_7 56 | ||
76 | #define IRQ_MV78XX0_GPIO_8_15 57 | ||
77 | #define IRQ_MV78XX0_GPIO_16_23 58 | ||
78 | #define IRQ_MV78XX0_GPIO_24_31 59 | ||
79 | #define IRQ_MV78XX0_DB_IN 60 | ||
80 | #define IRQ_MV78XX0_DB_OUT 61 | ||
81 | |||
82 | /* | ||
83 | * MV78XX0 General Purpose Pins | ||
84 | */ | ||
85 | #define IRQ_MV78XX0_GPIO_START 64 | ||
86 | #define NR_GPIO_IRQS GPIO_MAX | ||
87 | |||
88 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) | ||
89 | |||
90 | |||
91 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/memory.h b/include/asm-arm/arch-mv78xx0/memory.h new file mode 100644 index 000000000000..721a6b185b91 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/mv78xx0.h b/include/asm-arm/arch-mv78xx0/mv78xx0.h new file mode 100644 index 000000000000..9f5d83c73faa --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/mv78xx0.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/mv78xx0.h | ||
3 | * | ||
4 | * Generic definitions for Marvell MV78xx0 SoC flavors: | ||
5 | * MV781x0 and MV782x0. | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MV78XX0_H | ||
13 | #define __ASM_ARCH_MV78XX0_H | ||
14 | |||
15 | /* | ||
16 | * Marvell MV78xx0 address maps. | ||
17 | * | ||
18 | * phys | ||
19 | * c0000000 PCIe Memory space | ||
20 | * f0800000 PCIe #0 I/O space | ||
21 | * f0900000 PCIe #1 I/O space | ||
22 | * f0a00000 PCIe #2 I/O space | ||
23 | * f0b00000 PCIe #3 I/O space | ||
24 | * f0c00000 PCIe #4 I/O space | ||
25 | * f0d00000 PCIe #5 I/O space | ||
26 | * f0e00000 PCIe #6 I/O space | ||
27 | * f0f00000 PCIe #7 I/O space | ||
28 | * f1000000 on-chip peripheral registers | ||
29 | * | ||
30 | * virt phys size | ||
31 | * fe400000 f102x000 16K core-specific peripheral registers | ||
32 | * fe700000 f0800000 1M PCIe #0 I/O space | ||
33 | * fe800000 f0900000 1M PCIe #1 I/O space | ||
34 | * fe900000 f0a00000 1M PCIe #2 I/O space | ||
35 | * fea00000 f0b00000 1M PCIe #3 I/O space | ||
36 | * feb00000 f0c00000 1M PCIe #4 I/O space | ||
37 | * fec00000 f0d00000 1M PCIe #5 I/O space | ||
38 | * fed00000 f0e00000 1M PCIe #6 I/O space | ||
39 | * fee00000 f0f00000 1M PCIe #7 I/O space | ||
40 | * fef00000 f1000000 1M on-chip peripheral registers | ||
41 | */ | ||
42 | #define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000 | ||
43 | #define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000 | ||
44 | #define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000 | ||
45 | #define MV78XX0_CORE_REGS_SIZE SZ_16K | ||
46 | |||
47 | #define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20)) | ||
48 | #define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20)) | ||
49 | #define MV78XX0_PCIE_IO_SIZE SZ_1M | ||
50 | |||
51 | #define MV78XX0_REGS_PHYS_BASE 0xf1000000 | ||
52 | #define MV78XX0_REGS_VIRT_BASE 0xfef00000 | ||
53 | #define MV78XX0_REGS_SIZE SZ_1M | ||
54 | |||
55 | #define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000 | ||
56 | #define MV78XX0_PCIE_MEM_SIZE 0x30000000 | ||
57 | |||
58 | /* | ||
59 | * Core-specific peripheral registers. | ||
60 | */ | ||
61 | #define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE) | ||
62 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | ||
63 | #define L2_WRITETHROUGH 0x00020000 | ||
64 | #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108) | ||
65 | #define SOFT_RESET_OUT_EN 0x00000004 | ||
66 | #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c) | ||
67 | #define SOFT_RESET 0x00000001 | ||
68 | #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) | ||
69 | #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114) | ||
70 | #define BRIDGE_INT_TIMER0 0x0002 | ||
71 | #define BRIDGE_INT_TIMER1 0x0004 | ||
72 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | ||
73 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | ||
74 | #define IRQ_CAUSE_LOW_OFF 0x0004 | ||
75 | #define IRQ_CAUSE_HIGH_OFF 0x0008 | ||
76 | #define IRQ_MASK_LOW_OFF 0x0010 | ||
77 | #define IRQ_MASK_HIGH_OFF 0x0014 | ||
78 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | ||
79 | |||
80 | /* | ||
81 | * Register Map | ||
82 | */ | ||
83 | #define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000) | ||
84 | #define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500) | ||
85 | #define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700) | ||
86 | |||
87 | #define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000) | ||
88 | #define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000) | ||
89 | #define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030) | ||
90 | #define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034) | ||
91 | #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000) | ||
92 | #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000) | ||
93 | #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100) | ||
94 | #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) | ||
95 | #define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200) | ||
96 | #define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200) | ||
97 | #define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300) | ||
98 | #define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300) | ||
99 | |||
100 | #define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000) | ||
101 | #define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000) | ||
102 | |||
103 | #define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000) | ||
104 | #define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000) | ||
105 | #define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000) | ||
106 | #define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000) | ||
107 | |||
108 | #define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000) | ||
109 | #define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000) | ||
110 | #define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000) | ||
111 | |||
112 | #define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000) | ||
113 | #define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000) | ||
114 | |||
115 | #define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000) | ||
116 | #define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000) | ||
117 | #define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000) | ||
118 | #define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000) | ||
119 | |||
120 | #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000) | ||
121 | |||
122 | |||
123 | #define GPIO_MAX 32 | ||
124 | |||
125 | |||
126 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/system.h b/include/asm-arm/arch-mv78xx0/system.h new file mode 100644 index 000000000000..7eb47d376db9 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/system.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/system.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_SYSTEM_H | ||
10 | #define __ASM_ARCH_SYSTEM_H | ||
11 | |||
12 | #include <asm/arch/hardware.h> | ||
13 | #include <asm/arch/mv78xx0.h> | ||
14 | |||
15 | static inline void arch_idle(void) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | /* | ||
23 | * Enable soft reset to assert RSTOUTn. | ||
24 | */ | ||
25 | writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK); | ||
26 | |||
27 | /* | ||
28 | * Assert soft reset. | ||
29 | */ | ||
30 | writel(SOFT_RESET, SYSTEM_SOFT_RESET); | ||
31 | |||
32 | while (1) | ||
33 | ; | ||
34 | } | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-mv78xx0/timex.h b/include/asm-arm/arch-mv78xx0/timex.h new file mode 100644 index 000000000000..a854b1ccbd01 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/timex.h | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/timex.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | ||
diff --git a/include/asm-arm/arch-mv78xx0/uncompress.h b/include/asm-arm/arch-mv78xx0/uncompress.h new file mode 100644 index 000000000000..3bfe0a293ef7 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/uncompress.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/uncompress.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <linux/serial_reg.h> | ||
10 | #include <asm/arch/mv78xx0.h> | ||
11 | |||
12 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) | ||
13 | |||
14 | static void putc(const char c) | ||
15 | { | ||
16 | unsigned char *base = SERIAL_BASE; | ||
17 | int i; | ||
18 | |||
19 | for (i = 0; i < 0x1000; i++) { | ||
20 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
21 | break; | ||
22 | barrier(); | ||
23 | } | ||
24 | |||
25 | base[UART_TX << 2] = c; | ||
26 | } | ||
27 | |||
28 | static void flush(void) | ||
29 | { | ||
30 | unsigned char *base = SERIAL_BASE; | ||
31 | unsigned char mask; | ||
32 | int i; | ||
33 | |||
34 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
35 | |||
36 | for (i = 0; i < 0x1000; i++) { | ||
37 | if ((base[UART_LSR << 2] & mask) == mask) | ||
38 | break; | ||
39 | barrier(); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * nothing to do | ||
45 | */ | ||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-mv78xx0/vmalloc.h b/include/asm-arm/arch-mv78xx0/vmalloc.h new file mode 100644 index 000000000000..f2c512197579 --- /dev/null +++ b/include/asm-arm/arch-mv78xx0/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mv78xx0/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe000000 | ||
diff --git a/include/asm-arm/arch-ns9xxx/hardware.h b/include/asm-arm/arch-ns9xxx/hardware.h index 0b7b34603f1c..0dca11ce21fc 100644 --- a/include/asm-arm/arch-ns9xxx/hardware.h +++ b/include/asm-arm/arch-ns9xxx/hardware.h | |||
@@ -66,13 +66,13 @@ | |||
66 | __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field) | 66 | __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field) |
67 | 67 | ||
68 | # define REGGETIM_IDX(var, reg, field, idx) \ | 68 | # define REGGETIM_IDX(var, reg, field, idx) \ |
69 | __REGGET(var, reg ## _ ## field((idx))) / \ | 69 | __REGGET(var, reg ## _ ## field((idx))) / \ |
70 | __REGSHIFT(reg ## _ ## field((idx))) | 70 | __REGSHIFT(reg ## _ ## field((idx))) |
71 | 71 | ||
72 | #else | 72 | #else |
73 | 73 | ||
74 | # define __REG(x) io_p2v(x) | 74 | # define __REG(x) io_p2v(x) |
75 | # define __REG2(x, y) io_p2v((x) + (y)) | 75 | # define __REG2(x, y) io_p2v((x) + 4 * (y)) |
76 | 76 | ||
77 | #endif | 77 | #endif |
78 | 78 | ||
diff --git a/include/asm-arm/arch-omap/board-2430sdp.h b/include/asm-arm/arch-omap/board-2430sdp.h index e9c65ce3cb12..c7db9004ec31 100644 --- a/include/asm-arm/arch-omap/board-2430sdp.h +++ b/include/asm-arm/arch-omap/board-2430sdp.h | |||
@@ -36,9 +36,4 @@ | |||
36 | 36 | ||
37 | #define TWL4030_IRQNUM INT_24XX_SYS_NIRQ | 37 | #define TWL4030_IRQNUM INT_24XX_SYS_NIRQ |
38 | 38 | ||
39 | /* TWL4030 Primary Interrupt Handler (PIH) interrupts */ | ||
40 | #define IH_TWL4030_BASE IH_BOARD_BASE | ||
41 | #define IH_TWL4030_END (IH_TWL4030_BASE+8) | ||
42 | #define NR_IRQS (IH_TWL4030_END) | ||
43 | |||
44 | #endif /* __ASM_ARCH_OMAP_2430SDP_H */ | 39 | #endif /* __ASM_ARCH_OMAP_2430SDP_H */ |
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h index 0f6404435ea8..c5d0f32a40ac 100644 --- a/include/asm-arm/arch-omap/board-h3.h +++ b/include/asm-arm/arch-omap/board-h3.h | |||
@@ -30,12 +30,6 @@ | |||
30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ | 30 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ |
31 | #define OMAP1710_ETHR_START 0x04000300 | 31 | #define OMAP1710_ETHR_START 0x04000300 |
32 | 32 | ||
33 | #define MAXIRQNUM (IH_BOARD_BASE) | ||
34 | #define MAXFIQNUM MAXIRQNUM | ||
35 | #define MAXSWINUM MAXIRQNUM | ||
36 | |||
37 | #define NR_IRQS (MAXIRQNUM + 1) | ||
38 | |||
39 | extern void h3_mmc_init(void); | 33 | extern void h3_mmc_init(void); |
40 | extern void h3_mmc_slot_cover_handler(void *arg, int state); | 34 | extern void h3_mmc_slot_cover_handler(void *arg, int state); |
41 | 35 | ||
diff --git a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h index 56d2c98e143c..9ca03dec9d36 100644 --- a/include/asm-arm/arch-omap/board-innovator.h +++ b/include/asm-arm/arch-omap/board-innovator.h | |||
@@ -36,9 +36,6 @@ | |||
36 | #define OMAP1510P1_EMIFS_PRI_VALUE 0x00 | 36 | #define OMAP1510P1_EMIFS_PRI_VALUE 0x00 |
37 | #define OMAP1510P1_EMIFF_PRI_VALUE 0x00 | 37 | #define OMAP1510P1_EMIFF_PRI_VALUE 0x00 |
38 | 38 | ||
39 | #define NR_FPGA_IRQS 24 | ||
40 | #define NR_IRQS (IH_BOARD_BASE + NR_FPGA_IRQS) | ||
41 | |||
42 | #ifndef __ASSEMBLY__ | 39 | #ifndef __ASSEMBLY__ |
43 | void fpga_write(unsigned char val, int reg); | 40 | void fpga_write(unsigned char val, int reg); |
44 | unsigned char fpga_read(int reg); | 41 | unsigned char fpga_read(int reg); |
diff --git a/include/asm-arm/arch-omap/board-perseus2.h b/include/asm-arm/arch-omap/board-perseus2.h index eb74420cb439..d7429cb0f726 100644 --- a/include/asm-arm/arch-omap/board-perseus2.h +++ b/include/asm-arm/arch-omap/board-perseus2.h | |||
@@ -36,10 +36,4 @@ | |||
36 | #define OMAP_SDRAM_DEVICE D256M_1X16_4B | 36 | #define OMAP_SDRAM_DEVICE D256M_1X16_4B |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #define MAXIRQNUM IH_BOARD_BASE | ||
40 | #define MAXFIQNUM MAXIRQNUM | ||
41 | #define MAXSWINUM MAXIRQNUM | ||
42 | |||
43 | #define NR_IRQS (MAXIRQNUM + 1) | ||
44 | |||
45 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 12a5e4de9518..4c7b3514f71a 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -33,12 +33,24 @@ struct dpll_data { | |||
33 | void __iomem *mult_div1_reg; | 33 | void __iomem *mult_div1_reg; |
34 | u32 mult_mask; | 34 | u32 mult_mask; |
35 | u32 div1_mask; | 35 | u32 div1_mask; |
36 | u16 last_rounded_m; | ||
37 | u8 last_rounded_n; | ||
38 | unsigned long last_rounded_rate; | ||
39 | unsigned int rate_tolerance; | ||
40 | u16 max_multiplier; | ||
41 | u8 max_divider; | ||
42 | u32 max_tolerance; | ||
36 | # if defined(CONFIG_ARCH_OMAP3) | 43 | # if defined(CONFIG_ARCH_OMAP3) |
44 | u8 modes; | ||
37 | void __iomem *control_reg; | 45 | void __iomem *control_reg; |
38 | u32 enable_mask; | 46 | u32 enable_mask; |
39 | u8 auto_recal_bit; | 47 | u8 auto_recal_bit; |
40 | u8 recal_en_bit; | 48 | u8 recal_en_bit; |
41 | u8 recal_st_bit; | 49 | u8 recal_st_bit; |
50 | void __iomem *autoidle_reg; | ||
51 | u32 autoidle_mask; | ||
52 | void __iomem *idlest_reg; | ||
53 | u8 idlest_bit; | ||
42 | # endif | 54 | # endif |
43 | }; | 55 | }; |
44 | 56 | ||
@@ -66,11 +78,14 @@ struct clk { | |||
66 | void __iomem *clksel_reg; | 78 | void __iomem *clksel_reg; |
67 | u32 clksel_mask; | 79 | u32 clksel_mask; |
68 | const struct clksel *clksel; | 80 | const struct clksel *clksel; |
69 | const struct dpll_data *dpll_data; | 81 | struct dpll_data *dpll_data; |
70 | #else | 82 | #else |
71 | __u8 rate_offset; | 83 | __u8 rate_offset; |
72 | __u8 src_offset; | 84 | __u8 src_offset; |
73 | #endif | 85 | #endif |
86 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
87 | struct dentry *dent; /* For visible tree hierarchy */ | ||
88 | #endif | ||
74 | }; | 89 | }; |
75 | 90 | ||
76 | struct cpufreq_frequency_table; | 91 | struct cpufreq_frequency_table; |
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h index 36a3b62d4d8d..8ac03071f60c 100644 --- a/include/asm-arm/arch-omap/common.h +++ b/include/asm-arm/arch-omap/common.h | |||
@@ -47,8 +47,23 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
47 | } | 47 | } |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | /* IO bases for various OMAP processors */ | ||
51 | struct omap_globals { | ||
52 | void __iomem *tap; /* Control module ID code */ | ||
53 | void __iomem *sdrc; /* SDRAM Controller */ | ||
54 | void __iomem *sms; /* SDRAM Memory Scheduler */ | ||
55 | void __iomem *ctrl; /* System Control Module */ | ||
56 | void __iomem *prm; /* Power and Reset Management */ | ||
57 | void __iomem *cm; /* Clock Management */ | ||
58 | }; | ||
59 | |||
50 | void omap2_set_globals_242x(void); | 60 | void omap2_set_globals_242x(void); |
51 | void omap2_set_globals_243x(void); | 61 | void omap2_set_globals_243x(void); |
52 | void omap2_set_globals_343x(void); | 62 | void omap2_set_globals_343x(void); |
53 | 63 | ||
64 | /* These get called from omap2_set_globals_xxxx(), do not call these */ | ||
65 | void omap2_set_globals_memory(struct omap_globals *); | ||
66 | void omap2_set_globals_control(struct omap_globals *); | ||
67 | void omap2_set_globals_prcm(struct omap_globals *); | ||
68 | |||
54 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 69 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h index 59c0686f8be7..987553e3eeb9 100644 --- a/include/asm-arm/arch-omap/control.h +++ b/include/asm-arm/arch-omap/control.h | |||
@@ -167,8 +167,7 @@ | |||
167 | 167 | ||
168 | #ifndef __ASSEMBLY__ | 168 | #ifndef __ASSEMBLY__ |
169 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 169 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
170 | extern void omap_ctrl_base_set(u32 base); | 170 | extern void __iomem *omap_ctrl_base_get(void); |
171 | extern u32 omap_ctrl_base_get(void); | ||
172 | extern u8 omap_ctrl_readb(u16 offset); | 171 | extern u8 omap_ctrl_readb(u16 offset); |
173 | extern u16 omap_ctrl_readw(u16 offset); | 172 | extern u16 omap_ctrl_readw(u16 offset); |
174 | extern u32 omap_ctrl_readl(u16 offset); | 173 | extern u32 omap_ctrl_readl(u16 offset); |
@@ -176,7 +175,6 @@ extern void omap_ctrl_writeb(u8 val, u16 offset); | |||
176 | extern void omap_ctrl_writew(u16 val, u16 offset); | 175 | extern void omap_ctrl_writew(u16 val, u16 offset); |
177 | extern void omap_ctrl_writel(u32 val, u16 offset); | 176 | extern void omap_ctrl_writel(u32 val, u16 offset); |
178 | #else | 177 | #else |
179 | #define omap_ctrl_base_set(x) WARN_ON(1) | ||
180 | #define omap_ctrl_base_get() 0 | 178 | #define omap_ctrl_base_get() 0 |
181 | #define omap_ctrl_readb(x) 0 | 179 | #define omap_ctrl_readb(x) 0 |
182 | #define omap_ctrl_readw(x) 0 | 180 | #define omap_ctrl_readw(x) 0 |
diff --git a/include/asm-arm/arch-omap/cpu.h b/include/asm-arm/arch-omap/cpu.h index e8a4cf52778b..52db09f83281 100644 --- a/include/asm-arm/arch-omap/cpu.h +++ b/include/asm-arm/arch-omap/cpu.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * OMAP cpu type detection | 4 | * OMAP cpu type detection |
5 | * | 5 | * |
6 | * Copyright (C) 2004 Nokia Corporation | 6 | * Copyright (C) 2004, 2008 Nokia Corporation |
7 | * | 7 | * |
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | 8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> |
9 | * | 9 | * |
@@ -26,6 +26,12 @@ | |||
26 | #ifndef __ASM_ARCH_OMAP_CPU_H | 26 | #ifndef __ASM_ARCH_OMAP_CPU_H |
27 | #define __ASM_ARCH_OMAP_CPU_H | 27 | #define __ASM_ARCH_OMAP_CPU_H |
28 | 28 | ||
29 | struct omap_chip_id { | ||
30 | u8 oc; | ||
31 | }; | ||
32 | |||
33 | #define OMAP_CHIP_INIT(x) { .oc = x } | ||
34 | |||
29 | extern unsigned int system_rev; | 35 | extern unsigned int system_rev; |
30 | 36 | ||
31 | #define omap2_cpu_rev() ((system_rev >> 12) & 0x0f) | 37 | #define omap2_cpu_rev() ((system_rev >> 12) & 0x0f) |
@@ -345,6 +351,33 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
345 | #define OMAP2430_REV_ES1_0 0x24300000 | 351 | #define OMAP2430_REV_ES1_0 0x24300000 |
346 | #define OMAP3430_REV_ES1_0 0x34300000 | 352 | #define OMAP3430_REV_ES1_0 0x34300000 |
347 | #define OMAP3430_REV_ES2_0 0x34301000 | 353 | #define OMAP3430_REV_ES2_0 0x34301000 |
354 | #define OMAP3430_REV_ES2_1 0x34302000 | ||
355 | #define OMAP3430_REV_ES2_2 0x34303000 | ||
356 | |||
357 | /* | ||
358 | * omap_chip bits | ||
359 | * | ||
360 | * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is | ||
361 | * valid on all chips of that type. CHIP_IS_OMAP3430ES{1,2} indicates | ||
362 | * something that is only valid on that particular ES revision. | ||
363 | * | ||
364 | * These bits may be ORed together to indicate structures that are | ||
365 | * available on multiple chip types. | ||
366 | * | ||
367 | * To test whether a particular structure matches the current OMAP chip type, | ||
368 | * use omap_chip_is(). | ||
369 | * | ||
370 | */ | ||
371 | #define CHIP_IS_OMAP2420 (1 << 0) | ||
372 | #define CHIP_IS_OMAP2430 (1 << 1) | ||
373 | #define CHIP_IS_OMAP3430 (1 << 2) | ||
374 | #define CHIP_IS_OMAP3430ES1 (1 << 3) | ||
375 | #define CHIP_IS_OMAP3430ES2 (1 << 4) | ||
376 | |||
377 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | ||
378 | |||
379 | int omap_chip_is(struct omap_chip_id oci); | ||
380 | |||
348 | 381 | ||
349 | /* | 382 | /* |
350 | * Macro to detect device type i.e. EMU/HS/TST/GP/BAD | 383 | * Macro to detect device type i.e. EMU/HS/TST/GP/BAD |
@@ -362,6 +395,8 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
362 | #define is_device_type_gp() (get_device_type() == DEVICE_TYPE_GP) | 395 | #define is_device_type_gp() (get_device_type() == DEVICE_TYPE_GP) |
363 | #define is_device_type_bad() (get_device_type() == DEVICE_TYPE_BAD) | 396 | #define is_device_type_bad() (get_device_type() == DEVICE_TYPE_BAD) |
364 | 397 | ||
365 | #endif | 398 | void omap2_check_revision(void); |
399 | |||
400 | #endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */ | ||
366 | 401 | ||
367 | #endif | 402 | #endif |
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index 24acf090030d..f4dcb9587869 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -22,108 +22,128 @@ | |||
22 | #define __ASM_ARCH_DMA_H | 22 | #define __ASM_ARCH_DMA_H |
23 | 23 | ||
24 | /* Hardware registers for omap1 */ | 24 | /* Hardware registers for omap1 */ |
25 | #define OMAP_DMA_BASE (0xfffed800) | 25 | #define OMAP1_DMA_BASE (0xfffed800) |
26 | #define OMAP_DMA_GCR (OMAP_DMA_BASE + 0x400) | 26 | |
27 | #define OMAP_DMA_GSCR (OMAP_DMA_BASE + 0x404) | 27 | #define OMAP1_DMA_GCR 0x400 |
28 | #define OMAP_DMA_GRST (OMAP_DMA_BASE + 0x408) | 28 | #define OMAP1_DMA_GSCR 0x404 |
29 | #define OMAP_DMA_HW_ID (OMAP_DMA_BASE + 0x442) | 29 | #define OMAP1_DMA_GRST 0x408 |
30 | #define OMAP_DMA_PCH2_ID (OMAP_DMA_BASE + 0x444) | 30 | #define OMAP1_DMA_HW_ID 0x442 |
31 | #define OMAP_DMA_PCH0_ID (OMAP_DMA_BASE + 0x446) | 31 | #define OMAP1_DMA_PCH2_ID 0x444 |
32 | #define OMAP_DMA_PCH1_ID (OMAP_DMA_BASE + 0x448) | 32 | #define OMAP1_DMA_PCH0_ID 0x446 |
33 | #define OMAP_DMA_PCHG_ID (OMAP_DMA_BASE + 0x44a) | 33 | #define OMAP1_DMA_PCH1_ID 0x448 |
34 | #define OMAP_DMA_PCHD_ID (OMAP_DMA_BASE + 0x44c) | 34 | #define OMAP1_DMA_PCHG_ID 0x44a |
35 | #define OMAP_DMA_CAPS_0_U (OMAP_DMA_BASE + 0x44e) | 35 | #define OMAP1_DMA_PCHD_ID 0x44c |
36 | #define OMAP_DMA_CAPS_0_L (OMAP_DMA_BASE + 0x450) | 36 | #define OMAP1_DMA_CAPS_0_U 0x44e |
37 | #define OMAP_DMA_CAPS_1_U (OMAP_DMA_BASE + 0x452) | 37 | #define OMAP1_DMA_CAPS_0_L 0x450 |
38 | #define OMAP_DMA_CAPS_1_L (OMAP_DMA_BASE + 0x454) | 38 | #define OMAP1_DMA_CAPS_1_U 0x452 |
39 | #define OMAP_DMA_CAPS_2 (OMAP_DMA_BASE + 0x456) | 39 | #define OMAP1_DMA_CAPS_1_L 0x454 |
40 | #define OMAP_DMA_CAPS_3 (OMAP_DMA_BASE + 0x458) | 40 | #define OMAP1_DMA_CAPS_2 0x456 |
41 | #define OMAP_DMA_CAPS_4 (OMAP_DMA_BASE + 0x45a) | 41 | #define OMAP1_DMA_CAPS_3 0x458 |
42 | #define OMAP_DMA_PCH2_SR (OMAP_DMA_BASE + 0x460) | 42 | #define OMAP1_DMA_CAPS_4 0x45a |
43 | #define OMAP_DMA_PCH0_SR (OMAP_DMA_BASE + 0x480) | 43 | #define OMAP1_DMA_PCH2_SR 0x460 |
44 | #define OMAP_DMA_PCH1_SR (OMAP_DMA_BASE + 0x482) | 44 | #define OMAP1_DMA_PCH0_SR 0x480 |
45 | #define OMAP_DMA_PCHD_SR (OMAP_DMA_BASE + 0x4c0) | 45 | #define OMAP1_DMA_PCH1_SR 0x482 |
46 | 46 | #define OMAP1_DMA_PCHD_SR 0x4c0 | |
47 | /* Hardware registers for omap2 */ | 47 | |
48 | #if defined(CONFIG_ARCH_OMAP3) | 48 | /* Hardware registers for omap2 and omap3 */ |
49 | #define OMAP_DMA4_BASE (L4_34XX_BASE + 0x56000) | 49 | #define OMAP24XX_DMA4_BASE (L4_24XX_BASE + 0x56000) |
50 | #else /* CONFIG_ARCH_OMAP2 */ | 50 | #define OMAP34XX_DMA4_BASE (L4_34XX_BASE + 0x56000) |
51 | #define OMAP_DMA4_BASE (L4_24XX_BASE + 0x56000) | 51 | |
52 | #endif | 52 | #define OMAP_DMA4_REVISION 0x00 |
53 | 53 | #define OMAP_DMA4_GCR 0x78 | |
54 | #define OMAP_DMA4_REVISION (OMAP_DMA4_BASE + 0x00) | 54 | #define OMAP_DMA4_IRQSTATUS_L0 0x08 |
55 | #define OMAP_DMA4_GCR_REG (OMAP_DMA4_BASE + 0x78) | 55 | #define OMAP_DMA4_IRQSTATUS_L1 0x0c |
56 | #define OMAP_DMA4_IRQSTATUS_L0 (OMAP_DMA4_BASE + 0x08) | 56 | #define OMAP_DMA4_IRQSTATUS_L2 0x10 |
57 | #define OMAP_DMA4_IRQSTATUS_L1 (OMAP_DMA4_BASE + 0x0c) | 57 | #define OMAP_DMA4_IRQSTATUS_L3 0x14 |
58 | #define OMAP_DMA4_IRQSTATUS_L2 (OMAP_DMA4_BASE + 0x10) | 58 | #define OMAP_DMA4_IRQENABLE_L0 0x18 |
59 | #define OMAP_DMA4_IRQSTATUS_L3 (OMAP_DMA4_BASE + 0x14) | 59 | #define OMAP_DMA4_IRQENABLE_L1 0x1c |
60 | #define OMAP_DMA4_IRQENABLE_L0 (OMAP_DMA4_BASE + 0x18) | 60 | #define OMAP_DMA4_IRQENABLE_L2 0x20 |
61 | #define OMAP_DMA4_IRQENABLE_L1 (OMAP_DMA4_BASE + 0x1c) | 61 | #define OMAP_DMA4_IRQENABLE_L3 0x24 |
62 | #define OMAP_DMA4_IRQENABLE_L2 (OMAP_DMA4_BASE + 0x20) | 62 | #define OMAP_DMA4_SYSSTATUS 0x28 |
63 | #define OMAP_DMA4_IRQENABLE_L3 (OMAP_DMA4_BASE + 0x24) | 63 | #define OMAP_DMA4_OCP_SYSCONFIG 0x2c |
64 | #define OMAP_DMA4_SYSSTATUS (OMAP_DMA4_BASE + 0x28) | 64 | #define OMAP_DMA4_CAPS_0 0x64 |
65 | #define OMAP_DMA4_OCP_SYSCONFIG (OMAP_DMA4_BASE + 0x2c) | 65 | #define OMAP_DMA4_CAPS_2 0x6c |
66 | #define OMAP_DMA4_CAPS_0 (OMAP_DMA4_BASE + 0x64) | 66 | #define OMAP_DMA4_CAPS_3 0x70 |
67 | #define OMAP_DMA4_CAPS_2 (OMAP_DMA4_BASE + 0x6c) | 67 | #define OMAP_DMA4_CAPS_4 0x74 |
68 | #define OMAP_DMA4_CAPS_3 (OMAP_DMA4_BASE + 0x70) | 68 | |
69 | #define OMAP_DMA4_CAPS_4 (OMAP_DMA4_BASE + 0x74) | 69 | #define OMAP1_LOGICAL_DMA_CH_COUNT 17 |
70 | 70 | #define OMAP_DMA4_LOGICAL_DMA_CH_COUNT 32 /* REVISIT: Is this 32 + 2? */ | |
71 | #ifdef CONFIG_ARCH_OMAP1 | ||
72 | |||
73 | #define OMAP_LOGICAL_DMA_CH_COUNT 17 | ||
74 | 71 | ||
75 | /* Common channel specific registers for omap1 */ | 72 | /* Common channel specific registers for omap1 */ |
76 | #define OMAP_DMA_CSDP_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x00) | 73 | #define OMAP1_DMA_CH_BASE(n) (0x40 * (n) + 0x00) |
77 | #define OMAP_DMA_CCR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x02) | 74 | #define OMAP1_DMA_CSDP(n) (0x40 * (n) + 0x00) |
78 | #define OMAP_DMA_CICR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x04) | 75 | #define OMAP1_DMA_CCR(n) (0x40 * (n) + 0x02) |
79 | #define OMAP_DMA_CSR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x06) | 76 | #define OMAP1_DMA_CICR(n) (0x40 * (n) + 0x04) |
80 | #define OMAP_DMA_CEN_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x10) | 77 | #define OMAP1_DMA_CSR(n) (0x40 * (n) + 0x06) |
81 | #define OMAP_DMA_CFN_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x12) | 78 | #define OMAP1_DMA_CEN(n) (0x40 * (n) + 0x10) |
82 | #define OMAP_DMA_CSFI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x14) | 79 | #define OMAP1_DMA_CFN(n) (0x40 * (n) + 0x12) |
83 | #define OMAP_DMA_CSEI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x16) | 80 | #define OMAP1_DMA_CSFI(n) (0x40 * (n) + 0x14) |
84 | #define OMAP_DMA_CSAC_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x18) | 81 | #define OMAP1_DMA_CSEI(n) (0x40 * (n) + 0x16) |
85 | #define OMAP_DMA_CDAC_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1a) | 82 | #define OMAP1_DMA_CPC(n) (0x40 * (n) + 0x18) /* 15xx only */ |
86 | #define OMAP_DMA_CDEI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1c) | 83 | #define OMAP1_DMA_CSAC(n) (0x40 * (n) + 0x18) |
87 | #define OMAP_DMA_CDFI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1e) | 84 | #define OMAP1_DMA_CDAC(n) (0x40 * (n) + 0x1a) |
88 | #define OMAP_DMA_CLNK_CTRL_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x28) | 85 | #define OMAP1_DMA_CDEI(n) (0x40 * (n) + 0x1c) |
89 | 86 | #define OMAP1_DMA_CDFI(n) (0x40 * (n) + 0x1e) | |
90 | #else | 87 | #define OMAP1_DMA_CLNK_CTRL(n) (0x40 * (n) + 0x28) |
91 | |||
92 | #define OMAP_LOGICAL_DMA_CH_COUNT 32 /* REVISIT: Is this 32 + 2? */ | ||
93 | 88 | ||
94 | /* Common channel specific registers for omap2 */ | 89 | /* Common channel specific registers for omap2 */ |
95 | #define OMAP_DMA_CCR_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x80) | 90 | #define OMAP_DMA4_CH_BASE(n) (0x60 * (n) + 0x80) |
96 | #define OMAP_DMA_CLNK_CTRL_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x84) | 91 | #define OMAP_DMA4_CCR(n) (0x60 * (n) + 0x80) |
97 | #define OMAP_DMA_CICR_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x88) | 92 | #define OMAP_DMA4_CLNK_CTRL(n) (0x60 * (n) + 0x84) |
98 | #define OMAP_DMA_CSR_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x8c) | 93 | #define OMAP_DMA4_CICR(n) (0x60 * (n) + 0x88) |
99 | #define OMAP_DMA_CSDP_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x90) | 94 | #define OMAP_DMA4_CSR(n) (0x60 * (n) + 0x8c) |
100 | #define OMAP_DMA_CEN_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x94) | 95 | #define OMAP_DMA4_CSDP(n) (0x60 * (n) + 0x90) |
101 | #define OMAP_DMA_CFN_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x98) | 96 | #define OMAP_DMA4_CEN(n) (0x60 * (n) + 0x94) |
102 | #define OMAP_DMA_CSEI_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xa4) | 97 | #define OMAP_DMA4_CFN(n) (0x60 * (n) + 0x98) |
103 | #define OMAP_DMA_CSFI_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xa8) | 98 | #define OMAP_DMA4_CSEI(n) (0x60 * (n) + 0xa4) |
104 | #define OMAP_DMA_CDEI_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xac) | 99 | #define OMAP_DMA4_CSFI(n) (0x60 * (n) + 0xa8) |
105 | #define OMAP_DMA_CDFI_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xb0) | 100 | #define OMAP_DMA4_CDEI(n) (0x60 * (n) + 0xac) |
106 | #define OMAP_DMA_CSAC_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xb4) | 101 | #define OMAP_DMA4_CDFI(n) (0x60 * (n) + 0xb0) |
107 | #define OMAP_DMA_CDAC_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xb8) | 102 | #define OMAP_DMA4_CSAC(n) (0x60 * (n) + 0xb4) |
108 | 103 | #define OMAP_DMA4_CDAC(n) (0x60 * (n) + 0xb8) | |
109 | #endif | ||
110 | 104 | ||
111 | /* Channel specific registers only on omap1 */ | 105 | /* Channel specific registers only on omap1 */ |
112 | #define OMAP1_DMA_CSSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x08) | 106 | #define OMAP1_DMA_CSSA_L(n) (0x40 * (n) + 0x08) |
113 | #define OMAP1_DMA_CSSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0a) | 107 | #define OMAP1_DMA_CSSA_U(n) (0x40 * (n) + 0x0a) |
114 | #define OMAP1_DMA_CDSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0c) | 108 | #define OMAP1_DMA_CDSA_L(n) (0x40 * (n) + 0x0c) |
115 | #define OMAP1_DMA_CDSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0e) | 109 | #define OMAP1_DMA_CDSA_U(n) (0x40 * (n) + 0x0e) |
116 | #define OMAP1_DMA_COLOR_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x20) | 110 | #define OMAP1_DMA_COLOR_L(n) (0x40 * (n) + 0x20) |
117 | #define OMAP1_DMA_CCR2_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x24) | 111 | #define OMAP1_DMA_COLOR_U(n) (0x40 * (n) + 0x22) |
118 | #define OMAP1_DMA_COLOR_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x22) | 112 | #define OMAP1_DMA_CCR2(n) (0x40 * (n) + 0x24) |
119 | #define OMAP1_DMA_LCH_CTRL_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x2a) | 113 | #define OMAP1_DMA_LCH_CTRL(n) (0x40 * (n) + 0x2a) /* not on 15xx */ |
114 | #define OMAP1_DMA_CCEN(n) 0 | ||
115 | #define OMAP1_DMA_CCFN(n) 0 | ||
120 | 116 | ||
121 | /* Channel specific registers only on omap2 */ | 117 | /* Channel specific registers only on omap2 */ |
122 | #define OMAP2_DMA_CSSA_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0x9c) | 118 | #define OMAP_DMA4_CSSA(n) (0x60 * (n) + 0x9c) |
123 | #define OMAP2_DMA_CDSA_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xa0) | 119 | #define OMAP_DMA4_CDSA(n) (0x60 * (n) + 0xa0) |
124 | #define OMAP2_DMA_CCEN_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xbc) | 120 | #define OMAP_DMA4_CCEN(n) (0x60 * (n) + 0xbc) |
125 | #define OMAP2_DMA_CCFN_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xc0) | 121 | #define OMAP_DMA4_CCFN(n) (0x60 * (n) + 0xc0) |
126 | #define OMAP2_DMA_COLOR_REG(n) __REG32(OMAP_DMA4_BASE + 0x60 * (n) + 0xc4) | 122 | #define OMAP_DMA4_COLOR(n) (0x60 * (n) + 0xc4) |
123 | |||
124 | /* Dummy defines to keep multi-omap compiles happy */ | ||
125 | #define OMAP1_DMA_REVISION 0 | ||
126 | #define OMAP1_DMA_IRQSTATUS_L0 0 | ||
127 | #define OMAP1_DMA_IRQENABLE_L0 0 | ||
128 | #define OMAP1_DMA_OCP_SYSCONFIG 0 | ||
129 | #define OMAP_DMA4_HW_ID 0 | ||
130 | #define OMAP_DMA4_CAPS_0_L 0 | ||
131 | #define OMAP_DMA4_CAPS_0_U 0 | ||
132 | #define OMAP_DMA4_CAPS_1_L 0 | ||
133 | #define OMAP_DMA4_CAPS_1_U 0 | ||
134 | #define OMAP_DMA4_GSCR 0 | ||
135 | #define OMAP_DMA4_CPC(n) 0 | ||
136 | |||
137 | #define OMAP_DMA4_LCH_CTRL(n) 0 | ||
138 | #define OMAP_DMA4_COLOR_L(n) 0 | ||
139 | #define OMAP_DMA4_COLOR_U(n) 0 | ||
140 | #define OMAP_DMA4_CCR2(n) 0 | ||
141 | #define OMAP1_DMA_CSSA(n) 0 | ||
142 | #define OMAP1_DMA_CDSA(n) 0 | ||
143 | #define OMAP_DMA4_CSSA_L(n) 0 | ||
144 | #define OMAP_DMA4_CSSA_U(n) 0 | ||
145 | #define OMAP_DMA4_CDSA_L(n) 0 | ||
146 | #define OMAP_DMA4_CDSA_U(n) 0 | ||
127 | 147 | ||
128 | /*----------------------------------------------------------------------------*/ | 148 | /*----------------------------------------------------------------------------*/ |
129 | 149 | ||
@@ -196,63 +216,98 @@ | |||
196 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ | 216 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ |
197 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ | 217 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ |
198 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ | 218 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ |
199 | #define OMAP24XX_DMA_VLYNQ_TX 7 /* S_DMA_6 */ | 219 | #define OMAP242X_DMA_VLYNQ_TX 7 /* S_DMA_6 */ |
220 | #define OMAP24XX_DMA_EXT_DMAREQ2 7 /* S_DMA_6 */ | ||
200 | #define OMAP24XX_DMA_CWT 8 /* S_DMA_7 */ | 221 | #define OMAP24XX_DMA_CWT 8 /* S_DMA_7 */ |
201 | #define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */ | 222 | #define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */ |
202 | #define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */ | 223 | #define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */ |
203 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ | 224 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ |
204 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ | 225 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ |
205 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ | 226 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ |
206 | #define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */ | 227 | #define OMAP34XX_DMA_SHA2MD5_RX 13 /* S_DMA_12 */ |
207 | #define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */ | 228 | #define OMAP242X_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */ |
208 | #define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */ | 229 | #define OMAP242X_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */ |
209 | #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ | 230 | #define OMAP242X_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */ |
210 | #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ | 231 | #define OMAP242X_DMA_EAC_AC_RD 17 /* S_DMA_16 */ |
211 | #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ | 232 | #define OMAP242X_DMA_EAC_AC_WR 18 /* S_DMA_17 */ |
212 | #define OMAP24XX_DMA_EAC_MD_UL_WR 20 /* S_DMA_19 */ | 233 | #define OMAP242X_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ |
213 | #define OMAP24XX_DMA_EAC_MD_DL_RD 21 /* S_DMA_20 */ | 234 | #define OMAP242X_DMA_EAC_MD_UL_WR 20 /* S_DMA_19 */ |
214 | #define OMAP24XX_DMA_EAC_MD_DL_WR 22 /* S_DMA_21 */ | 235 | #define OMAP242X_DMA_EAC_MD_DL_RD 21 /* S_DMA_20 */ |
215 | #define OMAP24XX_DMA_EAC_BT_UL_RD 23 /* S_DMA_22 */ | 236 | #define OMAP242X_DMA_EAC_MD_DL_WR 22 /* S_DMA_21 */ |
216 | #define OMAP24XX_DMA_EAC_BT_UL_WR 24 /* S_DMA_23 */ | 237 | #define OMAP242X_DMA_EAC_BT_UL_RD 23 /* S_DMA_22 */ |
217 | #define OMAP24XX_DMA_EAC_BT_DL_RD 25 /* S_DMA_24 */ | 238 | #define OMAP242X_DMA_EAC_BT_UL_WR 24 /* S_DMA_23 */ |
218 | #define OMAP24XX_DMA_EAC_BT_DL_WR 26 /* S_DMA_25 */ | 239 | #define OMAP242X_DMA_EAC_BT_DL_RD 25 /* S_DMA_24 */ |
240 | #define OMAP242X_DMA_EAC_BT_DL_WR 26 /* S_DMA_25 */ | ||
241 | #define OMAP243X_DMA_EXT_DMAREQ3 14 /* S_DMA_13 */ | ||
242 | #define OMAP24XX_DMA_SPI3_TX0 15 /* S_DMA_14 */ | ||
243 | #define OMAP24XX_DMA_SPI3_RX0 16 /* S_DMA_15 */ | ||
244 | #define OMAP24XX_DMA_MCBSP3_TX 17 /* S_DMA_16 */ | ||
245 | #define OMAP24XX_DMA_MCBSP3_RX 18 /* S_DMA_17 */ | ||
246 | #define OMAP24XX_DMA_MCBSP4_TX 19 /* S_DMA_18 */ | ||
247 | #define OMAP24XX_DMA_MCBSP4_RX 20 /* S_DMA_19 */ | ||
248 | #define OMAP24XX_DMA_MCBSP5_TX 21 /* S_DMA_20 */ | ||
249 | #define OMAP24XX_DMA_MCBSP5_RX 22 /* S_DMA_21 */ | ||
250 | #define OMAP24XX_DMA_SPI3_TX1 23 /* S_DMA_22 */ | ||
251 | #define OMAP24XX_DMA_SPI3_RX1 24 /* S_DMA_23 */ | ||
252 | #define OMAP243X_DMA_EXT_DMAREQ4 25 /* S_DMA_24 */ | ||
253 | #define OMAP243X_DMA_EXT_DMAREQ5 26 /* S_DMA_25 */ | ||
254 | #define OMAP34XX_DMA_I2C3_TX 25 /* S_DMA_24 */ | ||
255 | #define OMAP34XX_DMA_I2C3_RX 26 /* S_DMA_25 */ | ||
219 | #define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */ | 256 | #define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */ |
220 | #define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */ | 257 | #define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */ |
221 | #define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */ | 258 | #define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */ |
222 | #define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */ | 259 | #define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */ |
223 | #define OMAP24XX_DMA_MCBSP1_TX 31 /* SDMA_30 */ | 260 | #define OMAP24XX_DMA_MCBSP1_TX 31 /* S_DMA_30 */ |
224 | #define OMAP24XX_DMA_MCBSP1_RX 32 /* SDMA_31 */ | 261 | #define OMAP24XX_DMA_MCBSP1_RX 32 /* S_DMA_31 */ |
225 | #define OMAP24XX_DMA_MCBSP2_TX 33 /* SDMA_32 */ | 262 | #define OMAP24XX_DMA_MCBSP2_TX 33 /* S_DMA_32 */ |
226 | #define OMAP24XX_DMA_MCBSP2_RX 34 /* SDMA_33 */ | 263 | #define OMAP24XX_DMA_MCBSP2_RX 34 /* S_DMA_33 */ |
227 | #define OMAP24XX_DMA_SPI1_TX0 35 /* SDMA_34 */ | 264 | #define OMAP24XX_DMA_SPI1_TX0 35 /* S_DMA_34 */ |
228 | #define OMAP24XX_DMA_SPI1_RX0 36 /* SDMA_35 */ | 265 | #define OMAP24XX_DMA_SPI1_RX0 36 /* S_DMA_35 */ |
229 | #define OMAP24XX_DMA_SPI1_TX1 37 /* SDMA_36 */ | 266 | #define OMAP24XX_DMA_SPI1_TX1 37 /* S_DMA_36 */ |
230 | #define OMAP24XX_DMA_SPI1_RX1 38 /* SDMA_37 */ | 267 | #define OMAP24XX_DMA_SPI1_RX1 38 /* S_DMA_37 */ |
231 | #define OMAP24XX_DMA_SPI1_TX2 39 /* SDMA_38 */ | 268 | #define OMAP24XX_DMA_SPI1_TX2 39 /* S_DMA_38 */ |
232 | #define OMAP24XX_DMA_SPI1_RX2 40 /* SDMA_39 */ | 269 | #define OMAP24XX_DMA_SPI1_RX2 40 /* S_DMA_39 */ |
233 | #define OMAP24XX_DMA_SPI1_TX3 41 /* SDMA_40 */ | 270 | #define OMAP24XX_DMA_SPI1_TX3 41 /* S_DMA_40 */ |
234 | #define OMAP24XX_DMA_SPI1_RX3 42 /* SDMA_41 */ | 271 | #define OMAP24XX_DMA_SPI1_RX3 42 /* S_DMA_41 */ |
235 | #define OMAP24XX_DMA_SPI2_TX0 43 /* SDMA_42 */ | 272 | #define OMAP24XX_DMA_SPI2_TX0 43 /* S_DMA_42 */ |
236 | #define OMAP24XX_DMA_SPI2_RX0 44 /* SDMA_43 */ | 273 | #define OMAP24XX_DMA_SPI2_RX0 44 /* S_DMA_43 */ |
237 | #define OMAP24XX_DMA_SPI2_TX1 45 /* SDMA_44 */ | 274 | #define OMAP24XX_DMA_SPI2_TX1 45 /* S_DMA_44 */ |
238 | #define OMAP24XX_DMA_SPI2_RX1 46 /* SDMA_45 */ | 275 | #define OMAP24XX_DMA_SPI2_RX1 46 /* S_DMA_45 */ |
239 | 276 | #define OMAP24XX_DMA_MMC2_TX 47 /* S_DMA_46 */ | |
240 | #define OMAP24XX_DMA_UART1_TX 49 /* SDMA_48 */ | 277 | #define OMAP24XX_DMA_MMC2_RX 48 /* S_DMA_47 */ |
241 | #define OMAP24XX_DMA_UART1_RX 50 /* SDMA_49 */ | 278 | #define OMAP24XX_DMA_UART1_TX 49 /* S_DMA_48 */ |
242 | #define OMAP24XX_DMA_UART2_TX 51 /* SDMA_50 */ | 279 | #define OMAP24XX_DMA_UART1_RX 50 /* S_DMA_49 */ |
243 | #define OMAP24XX_DMA_UART2_RX 52 /* SDMA_51 */ | 280 | #define OMAP24XX_DMA_UART2_TX 51 /* S_DMA_50 */ |
244 | #define OMAP24XX_DMA_UART3_TX 53 /* SDMA_52 */ | 281 | #define OMAP24XX_DMA_UART2_RX 52 /* S_DMA_51 */ |
245 | #define OMAP24XX_DMA_UART3_RX 54 /* SDMA_53 */ | 282 | #define OMAP24XX_DMA_UART3_TX 53 /* S_DMA_52 */ |
246 | #define OMAP24XX_DMA_USB_W2FC_TX0 55 /* SDMA_54 */ | 283 | #define OMAP24XX_DMA_UART3_RX 54 /* S_DMA_53 */ |
247 | #define OMAP24XX_DMA_USB_W2FC_RX0 56 /* SDMA_55 */ | 284 | #define OMAP24XX_DMA_USB_W2FC_TX0 55 /* S_DMA_54 */ |
248 | #define OMAP24XX_DMA_USB_W2FC_TX1 57 /* SDMA_56 */ | 285 | #define OMAP24XX_DMA_USB_W2FC_RX0 56 /* S_DMA_55 */ |
249 | #define OMAP24XX_DMA_USB_W2FC_RX1 58 /* SDMA_57 */ | 286 | #define OMAP24XX_DMA_USB_W2FC_TX1 57 /* S_DMA_56 */ |
250 | #define OMAP24XX_DMA_USB_W2FC_TX2 59 /* SDMA_58 */ | 287 | #define OMAP24XX_DMA_USB_W2FC_RX1 58 /* S_DMA_57 */ |
251 | #define OMAP24XX_DMA_USB_W2FC_RX2 60 /* SDMA_59 */ | 288 | #define OMAP24XX_DMA_USB_W2FC_TX2 59 /* S_DMA_58 */ |
252 | #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ | 289 | #define OMAP24XX_DMA_USB_W2FC_RX2 60 /* S_DMA_59 */ |
253 | #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ | 290 | #define OMAP24XX_DMA_MMC1_TX 61 /* S_DMA_60 */ |
254 | #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ | 291 | #define OMAP24XX_DMA_MMC1_RX 62 /* S_DMA_61 */ |
255 | #define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */ | 292 | #define OMAP24XX_DMA_MS 63 /* S_DMA_62 */ |
293 | #define OMAP242X_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */ | ||
294 | #define OMAP243X_DMA_EXT_DMAREQ6 64 /* S_DMA_63 */ | ||
295 | #define OMAP34XX_DMA_EXT_DMAREQ3 64 /* S_DMA_63 */ | ||
296 | #define OMAP34XX_DMA_AES2_TX 65 /* S_DMA_64 */ | ||
297 | #define OMAP34XX_DMA_AES2_RX 66 /* S_DMA_65 */ | ||
298 | #define OMAP34XX_DMA_DES2_TX 67 /* S_DMA_66 */ | ||
299 | #define OMAP34XX_DMA_DES2_RX 68 /* S_DMA_67 */ | ||
300 | #define OMAP34XX_DMA_SHA1MD5_RX 69 /* S_DMA_68 */ | ||
301 | #define OMAP34XX_DMA_SPI4_TX0 70 /* S_DMA_69 */ | ||
302 | #define OMAP34XX_DMA_SPI4_RX0 71 /* S_DMA_70 */ | ||
303 | #define OMAP34XX_DSS_DMA0 72 /* S_DMA_71 */ | ||
304 | #define OMAP34XX_DSS_DMA1 73 /* S_DMA_72 */ | ||
305 | #define OMAP34XX_DSS_DMA2 74 /* S_DMA_73 */ | ||
306 | #define OMAP34XX_DSS_DMA3 75 /* S_DMA_74 */ | ||
307 | #define OMAP34XX_DMA_MMC3_TX 77 /* S_DMA_76 */ | ||
308 | #define OMAP34XX_DMA_MMC3_RX 78 /* S_DMA_77 */ | ||
309 | #define OMAP34XX_DMA_USIM_TX 79 /* S_DMA_78 */ | ||
310 | #define OMAP34XX_DMA_USIM_RX 80 /* S_DMA_79 */ | ||
256 | 311 | ||
257 | /*----------------------------------------------------------------------------*/ | 312 | /*----------------------------------------------------------------------------*/ |
258 | 313 | ||
@@ -358,6 +413,11 @@ enum omap_dma_burst_mode { | |||
358 | OMAP_DMA_DATA_BURST_16, | 413 | OMAP_DMA_DATA_BURST_16, |
359 | }; | 414 | }; |
360 | 415 | ||
416 | enum end_type { | ||
417 | OMAP_DMA_LITTLE_ENDIAN = 0, | ||
418 | OMAP_DMA_BIG_ENDIAN | ||
419 | }; | ||
420 | |||
361 | enum omap_dma_color_mode { | 421 | enum omap_dma_color_mode { |
362 | OMAP_DMA_COLOR_DIS = 0, | 422 | OMAP_DMA_COLOR_DIS = 0, |
363 | OMAP_DMA_CONSTANT_FILL, | 423 | OMAP_DMA_CONSTANT_FILL, |
@@ -370,24 +430,34 @@ enum omap_dma_write_mode { | |||
370 | OMAP_DMA_WRITE_LAST_NON_POSTED | 430 | OMAP_DMA_WRITE_LAST_NON_POSTED |
371 | }; | 431 | }; |
372 | 432 | ||
433 | enum omap_dma_channel_mode { | ||
434 | OMAP_DMA_LCH_2D = 0, | ||
435 | OMAP_DMA_LCH_G, | ||
436 | OMAP_DMA_LCH_P, | ||
437 | OMAP_DMA_LCH_PD | ||
438 | }; | ||
439 | |||
373 | struct omap_dma_channel_params { | 440 | struct omap_dma_channel_params { |
374 | int data_type; /* data type 8,16,32 */ | 441 | int data_type; /* data type 8,16,32 */ |
375 | int elem_count; /* number of elements in a frame */ | 442 | int elem_count; /* number of elements in a frame */ |
376 | int frame_count; /* number of frames in a element */ | 443 | int frame_count; /* number of frames in a element */ |
377 | 444 | ||
378 | int src_port; /* Only on OMAP1 REVISIT: Is this needed? */ | 445 | int src_port; /* Only on OMAP1 REVISIT: Is this needed? */ |
379 | int src_amode; /* constant , post increment, indexed , double indexed */ | 446 | int src_amode; /* constant, post increment, indexed, |
447 | double indexed */ | ||
380 | unsigned long src_start; /* source address : physical */ | 448 | unsigned long src_start; /* source address : physical */ |
381 | int src_ei; /* source element index */ | 449 | int src_ei; /* source element index */ |
382 | int src_fi; /* source frame index */ | 450 | int src_fi; /* source frame index */ |
383 | 451 | ||
384 | int dst_port; /* Only on OMAP1 REVISIT: Is this needed? */ | 452 | int dst_port; /* Only on OMAP1 REVISIT: Is this needed? */ |
385 | int dst_amode; /* constant , post increment, indexed , double indexed */ | 453 | int dst_amode; /* constant, post increment, indexed, |
454 | double indexed */ | ||
386 | unsigned long dst_start; /* source address : physical */ | 455 | unsigned long dst_start; /* source address : physical */ |
387 | int dst_ei; /* source element index */ | 456 | int dst_ei; /* source element index */ |
388 | int dst_fi; /* source frame index */ | 457 | int dst_fi; /* source frame index */ |
389 | 458 | ||
390 | int trigger; /* trigger attached if the channel is synchronized */ | 459 | int trigger; /* trigger attached if the channel is |
460 | synchronized */ | ||
391 | int sync_mode; /* sycn on element, frame , block or packet */ | 461 | int sync_mode; /* sycn on element, frame , block or packet */ |
392 | int src_or_dst_synch; /* source synch(1) or destination synch(0) */ | 462 | int src_or_dst_synch; /* source synch(1) or destination synch(0) */ |
393 | 463 | ||
@@ -404,8 +474,8 @@ struct omap_dma_channel_params { | |||
404 | 474 | ||
405 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); | 475 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); |
406 | extern int omap_request_dma(int dev_id, const char *dev_name, | 476 | extern int omap_request_dma(int dev_id, const char *dev_name, |
407 | void (* callback)(int lch, u16 ch_status, void *data), | 477 | void (*callback)(int lch, u16 ch_status, void *data), |
408 | void *data, int *dma_ch); | 478 | void *data, int *dma_ch); |
409 | extern void omap_enable_dma_irq(int ch, u16 irq_bits); | 479 | extern void omap_enable_dma_irq(int ch, u16 irq_bits); |
410 | extern void omap_disable_dma_irq(int ch, u16 irq_bits); | 480 | extern void omap_disable_dma_irq(int ch, u16 irq_bits); |
411 | extern void omap_free_dma(int ch); | 481 | extern void omap_free_dma(int ch); |
@@ -418,6 +488,7 @@ extern void omap_set_dma_transfer_params(int lch, int data_type, | |||
418 | extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, | 488 | extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, |
419 | u32 color); | 489 | u32 color); |
420 | extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode); | 490 | extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode); |
491 | extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode); | ||
421 | 492 | ||
422 | extern void omap_set_dma_src_params(int lch, int src_port, int src_amode, | 493 | extern void omap_set_dma_src_params(int lch, int src_port, int src_amode, |
423 | unsigned long src_start, | 494 | unsigned long src_start, |
@@ -436,23 +507,26 @@ extern void omap_set_dma_dest_burst_mode(int lch, | |||
436 | enum omap_dma_burst_mode burst_mode); | 507 | enum omap_dma_burst_mode burst_mode); |
437 | 508 | ||
438 | extern void omap_set_dma_params(int lch, | 509 | extern void omap_set_dma_params(int lch, |
439 | struct omap_dma_channel_params * params); | 510 | struct omap_dma_channel_params *params); |
440 | 511 | ||
441 | extern void omap_dma_link_lch (int lch_head, int lch_queue); | 512 | extern void omap_dma_link_lch(int lch_head, int lch_queue); |
442 | extern void omap_dma_unlink_lch (int lch_head, int lch_queue); | 513 | extern void omap_dma_unlink_lch(int lch_head, int lch_queue); |
443 | 514 | ||
444 | extern int omap_set_dma_callback(int lch, | 515 | extern int omap_set_dma_callback(int lch, |
445 | void (* callback)(int lch, u16 ch_status, void *data), | 516 | void (*callback)(int lch, u16 ch_status, void *data), |
446 | void *data); | 517 | void *data); |
447 | extern dma_addr_t omap_get_dma_src_pos(int lch); | 518 | extern dma_addr_t omap_get_dma_src_pos(int lch); |
448 | extern dma_addr_t omap_get_dma_dst_pos(int lch); | 519 | extern dma_addr_t omap_get_dma_dst_pos(int lch); |
449 | extern int omap_get_dma_src_addr_counter(int lch); | ||
450 | extern void omap_clear_dma(int lch); | 520 | extern void omap_clear_dma(int lch); |
521 | extern int omap_get_dma_active_status(int lch); | ||
451 | extern int omap_dma_running(void); | 522 | extern int omap_dma_running(void); |
452 | extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth, | 523 | extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth, |
453 | int tparams); | 524 | int tparams); |
454 | extern int omap_dma_set_prio_lch(int lch, unsigned char read_prio, | 525 | extern int omap_dma_set_prio_lch(int lch, unsigned char read_prio, |
455 | unsigned char write_prio); | 526 | unsigned char write_prio); |
527 | extern void omap_set_dma_dst_endian_type(int lch, enum end_type etype); | ||
528 | extern void omap_set_dma_src_endian_type(int lch, enum end_type etype); | ||
529 | extern int omap_get_dma_index(int lch, int *ei, int *fi); | ||
456 | 530 | ||
457 | /* Chaining APIs */ | 531 | /* Chaining APIs */ |
458 | #ifndef CONFIG_ARCH_OMAP1 | 532 | #ifndef CONFIG_ARCH_OMAP1 |
@@ -478,7 +552,7 @@ extern int omap_dma_chain_status(int chain_id); | |||
478 | #endif | 552 | #endif |
479 | 553 | ||
480 | /* LCD DMA functions */ | 554 | /* LCD DMA functions */ |
481 | extern int omap_request_lcd_dma(void (* callback)(u16 status, void *data), | 555 | extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data), |
482 | void *data); | 556 | void *data); |
483 | extern void omap_free_lcd_dma(void); | 557 | extern void omap_free_lcd_dma(void); |
484 | extern void omap_setup_lcd_dma(void); | 558 | extern void omap_setup_lcd_dma(void); |
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h index fefb276ed402..02b29e8437ae 100644 --- a/include/asm-arm/arch-omap/dmtimer.h +++ b/include/asm-arm/arch-omap/dmtimer.h | |||
@@ -66,6 +66,7 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer); | |||
66 | 66 | ||
67 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); | 67 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); |
68 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value); | 68 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value); |
69 | void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, unsigned int value); | ||
69 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match); | 70 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match); |
70 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger); | 71 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger); |
71 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); | 72 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); |
diff --git a/include/asm-arm/arch-omap/fpga.h b/include/asm-arm/arch-omap/fpga.h index 6a883e0bdbb8..f420881d2a3b 100644 --- a/include/asm-arm/arch-omap/fpga.h +++ b/include/asm-arm/arch-omap/fpga.h | |||
@@ -169,30 +169,29 @@ struct h2p2_dbg_fpga { | |||
169 | #define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13) | 169 | #define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13) |
170 | 170 | ||
171 | /* IRQ Numbers for interrupts muxed through the FPGA */ | 171 | /* IRQ Numbers for interrupts muxed through the FPGA */ |
172 | #define OMAP1510_IH_FPGA_BASE IH_BOARD_BASE | 172 | #define OMAP1510_INT_FPGA_ATN (OMAP_FPGA_IRQ_BASE + 0) |
173 | #define OMAP1510_INT_FPGA_ATN (OMAP1510_IH_FPGA_BASE + 0) | 173 | #define OMAP1510_INT_FPGA_ACK (OMAP_FPGA_IRQ_BASE + 1) |
174 | #define OMAP1510_INT_FPGA_ACK (OMAP1510_IH_FPGA_BASE + 1) | 174 | #define OMAP1510_INT_FPGA2 (OMAP_FPGA_IRQ_BASE + 2) |
175 | #define OMAP1510_INT_FPGA2 (OMAP1510_IH_FPGA_BASE + 2) | 175 | #define OMAP1510_INT_FPGA3 (OMAP_FPGA_IRQ_BASE + 3) |
176 | #define OMAP1510_INT_FPGA3 (OMAP1510_IH_FPGA_BASE + 3) | 176 | #define OMAP1510_INT_FPGA4 (OMAP_FPGA_IRQ_BASE + 4) |
177 | #define OMAP1510_INT_FPGA4 (OMAP1510_IH_FPGA_BASE + 4) | 177 | #define OMAP1510_INT_FPGA5 (OMAP_FPGA_IRQ_BASE + 5) |
178 | #define OMAP1510_INT_FPGA5 (OMAP1510_IH_FPGA_BASE + 5) | 178 | #define OMAP1510_INT_FPGA6 (OMAP_FPGA_IRQ_BASE + 6) |
179 | #define OMAP1510_INT_FPGA6 (OMAP1510_IH_FPGA_BASE + 6) | 179 | #define OMAP1510_INT_FPGA7 (OMAP_FPGA_IRQ_BASE + 7) |
180 | #define OMAP1510_INT_FPGA7 (OMAP1510_IH_FPGA_BASE + 7) | 180 | #define OMAP1510_INT_FPGA8 (OMAP_FPGA_IRQ_BASE + 8) |
181 | #define OMAP1510_INT_FPGA8 (OMAP1510_IH_FPGA_BASE + 8) | 181 | #define OMAP1510_INT_FPGA9 (OMAP_FPGA_IRQ_BASE + 9) |
182 | #define OMAP1510_INT_FPGA9 (OMAP1510_IH_FPGA_BASE + 9) | 182 | #define OMAP1510_INT_FPGA10 (OMAP_FPGA_IRQ_BASE + 10) |
183 | #define OMAP1510_INT_FPGA10 (OMAP1510_IH_FPGA_BASE + 10) | 183 | #define OMAP1510_INT_FPGA11 (OMAP_FPGA_IRQ_BASE + 11) |
184 | #define OMAP1510_INT_FPGA11 (OMAP1510_IH_FPGA_BASE + 11) | 184 | #define OMAP1510_INT_FPGA12 (OMAP_FPGA_IRQ_BASE + 12) |
185 | #define OMAP1510_INT_FPGA12 (OMAP1510_IH_FPGA_BASE + 12) | 185 | #define OMAP1510_INT_ETHER (OMAP_FPGA_IRQ_BASE + 13) |
186 | #define OMAP1510_INT_ETHER (OMAP1510_IH_FPGA_BASE + 13) | 186 | #define OMAP1510_INT_FPGAUART1 (OMAP_FPGA_IRQ_BASE + 14) |
187 | #define OMAP1510_INT_FPGAUART1 (OMAP1510_IH_FPGA_BASE + 14) | 187 | #define OMAP1510_INT_FPGAUART2 (OMAP_FPGA_IRQ_BASE + 15) |
188 | #define OMAP1510_INT_FPGAUART2 (OMAP1510_IH_FPGA_BASE + 15) | 188 | #define OMAP1510_INT_FPGA_TS (OMAP_FPGA_IRQ_BASE + 16) |
189 | #define OMAP1510_INT_FPGA_TS (OMAP1510_IH_FPGA_BASE + 16) | 189 | #define OMAP1510_INT_FPGA17 (OMAP_FPGA_IRQ_BASE + 17) |
190 | #define OMAP1510_INT_FPGA17 (OMAP1510_IH_FPGA_BASE + 17) | 190 | #define OMAP1510_INT_FPGA_CAM (OMAP_FPGA_IRQ_BASE + 18) |
191 | #define OMAP1510_INT_FPGA_CAM (OMAP1510_IH_FPGA_BASE + 18) | 191 | #define OMAP1510_INT_FPGA_RTC_A (OMAP_FPGA_IRQ_BASE + 19) |
192 | #define OMAP1510_INT_FPGA_RTC_A (OMAP1510_IH_FPGA_BASE + 19) | 192 | #define OMAP1510_INT_FPGA_RTC_B (OMAP_FPGA_IRQ_BASE + 20) |
193 | #define OMAP1510_INT_FPGA_RTC_B (OMAP1510_IH_FPGA_BASE + 20) | 193 | #define OMAP1510_INT_FPGA_CD (OMAP_FPGA_IRQ_BASE + 21) |
194 | #define OMAP1510_INT_FPGA_CD (OMAP1510_IH_FPGA_BASE + 21) | 194 | #define OMAP1510_INT_FPGA22 (OMAP_FPGA_IRQ_BASE + 22) |
195 | #define OMAP1510_INT_FPGA22 (OMAP1510_IH_FPGA_BASE + 22) | 195 | #define OMAP1510_INT_FPGA23 (OMAP_FPGA_IRQ_BASE + 23) |
196 | #define OMAP1510_INT_FPGA23 (OMAP1510_IH_FPGA_BASE + 23) | ||
197 | 196 | ||
198 | #endif | 197 | #endif |
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 91d85b3417b7..45fdfccbd5d4 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -284,6 +284,7 @@ | |||
284 | #include "omap1510.h" | 284 | #include "omap1510.h" |
285 | #include "omap24xx.h" | 285 | #include "omap24xx.h" |
286 | #include "omap16xx.h" | 286 | #include "omap16xx.h" |
287 | #include "omap34xx.h" | ||
287 | 288 | ||
288 | #ifndef __ASSEMBLER__ | 289 | #ifndef __ASSEMBLER__ |
289 | 290 | ||
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index 160578e1f557..0b13557fd30b 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -60,6 +60,7 @@ | |||
60 | #define IO_SIZE 0x40000 | 60 | #define IO_SIZE 0x40000 |
61 | #define IO_VIRT (IO_PHYS - IO_OFFSET) | 61 | #define IO_VIRT (IO_PHYS - IO_OFFSET) |
62 | #define IO_ADDRESS(pa) ((pa) - IO_OFFSET) | 62 | #define IO_ADDRESS(pa) ((pa) - IO_OFFSET) |
63 | #define OMAP1_IO_ADDRESS(pa) ((pa) - IO_OFFSET) | ||
63 | #define io_p2v(pa) ((pa) - IO_OFFSET) | 64 | #define io_p2v(pa) ((pa) - IO_OFFSET) |
64 | #define io_v2p(va) ((va) + IO_OFFSET) | 65 | #define io_v2p(va) ((va) + IO_OFFSET) |
65 | 66 | ||
@@ -91,6 +92,7 @@ | |||
91 | 92 | ||
92 | #define IO_OFFSET 0x90000000 | 93 | #define IO_OFFSET 0x90000000 |
93 | #define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | 94 | #define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ |
95 | #define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | ||
94 | #define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ | 96 | #define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ |
95 | #define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ | 97 | #define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ |
96 | 98 | ||
@@ -148,6 +150,7 @@ | |||
148 | 150 | ||
149 | #define IO_OFFSET 0x90000000 | 151 | #define IO_OFFSET 0x90000000 |
150 | #define IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | 152 | #define IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ |
153 | #define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
151 | #define io_p2v(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | 154 | #define io_p2v(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ |
152 | #define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ | 155 | #define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ |
153 | 156 | ||
@@ -183,35 +186,12 @@ | |||
183 | #define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v)) | 186 | #define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v)) |
184 | #define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v)) | 187 | #define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v)) |
185 | 188 | ||
186 | /* 16 bit uses LDRH/STRH, base +/- offset_8 */ | ||
187 | typedef struct { volatile u16 offset[256]; } __regbase16; | ||
188 | #define __REGV16(vaddr) ((__regbase16 *)((vaddr)&~0xff)) \ | ||
189 | ->offset[((vaddr)&0xff)>>1] | ||
190 | #define __REG16(paddr) __REGV16(io_p2v(paddr)) | ||
191 | |||
192 | /* 8/32 bit uses LDR/STR, base +/- offset_12 */ | ||
193 | typedef struct { volatile u8 offset[4096]; } __regbase8; | ||
194 | #define __REGV8(vaddr) ((__regbase8 *)((vaddr)&~4095)) \ | ||
195 | ->offset[((vaddr)&4095)>>0] | ||
196 | #define __REG8(paddr) __REGV8(io_p2v(paddr)) | ||
197 | |||
198 | typedef struct { volatile u32 offset[4096]; } __regbase32; | ||
199 | #define __REGV32(vaddr) ((__regbase32 *)((vaddr)&~4095)) \ | ||
200 | ->offset[((vaddr)&4095)>>2] | ||
201 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) | ||
202 | |||
203 | extern void omap1_map_common_io(void); | 189 | extern void omap1_map_common_io(void); |
204 | extern void omap1_init_common_hw(void); | 190 | extern void omap1_init_common_hw(void); |
205 | 191 | ||
206 | extern void omap2_map_common_io(void); | 192 | extern void omap2_map_common_io(void); |
207 | extern void omap2_init_common_hw(void); | 193 | extern void omap2_init_common_hw(void); |
208 | 194 | ||
209 | #else | ||
210 | |||
211 | #define __REG8(paddr) io_p2v(paddr) | ||
212 | #define __REG16(paddr) io_p2v(paddr) | ||
213 | #define __REG32(paddr) io_p2v(paddr) | ||
214 | |||
215 | #endif | 195 | #endif |
216 | 196 | ||
217 | #endif | 197 | #endif |
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 87973654e625..7464c694859b 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -285,7 +285,41 @@ | |||
285 | #define OMAP_MAX_GPIO_LINES 192 | 285 | #define OMAP_MAX_GPIO_LINES 192 |
286 | #define IH_GPIO_BASE (128 + IH2_BASE) | 286 | #define IH_GPIO_BASE (128 + IH2_BASE) |
287 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) | 287 | #define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE) |
288 | #define IH_BOARD_BASE (16 + IH_MPUIO_BASE) | 288 | #define OMAP_IRQ_END (IH_MPUIO_BASE + 16) |
289 | |||
290 | /* External FPGA handles interrupts on Innovator boards */ | ||
291 | #define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END) | ||
292 | #ifdef CONFIG_MACH_OMAP_INNOVATOR | ||
293 | #define OMAP_FPGA_NR_IRQS 24 | ||
294 | #else | ||
295 | #define OMAP_FPGA_NR_IRQS 0 | ||
296 | #endif | ||
297 | #define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS) | ||
298 | |||
299 | /* External TWL4030 can handle interrupts on 2430 and 34xx boards */ | ||
300 | #define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END) | ||
301 | #ifdef CONFIG_TWL4030_CORE | ||
302 | #define TWL4030_BASE_NR_IRQS 8 | ||
303 | #define TWL4030_PWR_NR_IRQS 8 | ||
304 | #else | ||
305 | #define TWL4030_BASE_NR_IRQS 0 | ||
306 | #define TWL4030_PWR_NR_IRQS 0 | ||
307 | #endif | ||
308 | #define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS) | ||
309 | #define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END | ||
310 | #define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS) | ||
311 | |||
312 | /* External TWL4030 gpio interrupts are optional */ | ||
313 | #define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END | ||
314 | #ifdef CONFIG_TWL4030_GPIO | ||
315 | #define TWL4030_GPIO_NR_IRQS 18 | ||
316 | #else | ||
317 | #define TWL4030_GPIO_NR_IRQS 0 | ||
318 | #endif | ||
319 | #define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS) | ||
320 | |||
321 | /* Total number of interrupts depends on the enabled blocks above */ | ||
322 | #define NR_IRQS TWL4030_GPIO_IRQ_END | ||
289 | 323 | ||
290 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | 324 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) |
291 | 325 | ||
@@ -293,14 +327,6 @@ | |||
293 | extern void omap_init_irq(void); | 327 | extern void omap_init_irq(void); |
294 | #endif | 328 | #endif |
295 | 329 | ||
296 | /* | ||
297 | * The definition of NR_IRQS is in board-specific header file, which is | ||
298 | * included via hardware.h | ||
299 | */ | ||
300 | #include <asm/hardware.h> | 330 | #include <asm/hardware.h> |
301 | 331 | ||
302 | #ifndef NR_IRQS | ||
303 | #define NR_IRQS IH_BOARD_BASE | ||
304 | #endif | ||
305 | |||
306 | #endif | 332 | #endif |
diff --git a/include/asm-arm/arch-omap/mcbsp.h b/include/asm-arm/arch-omap/mcbsp.h index c7a0cc1c4e93..26c78f67dc8e 100644 --- a/include/asm-arm/arch-omap/mcbsp.h +++ b/include/asm-arm/arch-omap/mcbsp.h | |||
@@ -24,7 +24,11 @@ | |||
24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H | 24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H |
25 | #define __ASM_ARCH_OMAP_MCBSP_H | 25 | #define __ASM_ARCH_OMAP_MCBSP_H |
26 | 26 | ||
27 | #include <linux/completion.h> | ||
28 | #include <linux/spinlock.h> | ||
29 | |||
27 | #include <asm/hardware.h> | 30 | #include <asm/hardware.h> |
31 | #include <asm/arch/clock.h> | ||
28 | 32 | ||
29 | #define OMAP730_MCBSP1_BASE 0xfffb1000 | 33 | #define OMAP730_MCBSP1_BASE 0xfffb1000 |
30 | #define OMAP730_MCBSP2_BASE 0xfffb1800 | 34 | #define OMAP730_MCBSP2_BASE 0xfffb1800 |
@@ -40,6 +44,9 @@ | |||
40 | #define OMAP24XX_MCBSP1_BASE 0x48074000 | 44 | #define OMAP24XX_MCBSP1_BASE 0x48074000 |
41 | #define OMAP24XX_MCBSP2_BASE 0x48076000 | 45 | #define OMAP24XX_MCBSP2_BASE 0x48076000 |
42 | 46 | ||
47 | #define OMAP34XX_MCBSP1_BASE 0x48074000 | ||
48 | #define OMAP34XX_MCBSP2_BASE 0x49022000 | ||
49 | |||
43 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) | 50 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) |
44 | 51 | ||
45 | #define OMAP_MCBSP_REG_DRR2 0x00 | 52 | #define OMAP_MCBSP_REG_DRR2 0x00 |
@@ -74,7 +81,8 @@ | |||
74 | #define OMAP_MCBSP_REG_XCERG 0x3A | 81 | #define OMAP_MCBSP_REG_XCERG 0x3A |
75 | #define OMAP_MCBSP_REG_XCERH 0x3C | 82 | #define OMAP_MCBSP_REG_XCERH 0x3C |
76 | 83 | ||
77 | #define OMAP_MAX_MCBSP_COUNT 3 | 84 | #define OMAP_MAX_MCBSP_COUNT 3 |
85 | #define MAX_MCBSP_CLOCKS 3 | ||
78 | 86 | ||
79 | #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) | 87 | #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) |
80 | #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) | 88 | #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) |
@@ -117,7 +125,8 @@ | |||
117 | #define OMAP_MCBSP_REG_XCERG 0x74 | 125 | #define OMAP_MCBSP_REG_XCERG 0x74 |
118 | #define OMAP_MCBSP_REG_XCERH 0x78 | 126 | #define OMAP_MCBSP_REG_XCERH 0x78 |
119 | 127 | ||
120 | #define OMAP_MAX_MCBSP_COUNT 2 | 128 | #define OMAP_MAX_MCBSP_COUNT 2 |
129 | #define MAX_MCBSP_CLOCKS 2 | ||
121 | 130 | ||
122 | #define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1) | 131 | #define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1) |
123 | #define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1) | 132 | #define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1) |
@@ -298,6 +307,55 @@ struct omap_mcbsp_spi_cfg { | |||
298 | omap_mcbsp_word_length word_length; | 307 | omap_mcbsp_word_length word_length; |
299 | }; | 308 | }; |
300 | 309 | ||
310 | /* Platform specific configuration */ | ||
311 | struct omap_mcbsp_ops { | ||
312 | void (*request)(unsigned int); | ||
313 | void (*free)(unsigned int); | ||
314 | int (*check)(unsigned int); | ||
315 | }; | ||
316 | |||
317 | struct omap_mcbsp_platform_data { | ||
318 | u32 virt_base; | ||
319 | u8 dma_rx_sync, dma_tx_sync; | ||
320 | u16 rx_irq, tx_irq; | ||
321 | struct omap_mcbsp_ops *ops; | ||
322 | char const *clk_name; | ||
323 | }; | ||
324 | |||
325 | struct omap_mcbsp { | ||
326 | struct device *dev; | ||
327 | u32 io_base; | ||
328 | u8 id; | ||
329 | u8 free; | ||
330 | omap_mcbsp_word_length rx_word_length; | ||
331 | omap_mcbsp_word_length tx_word_length; | ||
332 | |||
333 | omap_mcbsp_io_type_t io_type; /* IRQ or poll */ | ||
334 | /* IRQ based TX/RX */ | ||
335 | int rx_irq; | ||
336 | int tx_irq; | ||
337 | |||
338 | /* DMA stuff */ | ||
339 | u8 dma_rx_sync; | ||
340 | short dma_rx_lch; | ||
341 | u8 dma_tx_sync; | ||
342 | short dma_tx_lch; | ||
343 | |||
344 | /* Completion queues */ | ||
345 | struct completion tx_irq_completion; | ||
346 | struct completion rx_irq_completion; | ||
347 | struct completion tx_dma_completion; | ||
348 | struct completion rx_dma_completion; | ||
349 | |||
350 | /* Protect the field .free, while checking if the mcbsp is in use */ | ||
351 | spinlock_t lock; | ||
352 | struct omap_mcbsp_platform_data *pdata; | ||
353 | struct clk *clk; | ||
354 | }; | ||
355 | |||
356 | int omap_mcbsp_init(void); | ||
357 | void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | ||
358 | int size); | ||
301 | void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config); | 359 | void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config); |
302 | int omap_mcbsp_request(unsigned int id); | 360 | int omap_mcbsp_request(unsigned int id); |
303 | void omap_mcbsp_free(unsigned int id); | 361 | void omap_mcbsp_free(unsigned int id); |
diff --git a/include/asm-arm/arch-omap/omap34xx.h b/include/asm-arm/arch-omap/omap34xx.h new file mode 100644 index 000000000000..aa30c6d10abd --- /dev/null +++ b/include/asm-arm/arch-omap/omap34xx.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-omap/omap34xx.h | ||
3 | * | ||
4 | * This file contains the processor specific definitions of the TI OMAP34XX. | ||
5 | * | ||
6 | * Copyright (C) 2007 Texas Instruments. | ||
7 | * Copyright (C) 2007 Nokia Corporation. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_OMAP34XX_H | ||
25 | #define __ASM_ARCH_OMAP34XX_H | ||
26 | |||
27 | /* | ||
28 | * Please place only base defines here and put the rest in device | ||
29 | * specific headers. | ||
30 | */ | ||
31 | |||
32 | #define L4_34XX_BASE 0x48000000 | ||
33 | #define L4_WK_34XX_BASE 0x48300000 | ||
34 | #define L4_WK_OMAP_BASE L4_WK_34XX_BASE | ||
35 | #define L4_PER_34XX_BASE 0x49000000 | ||
36 | #define L4_PER_OMAP_BASE L4_PER_34XX_BASE | ||
37 | #define L4_EMU_34XX_BASE 0x54000000 | ||
38 | #define L4_EMU_BASE L4_EMU_34XX_BASE | ||
39 | #define L3_34XX_BASE 0x68000000 | ||
40 | #define L3_OMAP_BASE L3_34XX_BASE | ||
41 | |||
42 | #define OMAP3430_32KSYNCT_BASE 0x48320000 | ||
43 | #define OMAP3430_CM_BASE 0x48004800 | ||
44 | #define OMAP3430_PRM_BASE 0x48306800 | ||
45 | #define OMAP343X_SMS_BASE 0x6C000000 | ||
46 | #define OMAP343X_SDRC_BASE 0x6D000000 | ||
47 | #define OMAP34XX_GPMC_BASE 0x6E000000 | ||
48 | #define OMAP343X_SCM_BASE 0x48002000 | ||
49 | #define OMAP343X_CTRL_BASE OMAP343X_SCM_BASE | ||
50 | |||
51 | #define OMAP34XX_IC_BASE 0x48200000 | ||
52 | #define OMAP34XX_IVA_INTC_BASE 0x40000000 | ||
53 | #define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000) | ||
54 | #define OMAP34XX_HSUSB_HOST_BASE (L4_34XX_BASE + 0x64000) | ||
55 | #define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000) | ||
56 | |||
57 | |||
58 | #if defined(CONFIG_ARCH_OMAP3430) | ||
59 | |||
60 | #define OMAP2_32KSYNCT_BASE OMAP3430_32KSYNCT_BASE | ||
61 | #define OMAP2_CM_BASE OMAP3430_CM_BASE | ||
62 | #define OMAP2_PRM_BASE OMAP3430_PRM_BASE | ||
63 | #define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE) | ||
64 | |||
65 | #endif | ||
66 | |||
67 | #define OMAP34XX_DSP_BASE 0x58000000 | ||
68 | #define OMAP34XX_DSP_MEM_BASE (OMAP34XX_DSP_BASE + 0x0) | ||
69 | #define OMAP34XX_DSP_IPI_BASE (OMAP34XX_DSP_BASE + 0x1000000) | ||
70 | #define OMAP34XX_DSP_MMU_BASE (OMAP34XX_DSP_BASE + 0x2000000) | ||
71 | #endif /* __ASM_ARCH_OMAP34XX_H */ | ||
72 | |||
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h index bb9bb3fd532f..be59f4a9828b 100644 --- a/include/asm-arm/arch-omap/sram.h +++ b/include/asm-arm/arch-omap/sram.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef __ARCH_ARM_OMAP_SRAM_H | 11 | #ifndef __ARCH_ARM_OMAP_SRAM_H |
12 | #define __ARCH_ARM_OMAP_SRAM_H | 12 | #define __ARCH_ARM_OMAP_SRAM_H |
13 | 13 | ||
14 | extern int __init omap_sram_init(void); | ||
14 | extern void * omap_sram_push(void * start, unsigned long size); | 15 | extern void * omap_sram_push(void * start, unsigned long size); |
15 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); | 16 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); |
16 | 17 | ||
@@ -21,17 +22,35 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | |||
21 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 22 | extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); |
22 | 23 | ||
23 | /* Do not use these */ | 24 | /* Do not use these */ |
24 | extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 25 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
25 | extern unsigned long sram_reprogram_clock_sz; | 26 | extern unsigned long omap1_sram_reprogram_clock_sz; |
26 | 27 | ||
27 | extern void sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | 28 | extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
28 | u32 base_cs, u32 force_unlock); | 29 | extern unsigned long omap24xx_sram_reprogram_clock_sz; |
29 | extern unsigned long sram_ddr_init_sz; | ||
30 | 30 | ||
31 | extern u32 sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); | 31 | extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, |
32 | extern unsigned long sram_set_prcm_sz; | 32 | u32 base_cs, u32 force_unlock); |
33 | extern unsigned long omap242x_sram_ddr_init_sz; | ||
33 | 34 | ||
34 | extern void sram_reprogram_sdrc(u32 perf_level, u32 dll_val, u32 mem_type); | 35 | extern u32 omap242x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, |
35 | extern unsigned long sram_reprogram_sdrc_sz; | 36 | int bypass); |
37 | extern unsigned long omap242x_sram_set_prcm_sz; | ||
38 | |||
39 | extern void omap242x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
40 | u32 mem_type); | ||
41 | extern unsigned long omap242x_sram_reprogram_sdrc_sz; | ||
42 | |||
43 | |||
44 | extern void omap243x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl, | ||
45 | u32 base_cs, u32 force_unlock); | ||
46 | extern unsigned long omap243x_sram_ddr_init_sz; | ||
47 | |||
48 | extern u32 omap243x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, | ||
49 | int bypass); | ||
50 | extern unsigned long omap243x_sram_set_prcm_sz; | ||
51 | |||
52 | extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val, | ||
53 | u32 mem_type); | ||
54 | extern unsigned long omap243x_sram_reprogram_sdrc_sz; | ||
36 | 55 | ||
37 | #endif | 56 | #endif |
diff --git a/include/asm-arm/arch-omap/tc.h b/include/asm-arm/arch-omap/tc.h index 8ded218cbea5..65a9c82d3bf7 100644 --- a/include/asm-arm/arch-omap/tc.h +++ b/include/asm-arm/arch-omap/tc.h | |||
@@ -75,16 +75,14 @@ | |||
75 | #ifndef __ASSEMBLER__ | 75 | #ifndef __ASSEMBLER__ |
76 | 76 | ||
77 | /* EMIF Slow Interface Configuration Register */ | 77 | /* EMIF Slow Interface Configuration Register */ |
78 | #define OMAP_EMIFS_CONFIG_REG __REG32(EMIFS_CONFIG) | ||
79 | |||
80 | #define OMAP_EMIFS_CONFIG_FR (1 << 4) | 78 | #define OMAP_EMIFS_CONFIG_FR (1 << 4) |
81 | #define OMAP_EMIFS_CONFIG_PDE (1 << 3) | 79 | #define OMAP_EMIFS_CONFIG_PDE (1 << 3) |
82 | #define OMAP_EMIFS_CONFIG_PWD_EN (1 << 2) | 80 | #define OMAP_EMIFS_CONFIG_PWD_EN (1 << 2) |
83 | #define OMAP_EMIFS_CONFIG_BM (1 << 1) | 81 | #define OMAP_EMIFS_CONFIG_BM (1 << 1) |
84 | #define OMAP_EMIFS_CONFIG_WP (1 << 0) | 82 | #define OMAP_EMIFS_CONFIG_WP (1 << 0) |
85 | 83 | ||
86 | #define EMIFS_CCS(n) __REG32(EMIFS_CS0_CONFIG + (4 * (n))) | 84 | #define EMIFS_CCS(n) (EMIFS_CS0_CONFIG + (4 * (n))) |
87 | #define EMIFS_ACS(n) __REG32(EMIFS_ACS0 + (4 * (n))) | 85 | #define EMIFS_ACS(n) (EMIFS_ACS0 + (4 * (n))) |
88 | 86 | ||
89 | /* Almost all documentation for chip and board memory maps assumes | 87 | /* Almost all documentation for chip and board memory maps assumes |
90 | * BM is clear. Most devel boards have a switch to control booting | 88 | * BM is clear. Most devel boards have a switch to control booting |
@@ -93,13 +91,13 @@ | |||
93 | */ | 91 | */ |
94 | static inline u32 omap_cs0_phys(void) | 92 | static inline u32 omap_cs0_phys(void) |
95 | { | 93 | { |
96 | return (OMAP_EMIFS_CONFIG_REG & OMAP_EMIFS_CONFIG_BM) | 94 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) |
97 | ? OMAP_CS3_PHYS : 0; | 95 | ? OMAP_CS3_PHYS : 0; |
98 | } | 96 | } |
99 | 97 | ||
100 | static inline u32 omap_cs3_phys(void) | 98 | static inline u32 omap_cs3_phys(void) |
101 | { | 99 | { |
102 | return (OMAP_EMIFS_CONFIG_REG & OMAP_EMIFS_CONFIG_BM) | 100 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) |
103 | ? 0 : OMAP_CS3_PHYS; | 101 | ? 0 : OMAP_CS3_PHYS; |
104 | } | 102 | } |
105 | 103 | ||
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h index 2147d18aaeae..ddf1861e6df9 100644 --- a/include/asm-arm/arch-omap/usb.h +++ b/include/asm-arm/arch-omap/usb.h | |||
@@ -34,11 +34,8 @@ | |||
34 | /* | 34 | /* |
35 | * OTG and transceiver registers, for OMAPs starting with ARM926 | 35 | * OTG and transceiver registers, for OMAPs starting with ARM926 |
36 | */ | 36 | */ |
37 | #define OTG_REG32(offset) __REG32(OTG_BASE + (offset)) | 37 | #define OTG_REV (OTG_BASE + 0x00) |
38 | #define OTG_REG16(offset) __REG16(OTG_BASE + (offset)) | 38 | #define OTG_SYSCON_1 (OTG_BASE + 0x04) |
39 | |||
40 | #define OTG_REV_REG OTG_REG32(0x00) | ||
41 | #define OTG_SYSCON_1_REG OTG_REG32(0x04) | ||
42 | # define USB2_TRX_MODE(w) (((w)>>24)&0x07) | 39 | # define USB2_TRX_MODE(w) (((w)>>24)&0x07) |
43 | # define USB1_TRX_MODE(w) (((w)>>20)&0x07) | 40 | # define USB1_TRX_MODE(w) (((w)>>20)&0x07) |
44 | # define USB0_TRX_MODE(w) (((w)>>16)&0x07) | 41 | # define USB0_TRX_MODE(w) (((w)>>16)&0x07) |
@@ -47,7 +44,7 @@ | |||
47 | # define DEV_IDLE_EN (1 << 13) | 44 | # define DEV_IDLE_EN (1 << 13) |
48 | # define OTG_RESET_DONE (1 << 2) | 45 | # define OTG_RESET_DONE (1 << 2) |
49 | # define OTG_SOFT_RESET (1 << 1) | 46 | # define OTG_SOFT_RESET (1 << 1) |
50 | #define OTG_SYSCON_2_REG OTG_REG32(0x08) | 47 | #define OTG_SYSCON_2 (OTG_BASE + 0x08) |
51 | # define OTG_EN (1 << 31) | 48 | # define OTG_EN (1 << 31) |
52 | # define USBX_SYNCHRO (1 << 30) | 49 | # define USBX_SYNCHRO (1 << 30) |
53 | # define OTG_MST16 (1 << 29) | 50 | # define OTG_MST16 (1 << 29) |
@@ -65,7 +62,7 @@ | |||
65 | # define HMC_TLLSPEED (1 << 7) | 62 | # define HMC_TLLSPEED (1 << 7) |
66 | # define HMC_TLLATTACH (1 << 6) | 63 | # define HMC_TLLATTACH (1 << 6) |
67 | # define OTG_HMC(w) (((w)>>0)&0x3f) | 64 | # define OTG_HMC(w) (((w)>>0)&0x3f) |
68 | #define OTG_CTRL_REG OTG_REG32(0x0c) | 65 | #define OTG_CTRL (OTG_BASE + 0x0c) |
69 | # define OTG_USB2_EN (1 << 29) | 66 | # define OTG_USB2_EN (1 << 29) |
70 | # define OTG_USB2_DP (1 << 28) | 67 | # define OTG_USB2_DP (1 << 28) |
71 | # define OTG_USB2_DM (1 << 27) | 68 | # define OTG_USB2_DM (1 << 27) |
@@ -92,7 +89,7 @@ | |||
92 | # define OTG_PD_VBUS (1 << 2) | 89 | # define OTG_PD_VBUS (1 << 2) |
93 | # define OTG_PU_VBUS (1 << 1) | 90 | # define OTG_PU_VBUS (1 << 1) |
94 | # define OTG_PU_ID (1 << 0) | 91 | # define OTG_PU_ID (1 << 0) |
95 | #define OTG_IRQ_EN_REG OTG_REG16(0x10) | 92 | #define OTG_IRQ_EN (OTG_BASE + 0x10) /* 16-bit */ |
96 | # define DRIVER_SWITCH (1 << 15) | 93 | # define DRIVER_SWITCH (1 << 15) |
97 | # define A_VBUS_ERR (1 << 13) | 94 | # define A_VBUS_ERR (1 << 13) |
98 | # define A_REQ_TMROUT (1 << 12) | 95 | # define A_REQ_TMROUT (1 << 12) |
@@ -102,9 +99,9 @@ | |||
102 | # define B_SRP_DONE (1 << 8) | 99 | # define B_SRP_DONE (1 << 8) |
103 | # define B_SRP_STARTED (1 << 7) | 100 | # define B_SRP_STARTED (1 << 7) |
104 | # define OPRT_CHG (1 << 0) | 101 | # define OPRT_CHG (1 << 0) |
105 | #define OTG_IRQ_SRC_REG OTG_REG16(0x14) | 102 | #define OTG_IRQ_SRC (OTG_BASE + 0x14) /* 16-bit */ |
106 | // same bits as in IRQ_EN | 103 | // same bits as in IRQ_EN |
107 | #define OTG_OUTCTRL_REG OTG_REG16(0x18) | 104 | #define OTG_OUTCTRL (OTG_BASE + 0x18) /* 16-bit */ |
108 | # define OTGVPD (1 << 14) | 105 | # define OTGVPD (1 << 14) |
109 | # define OTGVPU (1 << 13) | 106 | # define OTGVPU (1 << 13) |
110 | # define OTGPUID (1 << 12) | 107 | # define OTGPUID (1 << 12) |
@@ -117,13 +114,13 @@ | |||
117 | # define USB0VDR (1 << 2) | 114 | # define USB0VDR (1 << 2) |
118 | # define USB0PDEN (1 << 1) | 115 | # define USB0PDEN (1 << 1) |
119 | # define USB0PUEN (1 << 0) | 116 | # define USB0PUEN (1 << 0) |
120 | #define OTG_TEST_REG OTG_REG16(0x20) | 117 | #define OTG_TEST (OTG_BASE + 0x20) /* 16-bit */ |
121 | #define OTG_VENDOR_CODE_REG OTG_REG32(0xfc) | 118 | #define OTG_VENDOR_CODE (OTG_BASE + 0xfc) /* 16-bit */ |
122 | 119 | ||
123 | /*-------------------------------------------------------------------------*/ | 120 | /*-------------------------------------------------------------------------*/ |
124 | 121 | ||
125 | /* OMAP1 */ | 122 | /* OMAP1 */ |
126 | #define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064) | 123 | #define USB_TRANSCEIVER_CTRL (0xfffe1000 + 0x0064) |
127 | # define CONF_USB2_UNI_R (1 << 8) | 124 | # define CONF_USB2_UNI_R (1 << 8) |
128 | # define CONF_USB1_UNI_R (1 << 7) | 125 | # define CONF_USB1_UNI_R (1 << 7) |
129 | # define CONF_USB_PORT0_R(x) (((x)>>4)&0x7) | 126 | # define CONF_USB_PORT0_R(x) (((x)>>4)&0x7) |
diff --git a/include/asm-arm/arch-orion5x/io.h b/include/asm-arm/arch-orion5x/io.h index 50f8c8802206..59f1bc96a23b 100644 --- a/include/asm-arm/arch-orion5x/io.h +++ b/include/asm-arm/arch-orion5x/io.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #include "orion5x.h" | 14 | #include "orion5x.h" |
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE | ||
18 | 17 | ||
19 | static inline void __iomem * | 18 | static inline void __iomem * |
20 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | 19 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) |
@@ -53,15 +52,12 @@ static inline void __iomem *__io(unsigned long addr) | |||
53 | /***************************************************************************** | 52 | /***************************************************************************** |
54 | * Helpers to access Orion registers | 53 | * Helpers to access Orion registers |
55 | ****************************************************************************/ | 54 | ****************************************************************************/ |
56 | #define orion5x_read(r) __raw_readl(r) | ||
57 | #define orion5x_write(r, val) __raw_writel(val, r) | ||
58 | |||
59 | /* | 55 | /* |
60 | * These are not preempt-safe. Locks, if needed, must be taken | 56 | * These are not preempt-safe. Locks, if needed, must be taken |
61 | * care of by the caller. | 57 | * care of by the caller. |
62 | */ | 58 | */ |
63 | #define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask)) | 59 | #define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r)) |
64 | #define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask)) | 60 | #define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r)) |
65 | 61 | ||
66 | 62 | ||
67 | #endif | 63 | #endif |
diff --git a/include/asm-arm/arch-orion5x/orion5x.h b/include/asm-arm/arch-orion5x/orion5x.h index 206ddd71e193..10257f5c5e9e 100644 --- a/include/asm-arm/arch-orion5x/orion5x.h +++ b/include/asm-arm/arch-orion5x/orion5x.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * include/asm-arm/arch-orion5x/orion5x.h | 2 | * include/asm-arm/arch-orion5x/orion5x.h |
3 | * | 3 | * |
4 | * Generic definitions of Orion SoC flavors: | 4 | * Generic definitions of Orion SoC flavors: |
5 | * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2. | 5 | * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2. |
6 | * | 6 | * |
7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | 7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> |
8 | * | 8 | * |
@@ -63,9 +63,11 @@ | |||
63 | /******************************************************************************* | 63 | /******************************************************************************* |
64 | * Supported Devices & Revisions | 64 | * Supported Devices & Revisions |
65 | ******************************************************************************/ | 65 | ******************************************************************************/ |
66 | /* Orion-1 (88F5181) */ | 66 | /* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */ |
67 | #define MV88F5181_DEV_ID 0x5181 | 67 | #define MV88F5181_DEV_ID 0x5181 |
68 | #define MV88F5181_REV_B1 3 | 68 | #define MV88F5181_REV_B1 3 |
69 | #define MV88F5181L_REV_A0 8 | ||
70 | #define MV88F5181L_REV_A1 9 | ||
69 | /* Orion-NAS (88F5182) */ | 71 | /* Orion-NAS (88F5182) */ |
70 | #define MV88F5182_DEV_ID 0x5182 | 72 | #define MV88F5182_DEV_ID 0x5182 |
71 | #define MV88F5182_REV_A2 2 | 73 | #define MV88F5182_REV_A2 2 |
@@ -152,6 +154,7 @@ | |||
152 | #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114) | 154 | #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114) |
153 | #define BRIDGE_INT_TIMER0 0x0002 | 155 | #define BRIDGE_INT_TIMER0 0x0002 |
154 | #define BRIDGE_INT_TIMER1 0x0004 | 156 | #define BRIDGE_INT_TIMER1 0x0004 |
157 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | ||
155 | #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200) | 158 | #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200) |
156 | #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204) | 159 | #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204) |
157 | 160 | ||
diff --git a/include/asm-arm/arch-orion5x/uncompress.h b/include/asm-arm/arch-orion5x/uncompress.h index 5c13d4fafb4e..7548cedf2d76 100644 --- a/include/asm-arm/arch-orion5x/uncompress.h +++ b/include/asm-arm/arch-orion5x/uncompress.h | |||
@@ -8,23 +8,38 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/serial_reg.h> | ||
11 | #include <asm/arch/orion5x.h> | 12 | #include <asm/arch/orion5x.h> |
12 | 13 | ||
13 | #define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) | 14 | #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE) |
14 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) | ||
15 | |||
16 | #define LSR_THRE 0x20 | ||
17 | 15 | ||
18 | static void putc(const char c) | 16 | static void putc(const char c) |
19 | { | 17 | { |
20 | int j = 0x1000; | 18 | unsigned char *base = SERIAL_BASE; |
21 | while (--j && !(*MV_UART_LSR & LSR_THRE)) | 19 | int i; |
20 | |||
21 | for (i = 0; i < 0x1000; i++) { | ||
22 | if (base[UART_LSR << 2] & UART_LSR_THRE) | ||
23 | break; | ||
22 | barrier(); | 24 | barrier(); |
23 | *MV_UART_THR = c; | 25 | } |
26 | |||
27 | base[UART_TX << 2] = c; | ||
24 | } | 28 | } |
25 | 29 | ||
26 | static void flush(void) | 30 | static void flush(void) |
27 | { | 31 | { |
32 | unsigned char *base = SERIAL_BASE; | ||
33 | unsigned char mask; | ||
34 | int i; | ||
35 | |||
36 | mask = UART_LSR_TEMT | UART_LSR_THRE; | ||
37 | |||
38 | for (i = 0; i < 0x1000; i++) { | ||
39 | if ((base[UART_LSR << 2] & mask) == mask) | ||
40 | break; | ||
41 | barrier(); | ||
42 | } | ||
28 | } | 43 | } |
29 | 44 | ||
30 | /* | 45 | /* |
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h index 7583895fd336..18e10d2c35ea 100644 --- a/include/asm-arm/arch-s3c2410/gpio.h +++ b/include/asm-arm/arch-s3c2410/gpio.h | |||
@@ -1,68 +1,18 @@ | |||
1 | /* | 1 | /* linux/include/asm-arm/arch-s3c2410/gpio.h |
2 | * linux/include/asm-arm/arch-s3c2410/gpio.h | ||
3 | * | 2 | * |
4 | * S3C2410 GPIO wrappers for arch-neutral GPIO calls | 3 | * Copyright (c) 2008 Simtec Electronics |
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | 6 | * |
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | 7 | * S3C2410 - GPIO lib support |
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License version 2 as |
10 | * the Free Software Foundation; either version 2 of the License, or | 11 | * published by the Free Software Foundation. |
11 | * (at your option) any later version. | 12 | */ |
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_S3C2410_GPIO_H | ||
25 | #define __ASM_ARCH_S3C2410_GPIO_H | ||
26 | |||
27 | #include <asm/irq.h> | ||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/arch/regs-gpio.h> | ||
30 | |||
31 | static inline int gpio_request(unsigned gpio, const char *label) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static inline void gpio_free(unsigned gpio) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | static inline int gpio_direction_input(unsigned gpio) | ||
42 | { | ||
43 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_INPUT); | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
48 | { | ||
49 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT); | ||
50 | /* REVISIT can we write the value first, to avoid glitching? */ | ||
51 | s3c2410_gpio_setpin(gpio, value); | ||
52 | return 0; | ||
53 | } | ||
54 | |||
55 | #define gpio_get_value(gpio) s3c2410_gpio_getpin(gpio) | ||
56 | #define gpio_set_value(gpio,value) s3c2410_gpio_setpin(gpio, value) | ||
57 | |||
58 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
59 | |||
60 | #ifdef CONFIG_CPU_S3C2400 | ||
61 | #define gpio_to_irq(gpio) s3c2400_gpio_getirq(gpio) | ||
62 | #else | ||
63 | #define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) | ||
64 | #endif | ||
65 | 13 | ||
66 | /* FIXME implement irq_to_gpio() */ | 14 | #define gpio_get_value __gpio_get_value |
15 | #define gpio_set_value __gpio_set_value | ||
16 | #define gpio_cansleep __gpio_cansleep | ||
67 | 17 | ||
68 | #endif | 18 | #include <asm-generic/gpio.h> |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index ecae9e7f5e45..37661358b42b 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -189,6 +189,8 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
189 | #define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9) | 189 | #define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9) |
190 | #define S3C2412_CLKSRC_USBCLK_HCLK (1<<10) | 190 | #define S3C2412_CLKSRC_USBCLK_HCLK (1<<10) |
191 | #define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11) | 191 | #define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11) |
192 | #define S3C2412_CLKSRC_UREFCLK_EXTCLK (1<<12) | ||
193 | #define S3C2412_CLKSRC_EREFCLK_EXTCLK (1<<14) | ||
192 | 194 | ||
193 | #endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ | 195 | #endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ |
194 | 196 | ||
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index fce832820825..911393b2c6f0 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h | |||
@@ -56,6 +56,21 @@ | |||
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * This can be used to enable code to cacheline align the destination | ||
60 | * pointer when bulk writing to memory. Experiments on StrongARM and | ||
61 | * XScale didn't show this a worthwhile thing to do when the cache is not | ||
62 | * set to write-allocate (this would need further testing on XScale when WA | ||
63 | * is used). | ||
64 | * | ||
65 | * On Feroceon there is much to gain however, regardless of cache mode. | ||
66 | */ | ||
67 | #ifdef CONFIG_CPU_FEROCEON | ||
68 | #define CALGN(code...) code | ||
69 | #else | ||
70 | #define CALGN(code...) | ||
71 | #endif | ||
72 | |||
73 | /* | ||
59 | * Enable and disable interrupts | 74 | * Enable and disable interrupts |
60 | */ | 75 | */ |
61 | #if __LINUX_ARM_ARCH__ >= 6 | 76 | #if __LINUX_ARM_ARCH__ >= 6 |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 759a97b56eed..70b0fe724b62 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -95,11 +95,7 @@ | |||
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | #if defined(CONFIG_CPU_FEROCEON) | 97 | #if defined(CONFIG_CPU_FEROCEON) |
98 | # ifdef _CACHE | 98 | # define MULTI_CACHE 1 |
99 | # define MULTI_CACHE 1 | ||
100 | # else | ||
101 | # define _CACHE feroceon | ||
102 | # endif | ||
103 | #endif | 99 | #endif |
104 | 100 | ||
105 | #if defined(CONFIG_CPU_V6) | 101 | #if defined(CONFIG_CPU_V6) |
@@ -410,6 +406,13 @@ extern void flush_dcache_page(struct page *); | |||
410 | 406 | ||
411 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); | 407 | extern void __flush_dcache_page(struct address_space *mapping, struct page *page); |
412 | 408 | ||
409 | static inline void __flush_icache_all(void) | ||
410 | { | ||
411 | asm("mcr p15, 0, %0, c7, c5, 0 @ invalidate I-cache\n" | ||
412 | : | ||
413 | : "r" (0)); | ||
414 | } | ||
415 | |||
413 | #define ARCH_HAS_FLUSH_ANON_PAGE | 416 | #define ARCH_HAS_FLUSH_ANON_PAGE |
414 | static inline void flush_anon_page(struct vm_area_struct *vma, | 417 | static inline void flush_anon_page(struct vm_area_struct *vma, |
415 | struct page *page, unsigned long vmaddr) | 418 | struct page *page, unsigned long vmaddr) |
diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h deleted file mode 100644 index 19fab2d2b760..000000000000 --- a/include/asm-arm/dyntick.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASMARM_DYNTICK_H | ||
2 | #define _ASMARM_DYNTICK_H | ||
3 | |||
4 | #include <asm/mach/time.h> | ||
5 | |||
6 | #endif /* _ASMARM_DYNTICK_H */ | ||
diff --git a/include/asm-arm/hardware/iop3xx-gpio.h b/include/asm-arm/hardware/iop3xx-gpio.h new file mode 100644 index 000000000000..0c9331f9ac24 --- /dev/null +++ b/include/asm-arm/hardware/iop3xx-gpio.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/hardware/iop3xx-gpio.h | ||
3 | * | ||
4 | * IOP3xx GPIO wrappers | ||
5 | * | ||
6 | * Copyright (c) 2008 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
7 | * Based on IXP4XX gpio.h file | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __ASM_ARM_HARDWARE_IOP3XX_GPIO_H | ||
26 | #define __ASM_ARM_HARDWARE_IOP3XX_GPIO_H | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm-generic/gpio.h> | ||
30 | |||
31 | #define IOP3XX_N_GPIOS 8 | ||
32 | |||
33 | static inline int gpio_get_value(unsigned gpio) | ||
34 | { | ||
35 | if (gpio > IOP3XX_N_GPIOS) | ||
36 | return __gpio_get_value(gpio); | ||
37 | |||
38 | return gpio_line_get(gpio); | ||
39 | } | ||
40 | |||
41 | static inline void gpio_set_value(unsigned gpio, int value) | ||
42 | { | ||
43 | if (gpio > IOP3XX_N_GPIOS) { | ||
44 | __gpio_set_value(gpio, value); | ||
45 | return; | ||
46 | } | ||
47 | gpio_line_set(gpio, value); | ||
48 | } | ||
49 | |||
50 | static inline int gpio_cansleep(unsigned gpio) | ||
51 | { | ||
52 | if (gpio < IOP3XX_N_GPIOS) | ||
53 | return 0; | ||
54 | else | ||
55 | return __gpio_cansleep(gpio); | ||
56 | } | ||
57 | |||
58 | /* | ||
59 | * The GPIOs are not generating any interrupt | ||
60 | * Note : manuals are not clear about this | ||
61 | */ | ||
62 | static inline int gpio_to_irq(int gpio) | ||
63 | { | ||
64 | return -EINVAL; | ||
65 | } | ||
66 | |||
67 | static inline int irq_to_gpio(int gpio) | ||
68 | { | ||
69 | return -EINVAL; | ||
70 | } | ||
71 | |||
72 | #endif | ||
73 | |||
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h index 98d594a973d6..f1a08a500604 100644 --- a/include/asm-arm/hw_irq.h +++ b/include/asm-arm/hw_irq.h | |||
@@ -6,15 +6,4 @@ | |||
6 | 6 | ||
7 | #include <asm/mach/irq.h> | 7 | #include <asm/mach/irq.h> |
8 | 8 | ||
9 | #if defined(CONFIG_NO_IDLE_HZ) | ||
10 | # include <asm/dyntick.h> | ||
11 | # define handle_dynamic_tick(action) \ | ||
12 | if (!(action->flags & IRQF_TIMER) && system_timer->dyn_tick) { \ | ||
13 | write_seqlock(&xtime_lock); \ | ||
14 | if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \ | ||
15 | system_timer->dyn_tick->handler(irq, NULL); \ | ||
16 | write_sequnlock(&xtime_lock); \ | ||
17 | } | ||
18 | #endif | ||
19 | |||
20 | #endif | 9 | #endif |
diff --git a/include/asm-arm/kexec.h b/include/asm-arm/kexec.h index 47fe34d692da..c8986bb99ed5 100644 --- a/include/asm-arm/kexec.h +++ b/include/asm-arm/kexec.h | |||
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #define KEXEC_ARCH KEXEC_ARCH_ARM | 15 | #define KEXEC_ARCH KEXEC_ARCH_ARM |
16 | 16 | ||
17 | #define KEXEC_BOOT_PARAMS_SIZE 1536 | ||
18 | |||
19 | #define KEXEC_ARM_ATAGS_OFFSET 0x1000 | 17 | #define KEXEC_ARM_ATAGS_OFFSET 0x1000 |
20 | #define KEXEC_ARM_ZIMAGE_OFFSET 0x8000 | 18 | #define KEXEC_ARM_ZIMAGE_OFFSET 0x8000 |
21 | 19 | ||
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h index 5dc357013b79..2fd36ea0130d 100644 --- a/include/asm-arm/mach/time.h +++ b/include/asm-arm/mach/time.h | |||
@@ -41,30 +41,8 @@ struct sys_timer { | |||
41 | #ifndef CONFIG_GENERIC_TIME | 41 | #ifndef CONFIG_GENERIC_TIME |
42 | unsigned long (*offset)(void); | 42 | unsigned long (*offset)(void); |
43 | #endif | 43 | #endif |
44 | |||
45 | #ifdef CONFIG_NO_IDLE_HZ | ||
46 | struct dyn_tick_timer *dyn_tick; | ||
47 | #endif | ||
48 | }; | ||
49 | |||
50 | #ifdef CONFIG_NO_IDLE_HZ | ||
51 | |||
52 | #define DYN_TICK_ENABLED (1 << 1) | ||
53 | |||
54 | struct dyn_tick_timer { | ||
55 | spinlock_t lock; | ||
56 | unsigned int state; /* Current state */ | ||
57 | int (*enable)(void); /* Enables dynamic tick */ | ||
58 | int (*disable)(void); /* Disables dynamic tick */ | ||
59 | void (*reprogram)(unsigned long); /* Reprograms the timer */ | ||
60 | int (*handler)(int, void *); | ||
61 | }; | 44 | }; |
62 | 45 | ||
63 | void timer_dyn_reprogram(void); | ||
64 | #else | ||
65 | #define timer_dyn_reprogram() do { } while (0) | ||
66 | #endif | ||
67 | |||
68 | extern struct sys_timer *system_timer; | 46 | extern struct sys_timer *system_timer; |
69 | extern void timer_tick(void); | 47 | extern void timer_tick(void); |
70 | 48 | ||
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 6913d02ca5d6..91b9dfdfed52 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
@@ -97,6 +97,11 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
97 | #ifdef CONFIG_MMU | 97 | #ifdef CONFIG_MMU |
98 | unsigned int cpu = smp_processor_id(); | 98 | unsigned int cpu = smp_processor_id(); |
99 | 99 | ||
100 | #ifdef CONFIG_SMP | ||
101 | /* check for possible thread migration */ | ||
102 | if (!cpus_empty(next->cpu_vm_mask) && !cpu_isset(cpu, next->cpu_vm_mask)) | ||
103 | __flush_icache_all(); | ||
104 | #endif | ||
100 | if (!cpu_test_and_set(cpu, next->cpu_vm_mask) || prev != next) { | 105 | if (!cpu_test_and_set(cpu, next->cpu_vm_mask) || prev != next) { |
101 | check_context(next); | 106 | check_context(next); |
102 | cpu_switch_mm(next->pgd, next); | 107 | cpu_switch_mm(next->pgd, next); |
diff --git a/include/asm-arm/plat-orion/cache-feroceon-l2.h b/include/asm-arm/plat-orion/cache-feroceon-l2.h new file mode 100644 index 000000000000..ba4e016d3ec0 --- /dev/null +++ b/include/asm-arm/plat-orion/cache-feroceon-l2.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * include/asm-arm/plat-orion/cache-feroceon-l2.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Marvell Semiconductor | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | extern void __init feroceon_l2_init(int l2_wt_override); | ||
diff --git a/include/asm-arm/plat-orion/orion_nand.h b/include/asm-arm/plat-orion/orion_nand.h index ffd3852a0dd7..ad4ce94c1998 100644 --- a/include/asm-arm/plat-orion/orion_nand.h +++ b/include/asm-arm/plat-orion/orion_nand.h | |||
@@ -18,6 +18,7 @@ struct orion_nand_data { | |||
18 | u8 ale; /* address line number connected to ALE */ | 18 | u8 ale; /* address line number connected to ALE */ |
19 | u8 cle; /* address line number connected to CLE */ | 19 | u8 cle; /* address line number connected to CLE */ |
20 | u8 width; /* buswidth */ | 20 | u8 width; /* buswidth */ |
21 | u8 chip_delay; | ||
21 | }; | 22 | }; |
22 | 23 | ||
23 | 24 | ||
diff --git a/include/asm-arm/plat-orion/pcie.h b/include/asm-arm/plat-orion/pcie.h index 6434ac685d21..e61b7bd97af5 100644 --- a/include/asm-arm/plat-orion/pcie.h +++ b/include/asm-arm/plat-orion/pcie.h | |||
@@ -14,6 +14,7 @@ | |||
14 | u32 orion_pcie_dev_id(void __iomem *base); | 14 | u32 orion_pcie_dev_id(void __iomem *base); |
15 | u32 orion_pcie_rev(void __iomem *base); | 15 | u32 orion_pcie_rev(void __iomem *base); |
16 | int orion_pcie_link_up(void __iomem *base); | 16 | int orion_pcie_link_up(void __iomem *base); |
17 | int orion_pcie_x4_mode(void __iomem *base); | ||
17 | int orion_pcie_get_local_bus_nr(void __iomem *base); | 18 | int orion_pcie_get_local_bus_nr(void __iomem *base); |
18 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); | 19 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); |
19 | void orion_pcie_setup(void __iomem *base, | 20 | void orion_pcie_setup(void __iomem *base, |
diff --git a/include/asm-arm/plat-s3c/regs-timer.h b/include/asm-arm/plat-s3c/regs-timer.h index 8b0d594397b1..b5bc692f3489 100644 --- a/include/asm-arm/plat-s3c/regs-timer.h +++ b/include/asm-arm/plat-s3c/regs-timer.h | |||
@@ -65,6 +65,15 @@ | |||
65 | #define S3C2410_TCFG1_MUX0_TCLK0 (4<<0) | 65 | #define S3C2410_TCFG1_MUX0_TCLK0 (4<<0) |
66 | #define S3C2410_TCFG1_MUX0_MASK (15<<0) | 66 | #define S3C2410_TCFG1_MUX0_MASK (15<<0) |
67 | 67 | ||
68 | #define S3C2410_TCFG1_MUX_DIV2 (0<<0) | ||
69 | #define S3C2410_TCFG1_MUX_DIV4 (1<<0) | ||
70 | #define S3C2410_TCFG1_MUX_DIV8 (2<<0) | ||
71 | #define S3C2410_TCFG1_MUX_DIV16 (3<<0) | ||
72 | #define S3C2410_TCFG1_MUX_TCLK (4<<0) | ||
73 | #define S3C2410_TCFG1_MUX_MASK (15<<0) | ||
74 | |||
75 | #define S3C2410_TCFG1_SHIFT(x) ((x) * 4) | ||
76 | |||
68 | /* for each timer, we have an count buffer, an compare buffer and | 77 | /* for each timer, we have an count buffer, an compare buffer and |
69 | * an observation buffer | 78 | * an observation buffer |
70 | */ | 79 | */ |
diff --git a/include/asm-arm/plat-s3c24xx/devs.h b/include/asm-arm/plat-s3c24xx/devs.h index f9d6f0317bc1..badaac9d64a8 100644 --- a/include/asm-arm/plat-s3c24xx/devs.h +++ b/include/asm-arm/plat-s3c24xx/devs.h | |||
@@ -21,6 +21,8 @@ extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | |||
21 | extern struct platform_device *s3c24xx_uart_devs[]; | 21 | extern struct platform_device *s3c24xx_uart_devs[]; |
22 | extern struct platform_device *s3c24xx_uart_src[]; | 22 | extern struct platform_device *s3c24xx_uart_src[]; |
23 | 23 | ||
24 | extern struct platform_device s3c_device_timer[]; | ||
25 | |||
24 | extern struct platform_device s3c_device_usb; | 26 | extern struct platform_device s3c_device_usb; |
25 | extern struct platform_device s3c_device_lcd; | 27 | extern struct platform_device s3c_device_lcd; |
26 | extern struct platform_device s3c_device_wdt; | 28 | extern struct platform_device s3c_device_wdt; |
@@ -36,11 +38,6 @@ extern struct platform_device s3c_device_spi1; | |||
36 | 38 | ||
37 | extern struct platform_device s3c_device_nand; | 39 | extern struct platform_device s3c_device_nand; |
38 | 40 | ||
39 | extern struct platform_device s3c_device_timer0; | ||
40 | extern struct platform_device s3c_device_timer1; | ||
41 | extern struct platform_device s3c_device_timer2; | ||
42 | extern struct platform_device s3c_device_timer3; | ||
43 | |||
44 | extern struct platform_device s3c_device_usbgadget; | 41 | extern struct platform_device s3c_device_usbgadget; |
45 | 42 | ||
46 | /* s3c2440 specific devices */ | 43 | /* s3c2440 specific devices */ |
diff --git a/include/asm-arm/rtc.h b/include/asm-arm/rtc.h deleted file mode 100644 index 1a5c9232a91e..000000000000 --- a/include/asm-arm/rtc.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/rtc.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Deep Blue Solutions Ltd. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef ASMARM_RTC_H | ||
11 | #define ASMARM_RTC_H | ||
12 | |||
13 | struct module; | ||
14 | |||
15 | struct rtc_ops { | ||
16 | struct module *owner; | ||
17 | int (*open)(void); | ||
18 | void (*release)(void); | ||
19 | int (*ioctl)(unsigned int, unsigned long); | ||
20 | |||
21 | int (*read_time)(struct rtc_time *); | ||
22 | int (*set_time)(struct rtc_time *); | ||
23 | int (*read_alarm)(struct rtc_wkalrm *); | ||
24 | int (*set_alarm)(struct rtc_wkalrm *); | ||
25 | int (*proc)(char *buf); | ||
26 | }; | ||
27 | |||
28 | void rtc_next_alarm_time(struct rtc_time *, struct rtc_time *, struct rtc_time *); | ||
29 | void rtc_update(unsigned long, unsigned long); | ||
30 | int register_rtc(struct rtc_ops *); | ||
31 | void unregister_rtc(struct rtc_ops *); | ||
32 | |||
33 | static inline int rtc_periodic_alarm(struct rtc_time *tm) | ||
34 | { | ||
35 | return (tm->tm_year == -1) || | ||
36 | ((unsigned)tm->tm_mon >= 12) || | ||
37 | ((unsigned)(tm->tm_mday - 1) >= 31) || | ||
38 | ((unsigned)tm->tm_hour > 23) || | ||
39 | ((unsigned)tm->tm_min > 59) || | ||
40 | ((unsigned)tm->tm_sec > 59); | ||
41 | } | ||
42 | |||
43 | #endif | ||
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 8c6bc1bb9d1a..909656c747ef 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define TLB_V6_D_ASID (1 << 17) | 39 | #define TLB_V6_D_ASID (1 << 17) |
40 | #define TLB_V6_I_ASID (1 << 18) | 40 | #define TLB_V6_I_ASID (1 << 18) |
41 | 41 | ||
42 | #define TLB_L2CLEAN_FR (1 << 29) /* Feroceon */ | ||
42 | #define TLB_DCLEAN (1 << 30) | 43 | #define TLB_DCLEAN (1 << 30) |
43 | #define TLB_WB (1 << 31) | 44 | #define TLB_WB (1 << 31) |
44 | 45 | ||
@@ -51,6 +52,7 @@ | |||
51 | * v4 - ARMv4 without write buffer | 52 | * v4 - ARMv4 without write buffer |
52 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction | 53 | * v4wb - ARMv4 with write buffer without I TLB flush entry instruction |
53 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction | 54 | * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction |
55 | * fr - Feroceon (v4wbi with non-outer-cacheable page table walks) | ||
54 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction | 56 | * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction |
55 | */ | 57 | */ |
56 | #undef _TLB | 58 | #undef _TLB |
@@ -103,6 +105,23 @@ | |||
103 | # define v4wbi_always_flags (-1UL) | 105 | # define v4wbi_always_flags (-1UL) |
104 | #endif | 106 | #endif |
105 | 107 | ||
108 | #define fr_tlb_flags (TLB_WB | TLB_DCLEAN | TLB_L2CLEAN_FR | \ | ||
109 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ | ||
110 | TLB_V4_I_PAGE | TLB_V4_D_PAGE) | ||
111 | |||
112 | #ifdef CONFIG_CPU_TLB_FEROCEON | ||
113 | # define fr_possible_flags fr_tlb_flags | ||
114 | # define fr_always_flags fr_tlb_flags | ||
115 | # ifdef _TLB | ||
116 | # define MULTI_TLB 1 | ||
117 | # else | ||
118 | # define _TLB v4wbi | ||
119 | # endif | ||
120 | #else | ||
121 | # define fr_possible_flags 0 | ||
122 | # define fr_always_flags (-1UL) | ||
123 | #endif | ||
124 | |||
106 | #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \ | 125 | #define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \ |
107 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ | 126 | TLB_V4_I_FULL | TLB_V4_D_FULL | \ |
108 | TLB_V4_D_PAGE) | 127 | TLB_V4_D_PAGE) |
@@ -245,12 +264,14 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
245 | #define possible_tlb_flags (v3_possible_flags | \ | 264 | #define possible_tlb_flags (v3_possible_flags | \ |
246 | v4_possible_flags | \ | 265 | v4_possible_flags | \ |
247 | v4wbi_possible_flags | \ | 266 | v4wbi_possible_flags | \ |
267 | fr_possible_flags | \ | ||
248 | v4wb_possible_flags | \ | 268 | v4wb_possible_flags | \ |
249 | v6wbi_possible_flags) | 269 | v6wbi_possible_flags) |
250 | 270 | ||
251 | #define always_tlb_flags (v3_always_flags & \ | 271 | #define always_tlb_flags (v3_always_flags & \ |
252 | v4_always_flags & \ | 272 | v4_always_flags & \ |
253 | v4wbi_always_flags & \ | 273 | v4wbi_always_flags & \ |
274 | fr_always_flags & \ | ||
254 | v4wb_always_flags & \ | 275 | v4wb_always_flags & \ |
255 | v6wbi_always_flags) | 276 | v6wbi_always_flags) |
256 | 277 | ||
@@ -417,6 +438,11 @@ static inline void flush_pmd_entry(pmd_t *pmd) | |||
417 | if (tlb_flag(TLB_DCLEAN)) | 438 | if (tlb_flag(TLB_DCLEAN)) |
418 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" | 439 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" |
419 | : : "r" (pmd) : "cc"); | 440 | : : "r" (pmd) : "cc"); |
441 | |||
442 | if (tlb_flag(TLB_L2CLEAN_FR)) | ||
443 | asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" | ||
444 | : : "r" (pmd) : "cc"); | ||
445 | |||
420 | if (tlb_flag(TLB_WB)) | 446 | if (tlb_flag(TLB_WB)) |
421 | dsb(); | 447 | dsb(); |
422 | } | 448 | } |
@@ -428,6 +454,10 @@ static inline void clean_pmd_entry(pmd_t *pmd) | |||
428 | if (tlb_flag(TLB_DCLEAN)) | 454 | if (tlb_flag(TLB_DCLEAN)) |
429 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" | 455 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" |
430 | : : "r" (pmd) : "cc"); | 456 | : : "r" (pmd) : "cc"); |
457 | |||
458 | if (tlb_flag(TLB_L2CLEAN_FR)) | ||
459 | asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" | ||
460 | : : "r" (pmd) : "cc"); | ||
431 | } | 461 | } |
432 | 462 | ||
433 | #undef tlb_flag | 463 | #undef tlb_flag |
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 92a6d91d0c1a..7cd25b8e7c9a 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm | |||
@@ -1,6 +1,6 @@ | |||
1 | header-y += kvm.h | 1 | header-y += kvm.h |
2 | 2 | ||
3 | ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) | 3 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) |
4 | unifdef-y += a.out.h | 4 | unifdef-y += a.out.h |
5 | endif | 5 | endif |
6 | unifdef-y += auxvec.h | 6 | unifdef-y += auxvec.h |
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 7381916dfcbb..bca352e033c3 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -1,6 +1,5 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | header-y += a.out.h | ||
4 | header-y += auxvec.h | 3 | header-y += auxvec.h |
5 | header-y += ioctls.h | 4 | header-y += ioctls.h |
6 | header-y += mman.h | 5 | header-y += mman.h |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 1d8cd01fa514..844f2a89afbc 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kvm_para.h> | 18 | #include <linux/kvm_para.h> |
19 | #include <linux/kvm_types.h> | 19 | #include <linux/kvm_types.h> |
20 | 20 | ||
21 | #include <asm/pvclock-abi.h> | ||
21 | #include <asm/desc.h> | 22 | #include <asm/desc.h> |
22 | 23 | ||
23 | #define KVM_MAX_VCPUS 16 | 24 | #define KVM_MAX_VCPUS 16 |
@@ -282,7 +283,8 @@ struct kvm_vcpu_arch { | |||
282 | struct x86_emulate_ctxt emulate_ctxt; | 283 | struct x86_emulate_ctxt emulate_ctxt; |
283 | 284 | ||
284 | gpa_t time; | 285 | gpa_t time; |
285 | struct kvm_vcpu_time_info hv_clock; | 286 | struct pvclock_vcpu_time_info hv_clock; |
287 | unsigned int hv_clock_tsc_khz; | ||
286 | unsigned int time_offset; | 288 | unsigned int time_offset; |
287 | struct page *time_page; | 289 | struct page *time_page; |
288 | }; | 290 | }; |
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h index 509845942070..bfd9900742bf 100644 --- a/include/asm-x86/kvm_para.h +++ b/include/asm-x86/kvm_para.h | |||
@@ -48,24 +48,6 @@ struct kvm_mmu_op_release_pt { | |||
48 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
49 | #include <asm/processor.h> | 49 | #include <asm/processor.h> |
50 | 50 | ||
51 | /* xen binary-compatible interface. See xen headers for details */ | ||
52 | struct kvm_vcpu_time_info { | ||
53 | uint32_t version; | ||
54 | uint32_t pad0; | ||
55 | uint64_t tsc_timestamp; | ||
56 | uint64_t system_time; | ||
57 | uint32_t tsc_to_system_mul; | ||
58 | int8_t tsc_shift; | ||
59 | int8_t pad[3]; | ||
60 | } __attribute__((__packed__)); /* 32 bytes */ | ||
61 | |||
62 | struct kvm_wall_clock { | ||
63 | uint32_t wc_version; | ||
64 | uint32_t wc_sec; | ||
65 | uint32_t wc_nsec; | ||
66 | } __attribute__((__packed__)); | ||
67 | |||
68 | |||
69 | extern void kvmclock_init(void); | 51 | extern void kvmclock_init(void); |
70 | 52 | ||
71 | 53 | ||
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 3707650a169b..2b5f2c91db25 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h | |||
@@ -18,7 +18,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux) | |||
18 | unsigned long low, high; | 18 | unsigned long low, high; |
19 | asm volatile(".byte 0x0f,0x01,0xf9" | 19 | asm volatile(".byte 0x0f,0x01,0xf9" |
20 | : "=a" (low), "=d" (high), "=c" (*aux)); | 20 | : "=a" (low), "=d" (high), "=c" (*aux)); |
21 | return low | ((u64)high >> 32); | 21 | return low | ((u64)high << 32); |
22 | } | 22 | } |
23 | 23 | ||
24 | /* | 24 | /* |
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h new file mode 100644 index 000000000000..6857f840b243 --- /dev/null +++ b/include/asm-x86/pvclock-abi.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_ABI_H_ | ||
2 | #define _ASM_X86_PVCLOCK_ABI_H_ | ||
3 | #ifndef __ASSEMBLY__ | ||
4 | |||
5 | /* | ||
6 | * These structs MUST NOT be changed. | ||
7 | * They are the ABI between hypervisor and guest OS. | ||
8 | * Both Xen and KVM are using this. | ||
9 | * | ||
10 | * pvclock_vcpu_time_info holds the system time and the tsc timestamp | ||
11 | * of the last update. So the guest can use the tsc delta to get a | ||
12 | * more precise system time. There is one per virtual cpu. | ||
13 | * | ||
14 | * pvclock_wall_clock references the point in time when the system | ||
15 | * time was zero (usually boot time), thus the guest calculates the | ||
16 | * current wall clock by adding the system time. | ||
17 | * | ||
18 | * Protocol for the "version" fields is: hypervisor raises it (making | ||
19 | * it uneven) before it starts updating the fields and raises it again | ||
20 | * (making it even) when it is done. Thus the guest can make sure the | ||
21 | * time values it got are consistent by checking the version before | ||
22 | * and after reading them. | ||
23 | */ | ||
24 | |||
25 | struct pvclock_vcpu_time_info { | ||
26 | u32 version; | ||
27 | u32 pad0; | ||
28 | u64 tsc_timestamp; | ||
29 | u64 system_time; | ||
30 | u32 tsc_to_system_mul; | ||
31 | s8 tsc_shift; | ||
32 | u8 pad[3]; | ||
33 | } __attribute__((__packed__)); /* 32 bytes */ | ||
34 | |||
35 | struct pvclock_wall_clock { | ||
36 | u32 version; | ||
37 | u32 sec; | ||
38 | u32 nsec; | ||
39 | } __attribute__((__packed__)); | ||
40 | |||
41 | #endif /* __ASSEMBLY__ */ | ||
42 | #endif /* _ASM_X86_PVCLOCK_ABI_H_ */ | ||
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h new file mode 100644 index 000000000000..85b1bba8e0a3 --- /dev/null +++ b/include/asm-x86/pvclock.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _ASM_X86_PVCLOCK_H_ | ||
2 | #define _ASM_X86_PVCLOCK_H_ | ||
3 | |||
4 | #include <linux/clocksource.h> | ||
5 | #include <asm/pvclock-abi.h> | ||
6 | |||
7 | /* some helper functions for xen and kvm pv clock sources */ | ||
8 | cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src); | ||
9 | void pvclock_read_wallclock(struct pvclock_wall_clock *wall, | ||
10 | struct pvclock_vcpu_time_info *vcpu, | ||
11 | struct timespec *ts); | ||
12 | |||
13 | #endif /* _ASM_X86_PVCLOCK_H_ */ | ||
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index baf3a4dce28c..e11f24038b1d 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -150,13 +150,9 @@ static inline pte_t __pte_ma(pteval_t x) | |||
150 | return (pte_t) { .pte = x }; | 150 | return (pte_t) { .pte = x }; |
151 | } | 151 | } |
152 | 152 | ||
153 | #ifdef CONFIG_X86_PAE | ||
154 | #define pmd_val_ma(v) ((v).pmd) | 153 | #define pmd_val_ma(v) ((v).pmd) |
155 | #define pud_val_ma(v) ((v).pgd.pgd) | 154 | #define pud_val_ma(v) ((v).pgd.pgd) |
156 | #define __pmd_ma(x) ((pmd_t) { (x) } ) | 155 | #define __pmd_ma(x) ((pmd_t) { (x) } ) |
157 | #else /* !X86_PAE */ | ||
158 | #define pmd_val_ma(v) ((v).pud.pgd.pgd) | ||
159 | #endif /* CONFIG_X86_PAE */ | ||
160 | 156 | ||
161 | #define pgd_val_ma(x) ((x).pgd) | 157 | #define pgd_val_ma(x) ((x).pgd) |
162 | 158 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index b6fbb2573e88..71d70d1fbce2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -166,7 +166,7 @@ unifdef-y += acct.h | |||
166 | unifdef-y += adb.h | 166 | unifdef-y += adb.h |
167 | unifdef-y += adfs_fs.h | 167 | unifdef-y += adfs_fs.h |
168 | unifdef-y += agpgart.h | 168 | unifdef-y += agpgart.h |
169 | ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) | 169 | ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),) |
170 | unifdef-y += a.out.h | 170 | unifdef-y += a.out.h |
171 | endif | 171 | endif |
172 | unifdef-y += apm_bios.h | 172 | unifdef-y += apm_bios.h |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 63c3bb98558f..8b82974bdc12 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message); | |||
571 | extern int audit_update_lsm_rules(void); | 571 | extern int audit_update_lsm_rules(void); |
572 | 572 | ||
573 | /* Private API (for audit.c only) */ | 573 | /* Private API (for audit.c only) */ |
574 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 574 | extern int audit_filter_user(struct netlink_skb_parms *cb); |
575 | extern int audit_filter_type(int type); | 575 | extern int audit_filter_type(int type); |
576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
577 | void *data, size_t datasz, uid_t loginuid, | 577 | void *data, size_t datasz, uid_t loginuid, |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 6a5dbdc8a7dc..686895bacd9d 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
94 | unsigned long freepfn, | 94 | unsigned long freepfn, |
95 | unsigned long startpfn, | 95 | unsigned long startpfn, |
96 | unsigned long endpfn); | 96 | unsigned long endpfn); |
97 | extern void reserve_bootmem_node(pg_data_t *pgdat, | 97 | extern int reserve_bootmem_node(pg_data_t *pgdat, |
98 | unsigned long physaddr, | 98 | unsigned long physaddr, |
99 | unsigned long size, | 99 | unsigned long size, |
100 | int flags); | 100 | int flags); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 2a6639407c80..d982eb89c77d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -300,7 +300,7 @@ extern int d_validate(struct dentry *, struct dentry *); | |||
300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); | 300 | extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); |
301 | 301 | ||
302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); | 302 | extern char *__d_path(const struct path *path, struct path *root, char *, int); |
303 | extern char *d_path(struct path *, char *, int); | 303 | extern char *d_path(const struct path *, char *, int); |
304 | extern char *dentry_path(struct dentry *, char *, int); | 304 | extern char *dentry_path(struct dentry *, char *, int); |
305 | 305 | ||
306 | /* Allocation counts.. */ | 306 | /* Allocation counts.. */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index d490779f18d9..d8e2762ed14d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -83,6 +83,7 @@ extern int dir_notify_enable; | |||
83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) | 83 | #define READ_SYNC (READ | (1 << BIO_RW_SYNC)) |
84 | #define READ_META (READ | (1 << BIO_RW_META)) | 84 | #define READ_META (READ | (1 << BIO_RW_META)) |
85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) | 85 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) |
86 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC)) | ||
86 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) | 87 | #define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) |
87 | 88 | ||
88 | #define SEL_IN 1 | 89 | #define SEL_IN 1 |
@@ -894,8 +895,6 @@ static inline int file_check_writeable(struct file *filp) | |||
894 | typedef struct files_struct *fl_owner_t; | 895 | typedef struct files_struct *fl_owner_t; |
895 | 896 | ||
896 | struct file_lock_operations { | 897 | struct file_lock_operations { |
897 | void (*fl_insert)(struct file_lock *); /* lock insertion callback */ | ||
898 | void (*fl_remove)(struct file_lock *); /* lock removal callback */ | ||
899 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 898 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
900 | void (*fl_release_private)(struct file_lock *); | 899 | void (*fl_release_private)(struct file_lock *); |
901 | }; | 900 | }; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fb9af6a0fe9c..8dc730132192 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -171,7 +171,7 @@ struct i2c_client { | |||
171 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 171 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
172 | struct i2c_driver *driver; /* and our access routines */ | 172 | struct i2c_driver *driver; /* and our access routines */ |
173 | struct device dev; /* the device structure */ | 173 | struct device dev; /* the device structure */ |
174 | int irq; /* irq issued by device (or -1) */ | 174 | int irq; /* irq issued by device */ |
175 | struct list_head list; /* DEPRECATED */ | 175 | struct list_head list; /* DEPRECATED */ |
176 | struct completion released; | 176 | struct completion released; |
177 | }; | 177 | }; |
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index 80335b7d77c5..c4335faebb63 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h | |||
@@ -84,7 +84,11 @@ struct net_lro_mgr { | |||
84 | from received packets and eth protocol | 84 | from received packets and eth protocol |
85 | is still ETH_P_8021Q */ | 85 | is still ETH_P_8021Q */ |
86 | 86 | ||
87 | u32 ip_summed; /* Set in non generated SKBs in page mode */ | 87 | /* |
88 | * Set for generated SKBs that are not added to | ||
89 | * the frag list in fragmented mode | ||
90 | */ | ||
91 | u32 ip_summed; | ||
88 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY | 92 | u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY |
89 | * or CHECKSUM_NONE */ | 93 | * or CHECKSUM_NONE */ |
90 | 94 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index e075c4b762fb..d150c57e5f0a 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -534,8 +534,8 @@ struct input_absinfo { | |||
534 | 534 | ||
535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | 535 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ |
536 | #define KEY_FRAMEFORWARD 0x1b5 | 536 | #define KEY_FRAMEFORWARD 0x1b5 |
537 | |||
538 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 537 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
538 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | ||
539 | 539 | ||
540 | #define KEY_DEL_EOL 0x1c0 | 540 | #define KEY_DEL_EOL 0x1c0 |
541 | #define KEY_DEL_EOS 0x1c1 | 541 | #define KEY_DEL_EOS 0x1c1 |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 092b1b25291d..de9d1df4bba2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 | 33 | #define KVM_REQ_REPORT_TPR_ACCESS 2 |
34 | #define KVM_REQ_MMU_RELOAD 3 | 34 | #define KVM_REQ_MMU_RELOAD 3 |
35 | #define KVM_REQ_TRIPLE_FAULT 4 | 35 | #define KVM_REQ_TRIPLE_FAULT 4 |
36 | #define KVM_REQ_PENDING_TIMER 5 | ||
36 | 37 | ||
37 | struct kvm_vcpu; | 38 | struct kvm_vcpu; |
38 | extern struct kmem_cache *kvm_vcpu_cache; | 39 | extern struct kmem_cache *kvm_vcpu_cache; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f27fd2009334..25f87102ab66 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -88,6 +88,8 @@ struct wireless_dev; | |||
88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ | 88 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ |
89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ | 89 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ |
90 | 90 | ||
91 | #ifdef __KERNEL__ | ||
92 | |||
91 | /* | 93 | /* |
92 | * Compute the worst case header length according to the protocols | 94 | * Compute the worst case header length according to the protocols |
93 | * used. | 95 | * used. |
@@ -114,6 +116,8 @@ struct wireless_dev; | |||
114 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 116 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
115 | #endif | 117 | #endif |
116 | 118 | ||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
117 | struct net_device_subqueue | 121 | struct net_device_subqueue |
118 | { | 122 | { |
119 | /* Give a control state for each queue. This struct may contain | 123 | /* Give a control state for each queue. This struct may contain |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 06d3e6eb9ca8..917707e6151d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -66,8 +66,7 @@ struct thermal_cooling_device { | |||
66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | 66 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) |
67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | 67 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) |
68 | 68 | ||
69 | #if defined(CONFIG_HWMON) || \ | 69 | #if defined(CONFIG_THERMAL_HWMON) |
70 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
71 | /* thermal zone devices with the same type share one hwmon device */ | 70 | /* thermal zone devices with the same type share one hwmon device */ |
72 | struct thermal_hwmon_device { | 71 | struct thermal_hwmon_device { |
73 | char type[THERMAL_NAME_LENGTH]; | 72 | char type[THERMAL_NAME_LENGTH]; |
@@ -94,8 +93,7 @@ struct thermal_zone_device { | |||
94 | struct idr idr; | 93 | struct idr idr; |
95 | struct mutex lock; /* protect cooling devices list */ | 94 | struct mutex lock; /* protect cooling devices list */ |
96 | struct list_head node; | 95 | struct list_head node; |
97 | #if defined(CONFIG_HWMON) || \ | 96 | #if defined(CONFIG_THERMAL_HWMON) |
98 | (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) | ||
99 | struct list_head hwmon_node; | 97 | struct list_head hwmon_node; |
100 | struct thermal_hwmon_device *hwmon; | 98 | struct thermal_hwmon_device *hwmon; |
101 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ | 99 | struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 59f1c0bd8f9c..d2a003586761 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -27,8 +27,7 @@ | |||
27 | * This routine is called by the kernel to write a series of | 27 | * This routine is called by the kernel to write a series of |
28 | * characters to the tty device. The characters may come from | 28 | * characters to the tty device. The characters may come from |
29 | * user space or kernel space. This routine will return the | 29 | * user space or kernel space. This routine will return the |
30 | * number of characters actually accepted for writing. This | 30 | * number of characters actually accepted for writing. |
31 | * routine is mandatory. | ||
32 | * | 31 | * |
33 | * Optional: Required for writable devices. | 32 | * Optional: Required for writable devices. |
34 | * | 33 | * |
@@ -134,7 +133,7 @@ | |||
134 | * This routine notifies the tty driver that it should hangup the | 133 | * This routine notifies the tty driver that it should hangup the |
135 | * tty device. | 134 | * tty device. |
136 | * | 135 | * |
137 | * Required: | 136 | * Optional: |
138 | * | 137 | * |
139 | * void (*break_ctl)(struct tty_stuct *tty, int state); | 138 | * void (*break_ctl)(struct tty_stuct *tty, int state); |
140 | * | 139 | * |
diff --git a/include/media/cx25840.h b/include/media/cx25840.h index cd599ad29fb2..db431d513f2f 100644 --- a/include/media/cx25840.h +++ b/include/media/cx25840.h | |||
@@ -32,12 +32,16 @@ enum cx25840_video_input { | |||
32 | CX25840_COMPOSITE7, | 32 | CX25840_COMPOSITE7, |
33 | CX25840_COMPOSITE8, | 33 | CX25840_COMPOSITE8, |
34 | 34 | ||
35 | /* S-Video inputs consist of one luma input (In1-In4) ORed with one | 35 | /* S-Video inputs consist of one luma input (In1-In8) ORed with one |
36 | chroma input (In5-In8) */ | 36 | chroma input (In5-In8) */ |
37 | CX25840_SVIDEO_LUMA1 = 0x10, | 37 | CX25840_SVIDEO_LUMA1 = 0x10, |
38 | CX25840_SVIDEO_LUMA2 = 0x20, | 38 | CX25840_SVIDEO_LUMA2 = 0x20, |
39 | CX25840_SVIDEO_LUMA3 = 0x30, | 39 | CX25840_SVIDEO_LUMA3 = 0x30, |
40 | CX25840_SVIDEO_LUMA4 = 0x40, | 40 | CX25840_SVIDEO_LUMA4 = 0x40, |
41 | CX25840_SVIDEO_LUMA5 = 0x50, | ||
42 | CX25840_SVIDEO_LUMA6 = 0x60, | ||
43 | CX25840_SVIDEO_LUMA7 = 0x70, | ||
44 | CX25840_SVIDEO_LUMA8 = 0x80, | ||
41 | CX25840_SVIDEO_CHROMA4 = 0x400, | 45 | CX25840_SVIDEO_CHROMA4 = 0x400, |
42 | CX25840_SVIDEO_CHROMA5 = 0x500, | 46 | CX25840_SVIDEO_CHROMA5 = 0x500, |
43 | CX25840_SVIDEO_CHROMA6 = 0x600, | 47 | CX25840_SVIDEO_CHROMA6 = 0x600, |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index bfee8be5d63f..b8e8aa91905a 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; | |||
146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; | 146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; |
147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; | 147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; |
148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; | 148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; |
149 | extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE]; | ||
149 | 150 | ||
150 | #endif | 151 | #endif |
151 | 152 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 33f01ae08f76..859f7a6f6f67 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -40,9 +40,9 @@ | |||
40 | #define VFL_TYPE_VTX 3 | 40 | #define VFL_TYPE_VTX 3 |
41 | 41 | ||
42 | /* Video standard functions */ | 42 | /* Video standard functions */ |
43 | extern char *v4l2_norm_to_name(v4l2_std_id id); | 43 | extern const char *v4l2_norm_to_name(v4l2_std_id id); |
44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
45 | int id, char *name); | 45 | int id, const char *name); |
46 | /* Prints the ioctl in a human-readable format */ | 46 | /* Prints the ioctl in a human-readable format */ |
47 | extern void v4l_printk_ioctl(unsigned int cmd); | 47 | extern void v4l_printk_ioctl(unsigned int cmd); |
48 | 48 | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index e0a612bc9c4e..f422f7218e1c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a) | |||
367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); | 367 | a->s6_addr32[2] | a->s6_addr32[3] ) == 0); |
368 | } | 368 | } |
369 | 369 | ||
370 | static inline int ipv6_addr_loopback(const struct in6_addr *a) | ||
371 | { | ||
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | ||
373 | a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0); | ||
374 | } | ||
375 | |||
370 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) | 376 | static inline int ipv6_addr_v4mapped(const struct in6_addr *a) |
371 | { | 377 | { |
372 | return ((a->s6_addr32[0] | a->s6_addr32[1] | | 378 | return ((a->s6_addr32[0] | a->s6_addr32[1] | |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index dae3f9ec1154..bcd1623245cb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -595,6 +595,15 @@ enum ieee80211_key_alg { | |||
595 | ALG_CCMP, | 595 | ALG_CCMP, |
596 | }; | 596 | }; |
597 | 597 | ||
598 | /** | ||
599 | * enum ieee80211_key_len - key length | ||
600 | * @WEP40: WEP 5 byte long key | ||
601 | * @WEP104: WEP 13 byte long key | ||
602 | */ | ||
603 | enum ieee80211_key_len { | ||
604 | LEN_WEP40 = 5, | ||
605 | LEN_WEP104 = 13, | ||
606 | }; | ||
598 | 607 | ||
599 | /** | 608 | /** |
600 | * enum ieee80211_key_flags - key flags | 609 | * enum ieee80211_key_flags - key flags |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index aa540e6be502..d9dd0f707296 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list; | |||
95 | #ifdef CONFIG_NET_NS | 95 | #ifdef CONFIG_NET_NS |
96 | extern void __put_net(struct net *net); | 96 | extern void __put_net(struct net *net); |
97 | 97 | ||
98 | static inline int net_alive(struct net *net) | ||
99 | { | ||
100 | return net && atomic_read(&net->count); | ||
101 | } | ||
102 | |||
98 | static inline struct net *get_net(struct net *net) | 103 | static inline struct net *get_net(struct net *net) |
99 | { | 104 | { |
100 | atomic_inc(&net->count); | 105 | atomic_inc(&net->count); |
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
125 | return net1 == net2; | 130 | return net1 == net2; |
126 | } | 131 | } |
127 | #else | 132 | #else |
133 | |||
134 | static inline int net_alive(struct net *net) | ||
135 | { | ||
136 | return 1; | ||
137 | } | ||
138 | |||
128 | static inline struct net *get_net(struct net *net) | 139 | static inline struct net *get_net(struct net *net) |
129 | { | 140 | { |
130 | return net; | 141 | return net; |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ab502ec1c61c..a87fc0312edc 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -178,7 +178,7 @@ extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | |||
178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | 178 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, |
179 | struct Qdisc_ops *ops, u32 parentid); | 179 | struct Qdisc_ops *ops, u32 parentid); |
180 | extern void tcf_destroy(struct tcf_proto *tp); | 180 | extern void tcf_destroy(struct tcf_proto *tp); |
181 | extern void tcf_destroy_chain(struct tcf_proto *fl); | 181 | extern void tcf_destroy_chain(struct tcf_proto **fl); |
182 | 182 | ||
183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 183 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
184 | struct sk_buff_head *list) | 184 | struct sk_buff_head *list) |
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index 9b018da48cf3..819a0331cda9 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define __XEN_PUBLIC_XEN_H__ | 10 | #define __XEN_PUBLIC_XEN_H__ |
11 | 11 | ||
12 | #include <asm/xen/interface.h> | 12 | #include <asm/xen/interface.h> |
13 | #include <asm/pvclock-abi.h> | ||
13 | 14 | ||
14 | /* | 15 | /* |
15 | * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). | 16 | * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). |
@@ -336,7 +337,7 @@ struct vcpu_info { | |||
336 | uint8_t evtchn_upcall_mask; | 337 | uint8_t evtchn_upcall_mask; |
337 | unsigned long evtchn_pending_sel; | 338 | unsigned long evtchn_pending_sel; |
338 | struct arch_vcpu_info arch; | 339 | struct arch_vcpu_info arch; |
339 | struct vcpu_time_info time; | 340 | struct pvclock_vcpu_time_info time; |
340 | }; /* 64 bytes (x86) */ | 341 | }; /* 64 bytes (x86) */ |
341 | 342 | ||
342 | /* | 343 | /* |
@@ -384,9 +385,7 @@ struct shared_info { | |||
384 | * Wallclock time: updated only by control software. Guests should base | 385 | * Wallclock time: updated only by control software. Guests should base |
385 | * their gettimeofday() syscall on this wallclock-base value. | 386 | * their gettimeofday() syscall on this wallclock-base value. |
386 | */ | 387 | */ |
387 | uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */ | 388 | struct pvclock_wall_clock wc; |
388 | uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */ | ||
389 | uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */ | ||
390 | 389 | ||
391 | struct arch_shared_info arch; | 390 | struct arch_shared_info arch; |
392 | 391 | ||