diff options
Diffstat (limited to 'include')
110 files changed, 2026 insertions, 585 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 8948a6461834..45662f6dbdb6 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -486,6 +486,8 @@ | |||
486 | #define ACPI_FUNCTION_NAME(name) | 486 | #define ACPI_FUNCTION_NAME(name) |
487 | #endif | 487 | #endif |
488 | 488 | ||
489 | #ifdef DEBUG_FUNC_TRACE | ||
490 | |||
489 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ | 491 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ |
490 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) | 492 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) |
491 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ | 493 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ |
@@ -563,6 +565,27 @@ | |||
563 | 565 | ||
564 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ | 566 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ |
565 | 567 | ||
568 | #else /* !DEBUG_FUNC_TRACE */ | ||
569 | |||
570 | #define ACPI_FUNCTION_TRACE(a) | ||
571 | #define ACPI_FUNCTION_TRACE_PTR(a,b) | ||
572 | #define ACPI_FUNCTION_TRACE_U32(a,b) | ||
573 | #define ACPI_FUNCTION_TRACE_STR(a,b) | ||
574 | #define ACPI_FUNCTION_EXIT | ||
575 | #define ACPI_FUNCTION_STATUS_EXIT(s) | ||
576 | #define ACPI_FUNCTION_VALUE_EXIT(s) | ||
577 | #define ACPI_FUNCTION_TRACE(a) | ||
578 | #define ACPI_FUNCTION_ENTRY() | ||
579 | |||
580 | #define return_VOID return | ||
581 | #define return_ACPI_STATUS(s) return(s) | ||
582 | #define return_VALUE(s) return(s) | ||
583 | #define return_UINT8(s) return(s) | ||
584 | #define return_UINT32(s) return(s) | ||
585 | #define return_PTR(s) return(s) | ||
586 | |||
587 | #endif /* DEBUG_FUNC_TRACE */ | ||
588 | |||
566 | /* Conditional execution */ | 589 | /* Conditional execution */ |
567 | 590 | ||
568 | #define ACPI_DEBUG_EXEC(a) a | 591 | #define ACPI_DEBUG_EXEC(a) a |
@@ -599,26 +622,26 @@ | |||
599 | #define ACPI_DEBUG_EXEC(a) | 622 | #define ACPI_DEBUG_EXEC(a) |
600 | #define ACPI_NORMAL_EXEC(a) a; | 623 | #define ACPI_NORMAL_EXEC(a) a; |
601 | 624 | ||
602 | #define ACPI_DEBUG_DEFINE(a) | 625 | #define ACPI_DEBUG_DEFINE(a) do { } while(0) |
603 | #define ACPI_DEBUG_ONLY_MEMBERS(a) | 626 | #define ACPI_DEBUG_ONLY_MEMBERS(a) do { } while(0) |
604 | #define ACPI_FUNCTION_NAME(a) | 627 | #define ACPI_FUNCTION_NAME(a) do { } while(0) |
605 | #define ACPI_FUNCTION_TRACE(a) | 628 | #define ACPI_FUNCTION_TRACE(a) do { } while(0) |
606 | #define ACPI_FUNCTION_TRACE_PTR(a,b) | 629 | #define ACPI_FUNCTION_TRACE_PTR(a,b) do { } while(0) |
607 | #define ACPI_FUNCTION_TRACE_U32(a,b) | 630 | #define ACPI_FUNCTION_TRACE_U32(a,b) do { } while(0) |
608 | #define ACPI_FUNCTION_TRACE_STR(a,b) | 631 | #define ACPI_FUNCTION_TRACE_STR(a,b) do { } while(0) |
609 | #define ACPI_FUNCTION_EXIT | 632 | #define ACPI_FUNCTION_EXIT do { } while(0) |
610 | #define ACPI_FUNCTION_STATUS_EXIT(s) | 633 | #define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0) |
611 | #define ACPI_FUNCTION_VALUE_EXIT(s) | 634 | #define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) |
612 | #define ACPI_FUNCTION_ENTRY() | 635 | #define ACPI_FUNCTION_ENTRY() do { } while(0) |
613 | #define ACPI_DUMP_STACK_ENTRY(a) | 636 | #define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) |
614 | #define ACPI_DUMP_OPERANDS(a,b,c,d,e) | 637 | #define ACPI_DUMP_OPERANDS(a,b,c,d,e) do { } while(0) |
615 | #define ACPI_DUMP_ENTRY(a,b) | 638 | #define ACPI_DUMP_ENTRY(a,b) do { } while(0) |
616 | #define ACPI_DUMP_TABLES(a,b) | 639 | #define ACPI_DUMP_TABLES(a,b) do { } while(0) |
617 | #define ACPI_DUMP_PATHNAME(a,b,c,d) | 640 | #define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0) |
618 | #define ACPI_DUMP_RESOURCE_LIST(a) | 641 | #define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0) |
619 | #define ACPI_DUMP_BUFFER(a,b) | 642 | #define ACPI_DUMP_BUFFER(a,b) do { } while(0) |
620 | #define ACPI_DEBUG_PRINT(pl) | 643 | #define ACPI_DEBUG_PRINT(pl) do { } while(0) |
621 | #define ACPI_DEBUG_PRINT_RAW(pl) | 644 | #define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0) |
622 | 645 | ||
623 | #define return_VOID return | 646 | #define return_VOID return |
624 | #define return_ACPI_STATUS(s) return(s) | 647 | #define return_ACPI_STATUS(s) return(s) |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 7812267b577f..c090a8b0bc99 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -178,8 +178,8 @@ | |||
178 | 178 | ||
179 | /* Defaults for debug_level, debug and normal */ | 179 | /* Defaults for debug_level, debug and normal */ |
180 | 180 | ||
181 | #define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT) | 181 | #define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) |
182 | #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT) | 182 | #define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR) |
183 | #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) | 183 | #define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL) |
184 | 184 | ||
185 | #endif /* __ACOUTPUT_H__ */ | 185 | #endif /* __ACOUTPUT_H__ */ |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 529d03554c7a..a9f73efa01bc 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -321,7 +321,8 @@ struct acpi_bus_event { | |||
321 | }; | 321 | }; |
322 | 322 | ||
323 | extern struct kset acpi_subsys; | 323 | extern struct kset acpi_subsys; |
324 | 324 | extern int acpi_bus_generate_genetlink_event(struct acpi_device *device, | |
325 | u8 type, int data); | ||
325 | /* | 326 | /* |
326 | * External Functions | 327 | * External Functions |
327 | */ | 328 | */ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 553515912c0b..07b5d76b92cc 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -142,10 +142,6 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
142 | /*-------------------------------------------------------------------------- | 142 | /*-------------------------------------------------------------------------- |
143 | Suspend/Resume | 143 | Suspend/Resume |
144 | -------------------------------------------------------------------------- */ | 144 | -------------------------------------------------------------------------- */ |
145 | #ifdef CONFIG_ACPI_SLEEP | ||
146 | extern int acpi_sleep_init(void); | 145 | extern int acpi_sleep_init(void); |
147 | #else | ||
148 | #define acpi_sleep_init() do {} while (0) | ||
149 | #endif | ||
150 | 146 | ||
151 | #endif /*__ACPI_DRIVERS_H__*/ | 147 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index dab2ec59a3b0..c785485e62a6 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -136,7 +136,7 @@ | |||
136 | 136 | ||
137 | /*! [Begin] no source code translation */ | 137 | /*! [Begin] no source code translation */ |
138 | 138 | ||
139 | #if defined(__linux__) | 139 | #if defined(_LINUX) || defined(__linux__) |
140 | #include "aclinux.h" | 140 | #include "aclinux.h" |
141 | 141 | ||
142 | #elif defined(_AED_EFI) | 142 | #elif defined(_AED_EFI) |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index a568717f98c6..6ed15a0978eb 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -91,7 +91,10 @@ | |||
91 | #define ACPI_USE_NATIVE_DIVIDE | 91 | #define ACPI_USE_NATIVE_DIVIDE |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #ifndef __cdecl | ||
94 | #define __cdecl | 95 | #define __cdecl |
96 | #endif | ||
97 | |||
95 | #define ACPI_FLUSH_CPU_CACHE() | 98 | #define ACPI_FLUSH_CPU_CACHE() |
96 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
97 | 100 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index b4b0ffdab098..f9f987f8e661 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ | 21 | #define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ |
22 | #define ACPI_PSD_REV0_ENTRIES 5 | 22 | #define ACPI_PSD_REV0_ENTRIES 5 |
23 | 23 | ||
24 | #define ACPI_TSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ | ||
25 | #define ACPI_TSD_REV0_ENTRIES 5 | ||
24 | /* | 26 | /* |
25 | * Types of coordination defined in ACPI 3.0. Same macros can be used across | 27 | * Types of coordination defined in ACPI 3.0. Same macros can be used across |
26 | * P, C and T states | 28 | * P, C and T states |
@@ -125,17 +127,53 @@ struct acpi_processor_performance { | |||
125 | 127 | ||
126 | /* Throttling Control */ | 128 | /* Throttling Control */ |
127 | 129 | ||
130 | struct acpi_tsd_package { | ||
131 | acpi_integer num_entries; | ||
132 | acpi_integer revision; | ||
133 | acpi_integer domain; | ||
134 | acpi_integer coord_type; | ||
135 | acpi_integer num_processors; | ||
136 | } __attribute__ ((packed)); | ||
137 | |||
138 | struct acpi_ptc_register { | ||
139 | u8 descriptor; | ||
140 | u16 length; | ||
141 | u8 space_id; | ||
142 | u8 bit_width; | ||
143 | u8 bit_offset; | ||
144 | u8 reserved; | ||
145 | u64 address; | ||
146 | } __attribute__ ((packed)); | ||
147 | |||
148 | struct acpi_processor_tx_tss { | ||
149 | acpi_integer freqpercentage; /* */ | ||
150 | acpi_integer power; /* milliWatts */ | ||
151 | acpi_integer transition_latency; /* microseconds */ | ||
152 | acpi_integer control; /* control value */ | ||
153 | acpi_integer status; /* success indicator */ | ||
154 | }; | ||
128 | struct acpi_processor_tx { | 155 | struct acpi_processor_tx { |
129 | u16 power; | 156 | u16 power; |
130 | u16 performance; | 157 | u16 performance; |
131 | }; | 158 | }; |
132 | 159 | ||
160 | struct acpi_processor; | ||
133 | struct acpi_processor_throttling { | 161 | struct acpi_processor_throttling { |
134 | int state; | 162 | unsigned int state; |
163 | unsigned int platform_limit; | ||
164 | struct acpi_pct_register control_register; | ||
165 | struct acpi_pct_register status_register; | ||
166 | unsigned int state_count; | ||
167 | struct acpi_processor_tx_tss *states_tss; | ||
168 | struct acpi_tsd_package domain_info; | ||
169 | cpumask_t shared_cpu_map; | ||
170 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); | ||
171 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, | ||
172 | int state); | ||
173 | |||
135 | u32 address; | 174 | u32 address; |
136 | u8 duty_offset; | 175 | u8 duty_offset; |
137 | u8 duty_width; | 176 | u8 duty_width; |
138 | int state_count; | ||
139 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; | 177 | struct acpi_processor_tx states[ACPI_PROCESSOR_MAX_THROTTLING]; |
140 | }; | 178 | }; |
141 | 179 | ||
@@ -169,6 +207,9 @@ struct acpi_processor { | |||
169 | u32 id; | 207 | u32 id; |
170 | u32 pblk; | 208 | u32 pblk; |
171 | int performance_platform_limit; | 209 | int performance_platform_limit; |
210 | int throttling_platform_limit; | ||
211 | /* 0 - states 0..n-th state available */ | ||
212 | |||
172 | struct acpi_processor_flags flags; | 213 | struct acpi_processor_flags flags; |
173 | struct acpi_processor_power power; | 214 | struct acpi_processor_power power; |
174 | struct acpi_processor_performance *performance; | 215 | struct acpi_processor_performance *performance; |
@@ -270,7 +311,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
270 | 311 | ||
271 | /* in processor_throttling.c */ | 312 | /* in processor_throttling.c */ |
272 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 313 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
273 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 314 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
274 | extern struct file_operations acpi_processor_throttling_fops; | 315 | extern struct file_operations acpi_processor_throttling_fops; |
275 | 316 | ||
276 | /* in processor_idle.c */ | 317 | /* in processor_idle.c */ |
diff --git a/include/asm-alpha/irq.h b/include/asm-alpha/irq.h index 917b9fe372cf..06377400dc09 100644 --- a/include/asm-alpha/irq.h +++ b/include/asm-alpha/irq.h | |||
@@ -85,10 +85,6 @@ static __inline__ int irq_canonicalize(int irq) | |||
85 | return ((irq == 2) ? 9 : irq); | 85 | return ((irq == 2) ? 9 : irq); |
86 | } | 86 | } |
87 | 87 | ||
88 | extern void disable_irq(unsigned int); | ||
89 | extern void disable_irq_nosync(unsigned int); | ||
90 | extern void enable_irq(unsigned int); | ||
91 | |||
92 | struct pt_regs; | 88 | struct pt_regs; |
93 | extern void (*perf_irq)(unsigned long, struct pt_regs *); | 89 | extern void (*perf_irq)(unsigned long, struct pt_regs *); |
94 | 90 | ||
diff --git a/include/asm-arm/arch-at91/at91_mci.h b/include/asm-arm/arch-at91/at91_mci.h index 40a9876b661a..c2e11cc374ba 100644 --- a/include/asm-arm/arch-at91/at91_mci.h +++ b/include/asm-arm/arch-at91/at91_mci.h | |||
@@ -26,6 +26,9 @@ | |||
26 | #define AT91_MCI_MR 0x04 /* Mode Register */ | 26 | #define AT91_MCI_MR 0x04 /* Mode Register */ |
27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ | 27 | #define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */ |
28 | #define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */ | 28 | #define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */ |
29 | #define AT91_MCI_RDPROOF (1 << 11) /* Read Proof Enable [SAM926[03] only] */ | ||
30 | #define AT91_MCI_WRPROOF (1 << 12) /* Write Proof Enable [SAM926[03] only] */ | ||
31 | #define AT91_MCI_PDCFBYTE (1 << 13) /* PDC Force Byte Transfer [SAM926[03] only] */ | ||
29 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ | 32 | #define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */ |
30 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ | 33 | #define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */ |
31 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ | 34 | #define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */ |
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h index d4e4f828577c..52b7fab7ef60 100644 --- a/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -19,6 +19,39 @@ static inline int iop13xx_cpu_id(void) | |||
19 | return id; | 19 | return id; |
20 | } | 20 | } |
21 | 21 | ||
22 | /* WDTCR CP6 R7 Page 9 */ | ||
23 | static inline u32 read_wdtcr(void) | ||
24 | { | ||
25 | u32 val; | ||
26 | asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); | ||
27 | return val; | ||
28 | } | ||
29 | static inline void write_wdtcr(u32 val) | ||
30 | { | ||
31 | asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); | ||
32 | } | ||
33 | |||
34 | /* WDTSR CP6 R8 Page 9 */ | ||
35 | static inline u32 read_wdtsr(void) | ||
36 | { | ||
37 | u32 val; | ||
38 | asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); | ||
39 | return val; | ||
40 | } | ||
41 | static inline void write_wdtsr(u32 val) | ||
42 | { | ||
43 | asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); | ||
44 | } | ||
45 | |||
46 | /* RCSR - Reset Cause Status Register */ | ||
47 | static inline u32 read_rcsr(void) | ||
48 | { | ||
49 | u32 val; | ||
50 | asm volatile("mrc p6, 0, %0, c0, c1, 0":"=r" (val)); | ||
51 | return val; | ||
52 | } | ||
53 | |||
54 | extern unsigned long get_iop_tick_rate(void); | ||
22 | #endif | 55 | #endif |
23 | 56 | ||
24 | /* | 57 | /* |
@@ -480,4 +513,14 @@ static inline int iop13xx_cpu_id(void) | |||
480 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) | 513 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) |
481 | 514 | ||
482 | #define IOP13XX_PROCESSOR_FREQ IOP13XX_REG_ADDR32(0x2180) | 515 | #define IOP13XX_PROCESSOR_FREQ IOP13XX_REG_ADDR32(0x2180) |
516 | |||
517 | /* Watchdog timer definitions */ | ||
518 | #define IOP_WDTCR_EN_ARM 0x1e1e1e1e | ||
519 | #define IOP_WDTCR_EN 0xe1e1e1e1 | ||
520 | #define IOP_WDTCR_DIS_ARM 0x1f1f1f1f | ||
521 | #define IOP_WDTCR_DIS 0xf1f1f1f1 | ||
522 | #define IOP_RCSR_WDT (1 << 5) /* reset caused by watchdog timer */ | ||
523 | #define IOP13XX_WDTSR_WRITE_EN (1 << 31) /* used to speed up reset requests */ | ||
524 | #define IOP13XX_WDTCR_IB_RESET (1 << 0) | ||
525 | |||
483 | #endif /* _IOP13XX_HW_H_ */ | 526 | #endif /* _IOP13XX_HW_H_ */ |
diff --git a/include/asm-arm/arch-iop13xx/system.h b/include/asm-arm/arch-iop13xx/system.h index 127827058e1f..8575af8db78c 100644 --- a/include/asm-arm/arch-iop13xx/system.h +++ b/include/asm-arm/arch-iop13xx/system.h | |||
@@ -13,43 +13,13 @@ static inline void arch_idle(void) | |||
13 | cpu_do_idle(); | 13 | cpu_do_idle(); |
14 | } | 14 | } |
15 | 15 | ||
16 | /* WDTCR CP6 R7 Page 9 */ | ||
17 | static inline u32 read_wdtcr(void) | ||
18 | { | ||
19 | u32 val; | ||
20 | asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); | ||
21 | return val; | ||
22 | } | ||
23 | static inline void write_wdtcr(u32 val) | ||
24 | { | ||
25 | asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); | ||
26 | } | ||
27 | |||
28 | /* WDTSR CP6 R8 Page 9 */ | ||
29 | static inline u32 read_wdtsr(void) | ||
30 | { | ||
31 | u32 val; | ||
32 | asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); | ||
33 | return val; | ||
34 | } | ||
35 | static inline void write_wdtsr(u32 val) | ||
36 | { | ||
37 | asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); | ||
38 | } | ||
39 | |||
40 | #define IOP13XX_WDTCR_EN_ARM 0x1e1e1e1e | ||
41 | #define IOP13XX_WDTCR_EN 0xe1e1e1e1 | ||
42 | #define IOP13XX_WDTCR_DIS_ARM 0x1f1f1f1f | ||
43 | #define IOP13XX_WDTCR_DIS 0xf1f1f1f1 | ||
44 | #define IOP13XX_WDTSR_WRITE_EN (1 << 31) | ||
45 | #define IOP13XX_WDTCR_IB_RESET (1 << 0) | ||
46 | static inline void arch_reset(char mode) | 16 | static inline void arch_reset(char mode) |
47 | { | 17 | { |
48 | /* | 18 | /* |
49 | * Reset the internal bus (warning both cores are reset) | 19 | * Reset the internal bus (warning both cores are reset) |
50 | */ | 20 | */ |
51 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); | 21 | write_wdtcr(IOP_WDTCR_EN_ARM); |
52 | write_wdtcr(IOP13XX_WDTCR_EN); | 22 | write_wdtcr(IOP_WDTCR_EN); |
53 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); | 23 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); |
54 | write_wdtcr(0x1000); | 24 | write_wdtcr(0x1000); |
55 | 25 | ||
diff --git a/include/asm-arm/arch-iop13xx/uncompress.h b/include/asm-arm/arch-iop13xx/uncompress.h index b9525d59b7ad..dd9c2934190e 100644 --- a/include/asm-arm/arch-iop13xx/uncompress.h +++ b/include/asm-arm/arch-iop13xx/uncompress.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <asm/types.h> | 1 | #include <asm/types.h> |
2 | #include <linux/serial_reg.h> | 2 | #include <linux/serial_reg.h> |
3 | #include <asm/hardware.h> | 3 | #include <asm/hardware.h> |
4 | #include <asm/processor.h> | ||
5 | 4 | ||
6 | #define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS) | 5 | #define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS) |
7 | #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) | 6 | #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) |
@@ -9,7 +8,7 @@ | |||
9 | static inline void putc(char c) | 8 | static inline void putc(char c) |
10 | { | 9 | { |
11 | while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE) | 10 | while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE) |
12 | cpu_relax(); | 11 | barrier(); |
13 | UART_BASE[UART_TX] = c; | 12 | UART_BASE[UART_TX] = c; |
14 | } | 13 | } |
15 | 14 | ||
diff --git a/include/asm-arm/arch-iop32x/uncompress.h b/include/asm-arm/arch-iop32x/uncompress.h index e64f52bf2bce..070f15818fe7 100644 --- a/include/asm-arm/arch-iop32x/uncompress.h +++ b/include/asm-arm/arch-iop32x/uncompress.h | |||
@@ -26,7 +26,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) | |||
26 | { | 26 | { |
27 | if (machine_is_iq80321()) | 27 | if (machine_is_iq80321()) |
28 | uart_base = (volatile u8 *)IQ80321_UART; | 28 | uart_base = (volatile u8 *)IQ80321_UART; |
29 | else if (machine_is_iq31244()) | 29 | else if (machine_is_iq31244() || machine_is_em7210()) |
30 | uart_base = (volatile u8 *)IQ31244_UART; | 30 | uart_base = (volatile u8 *)IQ31244_UART; |
31 | else | 31 | else |
32 | uart_base = (volatile u8 *)0xfe800000; | 32 | uart_base = (volatile u8 *)0xfe800000; |
diff --git a/include/asm-arm/arch-mxc/board-mx31ads.h b/include/asm-arm/arch-mxc/board-mx31ads.h new file mode 100644 index 000000000000..be29b83ad4ae --- /dev/null +++ b/include/asm-arm/arch-mxc/board-mx31ads.h | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31ADS_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__ | ||
13 | |||
14 | /*! | ||
15 | * @name PBC Controller parameters | ||
16 | */ | ||
17 | /*! @{ */ | ||
18 | /*! | ||
19 | * Base address of PBC controller | ||
20 | */ | ||
21 | #define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) | ||
22 | /* Offsets for the PBC Controller register */ | ||
23 | /*! | ||
24 | * PBC Board status register offset | ||
25 | */ | ||
26 | #define PBC_BSTAT 0x000002 | ||
27 | /*! | ||
28 | * PBC Board control register 1 set address. | ||
29 | */ | ||
30 | #define PBC_BCTRL1_SET 0x000004 | ||
31 | /*! | ||
32 | * PBC Board control register 1 clear address. | ||
33 | */ | ||
34 | #define PBC_BCTRL1_CLEAR 0x000006 | ||
35 | /*! | ||
36 | * PBC Board control register 2 set address. | ||
37 | */ | ||
38 | #define PBC_BCTRL2_SET 0x000008 | ||
39 | /*! | ||
40 | * PBC Board control register 2 clear address. | ||
41 | */ | ||
42 | #define PBC_BCTRL2_CLEAR 0x00000A | ||
43 | /*! | ||
44 | * PBC Board control register 3 set address. | ||
45 | */ | ||
46 | #define PBC_BCTRL3_SET 0x00000C | ||
47 | /*! | ||
48 | * PBC Board control register 3 clear address. | ||
49 | */ | ||
50 | #define PBC_BCTRL3_CLEAR 0x00000E | ||
51 | /*! | ||
52 | * PBC Board control register 4 set address. | ||
53 | */ | ||
54 | #define PBC_BCTRL4_SET 0x000010 | ||
55 | /*! | ||
56 | * PBC Board control register 4 clear address. | ||
57 | */ | ||
58 | #define PBC_BCTRL4_CLEAR 0x000012 | ||
59 | /*! | ||
60 | * PBC Board status register 1. | ||
61 | */ | ||
62 | #define PBC_BSTAT1 0x000014 | ||
63 | /*! | ||
64 | * PBC Board interrupt status register. | ||
65 | */ | ||
66 | #define PBC_INTSTATUS 0x000016 | ||
67 | /*! | ||
68 | * PBC Board interrupt current status register. | ||
69 | */ | ||
70 | #define PBC_INTCURR_STATUS 0x000018 | ||
71 | /*! | ||
72 | * PBC Interrupt mask register set address. | ||
73 | */ | ||
74 | #define PBC_INTMASK_SET 0x00001A | ||
75 | /*! | ||
76 | * PBC Interrupt mask register clear address. | ||
77 | */ | ||
78 | #define PBC_INTMASK_CLEAR 0x00001C | ||
79 | |||
80 | /*! | ||
81 | * External UART A. | ||
82 | */ | ||
83 | #define PBC_SC16C652_UARTA 0x010000 | ||
84 | /*! | ||
85 | * External UART B. | ||
86 | */ | ||
87 | #define PBC_SC16C652_UARTB 0x010010 | ||
88 | /*! | ||
89 | * Ethernet Controller IO base address. | ||
90 | */ | ||
91 | #define PBC_CS8900A_IOBASE 0x020000 | ||
92 | /*! | ||
93 | * Ethernet Controller Memory base address. | ||
94 | */ | ||
95 | #define PBC_CS8900A_MEMBASE 0x021000 | ||
96 | /*! | ||
97 | * Ethernet Controller DMA base address. | ||
98 | */ | ||
99 | #define PBC_CS8900A_DMABASE 0x022000 | ||
100 | /*! | ||
101 | * External chip select 0. | ||
102 | */ | ||
103 | #define PBC_XCS0 0x040000 | ||
104 | /*! | ||
105 | * LCD Display enable. | ||
106 | */ | ||
107 | #define PBC_LCD_EN_B 0x060000 | ||
108 | /*! | ||
109 | * Code test debug enable. | ||
110 | */ | ||
111 | #define PBC_CODE_B 0x070000 | ||
112 | /*! | ||
113 | * PSRAM memory select. | ||
114 | */ | ||
115 | #define PBC_PSRAM_B 0x5000000 | ||
116 | |||
117 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | ||
118 | #define PBC_INTCURR_STATUS_REG (PBC_INTCURR_STATUS + PBC_BASE_ADDRESS) | ||
119 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | ||
120 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | ||
121 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
122 | |||
123 | #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 0) | ||
124 | #define EXPIO_INT_PB_IRQ (MXC_EXP_IO_BASE + 1) | ||
125 | #define EXPIO_INT_OTG_FS_OVR (MXC_EXP_IO_BASE + 2) | ||
126 | #define EXPIO_INT_FSH_OVR (MXC_EXP_IO_BASE + 3) | ||
127 | #define EXPIO_INT_RES4 (MXC_EXP_IO_BASE + 4) | ||
128 | #define EXPIO_INT_RES5 (MXC_EXP_IO_BASE + 5) | ||
129 | #define EXPIO_INT_RES6 (MXC_EXP_IO_BASE + 6) | ||
130 | #define EXPIO_INT_RES7 (MXC_EXP_IO_BASE + 7) | ||
131 | #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) | ||
132 | #define EXPIO_INT_OTG_FS_INT (MXC_EXP_IO_BASE + 9) | ||
133 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
134 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | ||
135 | #define EXPIO_INT_SYNTH_IRQ (MXC_EXP_IO_BASE + 12) | ||
136 | #define EXPIO_INT_CE_INT1 (MXC_EXP_IO_BASE + 13) | ||
137 | #define EXPIO_INT_CE_INT2 (MXC_EXP_IO_BASE + 14) | ||
138 | #define EXPIO_INT_RES15 (MXC_EXP_IO_BASE + 15) | ||
139 | |||
140 | #define MXC_MAX_EXP_IO_LINES 16 | ||
141 | |||
142 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/common.h b/include/asm-arm/arch-mxc/common.h new file mode 100644 index 000000000000..23b4350edbd6 --- /dev/null +++ b/include/asm-arm/arch-mxc/common.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_COMMON_H__ | ||
12 | #define __ASM_ARCH_MXC_COMMON_H__ | ||
13 | |||
14 | struct sys_timer; | ||
15 | |||
16 | extern void mxc_map_io(void); | ||
17 | extern void mxc_init_irq(void); | ||
18 | extern struct sys_timer mxc_timer; | ||
19 | |||
20 | #endif | ||
diff --git a/include/asm-arm/arch-mxc/dma.h b/include/asm-arm/arch-mxc/dma.h new file mode 100644 index 000000000000..65e639d51d2b --- /dev/null +++ b/include/asm-arm/arch-mxc/dma.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_DMA_H__ | ||
12 | #define __ASM_ARCH_MXC_DMA_H__ | ||
13 | |||
14 | /*! | ||
15 | * @file dma.h | ||
16 | * @brief This file contains Unified DMA API for all MXC platforms. | ||
17 | * The API is platform independent. | ||
18 | * | ||
19 | * @ingroup SDMA | ||
20 | */ | ||
21 | #endif | ||
diff --git a/include/asm-arm/arch-mxc/entry-macro.S b/include/asm-arm/arch-mxc/entry-macro.S new file mode 100644 index 000000000000..b542433afb1b --- /dev/null +++ b/include/asm-arm/arch-mxc/entry-macro.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | @ this macro disables fast irq (not implemented) | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
22 | @ this macro checks which interrupt occured | ||
23 | @ and returns its number in irqnr | ||
24 | @ and returns if an interrupt occured in irqstat | ||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
26 | ldr \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR) | ||
27 | @ Load offset & priority of the highest priority | ||
28 | @ interrupt pending from AVIC_NIVECSR | ||
29 | ldr \irqstat, [\base, #0x40] | ||
30 | @ Shift to get the decoded IRQ number, using ASR so | ||
31 | @ 'no interrupt pending' becomes 0xffffffff | ||
32 | mov \irqnr, \irqstat, asr #16 | ||
33 | @ set zero flag if IRQ + 1 == 0 | ||
34 | adds \tmp, \irqnr, #1 | ||
35 | .endm | ||
36 | |||
37 | @ irq priority table (not used) | ||
38 | .macro irq_prio_table | ||
39 | .endm | ||
diff --git a/include/asm-arm/arch-mxc/hardware.h b/include/asm-arm/arch-mxc/hardware.h new file mode 100644 index 000000000000..3c09b92fef0d --- /dev/null +++ b/include/asm-arm/arch-mxc/hardware.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | /*! | ||
12 | * @file hardware.h | ||
13 | * @brief This file contains the hardware definitions of the board. | ||
14 | * | ||
15 | * @ingroup System | ||
16 | */ | ||
17 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
18 | #define __ASM_ARCH_MXC_HARDWARE_H__ | ||
19 | |||
20 | #include <asm/sizes.h> | ||
21 | |||
22 | #include <asm/arch/mx31.h> | ||
23 | |||
24 | #include <asm/arch/mxc.h> | ||
25 | |||
26 | #define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM) | ||
27 | |||
28 | /* | ||
29 | * --------------------------------------------------------------------------- | ||
30 | * Board specific defines | ||
31 | * --------------------------------------------------------------------------- | ||
32 | */ | ||
33 | #define MXC_EXP_IO_BASE (MXC_GPIO_INT_BASE + MXC_MAX_GPIO_LINES) | ||
34 | |||
35 | #include <asm/arch/board-mx31ads.h> | ||
36 | |||
37 | #ifndef MXC_MAX_EXP_IO_LINES | ||
38 | #define MXC_MAX_EXP_IO_LINES 0 | ||
39 | #endif | ||
40 | |||
41 | #define MXC_MAX_VIRTUAL_INTS 16 | ||
42 | #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) | ||
43 | #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE | ||
44 | #define MXC_SDIO2_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 1) | ||
45 | #define MXC_SDIO3_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 2) | ||
46 | |||
47 | #define MXC_MAX_INTS (MXC_MAX_INT_LINES + \ | ||
48 | MXC_MAX_GPIO_LINES + \ | ||
49 | MXC_MAX_EXP_IO_LINES + \ | ||
50 | MXC_MAX_VIRTUAL_INTS) | ||
51 | |||
52 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/io.h b/include/asm-arm/arch-mxc/io.h new file mode 100644 index 000000000000..cf6c83a4b9f7 --- /dev/null +++ b/include/asm-arm/arch-mxc/io.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | /*! | ||
12 | * @file io.h | ||
13 | * @brief This file contains some memory mapping macros. | ||
14 | * @note There is no real ISA or PCI buses. But have to define these macros | ||
15 | * for some drivers to compile. | ||
16 | * | ||
17 | * @ingroup System | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_IO_H__ | ||
21 | #define __ASM_ARCH_MXC_IO_H__ | ||
22 | |||
23 | /*! Allow IO space to be anywhere in the memory */ | ||
24 | #define IO_SPACE_LIMIT 0xffffffff | ||
25 | |||
26 | /*! | ||
27 | * io address mapping macro | ||
28 | */ | ||
29 | #define __io(a) ((void __iomem *)(a)) | ||
30 | |||
31 | #define __mem_pci(a) (a) | ||
32 | |||
33 | #endif | ||
diff --git a/include/asm-arm/arch-mxc/irqs.h b/include/asm-arm/arch-mxc/irqs.h new file mode 100644 index 000000000000..e4686c6bc4bf --- /dev/null +++ b/include/asm-arm/arch-mxc/irqs.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_IRQS_H__ | ||
12 | #define __ASM_ARCH_MXC_IRQS_H__ | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /*! | ||
17 | * @file irqs.h | ||
18 | * @brief This file defines the number of normal interrupts and fast interrupts | ||
19 | * | ||
20 | * @ingroup Interrupt | ||
21 | */ | ||
22 | |||
23 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
24 | |||
25 | #define MXC_IRQ_TO_GPIO(irq) ((irq) - MXC_GPIO_INT_BASE) | ||
26 | #define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x) | ||
27 | |||
28 | /*! | ||
29 | * Number of normal interrupts | ||
30 | */ | ||
31 | #define NR_IRQS MXC_MAX_INTS | ||
32 | |||
33 | /*! | ||
34 | * Number of fast interrupts | ||
35 | */ | ||
36 | #define NR_FIQS MXC_MAX_INTS | ||
37 | |||
38 | #endif /* __ASM_ARCH_MXC_IRQS_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/memory.h b/include/asm-arm/arch-mxc/memory.h new file mode 100644 index 000000000000..c89aac83a407 --- /dev/null +++ b/include/asm-arm/arch-mxc/memory.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ | ||
12 | #define __ASM_ARCH_MXC_MEMORY_H__ | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /*! | ||
17 | * @file memory.h | ||
18 | * @brief This file contains macros needed by the Linux kernel and drivers. | ||
19 | * | ||
20 | * @ingroup Memory | ||
21 | */ | ||
22 | |||
23 | /*! | ||
24 | * Virtual view <-> DMA view memory address translations | ||
25 | * This macro is used to translate the virtual address to an address | ||
26 | * suitable to be passed to set_dma_addr() | ||
27 | */ | ||
28 | #define __virt_to_bus(a) __virt_to_phys(a) | ||
29 | |||
30 | /*! | ||
31 | * Used to convert an address for DMA operations to an address that the | ||
32 | * kernel can use. | ||
33 | */ | ||
34 | #define __bus_to_virt(a) __phys_to_virt(a) | ||
35 | |||
36 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/mx31.h b/include/asm-arm/arch-mxc/mx31.h new file mode 100644 index 000000000000..85c49c9e5d15 --- /dev/null +++ b/include/asm-arm/arch-mxc/mx31.h | |||
@@ -0,0 +1,335 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_MX31_H__ | ||
12 | #define __ASM_ARCH_MXC_MX31_H__ | ||
13 | |||
14 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
15 | #error "Do not include directly." | ||
16 | #endif | ||
17 | |||
18 | /*! | ||
19 | * defines the hardware clock tick rate | ||
20 | */ | ||
21 | #define CLOCK_TICK_RATE 16625000 | ||
22 | |||
23 | /* | ||
24 | * MX31 memory map: | ||
25 | * | ||
26 | * Virt Phys Size What | ||
27 | * --------------------------------------------------------------------------- | ||
28 | * F8000000 1FFC0000 16K IRAM | ||
29 | * F9000000 30000000 256M L2CC | ||
30 | * FC000000 43F00000 1M AIPS 1 | ||
31 | * FC100000 50000000 1M SPBA | ||
32 | * FC200000 53F00000 1M AIPS 2 | ||
33 | * FC500000 60000000 128M ROMPATCH | ||
34 | * FC400000 68000000 128M AVIC | ||
35 | * 70000000 256M IPU (MAX M2) | ||
36 | * 80000000 256M CSD0 SDRAM/DDR | ||
37 | * 90000000 256M CSD1 SDRAM/DDR | ||
38 | * A0000000 128M CS0 Flash | ||
39 | * A8000000 128M CS1 Flash | ||
40 | * B0000000 32M CS2 | ||
41 | * B2000000 32M CS3 | ||
42 | * F4000000 B4000000 32M CS4 | ||
43 | * B6000000 32M CS5 | ||
44 | * FC320000 B8000000 64K NAND, SDRAM, WEIM, M3IF, EMI controllers | ||
45 | * C0000000 64M PCMCIA/CF | ||
46 | */ | ||
47 | |||
48 | #define CS0_BASE_ADDR 0xA0000000 | ||
49 | #define CS1_BASE_ADDR 0xA8000000 | ||
50 | #define CS2_BASE_ADDR 0xB0000000 | ||
51 | #define CS3_BASE_ADDR 0xB2000000 | ||
52 | |||
53 | #define CS4_BASE_ADDR 0xB4000000 | ||
54 | #define CS4_BASE_ADDR_VIRT 0xF4000000 | ||
55 | #define CS4_SIZE SZ_32M | ||
56 | |||
57 | #define CS5_BASE_ADDR 0xB6000000 | ||
58 | #define PCMCIA_MEM_BASE_ADDR 0xBC000000 | ||
59 | |||
60 | /* | ||
61 | * IRAM | ||
62 | */ | ||
63 | #define IRAM_BASE_ADDR 0x1FFC0000 /* internal ram */ | ||
64 | #define IRAM_BASE_ADDR_VIRT 0xF8000000 | ||
65 | #define IRAM_SIZE SZ_16K | ||
66 | |||
67 | /* | ||
68 | * L2CC | ||
69 | */ | ||
70 | #define L2CC_BASE_ADDR 0x30000000 | ||
71 | #define L2CC_BASE_ADDR_VIRT 0xF9000000 | ||
72 | #define L2CC_SIZE SZ_1M | ||
73 | |||
74 | /* | ||
75 | * AIPS 1 | ||
76 | */ | ||
77 | #define AIPS1_BASE_ADDR 0x43F00000 | ||
78 | #define AIPS1_BASE_ADDR_VIRT 0xFC000000 | ||
79 | #define AIPS1_SIZE SZ_1M | ||
80 | |||
81 | #define MAX_BASE_ADDR (AIPS1_BASE_ADDR + 0x00004000) | ||
82 | #define EVTMON_BASE_ADDR (AIPS1_BASE_ADDR + 0x00008000) | ||
83 | #define CLKCTL_BASE_ADDR (AIPS1_BASE_ADDR + 0x0000C000) | ||
84 | #define ETB_SLOT4_BASE_ADDR (AIPS1_BASE_ADDR + 0x00010000) | ||
85 | #define ETB_SLOT5_BASE_ADDR (AIPS1_BASE_ADDR + 0x00014000) | ||
86 | #define ECT_CTIO_BASE_ADDR (AIPS1_BASE_ADDR + 0x00018000) | ||
87 | #define I2C_BASE_ADDR (AIPS1_BASE_ADDR + 0x00080000) | ||
88 | #define I2C3_BASE_ADDR (AIPS1_BASE_ADDR + 0x00084000) | ||
89 | #define OTG_BASE_ADDR (AIPS1_BASE_ADDR + 0x00088000) | ||
90 | #define ATA_BASE_ADDR (AIPS1_BASE_ADDR + 0x0008C000) | ||
91 | #define UART1_BASE_ADDR (AIPS1_BASE_ADDR + 0x00090000) | ||
92 | #define UART2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00094000) | ||
93 | #define I2C2_BASE_ADDR (AIPS1_BASE_ADDR + 0x00098000) | ||
94 | #define OWIRE_BASE_ADDR (AIPS1_BASE_ADDR + 0x0009C000) | ||
95 | #define SSI1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A0000) | ||
96 | #define CSPI1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A4000) | ||
97 | #define KPP_BASE_ADDR (AIPS1_BASE_ADDR + 0x000A8000) | ||
98 | #define IOMUXC_BASE_ADDR (AIPS1_BASE_ADDR + 0x000AC000) | ||
99 | #define UART4_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B0000) | ||
100 | #define UART5_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B4000) | ||
101 | #define ECT_IP1_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B8000) | ||
102 | #define ECT_IP2_BASE_ADDR (AIPS1_BASE_ADDR + 0x000BC000) | ||
103 | |||
104 | /* | ||
105 | * SPBA global module enabled #0 | ||
106 | */ | ||
107 | #define SPBA0_BASE_ADDR 0x50000000 | ||
108 | #define SPBA0_BASE_ADDR_VIRT 0xFC100000 | ||
109 | #define SPBA0_SIZE SZ_1M | ||
110 | |||
111 | #define MMC_SDHC1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00004000) | ||
112 | #define MMC_SDHC2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00008000) | ||
113 | #define UART3_BASE_ADDR (SPBA0_BASE_ADDR + 0x0000C000) | ||
114 | #define CSPI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00010000) | ||
115 | #define SSI2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00014000) | ||
116 | #define SIM1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00018000) | ||
117 | #define IIM_BASE_ADDR (SPBA0_BASE_ADDR + 0x0001C000) | ||
118 | #define ATA_DMA_BASE_ADDR (SPBA0_BASE_ADDR + 0x00020000) | ||
119 | #define MSHC1_BASE_ADDR (SPBA0_BASE_ADDR + 0x00024000) | ||
120 | #define MSHC2_BASE_ADDR (SPBA0_BASE_ADDR + 0x00024000) | ||
121 | #define SPBA_CTRL_BASE_ADDR (SPBA0_BASE_ADDR + 0x0003C000) | ||
122 | |||
123 | /* | ||
124 | * AIPS 2 | ||
125 | */ | ||
126 | #define AIPS2_BASE_ADDR 0x53F00000 | ||
127 | #define AIPS2_BASE_ADDR_VIRT 0xFC200000 | ||
128 | #define AIPS2_SIZE SZ_1M | ||
129 | #define CCM_BASE_ADDR (AIPS2_BASE_ADDR + 0x00080000) | ||
130 | #define CSPI3_BASE_ADDR (AIPS2_BASE_ADDR + 0x00084000) | ||
131 | #define FIRI_BASE_ADDR (AIPS2_BASE_ADDR + 0x0008C000) | ||
132 | #define GPT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00090000) | ||
133 | #define EPIT1_BASE_ADDR (AIPS2_BASE_ADDR + 0x00094000) | ||
134 | #define EPIT2_BASE_ADDR (AIPS2_BASE_ADDR + 0x00098000) | ||
135 | #define GPIO3_BASE_ADDR (AIPS2_BASE_ADDR + 0x000A4000) | ||
136 | #define SCC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AC000) | ||
137 | #define SCM_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AE000) | ||
138 | #define SMN_BASE_ADDR (AIPS2_BASE_ADDR + 0x000AF000) | ||
139 | #define RNGA_BASE_ADDR (AIPS2_BASE_ADDR + 0x000B0000) | ||
140 | #define IPU_CTRL_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C0000) | ||
141 | #define AUDMUX_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C4000) | ||
142 | #define MPEG4_ENC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000C8000) | ||
143 | #define GPIO1_BASE_ADDR (AIPS2_BASE_ADDR + 0x000CC000) | ||
144 | #define GPIO2_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D0000) | ||
145 | #define SDMA_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D4000) | ||
146 | #define RTC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000D8000) | ||
147 | #define WDOG_BASE_ADDR (AIPS2_BASE_ADDR + 0x000DC000) | ||
148 | #define PWM_BASE_ADDR (AIPS2_BASE_ADDR + 0x000E0000) | ||
149 | #define RTIC_BASE_ADDR (AIPS2_BASE_ADDR + 0x000EC000) | ||
150 | |||
151 | /* | ||
152 | * ROMP and AVIC | ||
153 | */ | ||
154 | #define ROMP_BASE_ADDR 0x60000000 | ||
155 | #define ROMP_BASE_ADDR_VIRT 0xFC500000 | ||
156 | #define ROMP_SIZE SZ_1M | ||
157 | |||
158 | #define AVIC_BASE_ADDR 0x68000000 | ||
159 | #define AVIC_BASE_ADDR_VIRT 0xFC400000 | ||
160 | #define AVIC_SIZE SZ_1M | ||
161 | |||
162 | /* | ||
163 | * NAND, SDRAM, WEIM, M3IF, EMI controllers | ||
164 | */ | ||
165 | #define X_MEMC_BASE_ADDR 0xB8000000 | ||
166 | #define X_MEMC_BASE_ADDR_VIRT 0xFC320000 | ||
167 | #define X_MEMC_SIZE SZ_64K | ||
168 | |||
169 | #define NFC_BASE_ADDR (X_MEMC_BASE_ADDR + 0x0000) | ||
170 | #define ESDCTL_BASE_ADDR (X_MEMC_BASE_ADDR + 0x1000) | ||
171 | #define WEIM_BASE_ADDR (X_MEMC_BASE_ADDR + 0x2000) | ||
172 | #define M3IF_BASE_ADDR (X_MEMC_BASE_ADDR + 0x3000) | ||
173 | #define EMI_CTL_BASE_ADDR (X_MEMC_BASE_ADDR + 0x4000) | ||
174 | #define PCMCIA_CTL_BASE_ADDR EMI_CTL_BASE_ADDR | ||
175 | |||
176 | /* | ||
177 | * Memory regions and CS | ||
178 | */ | ||
179 | #define IPU_MEM_BASE_ADDR 0x70000000 | ||
180 | #define CSD0_BASE_ADDR 0x80000000 | ||
181 | #define CSD1_BASE_ADDR 0x90000000 | ||
182 | #define CS0_BASE_ADDR 0xA0000000 | ||
183 | #define CS1_BASE_ADDR 0xA8000000 | ||
184 | #define CS2_BASE_ADDR 0xB0000000 | ||
185 | #define CS3_BASE_ADDR 0xB2000000 | ||
186 | |||
187 | #define CS4_BASE_ADDR 0xB4000000 | ||
188 | #define CS4_BASE_ADDR_VIRT 0xF4000000 | ||
189 | #define CS4_SIZE SZ_32M | ||
190 | |||
191 | #define CS5_BASE_ADDR 0xB6000000 | ||
192 | #define PCMCIA_MEM_BASE_ADDR 0xBC000000 | ||
193 | |||
194 | /*! | ||
195 | * This macro defines the physical to virtual address mapping for all the | ||
196 | * peripheral modules. It is used by passing in the physical address as x | ||
197 | * and returning the virtual address. If the physical address is not mapped, | ||
198 | * it returns 0xDEADBEEF | ||
199 | */ | ||
200 | #define IO_ADDRESS(x) \ | ||
201 | (((x >= IRAM_BASE_ADDR) && (x < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x):\ | ||
202 | ((x >= L2CC_BASE_ADDR) && (x < (L2CC_BASE_ADDR + L2CC_SIZE))) ? L2CC_IO_ADDRESS(x):\ | ||
203 | ((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\ | ||
204 | ((x >= SPBA0_BASE_ADDR) && (x < (SPBA0_BASE_ADDR + SPBA0_SIZE))) ? SPBA0_IO_ADDRESS(x):\ | ||
205 | ((x >= AIPS2_BASE_ADDR) && (x < (AIPS2_BASE_ADDR + AIPS2_SIZE))) ? AIPS2_IO_ADDRESS(x):\ | ||
206 | ((x >= ROMP_BASE_ADDR) && (x < (ROMP_BASE_ADDR + ROMP_SIZE))) ? ROMP_IO_ADDRESS(x):\ | ||
207 | ((x >= AVIC_BASE_ADDR) && (x < (AVIC_BASE_ADDR + AVIC_SIZE))) ? AVIC_IO_ADDRESS(x):\ | ||
208 | ((x >= CS4_BASE_ADDR) && (x < (CS4_BASE_ADDR + CS4_SIZE))) ? CS4_IO_ADDRESS(x):\ | ||
209 | ((x >= X_MEMC_BASE_ADDR) && (x < (X_MEMC_BASE_ADDR + X_MEMC_SIZE))) ? X_MEMC_IO_ADDRESS(x):\ | ||
210 | 0xDEADBEEF) | ||
211 | |||
212 | /* | ||
213 | * define the address mapping macros: in physical address order | ||
214 | */ | ||
215 | |||
216 | #define IRAM_IO_ADDRESS(x) \ | ||
217 | (((x) - IRAM_BASE_ADDR) + IRAM_BASE_ADDR_VIRT) | ||
218 | |||
219 | #define L2CC_IO_ADDRESS(x) \ | ||
220 | (((x) - L2CC_BASE_ADDR) + L2CC_BASE_ADDR_VIRT) | ||
221 | |||
222 | #define AIPS1_IO_ADDRESS(x) \ | ||
223 | (((x) - AIPS1_BASE_ADDR) + AIPS1_BASE_ADDR_VIRT) | ||
224 | |||
225 | #define SPBA0_IO_ADDRESS(x) \ | ||
226 | (((x) - SPBA0_BASE_ADDR) + SPBA0_BASE_ADDR_VIRT) | ||
227 | |||
228 | #define AIPS2_IO_ADDRESS(x) \ | ||
229 | (((x) - AIPS2_BASE_ADDR) + AIPS2_BASE_ADDR_VIRT) | ||
230 | |||
231 | #define ROMP_IO_ADDRESS(x) \ | ||
232 | (((x) - ROMP_BASE_ADDR) + ROMP_BASE_ADDR_VIRT) | ||
233 | |||
234 | #define AVIC_IO_ADDRESS(x) \ | ||
235 | (((x) - AVIC_BASE_ADDR) + AVIC_BASE_ADDR_VIRT) | ||
236 | |||
237 | #define CS4_IO_ADDRESS(x) \ | ||
238 | (((x) - CS4_BASE_ADDR) + CS4_BASE_ADDR_VIRT) | ||
239 | |||
240 | #define X_MEMC_IO_ADDRESS(x) \ | ||
241 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) | ||
242 | |||
243 | #define PCMCIA_IO_ADDRESS(x) \ | ||
244 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) | ||
245 | |||
246 | /* Start of physical RAM - On many MX31 platforms, this is the first SDRAM bank (CSD0) */ | ||
247 | #define PHYS_OFFSET CSD0_BASE_ADDR | ||
248 | |||
249 | /* | ||
250 | * Interrupt numbers | ||
251 | */ | ||
252 | #define MXC_INT_PEN_ADS7843 0 | ||
253 | #define MXC_INT_RESV1 1 | ||
254 | #define MXC_INT_CS8900A 2 | ||
255 | #define MXC_INT_I2C3 3 | ||
256 | #define MXC_INT_I2C2 4 | ||
257 | #define MXC_INT_MPEG4_ENCODER 5 | ||
258 | #define MXC_INT_RTIC 6 | ||
259 | #define MXC_INT_FIRI 7 | ||
260 | #define MXC_INT_MMC_SDHC2 8 | ||
261 | #define MXC_INT_MMC_SDHC1 9 | ||
262 | #define MXC_INT_I2C 10 | ||
263 | #define MXC_INT_SSI2 11 | ||
264 | #define MXC_INT_SSI1 12 | ||
265 | #define MXC_INT_CSPI2 13 | ||
266 | #define MXC_INT_CSPI1 14 | ||
267 | #define MXC_INT_ATA 15 | ||
268 | #define MXC_INT_MBX 16 | ||
269 | #define MXC_INT_CSPI3 17 | ||
270 | #define MXC_INT_UART3 18 | ||
271 | #define MXC_INT_IIM 19 | ||
272 | #define MXC_INT_SIM2 20 | ||
273 | #define MXC_INT_SIM1 21 | ||
274 | #define MXC_INT_RNGA 22 | ||
275 | #define MXC_INT_EVTMON 23 | ||
276 | #define MXC_INT_KPP 24 | ||
277 | #define MXC_INT_RTC 25 | ||
278 | #define MXC_INT_PWM 26 | ||
279 | #define MXC_INT_EPIT2 27 | ||
280 | #define MXC_INT_EPIT1 28 | ||
281 | #define MXC_INT_GPT 29 | ||
282 | #define MXC_INT_RESV30 30 | ||
283 | #define MXC_INT_RESV31 31 | ||
284 | #define MXC_INT_UART2 32 | ||
285 | #define MXC_INT_NANDFC 33 | ||
286 | #define MXC_INT_SDMA 34 | ||
287 | #define MXC_INT_USB1 35 | ||
288 | #define MXC_INT_USB2 36 | ||
289 | #define MXC_INT_USB3 37 | ||
290 | #define MXC_INT_USB4 38 | ||
291 | #define MXC_INT_MSHC1 39 | ||
292 | #define MXC_INT_MSHC2 40 | ||
293 | #define MXC_INT_IPU_ERR 41 | ||
294 | #define MXC_INT_IPU_SYN 42 | ||
295 | #define MXC_INT_RESV43 43 | ||
296 | #define MXC_INT_RESV44 44 | ||
297 | #define MXC_INT_UART1 45 | ||
298 | #define MXC_INT_UART4 46 | ||
299 | #define MXC_INT_UART5 47 | ||
300 | #define MXC_INT_ECT 48 | ||
301 | #define MXC_INT_SCC_SCM 49 | ||
302 | #define MXC_INT_SCC_SMN 50 | ||
303 | #define MXC_INT_GPIO2 51 | ||
304 | #define MXC_INT_GPIO1 52 | ||
305 | #define MXC_INT_CCM 53 | ||
306 | #define MXC_INT_PCMCIA 54 | ||
307 | #define MXC_INT_WDOG 55 | ||
308 | #define MXC_INT_GPIO3 56 | ||
309 | #define MXC_INT_RESV57 57 | ||
310 | #define MXC_INT_EXT_POWER 58 | ||
311 | #define MXC_INT_EXT_TEMPER 59 | ||
312 | #define MXC_INT_EXT_SENSOR60 60 | ||
313 | #define MXC_INT_EXT_SENSOR61 61 | ||
314 | #define MXC_INT_EXT_WDOG 62 | ||
315 | #define MXC_INT_EXT_TV 63 | ||
316 | |||
317 | #define MXC_MAX_INT_LINES 64 | ||
318 | |||
319 | #define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES | ||
320 | |||
321 | /*! | ||
322 | * Number of GPIO port as defined in the IC Spec | ||
323 | */ | ||
324 | #define GPIO_PORT_NUM 3 | ||
325 | /*! | ||
326 | * Number of GPIO pins per port | ||
327 | */ | ||
328 | #define GPIO_NUM_PIN 32 | ||
329 | |||
330 | #define PROD_SIGNATURE 0x1 /* For MX31 */ | ||
331 | |||
332 | #define SYSTEM_REV_MIN CHIP_REV_1_0 | ||
333 | #define SYSTEM_REV_NUM 3 | ||
334 | |||
335 | #endif /* __ASM_ARCH_MXC_MX31_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/mxc.h b/include/asm-arm/arch-mxc/mxc.h new file mode 100644 index 000000000000..0837f1f9ca31 --- /dev/null +++ b/include/asm-arm/arch-mxc/mxc.h | |||
@@ -0,0 +1,149 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | |||
11 | #ifndef __ASM_ARCH_MXC_H__ | ||
12 | #define __ASM_ARCH_MXC_H__ | ||
13 | |||
14 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
15 | #error "Do not include directly." | ||
16 | #endif | ||
17 | |||
18 | /* | ||
19 | ***************************************** | ||
20 | * GPT Register definitions * | ||
21 | ***************************************** | ||
22 | */ | ||
23 | #define MXC_GPT_GPTCR IO_ADDRESS(GPT1_BASE_ADDR + 0x00) | ||
24 | #define MXC_GPT_GPTPR IO_ADDRESS(GPT1_BASE_ADDR + 0x04) | ||
25 | #define MXC_GPT_GPTSR IO_ADDRESS(GPT1_BASE_ADDR + 0x08) | ||
26 | #define MXC_GPT_GPTIR IO_ADDRESS(GPT1_BASE_ADDR + 0x0C) | ||
27 | #define MXC_GPT_GPTOCR1 IO_ADDRESS(GPT1_BASE_ADDR + 0x10) | ||
28 | #define MXC_GPT_GPTOCR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x14) | ||
29 | #define MXC_GPT_GPTOCR3 IO_ADDRESS(GPT1_BASE_ADDR + 0x18) | ||
30 | #define MXC_GPT_GPTICR1 IO_ADDRESS(GPT1_BASE_ADDR + 0x1C) | ||
31 | #define MXC_GPT_GPTICR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x20) | ||
32 | #define MXC_GPT_GPTCNT IO_ADDRESS(GPT1_BASE_ADDR + 0x24) | ||
33 | |||
34 | /*! | ||
35 | * GPT Control register bit definitions | ||
36 | */ | ||
37 | #define GPTCR_FO3 (1 << 31) | ||
38 | #define GPTCR_FO2 (1 << 30) | ||
39 | #define GPTCR_FO1 (1 << 29) | ||
40 | |||
41 | #define GPTCR_OM3_SHIFT 26 | ||
42 | #define GPTCR_OM3_MASK (7 << GPTCR_OM3_SHIFT) | ||
43 | #define GPTCR_OM3_DISCONNECTED (0 << GPTCR_OM3_SHIFT) | ||
44 | #define GPTCR_OM3_TOGGLE (1 << GPTCR_OM3_SHIFT) | ||
45 | #define GPTCR_OM3_CLEAR (2 << GPTCR_OM3_SHIFT) | ||
46 | #define GPTCR_OM3_SET (3 << GPTCR_OM3_SHIFT) | ||
47 | #define GPTCR_OM3_GENERATE_LOW (7 << GPTCR_OM3_SHIFT) | ||
48 | |||
49 | #define GPTCR_OM2_SHIFT 23 | ||
50 | #define GPTCR_OM2_MASK (7 << GPTCR_OM2_SHIFT) | ||
51 | #define GPTCR_OM2_DISCONNECTED (0 << GPTCR_OM2_SHIFT) | ||
52 | #define GPTCR_OM2_TOGGLE (1 << GPTCR_OM2_SHIFT) | ||
53 | #define GPTCR_OM2_CLEAR (2 << GPTCR_OM2_SHIFT) | ||
54 | #define GPTCR_OM2_SET (3 << GPTCR_OM2_SHIFT) | ||
55 | #define GPTCR_OM2_GENERATE_LOW (7 << GPTCR_OM2_SHIFT) | ||
56 | |||
57 | #define GPTCR_OM1_SHIFT 20 | ||
58 | #define GPTCR_OM1_MASK (7 << GPTCR_OM1_SHIFT) | ||
59 | #define GPTCR_OM1_DISCONNECTED (0 << GPTCR_OM1_SHIFT) | ||
60 | #define GPTCR_OM1_TOGGLE (1 << GPTCR_OM1_SHIFT) | ||
61 | #define GPTCR_OM1_CLEAR (2 << GPTCR_OM1_SHIFT) | ||
62 | #define GPTCR_OM1_SET (3 << GPTCR_OM1_SHIFT) | ||
63 | #define GPTCR_OM1_GENERATE_LOW (7 << GPTCR_OM1_SHIFT) | ||
64 | |||
65 | #define GPTCR_IM2_SHIFT 18 | ||
66 | #define GPTCR_IM2_MASK (3 << GPTCR_IM2_SHIFT) | ||
67 | #define GPTCR_IM2_CAPTURE_DISABLE (0 << GPTCR_IM2_SHIFT) | ||
68 | #define GPTCR_IM2_CAPTURE_RISING (1 << GPTCR_IM2_SHIFT) | ||
69 | #define GPTCR_IM2_CAPTURE_FALLING (2 << GPTCR_IM2_SHIFT) | ||
70 | #define GPTCR_IM2_CAPTURE_BOTH (3 << GPTCR_IM2_SHIFT) | ||
71 | |||
72 | #define GPTCR_IM1_SHIFT 16 | ||
73 | #define GPTCR_IM1_MASK (3 << GPTCR_IM1_SHIFT) | ||
74 | #define GPTCR_IM1_CAPTURE_DISABLE (0 << GPTCR_IM1_SHIFT) | ||
75 | #define GPTCR_IM1_CAPTURE_RISING (1 << GPTCR_IM1_SHIFT) | ||
76 | #define GPTCR_IM1_CAPTURE_FALLING (2 << GPTCR_IM1_SHIFT) | ||
77 | #define GPTCR_IM1_CAPTURE_BOTH (3 << GPTCR_IM1_SHIFT) | ||
78 | |||
79 | #define GPTCR_SWR (1 << 15) | ||
80 | #define GPTCR_FRR (1 << 9) | ||
81 | |||
82 | #define GPTCR_CLKSRC_SHIFT 6 | ||
83 | #define GPTCR_CLKSRC_MASK (7 << GPTCR_CLKSRC_SHIFT) | ||
84 | #define GPTCR_CLKSRC_NOCLOCK (0 << GPTCR_CLKSRC_SHIFT) | ||
85 | #define GPTCR_CLKSRC_HIGHFREQ (2 << GPTCR_CLKSRC_SHIFT) | ||
86 | #define GPTCR_CLKSRC_CLKIN (3 << GPTCR_CLKSRC_SHIFT) | ||
87 | #define GPTCR_CLKSRC_CLK32K (7 << GPTCR_CLKSRC_SHIFT) | ||
88 | |||
89 | #define GPTCR_STOPEN (1 << 5) | ||
90 | #define GPTCR_DOZEN (1 << 4) | ||
91 | #define GPTCR_WAITEN (1 << 3) | ||
92 | #define GPTCR_DBGEN (1 << 2) | ||
93 | |||
94 | #define GPTCR_ENMOD (1 << 1) | ||
95 | #define GPTCR_ENABLE (1 << 0) | ||
96 | |||
97 | #define GPTSR_OF1 (1 << 0) | ||
98 | #define GPTSR_OF2 (1 << 1) | ||
99 | #define GPTSR_OF3 (1 << 2) | ||
100 | #define GPTSR_IF1 (1 << 3) | ||
101 | #define GPTSR_IF2 (1 << 4) | ||
102 | #define GPTSR_ROV (1 << 5) | ||
103 | |||
104 | #define GPTIR_OF1IE GPTSR_OF1 | ||
105 | #define GPTIR_OF2IE GPTSR_OF2 | ||
106 | #define GPTIR_OF3IE GPTSR_OF3 | ||
107 | #define GPTIR_IF1IE GPTSR_IF1 | ||
108 | #define GPTIR_IF2IE GPTSR_IF2 | ||
109 | #define GPTIR_ROVIE GPTSR_ROV | ||
110 | |||
111 | /* | ||
112 | ***************************************** | ||
113 | * AVIC Registers * | ||
114 | ***************************************** | ||
115 | */ | ||
116 | #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) | ||
117 | #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ | ||
118 | #define AVIC_NIMASK (AVIC_BASE + 0x04) /* int mask reg */ | ||
119 | #define AVIC_INTENNUM (AVIC_BASE + 0x08) /* int enable number reg */ | ||
120 | #define AVIC_INTDISNUM (AVIC_BASE + 0x0C) /* int disable number reg */ | ||
121 | #define AVIC_INTENABLEH (AVIC_BASE + 0x10) /* int enable reg high */ | ||
122 | #define AVIC_INTENABLEL (AVIC_BASE + 0x14) /* int enable reg low */ | ||
123 | #define AVIC_INTTYPEH (AVIC_BASE + 0x18) /* int type reg high */ | ||
124 | #define AVIC_INTTYPEL (AVIC_BASE + 0x1C) /* int type reg low */ | ||
125 | #define AVIC_NIPRIORITY7 (AVIC_BASE + 0x20) /* norm int priority lvl7 */ | ||
126 | #define AVIC_NIPRIORITY6 (AVIC_BASE + 0x24) /* norm int priority lvl6 */ | ||
127 | #define AVIC_NIPRIORITY5 (AVIC_BASE + 0x28) /* norm int priority lvl5 */ | ||
128 | #define AVIC_NIPRIORITY4 (AVIC_BASE + 0x2C) /* norm int priority lvl4 */ | ||
129 | #define AVIC_NIPRIORITY3 (AVIC_BASE + 0x30) /* norm int priority lvl3 */ | ||
130 | #define AVIC_NIPRIORITY2 (AVIC_BASE + 0x34) /* norm int priority lvl2 */ | ||
131 | #define AVIC_NIPRIORITY1 (AVIC_BASE + 0x38) /* norm int priority lvl1 */ | ||
132 | #define AVIC_NIPRIORITY0 (AVIC_BASE + 0x3C) /* norm int priority lvl0 */ | ||
133 | #define AVIC_NIVECSR (AVIC_BASE + 0x40) /* norm int vector/status */ | ||
134 | #define AVIC_FIVECSR (AVIC_BASE + 0x44) /* fast int vector/status */ | ||
135 | #define AVIC_INTSRCH (AVIC_BASE + 0x48) /* int source reg high */ | ||
136 | #define AVIC_INTSRCL (AVIC_BASE + 0x4C) /* int source reg low */ | ||
137 | #define AVIC_INTFRCH (AVIC_BASE + 0x50) /* int force reg high */ | ||
138 | #define AVIC_INTFRCL (AVIC_BASE + 0x54) /* int force reg low */ | ||
139 | #define AVIC_NIPNDH (AVIC_BASE + 0x58) /* norm int pending high */ | ||
140 | #define AVIC_NIPNDL (AVIC_BASE + 0x5C) /* norm int pending low */ | ||
141 | #define AVIC_FIPNDH (AVIC_BASE + 0x60) /* fast int pending high */ | ||
142 | #define AVIC_FIPNDL (AVIC_BASE + 0x64) /* fast int pending low */ | ||
143 | |||
144 | #define SYSTEM_PREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x20) | ||
145 | #define SYSTEM_SREV_REG IO_ADDRESS(IIM_BASE_ADDR + 0x24) | ||
146 | #define IIM_PROD_REV_SH 3 | ||
147 | #define IIM_PROD_REV_LEN 5 | ||
148 | |||
149 | #endif /* __ASM_ARCH_MXC_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/system.h b/include/asm-arm/arch-mxc/system.h new file mode 100644 index 000000000000..109956b41aca --- /dev/null +++ b/include/asm-arm/arch-mxc/system.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999 ARM Limited | ||
3 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
4 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ | ||
22 | #define __ASM_ARCH_MXC_SYSTEM_H__ | ||
23 | |||
24 | /*! | ||
25 | * @file system.h | ||
26 | * @brief This file contains idle and reset functions. | ||
27 | * | ||
28 | * @ingroup System | ||
29 | */ | ||
30 | |||
31 | /*! | ||
32 | * This function puts the CPU into idle mode. It is called by default_idle() | ||
33 | * in process.c file. | ||
34 | */ | ||
35 | static inline void arch_idle(void) | ||
36 | { | ||
37 | cpu_do_idle(); | ||
38 | } | ||
39 | |||
40 | /* | ||
41 | * This function resets the system. It is called by machine_restart(). | ||
42 | * | ||
43 | * @param mode indicates different kinds of resets | ||
44 | */ | ||
45 | static inline void arch_reset(char mode) | ||
46 | { | ||
47 | cpu_reset(0); | ||
48 | } | ||
49 | |||
50 | #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/timex.h b/include/asm-arm/arch-mxc/timex.h new file mode 100644 index 000000000000..59019fa58f82 --- /dev/null +++ b/include/asm-arm/arch-mxc/timex.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999 ARM Limited | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ | ||
21 | #define __ASM_ARCH_MXC_TIMEX_H__ | ||
22 | |||
23 | #include <asm/hardware.h> /* for CLOCK_TICK_RATE */ | ||
24 | |||
25 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/uncompress.h b/include/asm-arm/arch-mxc/uncompress.h new file mode 100644 index 000000000000..ec5787d0e78c --- /dev/null +++ b/include/asm-arm/arch-mxc/uncompress.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-mxc/uncompress.h | ||
3 | * | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 1999 ARM Limited | ||
7 | * Copyright (C) Shane Nay (shane@minirl.com) | ||
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 | #ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__ | ||
24 | #define __ASM_ARCH_MXC_UNCOMPRESS_H__ | ||
25 | |||
26 | #define __MXC_BOOT_UNCOMPRESS | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/processor.h> | ||
30 | |||
31 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | ||
32 | |||
33 | #define USR2 0x98 | ||
34 | #define USR2_TXFE (1<<14) | ||
35 | #define TXR 0x40 | ||
36 | #define UCR1 0x80 | ||
37 | #define UCR1_UARTEN 1 | ||
38 | |||
39 | /* | ||
40 | * The following code assumes the serial port has already been | ||
41 | * initialized by the bootloader. We search for the first enabled | ||
42 | * port in the most probable order. If you didn't setup a port in | ||
43 | * your bootloader then nothing will appear (which might be desired). | ||
44 | * | ||
45 | * This does not append a newline | ||
46 | */ | ||
47 | |||
48 | static void putc(int ch) | ||
49 | { | ||
50 | static unsigned long serial_port = 0; | ||
51 | |||
52 | if (unlikely(serial_port == 0)) { | ||
53 | do { | ||
54 | serial_port = UART1_BASE_ADDR; | ||
55 | if (UART(UCR1) & UCR1_UARTEN) | ||
56 | break; | ||
57 | serial_port = UART2_BASE_ADDR; | ||
58 | if (UART(UCR1) & UCR1_UARTEN) | ||
59 | break; | ||
60 | return; | ||
61 | } while (0); | ||
62 | } | ||
63 | |||
64 | while (!(UART(USR2) & USR2_TXFE)) | ||
65 | cpu_relax(); | ||
66 | |||
67 | UART(TXR) = ch; | ||
68 | } | ||
69 | |||
70 | #define flush() do { } while (0) | ||
71 | |||
72 | /* | ||
73 | * nothing to do | ||
74 | */ | ||
75 | #define arch_decomp_setup() | ||
76 | |||
77 | #define arch_decomp_wdog() | ||
78 | |||
79 | #endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/vmalloc.h b/include/asm-arm/arch-mxc/vmalloc.h new file mode 100644 index 000000000000..83a73da895eb --- /dev/null +++ b/include/asm-arm/arch-mxc/vmalloc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Russell King. | ||
3 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ | ||
21 | #define __ASM_ARCH_MXC_VMALLOC_H__ | ||
22 | |||
23 | /*! | ||
24 | * @file vmalloc.h | ||
25 | * | ||
26 | * @brief This file contains platform specific macros for vmalloc. | ||
27 | * | ||
28 | * @ingroup System | ||
29 | */ | ||
30 | |||
31 | /*! | ||
32 | * vmalloc ending address | ||
33 | */ | ||
34 | #define VMALLOC_END 0xF4000000 | ||
35 | |||
36 | #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-bbu.h b/include/asm-arm/arch-ns9xxx/regs-bbu.h index e26269546240..7ee194dc6354 100644 --- a/include/asm-arm/arch-ns9xxx/regs-bbu.h +++ b/include/asm-arm/arch-ns9xxx/regs-bbu.h | |||
@@ -15,7 +15,31 @@ | |||
15 | 15 | ||
16 | /* BBus Utility */ | 16 | /* BBus Utility */ |
17 | 17 | ||
18 | /* GPIO Configuration Register */ | 18 | /* GPIO Configuration Registers block 1 */ |
19 | #define BBU_GC(x) __REG2(0x9060000c, (x)) | 19 | /* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is |
20 | * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register | ||
21 | * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */ | ||
22 | #define BBU_GCONFb1(x) __REG2(0x90600010, (x)) | ||
23 | #define BBU_GCONFb2(x) __REG2(0x90600100, (x)) | ||
24 | |||
25 | #define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2)) | ||
26 | #define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0) | ||
27 | #define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1) | ||
28 | #define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2)) | ||
29 | #define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0) | ||
30 | #define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1) | ||
31 | #define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2) | ||
32 | #define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0) | ||
33 | #define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1) | ||
34 | #define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2) | ||
35 | #define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3) | ||
36 | |||
37 | #define BBU_GCTRL1 __REG(0x90600030) | ||
38 | #define BBU_GCTRL2 __REG(0x90600034) | ||
39 | #define BBU_GCTRL3 __REG(0x90600120) | ||
40 | |||
41 | #define BBU_GSTAT1 __REG(0x90600040) | ||
42 | #define BBU_GSTAT2 __REG(0x90600044) | ||
43 | #define BBU_GSTAT3 __REG(0x90600130) | ||
20 | 44 | ||
21 | #endif /* ifndef __ASM_ARCH_REGSBBU_H */ | 45 | #endif /* ifndef __ASM_ARCH_REGSBBU_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/regs-mem.h b/include/asm-arm/arch-ns9xxx/regs-mem.h index 8ed8448767b9..fb455a0ed845 100644 --- a/include/asm-arm/arch-ns9xxx/regs-mem.h +++ b/include/asm-arm/arch-ns9xxx/regs-mem.h | |||
@@ -79,9 +79,9 @@ | |||
79 | #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3) | 79 | #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3) |
80 | 80 | ||
81 | /* Static Memory Configuration Register x: Write protect */ | 81 | /* Static Memory Configuration Register x: Write protect */ |
82 | #define MEM_SMC_WSMC __REGBIT(20) | 82 | #define MEM_SMC_PSMC __REGBIT(20) |
83 | #define MEM_SMC_WSMC_OFF __REGVAL(MEM_SMC_WSMC, 0) | 83 | #define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0) |
84 | #define MEM_SMC_WSMC_ON __REGVAL(MEM_SMC_WSMC, 1) | 84 | #define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1) |
85 | 85 | ||
86 | /* Static Memory Configuration Register x: Buffer enable */ | 86 | /* Static Memory Configuration Register x: Buffer enable */ |
87 | #define MEM_SMC_BSMC __REGBIT(19) | 87 | #define MEM_SMC_BSMC __REGBIT(19) |
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys.h b/include/asm-arm/arch-ns9xxx/regs-sys.h index a42546aeb92a..749262f86204 100644 --- a/include/asm-arm/arch-ns9xxx/regs-sys.h +++ b/include/asm-arm/arch-ns9xxx/regs-sys.h | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | /* Timer x Control register: Timer enable */ | 65 | /* Timer x Control register: Timer enable */ |
66 | #define SYS_TCx_TEN __REGBIT(15) | 66 | #define SYS_TCx_TEN __REGBIT(15) |
67 | #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 1) | 67 | #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0) |
68 | #define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1) | 68 | #define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1) |
69 | 69 | ||
70 | /* Timer x Control register: CPU debug mode */ | 70 | /* Timer x Control register: CPU debug mode */ |
diff --git a/include/asm-arm/arch-pxa/pm.h b/include/asm-arm/arch-pxa/pm.h index 52243a62c4e7..6903db7fae15 100644 --- a/include/asm-arm/arch-pxa/pm.h +++ b/include/asm-arm/arch-pxa/pm.h | |||
@@ -7,5 +7,19 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | extern int pxa_pm_prepare(suspend_state_t state); | 10 | struct pxa_cpu_pm_fns { |
11 | int save_size; | ||
12 | void (*save)(unsigned long *); | ||
13 | void (*restore)(unsigned long *); | ||
14 | int (*valid)(suspend_state_t state); | ||
15 | void (*enter)(suspend_state_t state); | ||
16 | }; | ||
17 | |||
18 | extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; | ||
19 | |||
20 | /* sleep.S */ | ||
21 | extern void pxa25x_cpu_suspend(unsigned int); | ||
22 | extern void pxa27x_cpu_suspend(unsigned int); | ||
23 | extern void pxa_cpu_resume(void); | ||
24 | |||
11 | extern int pxa_pm_enter(suspend_state_t state); | 25 | extern int pxa_pm_enter(suspend_state_t state); |
diff --git a/include/asm-arm/arch-s3c2400/map.h b/include/asm-arm/arch-s3c2400/map.h new file mode 100644 index 000000000000..1184d907b31e --- /dev/null +++ b/include/asm-arm/arch-s3c2400/map.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2400/map.h | ||
2 | * | ||
3 | * Copyright 2003,2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * Copyright 2003, Lucas Correia Villa Real | ||
8 | * | ||
9 | * S3C2400 - Memory map definitions | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #define S3C2400_PA_MEMCTRL (0x14000000) | ||
17 | #define S3C2400_PA_USBHOST (0x14200000) | ||
18 | #define S3C2400_PA_IRQ (0x14400000) | ||
19 | #define S3C2400_PA_DMA (0x14600000) | ||
20 | #define S3C2400_PA_CLKPWR (0x14800000) | ||
21 | #define S3C2400_PA_LCD (0x14A00000) | ||
22 | #define S3C2400_PA_UART (0x15000000) | ||
23 | #define S3C2400_PA_TIMER (0x15100000) | ||
24 | #define S3C2400_PA_USBDEV (0x15200140) | ||
25 | #define S3C2400_PA_WATCHDOG (0x15300000) | ||
26 | #define S3C2400_PA_IIC (0x15400000) | ||
27 | #define S3C2400_PA_IIS (0x15508000) | ||
28 | #define S3C2400_PA_GPIO (0x15600000) | ||
29 | #define S3C2400_PA_RTC (0x15700040) | ||
30 | #define S3C2400_PA_ADC (0x15800000) | ||
31 | #define S3C2400_PA_SPI (0x15900000) | ||
32 | |||
33 | #define S3C2400_PA_MMC (0x15A00000) | ||
34 | #define S3C2400_SZ_MMC SZ_1M | ||
35 | |||
36 | /* physical addresses of all the chip-select areas */ | ||
37 | |||
38 | #define S3C2400_CS0 (0x00000000) | ||
39 | #define S3C2400_CS1 (0x02000000) | ||
40 | #define S3C2400_CS2 (0x04000000) | ||
41 | #define S3C2400_CS3 (0x06000000) | ||
42 | #define S3C2400_CS4 (0x08000000) | ||
43 | #define S3C2400_CS5 (0x0A000000) | ||
44 | #define S3C2400_CS6 (0x0C000000) | ||
45 | #define S3C2400_CS7 (0x0E000000) | ||
46 | |||
47 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | ||
48 | |||
49 | /* Use a single interface for common resources between S3C24XX cpus */ | ||
50 | |||
51 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
52 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
53 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
54 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
55 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
56 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
57 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
58 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
59 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
60 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
61 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
62 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
63 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
64 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
65 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
66 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
diff --git a/include/asm-arm/arch-s3c2400/memory.h b/include/asm-arm/arch-s3c2400/memory.h new file mode 100644 index 000000000000..fb0381dde704 --- /dev/null +++ b/include/asm-arm/arch-s3c2400/memory.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2400/memory.h | ||
2 | * from linux/include/asm-arm/arch-rpc/memory.h | ||
3 | * | ||
4 | * Copyright 2007 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * Copyright (C) 1996,1997,1998 Russell King. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MEMORY_H | ||
16 | #define __ASM_ARCH_MEMORY_H | ||
17 | |||
18 | #define PHYS_OFFSET UL(0x0C000000) | ||
19 | |||
20 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
21 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
22 | |||
23 | #endif | ||
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 93064860e0e5..9c8cd9abb82b 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -13,32 +13,23 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/arch/map.h> | 15 | #include <asm/arch/map.h> |
16 | #include <asm/arch/regs-serial.h> | ||
17 | #include <asm/arch/regs-gpio.h> | 16 | #include <asm/arch/regs-gpio.h> |
17 | #include <asm/plat-s3c/regs-serial.h> | ||
18 | 18 | ||
19 | #define S3C2410_UART1_OFF (0x4000) | 19 | #define S3C2410_UART1_OFF (0x4000) |
20 | #define SHIFT_2440TXF (14-9) | 20 | #define SHIFT_2440TXF (14-9) |
21 | 21 | ||
22 | .macro addruart, rx | 22 | .macro addruart, rx |
23 | mrc p15, 0, \rx, c1, c0 | 23 | mrc p15, 0, \rx, c1, c0 |
24 | tst \rx, #1 | 24 | tst \rx, #1 |
25 | ldreq \rx, = S3C24XX_PA_UART | 25 | ldreq \rx, = S3C24XX_PA_UART |
26 | ldrne \rx, = S3C24XX_VA_UART | 26 | ldrne \rx, = S3C24XX_VA_UART |
27 | #if CONFIG_DEBUG_S3C2410_UART != 0 | 27 | #if CONFIG_DEBUG_S3C_UART != 0 |
28 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) | 28 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART) |
29 | #endif | 29 | #endif |
30 | .endm | 30 | .endm |
31 | 31 | ||
32 | .macro senduart,rd,rx | 32 | .macro fifo_full_s3c24xx rd, rx |
33 | strb \rd, [\rx, # S3C2410_UTXH ] | ||
34 | .endm | ||
35 | |||
36 | .macro busyuart, rd, rx | ||
37 | ldr \rd, [ \rx, # S3C2410_UFCON ] | ||
38 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | ||
39 | beq 1001f @ | ||
40 | @ FIFO enabled... | ||
41 | 1003: | ||
42 | @ check for arm920 vs arm926. currently assume all arm926 | 33 | @ check for arm920 vs arm926. currently assume all arm926 |
43 | @ devices have an 64 byte FIFO identical to the s3c2440 | 34 | @ devices have an 64 byte FIFO identical to the s3c2440 |
44 | mrc p15, 0, \rd, c0, c0 | 35 | mrc p15, 0, \rd, c0, c0 |
@@ -57,25 +48,22 @@ | |||
57 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 48 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
58 | moveq \rd, \rd, lsr #SHIFT_2440TXF | 49 | moveq \rd, \rd, lsr #SHIFT_2440TXF |
59 | tst \rd, #S3C2410_UFSTAT_TXFULL | 50 | tst \rd, #S3C2410_UFSTAT_TXFULL |
60 | bne 1003b | 51 | .endm |
61 | b 1002f | ||
62 | |||
63 | 1001: | ||
64 | @ busy waiting for non fifo | ||
65 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
66 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
67 | beq 1001b | ||
68 | 52 | ||
69 | 1002: @ exit busyuart | 53 | .macro fifo_full_s3c2410 rd, rx |
70 | .endm | 54 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
55 | tst \rd, #S3C2410_UFSTAT_TXFULL | ||
56 | .endm | ||
71 | 57 | ||
72 | .macro waituart,rd,rx | 58 | /* fifo level reading */ |
73 | 59 | ||
74 | ldr \rd, [ \rx, # S3C2410_UFCON ] | 60 | .macro fifo_level_s3c24xx rd, rx |
75 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | 61 | @ check for arm920 vs arm926. currently assume all arm926 |
76 | beq 1001f @ | 62 | @ devices have an 64 byte FIFO identical to the s3c2440 |
77 | @ FIFO enabled... | 63 | mrc p15, 0, \rd, c0, c0 |
78 | 1003: | 64 | and \rd, \rd, #0xff0 |
65 | teq \rd, #0x260 | ||
66 | beq 10000f | ||
79 | mrc p15, 0, \rd, c1, c0 | 67 | mrc p15, 0, \rd, c1, c0 |
80 | tst \rd, #1 | 68 | tst \rd, #1 |
81 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) | 69 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
@@ -85,18 +73,32 @@ | |||
85 | and \rd, \rd, #0x00ff0000 | 73 | and \rd, \rd, #0x00ff0000 |
86 | teq \rd, #0x00440000 @ is it 2440? | 74 | teq \rd, #0x00440000 @ is it 2440? |
87 | 75 | ||
76 | 10000: | ||
88 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 77 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
89 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK | 78 | andne \rd, \rd, #S3C2410_UFSTAT_TXMASK |
90 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK | 79 | andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK |
91 | teq \rd, #0 | 80 | .endm |
92 | bne 1003b | 81 | |
93 | b 1002f | 82 | .macro fifo_level_s3c2410 rd, rx |
83 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
84 | and \rd, \rd, #S3C2410_UFSTAT_TXMASK | ||
85 | .endm | ||
86 | |||
87 | /* Select the correct implementation depending on the configuration. The | ||
88 | * S3C2440 will get selected by default, as these are the most widely | ||
89 | * used variants of these | ||
90 | */ | ||
91 | |||
92 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) | ||
93 | #define fifo_full fifo_full_s3c2410 | ||
94 | #define fifo_level fifo_level_s3c2410 | ||
95 | #warning 2410only | ||
96 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) | ||
97 | #define fifo_full fifo_full_s3c24xx | ||
98 | #define fifo_level fifo_level_s3c24xx | ||
99 | #warning generic | ||
100 | #endif | ||
94 | 101 | ||
95 | 1001: | 102 | /* include the reset of the code which will do the work */ |
96 | @ idle waiting for non fifo | ||
97 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
98 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
99 | beq 1001b | ||
100 | 103 | ||
101 | 1002: @ exit busyuart | 104 | #include <asm/plat-s3c/debug-macro.S> |
102 | .endm | ||
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 19e77f038042..b33ed3b05ef5 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -13,58 +13,36 @@ | |||
13 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
14 | #define __ASM_ARCH_MAP_H | 14 | #define __ASM_ARCH_MAP_H |
15 | 15 | ||
16 | /* we have a bit of a tight squeeze to fit all our registers from | 16 | #include <asm/plat-s3c/map.h> |
17 | * 0xF00000000 upwards, since we use all of the nGCS space in some | ||
18 | * capacity, and also need to fit the S3C2410 registers in as well... | ||
19 | * | ||
20 | * we try to ensure stuff like the IRQ registers are available for | ||
21 | * an single MOVS instruction (ie, only 8 bits of set data) | ||
22 | * | ||
23 | * Note, we are trying to remove some of these from the implementation | ||
24 | * as they are only useful to certain drivers... | ||
25 | */ | ||
26 | |||
27 | #ifndef __ASSEMBLY__ | ||
28 | #define S3C2410_ADDR(x) ((void __iomem __force *)0xF0000000 + (x)) | ||
29 | #else | ||
30 | #define S3C2410_ADDR(x) (0xF0000000 + (x)) | ||
31 | #endif | ||
32 | 17 | ||
33 | #define S3C2400_ADDR(x) S3C2410_ADDR(x) | 18 | #define S3C2410_ADDR(x) S3C_ADDR(x) |
34 | 19 | ||
35 | /* interrupt controller is the first thing we put in, to make | 20 | /* interrupt controller is the first thing we put in, to make |
36 | * the assembly code for the irq detection easier | 21 | * the assembly code for the irq detection easier |
37 | */ | 22 | */ |
38 | #define S3C24XX_VA_IRQ S3C2410_ADDR(0x00000000) | 23 | #define S3C24XX_VA_IRQ S3C_VA_IRQ |
39 | #define S3C2400_PA_IRQ (0x14400000) | ||
40 | #define S3C2410_PA_IRQ (0x4A000000) | 24 | #define S3C2410_PA_IRQ (0x4A000000) |
41 | #define S3C24XX_SZ_IRQ SZ_1M | 25 | #define S3C24XX_SZ_IRQ SZ_1M |
42 | 26 | ||
43 | /* memory controller registers */ | 27 | /* memory controller registers */ |
44 | #define S3C24XX_VA_MEMCTRL S3C2410_ADDR(0x00100000) | 28 | #define S3C24XX_VA_MEMCTRL S3C_VA_MEM |
45 | #define S3C2400_PA_MEMCTRL (0x14000000) | ||
46 | #define S3C2410_PA_MEMCTRL (0x48000000) | 29 | #define S3C2410_PA_MEMCTRL (0x48000000) |
47 | #define S3C24XX_SZ_MEMCTRL SZ_1M | 30 | #define S3C24XX_SZ_MEMCTRL SZ_1M |
48 | 31 | ||
49 | /* USB host controller */ | 32 | /* USB host controller */ |
50 | #define S3C2400_PA_USBHOST (0x14200000) | ||
51 | #define S3C2410_PA_USBHOST (0x49000000) | 33 | #define S3C2410_PA_USBHOST (0x49000000) |
52 | #define S3C24XX_SZ_USBHOST SZ_1M | 34 | #define S3C24XX_SZ_USBHOST SZ_1M |
53 | 35 | ||
54 | /* DMA controller */ | 36 | /* DMA controller */ |
55 | #define S3C2400_PA_DMA (0x14600000) | ||
56 | #define S3C2410_PA_DMA (0x4B000000) | 37 | #define S3C2410_PA_DMA (0x4B000000) |
57 | #define S3C24XX_SZ_DMA SZ_1M | 38 | #define S3C24XX_SZ_DMA SZ_1M |
58 | 39 | ||
59 | /* Clock and Power management */ | 40 | /* Clock and Power management */ |
60 | #define S3C24XX_VA_CLKPWR S3C2410_ADDR(0x00200000) | 41 | #define S3C24XX_VA_CLKPWR S3C_VA_SYS |
61 | #define S3C2400_PA_CLKPWR (0x14800000) | ||
62 | #define S3C2410_PA_CLKPWR (0x4C000000) | 42 | #define S3C2410_PA_CLKPWR (0x4C000000) |
63 | #define S3C24XX_SZ_CLKPWR SZ_1M | 43 | #define S3C24XX_SZ_CLKPWR SZ_1M |
64 | 44 | ||
65 | /* LCD controller */ | 45 | /* LCD controller */ |
66 | #define S3C24XX_VA_LCD S3C2410_ADDR(0x00300000) | ||
67 | #define S3C2400_PA_LCD (0x14A00000) | ||
68 | #define S3C2410_PA_LCD (0x4D000000) | 46 | #define S3C2410_PA_LCD (0x4D000000) |
69 | #define S3C24XX_SZ_LCD SZ_1M | 47 | #define S3C24XX_SZ_LCD SZ_1M |
70 | 48 | ||
@@ -72,41 +50,30 @@ | |||
72 | #define S3C2410_PA_NAND (0x4E000000) | 50 | #define S3C2410_PA_NAND (0x4E000000) |
73 | #define S3C24XX_SZ_NAND SZ_1M | 51 | #define S3C24XX_SZ_NAND SZ_1M |
74 | 52 | ||
75 | /* MMC controller - available on the S3C2400 */ | ||
76 | #define S3C2400_PA_MMC (0x15A00000) | ||
77 | #define S3C2400_SZ_MMC SZ_1M | ||
78 | |||
79 | /* UARTs */ | 53 | /* UARTs */ |
80 | #define S3C24XX_VA_UART S3C2410_ADDR(0x00400000) | 54 | #define S3C24XX_VA_UART S3C_VA_UART |
81 | #define S3C2400_PA_UART (0x15000000) | ||
82 | #define S3C2410_PA_UART (0x50000000) | 55 | #define S3C2410_PA_UART (0x50000000) |
83 | #define S3C24XX_SZ_UART SZ_1M | 56 | #define S3C24XX_SZ_UART SZ_1M |
84 | 57 | ||
85 | /* Timers */ | 58 | /* Timers */ |
86 | #define S3C24XX_VA_TIMER S3C2410_ADDR(0x00500000) | 59 | #define S3C24XX_VA_TIMER S3C_VA_TIMER |
87 | #define S3C2400_PA_TIMER (0x15100000) | ||
88 | #define S3C2410_PA_TIMER (0x51000000) | 60 | #define S3C2410_PA_TIMER (0x51000000) |
89 | #define S3C24XX_SZ_TIMER SZ_1M | 61 | #define S3C24XX_SZ_TIMER SZ_1M |
90 | 62 | ||
91 | /* USB Device port */ | 63 | /* USB Device port */ |
92 | #define S3C24XX_VA_USBDEV S3C2410_ADDR(0x00600000) | ||
93 | #define S3C2400_PA_USBDEV (0x15200140) | ||
94 | #define S3C2410_PA_USBDEV (0x52000000) | 64 | #define S3C2410_PA_USBDEV (0x52000000) |
95 | #define S3C24XX_SZ_USBDEV SZ_1M | 65 | #define S3C24XX_SZ_USBDEV SZ_1M |
96 | 66 | ||
97 | /* Watchdog */ | 67 | /* Watchdog */ |
98 | #define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00700000) | 68 | #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG |
99 | #define S3C2400_PA_WATCHDOG (0x15300000) | ||
100 | #define S3C2410_PA_WATCHDOG (0x53000000) | 69 | #define S3C2410_PA_WATCHDOG (0x53000000) |
101 | #define S3C24XX_SZ_WATCHDOG SZ_1M | 70 | #define S3C24XX_SZ_WATCHDOG SZ_1M |
102 | 71 | ||
103 | /* IIC hardware controller */ | 72 | /* IIC hardware controller */ |
104 | #define S3C2400_PA_IIC (0x15400000) | ||
105 | #define S3C2410_PA_IIC (0x54000000) | 73 | #define S3C2410_PA_IIC (0x54000000) |
106 | #define S3C24XX_SZ_IIC SZ_1M | 74 | #define S3C24XX_SZ_IIC SZ_1M |
107 | 75 | ||
108 | /* IIS controller */ | 76 | /* IIS controller */ |
109 | #define S3C2400_PA_IIS (0x15508000) | ||
110 | #define S3C2410_PA_IIS (0x55000000) | 77 | #define S3C2410_PA_IIS (0x55000000) |
111 | #define S3C24XX_SZ_IIS SZ_1M | 78 | #define S3C24XX_SZ_IIS SZ_1M |
112 | 79 | ||
@@ -116,27 +83,23 @@ | |||
116 | * it is the same distance apart from the UART in the | 83 | * it is the same distance apart from the UART in the |
117 | * phsyical address space, as the initial mapping for the IO | 84 | * phsyical address space, as the initial mapping for the IO |
118 | * is done as a 1:1 maping. This puts it (currently) at | 85 | * is done as a 1:1 maping. This puts it (currently) at |
119 | * 0xF6800000, which is not in the way of any current mapping | 86 | * 0xFA800000, which is not in the way of any current mapping |
120 | * by the base system. | 87 | * by the base system. |
121 | */ | 88 | */ |
122 | 89 | ||
123 | #define S3C2400_PA_GPIO (0x15600000) | ||
124 | #define S3C2410_PA_GPIO (0x56000000) | 90 | #define S3C2410_PA_GPIO (0x56000000) |
125 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | 91 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) |
126 | #define S3C24XX_SZ_GPIO SZ_1M | 92 | #define S3C24XX_SZ_GPIO SZ_1M |
127 | 93 | ||
128 | /* RTC */ | 94 | /* RTC */ |
129 | #define S3C2400_PA_RTC (0x15700040) | ||
130 | #define S3C2410_PA_RTC (0x57000000) | 95 | #define S3C2410_PA_RTC (0x57000000) |
131 | #define S3C24XX_SZ_RTC SZ_1M | 96 | #define S3C24XX_SZ_RTC SZ_1M |
132 | 97 | ||
133 | /* ADC */ | 98 | /* ADC */ |
134 | #define S3C2400_PA_ADC (0x15800000) | ||
135 | #define S3C2410_PA_ADC (0x58000000) | 99 | #define S3C2410_PA_ADC (0x58000000) |
136 | #define S3C24XX_SZ_ADC SZ_1M | 100 | #define S3C24XX_SZ_ADC SZ_1M |
137 | 101 | ||
138 | /* SPI */ | 102 | /* SPI */ |
139 | #define S3C2400_PA_SPI (0x15900000) | ||
140 | #define S3C2410_PA_SPI (0x59000000) | 103 | #define S3C2410_PA_SPI (0x59000000) |
141 | #define S3C24XX_SZ_SPI SZ_1M | 104 | #define S3C24XX_SZ_SPI SZ_1M |
142 | 105 | ||
@@ -177,37 +140,8 @@ | |||
177 | 140 | ||
178 | #define S3C2410_SDRAM_PA (S3C2410_CS6) | 141 | #define S3C2410_SDRAM_PA (S3C2410_CS6) |
179 | 142 | ||
180 | #define S3C2400_CS0 (0x00000000) | ||
181 | #define S3C2400_CS1 (0x02000000) | ||
182 | #define S3C2400_CS2 (0x04000000) | ||
183 | #define S3C2400_CS3 (0x06000000) | ||
184 | #define S3C2400_CS4 (0x08000000) | ||
185 | #define S3C2400_CS5 (0x0A000000) | ||
186 | #define S3C2400_CS6 (0x0C000000) | ||
187 | #define S3C2400_CS7 (0x0E000000) | ||
188 | |||
189 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | ||
190 | |||
191 | /* Use a single interface for common resources between S3C24XX cpus */ | 143 | /* Use a single interface for common resources between S3C24XX cpus */ |
192 | 144 | ||
193 | #ifdef CONFIG_CPU_S3C2400 | ||
194 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
195 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
196 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
197 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
198 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
199 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
200 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
201 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
202 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
203 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
204 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
205 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
206 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
207 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
208 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
209 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
210 | #else | ||
211 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ | 145 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ |
212 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL | 146 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL |
213 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST | 147 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST |
@@ -224,7 +158,6 @@ | |||
224 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | 158 | #define S3C24XX_PA_RTC S3C2410_PA_RTC |
225 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | 159 | #define S3C24XX_PA_ADC S3C2410_PA_ADC |
226 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | 160 | #define S3C24XX_PA_SPI S3C2410_PA_SPI |
227 | #endif | ||
228 | 161 | ||
229 | /* deal with the registers that move under the 2412/2413 */ | 162 | /* deal with the registers that move under the 2412/2413 */ |
230 | 163 | ||
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 4be6a74c4303..533e2436e707 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h | |||
@@ -11,20 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_MEMORY_H | 11 | #ifndef __ASM_ARCH_MEMORY_H |
12 | #define __ASM_ARCH_MEMORY_H | 12 | #define __ASM_ARCH_MEMORY_H |
13 | 13 | ||
14 | /* | ||
15 | * DRAM starts at 0x30000000 for S3C2410/S3C2440 | ||
16 | * and at 0x0C000000 for S3C2400 | ||
17 | */ | ||
18 | #ifdef CONFIG_CPU_S3C2400 | ||
19 | #define PHYS_OFFSET UL(0x0C000000) | ||
20 | #else | ||
21 | #define PHYS_OFFSET UL(0x30000000) | 14 | #define PHYS_OFFSET UL(0x30000000) |
22 | #endif | ||
23 | |||
24 | /* | ||
25 | * These are exactly the same on the S3C2410 as the | ||
26 | * physical memory view. | ||
27 | */ | ||
28 | 15 | ||
29 | #define __virt_to_bus(x) __virt_to_phys(x) | 16 | #define __virt_to_bus(x) __virt_to_phys(x) |
30 | #define __bus_to_virt(x) __phys_to_virt(x) | 17 | #define __bus_to_virt(x) __phys_to_virt(x) |
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b7faeb04c0ff..76fe5f693426 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef ___ASM_ARCH_REGS_LCD_H | 12 | #ifndef ___ASM_ARCH_REGS_LCD_H |
13 | #define ___ASM_ARCH_REGS_LCD_H "$Id: lcd.h,v 1.3 2003/06/26 13:25:06 ben Exp $" | 13 | #define ___ASM_ARCH_REGS_LCD_H "$Id: lcd.h,v 1.3 2003/06/26 13:25:06 ben Exp $" |
14 | 14 | ||
15 | #define S3C2410_LCDREG(x) ((x) + S3C24XX_VA_LCD) | 15 | #define S3C2410_LCDREG(x) (x) |
16 | 16 | ||
17 | /* LCD control registers */ | 17 | /* LCD control registers */ |
18 | #define S3C2410_LCDCON1 S3C2410_LCDREG(0x00) | 18 | #define S3C2410_LCDCON1 S3C2410_LCDREG(0x00) |
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 1c74ef17da33..63891786dfa0 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/arch/idle.h> | 17 | #include <asm/arch/idle.h> |
18 | #include <asm/arch/reset.h> | 18 | #include <asm/arch/reset.h> |
19 | 19 | ||
20 | #include <asm/arch/regs-watchdog.h> | 20 | #include <asm/plat-s3c/regs-watchdog.h> |
21 | #include <asm/arch/regs-clock.h> | 21 | #include <asm/arch/regs-clock.h> |
22 | 22 | ||
23 | void (*s3c24xx_idle)(void); | 23 | void (*s3c24xx_idle)(void); |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index dcb2cef38f50..48a5731ee988 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/uncompress.h | 1 | /* linux/include/asm-arm/arch-s3c2410/uncompress.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003 Simtec Electronics | 3 | * Copyright (c) 2003, 2007 Simtec Electronics |
4 | * http://armlinux.simtec.co.uk/ | ||
4 | * Ben Dooks <ben@simtec.co.uk> | 5 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 6 | * |
6 | * S3C2410 - uncompress code | 7 | * S3C2410 - uncompress code |
@@ -13,153 +14,39 @@ | |||
13 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 14 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
14 | #define __ASM_ARCH_UNCOMPRESS_H | 15 | #define __ASM_ARCH_UNCOMPRESS_H |
15 | 16 | ||
16 | typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ | 17 | #include <asm/arch/regs-gpio.h> |
17 | |||
18 | /* defines for UART registers */ | ||
19 | #include "asm/arch/regs-serial.h" | ||
20 | #include "asm/arch/regs-gpio.h" | ||
21 | #include "asm/arch/regs-watchdog.h" | ||
22 | |||
23 | #include <asm/arch/map.h> | 18 | #include <asm/arch/map.h> |
24 | 19 | ||
25 | /* working in physical space... */ | 20 | /* working in physical space... */ |
26 | #undef S3C2410_GPIOREG | 21 | #undef S3C2410_GPIOREG |
27 | #undef S3C2410_WDOGREG | ||
28 | |||
29 | #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) | 22 | #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) |
30 | #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) | ||
31 | 23 | ||
32 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 24 | #include <asm/plat-s3c/uncompress.h> |
33 | #define FIFO_MAX (14) | ||
34 | 25 | ||
35 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) | 26 | static inline int is_arm926(void) |
36 | |||
37 | static __inline__ void | ||
38 | uart_wr(unsigned int reg, unsigned int val) | ||
39 | { | 27 | { |
40 | volatile unsigned int *ptr; | 28 | unsigned int cpuid; |
41 | |||
42 | ptr = (volatile unsigned int *)(reg + uart_base); | ||
43 | *ptr = val; | ||
44 | } | ||
45 | 29 | ||
46 | static __inline__ unsigned int | 30 | asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid)); |
47 | uart_rd(unsigned int reg) | ||
48 | { | ||
49 | volatile unsigned int *ptr; | ||
50 | 31 | ||
51 | ptr = (volatile unsigned int *)(reg + uart_base); | 32 | return ((cpuid & 0xff0) == 0x260); |
52 | return *ptr; | ||
53 | } | 33 | } |
54 | 34 | ||
55 | 35 | static void arch_detect_cpu(void) | |
56 | /* we can deal with the case the UARTs are being run | ||
57 | * in FIFO mode, so that we don't hold up our execution | ||
58 | * waiting for tx to happen... | ||
59 | */ | ||
60 | |||
61 | static void putc(int ch) | ||
62 | { | 36 | { |
63 | int cpuid = S3C2410_GSTATUS1_2410; | 37 | unsigned int cpuid; |
64 | 38 | ||
65 | #ifndef CONFIG_CPU_S3C2400 | ||
66 | cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); | 39 | cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); |
67 | cpuid &= S3C2410_GSTATUS1_IDMASK; | 40 | cpuid &= S3C2410_GSTATUS1_IDMASK; |
68 | #endif | ||
69 | |||
70 | if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { | ||
71 | int level; | ||
72 | |||
73 | while (1) { | ||
74 | level = uart_rd(S3C2410_UFSTAT); | ||
75 | |||
76 | if (cpuid == S3C2410_GSTATUS1_2440 || | ||
77 | cpuid == S3C2410_GSTATUS1_2442) { | ||
78 | level &= S3C2440_UFSTAT_TXMASK; | ||
79 | level >>= S3C2440_UFSTAT_TXSHIFT; | ||
80 | } else { | ||
81 | level &= S3C2410_UFSTAT_TXMASK; | ||
82 | level >>= S3C2410_UFSTAT_TXSHIFT; | ||
83 | } | ||
84 | |||
85 | if (level < FIFO_MAX) | ||
86 | break; | ||
87 | } | ||
88 | 41 | ||
42 | if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 || | ||
43 | cpuid == S3C2410_GSTATUS1_2442) { | ||
44 | fifo_mask = S3C2440_UFSTAT_TXMASK; | ||
45 | fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; | ||
89 | } else { | 46 | } else { |
90 | /* not using fifos */ | 47 | fifo_mask = S3C2410_UFSTAT_TXMASK; |
91 | 48 | fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; | |
92 | while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) | ||
93 | barrier(); | ||
94 | } | 49 | } |
95 | |||
96 | /* write byte to transmission register */ | ||
97 | uart_wr(S3C2410_UTXH, ch); | ||
98 | } | 50 | } |
99 | 51 | ||
100 | static inline void flush(void) | ||
101 | { | ||
102 | } | ||
103 | |||
104 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) | ||
105 | |||
106 | /* CONFIG_S3C2410_BOOT_WATCHDOG | ||
107 | * | ||
108 | * Simple boot-time watchdog setup, to reboot the system if there is | ||
109 | * any problem with the boot process | ||
110 | */ | ||
111 | |||
112 | #ifdef CONFIG_S3C2410_BOOT_WATCHDOG | ||
113 | |||
114 | #define WDOG_COUNT (0xff00) | ||
115 | |||
116 | static inline void arch_decomp_wdog(void) | ||
117 | { | ||
118 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | ||
119 | } | ||
120 | |||
121 | static void arch_decomp_wdog_start(void) | ||
122 | { | ||
123 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); | ||
124 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | ||
125 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); | ||
126 | } | ||
127 | |||
128 | #else | ||
129 | #define arch_decomp_wdog_start() | ||
130 | #define arch_decomp_wdog() | ||
131 | #endif | ||
132 | |||
133 | #ifdef CONFIG_S3C2410_BOOT_ERROR_RESET | ||
134 | |||
135 | static void arch_decomp_error(const char *x) | ||
136 | { | ||
137 | putstr("\n\n"); | ||
138 | putstr(x); | ||
139 | putstr("\n\n -- System resetting\n"); | ||
140 | |||
141 | __raw_writel(0x4000, S3C2410_WTDAT); | ||
142 | __raw_writel(0x4000, S3C2410_WTCNT); | ||
143 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); | ||
144 | |||
145 | while(1); | ||
146 | } | ||
147 | |||
148 | #define arch_error arch_decomp_error | ||
149 | #endif | ||
150 | |||
151 | static void error(char *err); | ||
152 | |||
153 | static void | ||
154 | arch_decomp_setup(void) | ||
155 | { | ||
156 | /* we may need to setup the uart(s) here if we are not running | ||
157 | * on an BAST... the BAST will have left the uarts configured | ||
158 | * after calling linux. | ||
159 | */ | ||
160 | |||
161 | arch_decomp_wdog_start(); | ||
162 | } | ||
163 | |||
164 | |||
165 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | 52 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ |
diff --git a/include/asm-arm/arch-sa1100/jornada720.h b/include/asm-arm/arch-sa1100/jornada720.h new file mode 100644 index 000000000000..45d2bb59f9d0 --- /dev/null +++ b/include/asm-arm/arch-sa1100/jornada720.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-sa1100/jornada720.h | ||
3 | * | ||
4 | * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728 | ||
5 | * | ||
6 | * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> | ||
7 | * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu> | ||
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 version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | /* HP Jornada 7xx microprocessor commands */ | ||
16 | #define GETBATTERYDATA 0xc0 | ||
17 | #define GETSCANKEYCODE 0x90 | ||
18 | #define GETTOUCHSAMPLES 0xa0 | ||
19 | #define GETCONTRAST 0xD0 | ||
20 | #define SETCONTRAST 0xD1 | ||
21 | #define GETBRIGHTNESS 0xD2 | ||
22 | #define SETBRIGHTNESS 0xD3 | ||
23 | #define CONTRASTOFF 0xD8 | ||
24 | #define BRIGHTNESSOFF 0xD9 | ||
25 | #define PWMOFF 0xDF | ||
26 | #define TXDUMMY 0x11 | ||
27 | #define ERRORCODE 0x00 | ||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index d7a777f05088..ec1c685562ce 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef __ASMARM_ELF_H | 1 | #ifndef __ASMARM_ELF_H |
2 | #define __ASMARM_ELF_H | 2 | #define __ASMARM_ELF_H |
3 | 3 | ||
4 | #include <asm/hwcap.h> | ||
5 | |||
4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
5 | /* | 7 | /* |
6 | * ELF register definitions.. | 8 | * ELF register definitions.. |
7 | */ | 9 | */ |
8 | #include <asm/ptrace.h> | 10 | #include <asm/ptrace.h> |
9 | #include <asm/user.h> | 11 | #include <asm/user.h> |
10 | #include <asm/hwcap.h> | ||
11 | 12 | ||
12 | typedef unsigned long elf_greg_t; | 13 | typedef unsigned long elf_greg_t; |
13 | typedef unsigned long elf_freg_t[3]; | 14 | typedef unsigned long elf_freg_t[3]; |
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h index 54b5ae44ed94..d595c15166a4 100644 --- a/include/asm-arm/floppy.h +++ b/include/asm-arm/floppy.h | |||
@@ -30,15 +30,21 @@ | |||
30 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) | 30 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) |
31 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) | 31 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) |
32 | 32 | ||
33 | static inline int fd_dma_setup(void *data, unsigned int length, | ||
34 | unsigned int mode, unsigned long addr) | ||
35 | { | ||
36 | set_dma_mode(DMA_FLOPPY, mode); | ||
37 | __set_dma_addr(DMA_FLOPPY, data); | ||
38 | set_dma_count(DMA_FLOPPY, length); | ||
39 | virtual_dma_port = addr; | ||
40 | enable_dma(DMA_FLOPPY); | ||
41 | return 0; | ||
42 | } | ||
43 | #define fd_dma_setup fd_dma_setup | ||
44 | |||
33 | #define fd_request_dma() request_dma(DMA_FLOPPY,"floppy") | 45 | #define fd_request_dma() request_dma(DMA_FLOPPY,"floppy") |
34 | #define fd_free_dma() free_dma(DMA_FLOPPY) | 46 | #define fd_free_dma() free_dma(DMA_FLOPPY) |
35 | #define fd_disable_dma() disable_dma(DMA_FLOPPY) | 47 | #define fd_disable_dma() disable_dma(DMA_FLOPPY) |
36 | #define fd_enable_dma() enable_dma(DMA_FLOPPY) | ||
37 | #define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY) | ||
38 | #define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode)) | ||
39 | #define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr))) | ||
40 | #define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len)) | ||
41 | #define fd_cacheflush(addr,sz) | ||
42 | 48 | ||
43 | /* need to clean up dma.h */ | 49 | /* need to clean up dma.h */ |
44 | #define DMA_FLOPPYDISK DMA_FLOPPY | 50 | #define DMA_FLOPPYDISK DMA_FLOPPY |
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 81ca5d3e2bff..fb90b421f31c 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -194,6 +194,13 @@ extern int init_atu; | |||
194 | #define IOP_TMR_PRIVILEGED 0x08 | 194 | #define IOP_TMR_PRIVILEGED 0x08 |
195 | #define IOP_TMR_RATIO_1_1 0x00 | 195 | #define IOP_TMR_RATIO_1_1 0x00 |
196 | 196 | ||
197 | /* Watchdog timer definitions */ | ||
198 | #define IOP_WDTCR_EN_ARM 0x1e1e1e1e | ||
199 | #define IOP_WDTCR_EN 0xe1e1e1e1 | ||
200 | /* iop3xx does not support stopping the watchdog, so we just re-arm */ | ||
201 | #define IOP_WDTCR_DIS_ARM (IOP_WDTCR_EN_ARM) | ||
202 | #define IOP_WDTCR_DIS (IOP_WDTCR_EN) | ||
203 | |||
197 | /* Application accelerator unit */ | 204 | /* Application accelerator unit */ |
198 | #define IOP3XX_AAU_PHYS_BASE (IOP3XX_PERIPHERAL_PHYS_BASE + 0x800) | 205 | #define IOP3XX_AAU_PHYS_BASE (IOP3XX_PERIPHERAL_PHYS_BASE + 0x800) |
199 | #define IOP3XX_AAU_UPPER_PA (IOP3XX_AAU_PHYS_BASE + 0xa7) | 206 | #define IOP3XX_AAU_UPPER_PA (IOP3XX_AAU_PHYS_BASE + 0xa7) |
@@ -274,6 +281,32 @@ static inline void write_tisr(u32 val) | |||
274 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); | 281 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); |
275 | } | 282 | } |
276 | 283 | ||
284 | static inline u32 read_wdtcr(void) | ||
285 | { | ||
286 | u32 val; | ||
287 | asm volatile("mrc p6, 0, %0, c7, c1, 0":"=r" (val)); | ||
288 | return val; | ||
289 | } | ||
290 | static inline void write_wdtcr(u32 val) | ||
291 | { | ||
292 | asm volatile("mcr p6, 0, %0, c7, c1, 0"::"r" (val)); | ||
293 | } | ||
294 | |||
295 | extern unsigned long get_iop_tick_rate(void); | ||
296 | |||
297 | /* only iop13xx has these registers, we define these to present a | ||
298 | * common register interface for the iop_wdt driver. | ||
299 | */ | ||
300 | #define IOP_RCSR_WDT (0) | ||
301 | static inline u32 read_rcsr(void) | ||
302 | { | ||
303 | return 0; | ||
304 | } | ||
305 | static inline void write_wdtsr(u32 val) | ||
306 | { | ||
307 | do { } while (0); | ||
308 | } | ||
309 | |||
277 | extern struct platform_device iop3xx_dma_0_channel; | 310 | extern struct platform_device iop3xx_dma_0_channel; |
278 | extern struct platform_device iop3xx_dma_1_channel; | 311 | extern struct platform_device iop3xx_dma_1_channel; |
279 | extern struct platform_device iop3xx_aau_channel; | 312 | extern struct platform_device iop3xx_aau_channel; |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 0c8be19fd66b..b186bc820e30 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -102,7 +102,8 @@ extern int is_in_rom(unsigned long); | |||
102 | #define v4_tlb_fns (0) | 102 | #define v4_tlb_fns (0) |
103 | #define v4wb_tlb_fns (0) | 103 | #define v4wb_tlb_fns (0) |
104 | #define v4wbi_tlb_fns (0) | 104 | #define v4wbi_tlb_fns (0) |
105 | #define v6_tlb_fns (0) | 105 | #define v6wbi_tlb_fns (0) |
106 | #define v7wbi_tlb_fns (0) | ||
106 | 107 | ||
107 | #define v3_user_fns (0) | 108 | #define v3_user_fns (0) |
108 | #define v4_user_fns (0) | 109 | #define v4_user_fns (0) |
diff --git a/include/asm-arm/plat-s3c/debug-macro.S b/include/asm-arm/plat-s3c/debug-macro.S new file mode 100644 index 000000000000..84c40b847da8 --- /dev/null +++ b/include/asm-arm/plat-s3c/debug-macro.S | |||
@@ -0,0 +1,75 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c/debug-macro.S | ||
2 | * | ||
3 | * Copyright 2005, 2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <asm/plat-s3c/regs-serial.h> | ||
13 | |||
14 | /* The S3C2440 implementations are used by default as they are the | ||
15 | * most widely re-used */ | ||
16 | |||
17 | .macro fifo_level_s3c2440 rd, rx | ||
18 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
19 | and \rd, \rd, #S3C2440_UFSTAT_TXMASK | ||
20 | .endm | ||
21 | |||
22 | #ifndef fifo_level | ||
23 | #define fifo_level fifo_level_s3c2410 | ||
24 | #endif | ||
25 | |||
26 | .macro fifo_full_s3c2440 rd, rx | ||
27 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | ||
28 | tst \rd, #S3C2440_UFSTAT_TXFULL | ||
29 | .endm | ||
30 | |||
31 | #ifndef fifo_full | ||
32 | #define fifo_full fifo_full_s3c2440 | ||
33 | #endif | ||
34 | |||
35 | .macro senduart,rd,rx | ||
36 | strb \rd, [\rx, # S3C2410_UTXH ] | ||
37 | .endm | ||
38 | |||
39 | .macro busyuart, rd, rx | ||
40 | ldr \rd, [ \rx, # S3C2410_UFCON ] | ||
41 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | ||
42 | beq 1001f @ | ||
43 | @ FIFO enabled... | ||
44 | 1003: | ||
45 | fifo_full \rd, \rx | ||
46 | bne 1003b | ||
47 | b 1002f | ||
48 | |||
49 | 1001: | ||
50 | @ busy waiting for non fifo | ||
51 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
52 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
53 | beq 1001b | ||
54 | |||
55 | 1002: @ exit busyuart | ||
56 | .endm | ||
57 | |||
58 | .macro waituart,rd,rx | ||
59 | ldr \rd, [ \rx, # S3C2410_UFCON ] | ||
60 | tst \rd, #S3C2410_UFCON_FIFOMODE @ fifo enabled? | ||
61 | beq 1001f @ | ||
62 | @ FIFO enabled... | ||
63 | 1003: | ||
64 | fifo_level \rd, \rx | ||
65 | teq \rd, #0 | ||
66 | bne 1003b | ||
67 | b 1002f | ||
68 | 1001: | ||
69 | @ idle waiting for non fifo | ||
70 | ldr \rd, [ \rx, # S3C2410_UTRSTAT ] | ||
71 | tst \rd, #S3C2410_UTRSTAT_TXFE | ||
72 | beq 1001b | ||
73 | |||
74 | 1002: @ exit busyuart | ||
75 | .endm | ||
diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/plat-s3c/iic.h index 71211c8b5384..71211c8b5384 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/plat-s3c/iic.h | |||
diff --git a/include/asm-arm/plat-s3c/map.h b/include/asm-arm/plat-s3c/map.h new file mode 100644 index 000000000000..95a82b0e84a1 --- /dev/null +++ b/include/asm-arm/plat-s3c/map.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c/map.h | ||
2 | * | ||
3 | * Copyright 2003, 2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C - Memory map definitions (virtual addresses) | ||
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 version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_PLAT_MAP_H | ||
15 | #define __ASM_PLAT_MAP_H __FILE__ | ||
16 | |||
17 | /* Fit all our registers in at 0xF4000000 upwards, trying to use as | ||
18 | * little of the VA space as possible so vmalloc and friends have a | ||
19 | * better chance of getting memory. | ||
20 | * | ||
21 | * we try to ensure stuff like the IRQ registers are available for | ||
22 | * an single MOVS instruction (ie, only 8 bits of set data) | ||
23 | */ | ||
24 | |||
25 | #define S3C_ADDR_BASE (0xF4000000) | ||
26 | |||
27 | #ifndef __ASSEMBLY__ | ||
28 | #define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x)) | ||
29 | #else | ||
30 | #define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) | ||
31 | #endif | ||
32 | |||
33 | #define S3C_VA_IRQ S3C_ADDR(0x000000000) /* irq controller(s) */ | ||
34 | #define S3C_VA_SYS S3C_ADDR(0x001000000) /* system control */ | ||
35 | #define S3C_VA_MEM S3C_ADDR(0x002000000) /* system control */ | ||
36 | #define S3C_VA_TIMER S3C_ADDR(0x003000000) /* timer block */ | ||
37 | #define S3C_VA_WATCHDOG S3C_ADDR(0x004000000) /* watchdog */ | ||
38 | #define S3C_VA_UART S3C_ADDR(0x010000000) /* UART */ | ||
39 | |||
40 | #endif /* __ASM_PLAT_MAP_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/plat-s3c/nand.h index 8816f7f9cee1..8816f7f9cee1 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/plat-s3c/nand.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-ac97.h b/include/asm-arm/plat-s3c/regs-ac97.h index b004dee6bcaf..b004dee6bcaf 100644 --- a/include/asm-arm/arch-s3c2410/regs-ac97.h +++ b/include/asm-arm/plat-s3c/regs-ac97.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/plat-s3c/regs-adc.h index c7f231963e76..c7f231963e76 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/plat-s3c/regs-adc.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/plat-s3c/regs-iic.h index 2ae29522f253..2ae29522f253 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/plat-s3c/regs-iic.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/plat-s3c/regs-nand.h index b824d371ae0b..b824d371ae0b 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/plat-s3c/regs-nand.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/plat-s3c/regs-rtc.h index 93b03c49710a..93b03c49710a 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/plat-s3c/regs-rtc.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/plat-s3c/regs-serial.h index 8946702a87f5..923e114db663 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/plat-s3c/regs-serial.h | |||
@@ -32,10 +32,10 @@ | |||
32 | #ifndef __ASM_ARM_REGS_SERIAL_H | 32 | #ifndef __ASM_ARM_REGS_SERIAL_H |
33 | #define __ASM_ARM_REGS_SERIAL_H | 33 | #define __ASM_ARM_REGS_SERIAL_H |
34 | 34 | ||
35 | #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) | 35 | #define S3C24XX_VA_UART0 (S3C_VA_UART) |
36 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 36 | #define S3C24XX_VA_UART1 (S3C_VA_UART + 0x4000 ) |
37 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 37 | #define S3C24XX_VA_UART2 (S3C_VA_UART + 0x8000 ) |
38 | #define S3C24XX_VA_UART3 (S3C24XX_VA_UART + 0xC000 ) | 38 | #define S3C24XX_VA_UART3 (S3C_VA_UART + 0xC000 ) |
39 | 39 | ||
40 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) | 40 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
41 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) | 41 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/plat-s3c/regs-timer.h index 6f8fe432fe3a..8b0d594397b1 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/plat-s3c/regs-timer.h | |||
@@ -14,12 +14,12 @@ | |||
14 | #ifndef __ASM_ARCH_REGS_TIMER_H | 14 | #ifndef __ASM_ARCH_REGS_TIMER_H |
15 | #define __ASM_ARCH_REGS_TIMER_H "$Id: timer.h,v 1.4 2003/05/06 19:30:50 ben Exp $" | 15 | #define __ASM_ARCH_REGS_TIMER_H "$Id: timer.h,v 1.4 2003/05/06 19:30:50 ben Exp $" |
16 | 16 | ||
17 | #define S3C2410_TIMERREG(x) (S3C24XX_VA_TIMER + (x)) | 17 | #define S3C_TIMERREG(x) (S3C_VA_TIMER + (x)) |
18 | #define S3C2410_TIMERREG2(tmr,reg) S3C2410_TIMERREG((reg)+0x0c+((tmr)*0x0c)) | 18 | #define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c)) |
19 | 19 | ||
20 | #define S3C2410_TCFG0 S3C2410_TIMERREG(0x00) | 20 | #define S3C2410_TCFG0 S3C_TIMERREG(0x00) |
21 | #define S3C2410_TCFG1 S3C2410_TIMERREG(0x04) | 21 | #define S3C2410_TCFG1 S3C_TIMERREG(0x04) |
22 | #define S3C2410_TCON S3C2410_TIMERREG(0x08) | 22 | #define S3C2410_TCON S3C_TIMERREG(0x08) |
23 | 23 | ||
24 | #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) | 24 | #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) |
25 | #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) | 25 | #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) |
@@ -71,9 +71,9 @@ | |||
71 | 71 | ||
72 | /* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */ | 72 | /* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */ |
73 | 73 | ||
74 | #define S3C2410_TCNTB(tmr) S3C2410_TIMERREG2(tmr, 0x00) | 74 | #define S3C2410_TCNTB(tmr) S3C_TIMERREG2(tmr, 0x00) |
75 | #define S3C2410_TCMPB(tmr) S3C2410_TIMERREG2(tmr, 0x04) | 75 | #define S3C2410_TCMPB(tmr) S3C_TIMERREG2(tmr, 0x04) |
76 | #define S3C2410_TCNTO(tmr) S3C2410_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08)) | 76 | #define S3C2410_TCNTO(tmr) S3C_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08)) |
77 | 77 | ||
78 | #define S3C2410_TCON_T4RELOAD (1<<22) | 78 | #define S3C2410_TCON_T4RELOAD (1<<22) |
79 | #define S3C2410_TCON_T4MANUALUPD (1<<21) | 79 | #define S3C2410_TCON_T4MANUALUPD (1<<21) |
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/plat-s3c/regs-watchdog.h index a9c5d491bdb6..56c4193b7a46 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/plat-s3c/regs-watchdog.h | |||
@@ -14,11 +14,11 @@ | |||
14 | #ifndef __ASM_ARCH_REGS_WATCHDOG_H | 14 | #ifndef __ASM_ARCH_REGS_WATCHDOG_H |
15 | #define __ASM_ARCH_REGS_WATCHDOG_H "$Id: watchdog.h,v 1.2 2003/04/29 13:31:09 ben Exp $" | 15 | #define __ASM_ARCH_REGS_WATCHDOG_H "$Id: watchdog.h,v 1.2 2003/04/29 13:31:09 ben Exp $" |
16 | 16 | ||
17 | #define S3C2410_WDOGREG(x) ((x) + S3C24XX_VA_WATCHDOG) | 17 | #define S3C_WDOGREG(x) ((x) + S3C_VA_WATCHDOG) |
18 | 18 | ||
19 | #define S3C2410_WTCON S3C2410_WDOGREG(0x00) | 19 | #define S3C2410_WTCON S3C_WDOGREG(0x00) |
20 | #define S3C2410_WTDAT S3C2410_WDOGREG(0x04) | 20 | #define S3C2410_WTDAT S3C_WDOGREG(0x04) |
21 | #define S3C2410_WTCNT S3C2410_WDOGREG(0x08) | 21 | #define S3C2410_WTCNT S3C_WDOGREG(0x08) |
22 | 22 | ||
23 | /* the watchdog can either generate a reset pulse, or an | 23 | /* the watchdog can either generate a reset pulse, or an |
24 | * interrupt. | 24 | * interrupt. |
diff --git a/include/asm-arm/plat-s3c/uncompress.h b/include/asm-arm/plat-s3c/uncompress.h new file mode 100644 index 000000000000..b5e6208175d1 --- /dev/null +++ b/include/asm-arm/plat-s3c/uncompress.h | |||
@@ -0,0 +1,155 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c/uncompress.h | ||
2 | * | ||
3 | * Copyright 2003, 2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C - uncompress code | ||
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 version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_PLAT_UNCOMPRESS_H | ||
15 | #define __ASM_PLAT_UNCOMPRESS_H | ||
16 | |||
17 | typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ | ||
18 | |||
19 | /* uart setup */ | ||
20 | |||
21 | static unsigned int fifo_mask; | ||
22 | static unsigned int fifo_max; | ||
23 | |||
24 | /* forward declerations */ | ||
25 | |||
26 | static void arch_detect_cpu(void); | ||
27 | |||
28 | /* defines for UART registers */ | ||
29 | |||
30 | #include "asm/plat-s3c/regs-serial.h" | ||
31 | #include "asm/plat-s3c/regs-watchdog.h" | ||
32 | |||
33 | /* working in physical space... */ | ||
34 | #undef S3C2410_WDOGREG | ||
35 | #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) | ||
36 | |||
37 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | ||
38 | #define FIFO_MAX (14) | ||
39 | |||
40 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C_LOWLEVEL_UART_PORT) | ||
41 | |||
42 | static __inline__ void | ||
43 | uart_wr(unsigned int reg, unsigned int val) | ||
44 | { | ||
45 | volatile unsigned int *ptr; | ||
46 | |||
47 | ptr = (volatile unsigned int *)(reg + uart_base); | ||
48 | *ptr = val; | ||
49 | } | ||
50 | |||
51 | static __inline__ unsigned int | ||
52 | uart_rd(unsigned int reg) | ||
53 | { | ||
54 | volatile unsigned int *ptr; | ||
55 | |||
56 | ptr = (volatile unsigned int *)(reg + uart_base); | ||
57 | return *ptr; | ||
58 | } | ||
59 | |||
60 | /* we can deal with the case the UARTs are being run | ||
61 | * in FIFO mode, so that we don't hold up our execution | ||
62 | * waiting for tx to happen... | ||
63 | */ | ||
64 | |||
65 | static void putc(int ch) | ||
66 | { | ||
67 | if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { | ||
68 | int level; | ||
69 | |||
70 | while (1) { | ||
71 | level = uart_rd(S3C2410_UFSTAT); | ||
72 | level &= fifo_mask; | ||
73 | |||
74 | if (level < fifo_max) | ||
75 | break; | ||
76 | } | ||
77 | |||
78 | } else { | ||
79 | /* not using fifos */ | ||
80 | |||
81 | while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) | ||
82 | barrier(); | ||
83 | } | ||
84 | |||
85 | /* write byte to transmission register */ | ||
86 | uart_wr(S3C2410_UTXH, ch); | ||
87 | } | ||
88 | |||
89 | static inline void flush(void) | ||
90 | { | ||
91 | } | ||
92 | |||
93 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) | ||
94 | |||
95 | /* CONFIG_S3C_BOOT_WATCHDOG | ||
96 | * | ||
97 | * Simple boot-time watchdog setup, to reboot the system if there is | ||
98 | * any problem with the boot process | ||
99 | */ | ||
100 | |||
101 | #ifdef CONFIG_S3C_BOOT_WATCHDOG | ||
102 | |||
103 | #define WDOG_COUNT (0xff00) | ||
104 | |||
105 | static inline void arch_decomp_wdog(void) | ||
106 | { | ||
107 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | ||
108 | } | ||
109 | |||
110 | static void arch_decomp_wdog_start(void) | ||
111 | { | ||
112 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); | ||
113 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | ||
114 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); | ||
115 | } | ||
116 | |||
117 | #else | ||
118 | #define arch_decomp_wdog_start() | ||
119 | #define arch_decomp_wdog() | ||
120 | #endif | ||
121 | |||
122 | #ifdef CONFIG_S3C_BOOT_ERROR_RESET | ||
123 | |||
124 | static void arch_decomp_error(const char *x) | ||
125 | { | ||
126 | putstr("\n\n"); | ||
127 | putstr(x); | ||
128 | putstr("\n\n -- System resetting\n"); | ||
129 | |||
130 | __raw_writel(0x4000, S3C2410_WTDAT); | ||
131 | __raw_writel(0x4000, S3C2410_WTCNT); | ||
132 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); | ||
133 | |||
134 | while(1); | ||
135 | } | ||
136 | |||
137 | #define arch_error arch_decomp_error | ||
138 | #endif | ||
139 | |||
140 | static void error(char *err); | ||
141 | |||
142 | static void | ||
143 | arch_decomp_setup(void) | ||
144 | { | ||
145 | /* we may need to setup the uart(s) here if we are not running | ||
146 | * on an BAST... the BAST will have left the uarts configured | ||
147 | * after calling linux. | ||
148 | */ | ||
149 | |||
150 | arch_detect_cpu(); | ||
151 | arch_decomp_wdog_start(); | ||
152 | } | ||
153 | |||
154 | |||
155 | #endif /* __ASM_PLAT_UNCOMPRESS_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/plat-s3c24xx/regs-iis.h index eaf77916a602..eaf77916a602 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/plat-s3c24xx/regs-iis.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/plat-s3c24xx/regs-spi.h index 4a499a138256..4a499a138256 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/plat-s3c24xx/regs-spi.h | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/plat-s3c24xx/regs-udc.h index e1e9805d2d9a..e1e9805d2d9a 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/plat-s3c24xx/regs-udc.h | |||
diff --git a/include/asm-arm/arch-s3c2410/udc.h b/include/asm-arm/plat-s3c24xx/udc.h index b8aa6cb69b58..b8aa6cb69b58 100644 --- a/include/asm-arm/arch-s3c2410/udc.h +++ b/include/asm-arm/plat-s3c24xx/udc.h | |||
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index eae85b09db2e..69c65d56a6ac 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -24,7 +24,6 @@ | |||
24 | struct task_struct; | 24 | struct task_struct; |
25 | struct exec_domain; | 25 | struct exec_domain; |
26 | 26 | ||
27 | #include <asm/ptrace.h> | ||
28 | #include <asm/types.h> | 27 | #include <asm/types.h> |
29 | #include <asm/domain.h> | 28 | #include <asm/domain.h> |
30 | 29 | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index bfdbebebdc1b..d327b25c986c 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -441,7 +441,6 @@ | |||
441 | /* | 441 | /* |
442 | * Unimplemented (or alternatively implemented) syscalls | 442 | * Unimplemented (or alternatively implemented) syscalls |
443 | */ | 443 | */ |
444 | #define __IGNORE_sync_file_range 1 | ||
445 | #define __IGNORE_fadvise64_64 1 | 444 | #define __IGNORE_fadvise64_64 1 |
446 | 445 | ||
447 | #endif /* __KERNEL__ */ | 446 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-arm/vfp.h b/include/asm-arm/vfp.h index 14c5e0946c47..bd6be9d7f772 100644 --- a/include/asm-arm/vfp.h +++ b/include/asm-arm/vfp.h | |||
@@ -26,8 +26,8 @@ | |||
26 | #define FPSID_REV_MASK (0xF << FPSID_REV_BIT) | 26 | #define FPSID_REV_MASK (0xF << FPSID_REV_BIT) |
27 | 27 | ||
28 | /* FPEXC bits */ | 28 | /* FPEXC bits */ |
29 | #define FPEXC_EXCEPTION (1<<31) | 29 | #define FPEXC_EX (1 << 31) |
30 | #define FPEXC_ENABLE (1<<30) | 30 | #define FPEXC_EN (1 << 30) |
31 | 31 | ||
32 | /* FPSCR bits */ | 32 | /* FPSCR bits */ |
33 | #define FPSCR_DEFAULT_NAN (1<<25) | 33 | #define FPSCR_DEFAULT_NAN (1<<25) |
diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h index 9aaac87efba9..52971b49ed3b 100644 --- a/include/asm-arm26/irq.h +++ b/include/asm-arm26/irq.h | |||
@@ -24,11 +24,6 @@ | |||
24 | 24 | ||
25 | struct irqaction; | 25 | struct irqaction; |
26 | 26 | ||
27 | #define disable_irq_nosync(i) disable_irq(i) | ||
28 | |||
29 | extern void disable_irq(unsigned int); | ||
30 | extern void enable_irq(unsigned int); | ||
31 | |||
32 | #define __IRQT_FALEDGE (1 << 0) | 27 | #define __IRQT_FALEDGE (1 << 0) |
33 | #define __IRQT_RISEDGE (1 << 1) | 28 | #define __IRQT_RISEDGE (1 << 1) |
34 | #define __IRQT_LOWLVL (1 << 2) | 29 | #define __IRQT_LOWLVL (1 << 2) |
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h index 41be646c3514..56eec28cc2c4 100644 --- a/include/asm-h8300/irq.h +++ b/include/asm-h8300/irq.h | |||
@@ -59,7 +59,4 @@ static __inline__ int irq_canonicalize(int irq) | |||
59 | return irq; | 59 | return irq; |
60 | } | 60 | } |
61 | 61 | ||
62 | extern void enable_irq(unsigned int); | ||
63 | extern void disable_irq(unsigned int); | ||
64 | |||
65 | #endif /* _H8300_IRQ_H_ */ | 62 | #endif /* _H8300_IRQ_H_ */ |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 449f3f272e07..125179adf044 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -121,19 +121,6 @@ static inline void acpi_disable_pci(void) | |||
121 | } | 121 | } |
122 | extern int acpi_irq_balance_set(char *str); | 122 | extern int acpi_irq_balance_set(char *str); |
123 | 123 | ||
124 | #else /* !CONFIG_ACPI */ | ||
125 | |||
126 | #define acpi_lapic 0 | ||
127 | #define acpi_ioapic 0 | ||
128 | static inline void acpi_noirq_set(void) { } | ||
129 | static inline void acpi_disable_pci(void) { } | ||
130 | static inline void disable_acpi(void) { } | ||
131 | |||
132 | #endif /* !CONFIG_ACPI */ | ||
133 | |||
134 | |||
135 | #ifdef CONFIG_ACPI_SLEEP | ||
136 | |||
137 | /* routines for saving/restoring kernel state */ | 124 | /* routines for saving/restoring kernel state */ |
138 | extern int acpi_save_state_mem(void); | 125 | extern int acpi_save_state_mem(void); |
139 | extern void acpi_restore_state_mem(void); | 126 | extern void acpi_restore_state_mem(void); |
@@ -143,7 +130,15 @@ extern unsigned long acpi_wakeup_address; | |||
143 | /* early initialization routine */ | 130 | /* early initialization routine */ |
144 | extern void acpi_reserve_bootmem(void); | 131 | extern void acpi_reserve_bootmem(void); |
145 | 132 | ||
146 | #endif /*CONFIG_ACPI_SLEEP*/ | 133 | #else /* !CONFIG_ACPI */ |
134 | |||
135 | #define acpi_lapic 0 | ||
136 | #define acpi_ioapic 0 | ||
137 | static inline void acpi_noirq_set(void) { } | ||
138 | static inline void acpi_disable_pci(void) { } | ||
139 | static inline void disable_acpi(void) { } | ||
140 | |||
141 | #endif /* !CONFIG_ACPI */ | ||
147 | 142 | ||
148 | #define ARCH_HAS_POWER_INIT 1 | 143 | #define ARCH_HAS_POWER_INIT 1 |
149 | 144 | ||
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index eb7da5402bfa..bda6c810c0f4 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h | |||
@@ -149,4 +149,6 @@ apply_paravirt(struct paravirt_patch_site *start, | |||
149 | #define __parainstructions_end NULL | 149 | #define __parainstructions_end NULL |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | extern void text_poke(void *addr, unsigned char *opcode, int len); | ||
153 | |||
152 | #endif /* _I386_ALTERNATIVE_H */ | 154 | #endif /* _I386_ALTERNATIVE_H */ |
diff --git a/include/asm-i386/cmpxchg.h b/include/asm-i386/cmpxchg.h index 64dcdf46117b..f86ede28f6dc 100644 --- a/include/asm-i386/cmpxchg.h +++ b/include/asm-i386/cmpxchg.h | |||
@@ -34,7 +34,7 @@ static inline void __set_64bit (unsigned long long * ptr, | |||
34 | "\n1:\t" | 34 | "\n1:\t" |
35 | "movl (%0), %%eax\n\t" | 35 | "movl (%0), %%eax\n\t" |
36 | "movl 4(%0), %%edx\n\t" | 36 | "movl 4(%0), %%edx\n\t" |
37 | "lock cmpxchg8b (%0)\n\t" | 37 | LOCK_PREFIX "cmpxchg8b (%0)\n\t" |
38 | "jnz 1b" | 38 | "jnz 1b" |
39 | : /* no outputs */ | 39 | : /* no outputs */ |
40 | : "D"(ptr), | 40 | : "D"(ptr), |
diff --git a/include/asm-i386/mce.h b/include/asm-i386/mce.h index b0a02ee34ffd..d56d89742e8f 100644 --- a/include/asm-i386/mce.h +++ b/include/asm-i386/mce.h | |||
@@ -5,3 +5,7 @@ extern void mcheck_init(struct cpuinfo_x86 *c); | |||
5 | #endif | 5 | #endif |
6 | 6 | ||
7 | extern int mce_disabled; | 7 | extern int mce_disabled; |
8 | |||
9 | extern void stop_mce(void); | ||
10 | extern void restart_mce(void); | ||
11 | |||
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index fb1e133efd9f..ff30c98f87b0 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -57,5 +57,7 @@ unsigned lapic_adjust_nmi_hz(unsigned hz); | |||
57 | int lapic_watchdog_ok(void); | 57 | int lapic_watchdog_ok(void); |
58 | void disable_lapic_nmi_watchdog(void); | 58 | void disable_lapic_nmi_watchdog(void); |
59 | void enable_lapic_nmi_watchdog(void); | 59 | void enable_lapic_nmi_watchdog(void); |
60 | void stop_nmi(void); | ||
61 | void restart_nmi(void); | ||
60 | 62 | ||
61 | #endif /* ASM_NMI_H */ | 63 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-i386/processor-cyrix.h b/include/asm-i386/processor-cyrix.h new file mode 100644 index 000000000000..97568ada1f97 --- /dev/null +++ b/include/asm-i386/processor-cyrix.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * NSC/Cyrix CPU indexed register access. Must be inlined instead of | ||
3 | * macros to ensure correct access ordering | ||
4 | * Access order is always 0x22 (=offset), 0x23 (=value) | ||
5 | * | ||
6 | * When using the old macros a line like | ||
7 | * setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); | ||
8 | * gets expanded to: | ||
9 | * do { | ||
10 | * outb((CX86_CCR2), 0x22); | ||
11 | * outb((({ | ||
12 | * outb((CX86_CCR2), 0x22); | ||
13 | * inb(0x23); | ||
14 | * }) | 0x88), 0x23); | ||
15 | * } while (0); | ||
16 | * | ||
17 | * which in fact violates the access order (= 0x22, 0x22, 0x23, 0x23). | ||
18 | */ | ||
19 | |||
20 | static inline u8 getCx86(u8 reg) | ||
21 | { | ||
22 | outb(reg, 0x22); | ||
23 | return inb(0x23); | ||
24 | } | ||
25 | |||
26 | static inline void setCx86(u8 reg, u8 data) | ||
27 | { | ||
28 | outb(reg, 0x22); | ||
29 | outb(data, 0x23); | ||
30 | } | ||
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 48a7f69bb767..3845fe72383e 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -168,17 +168,6 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
168 | write_cr4(cr4); | 168 | write_cr4(cr4); |
169 | } | 169 | } |
170 | 170 | ||
171 | /* | ||
172 | * NSC/Cyrix CPU indexed register access macros | ||
173 | */ | ||
174 | |||
175 | #define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); }) | ||
176 | |||
177 | #define setCx86(reg, data) do { \ | ||
178 | outb((reg), 0x22); \ | ||
179 | outb((data), 0x23); \ | ||
180 | } while (0) | ||
181 | |||
182 | /* Stop speculative execution */ | 171 | /* Stop speculative execution */ |
183 | static inline void sync_core(void) | 172 | static inline void sync_core(void) |
184 | { | 173 | { |
diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 8dbaafe611ff..a2520732ffd6 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h | |||
@@ -21,7 +21,7 @@ struct saved_context { | |||
21 | unsigned long return_address; | 21 | unsigned long return_address; |
22 | } __attribute__((packed)); | 22 | } __attribute__((packed)); |
23 | 23 | ||
24 | #ifdef CONFIG_ACPI_SLEEP | 24 | #ifdef CONFIG_ACPI |
25 | extern unsigned long saved_eip; | 25 | extern unsigned long saved_eip; |
26 | extern unsigned long saved_esp; | 26 | extern unsigned long saved_esp; |
27 | extern unsigned long saved_ebp; | 27 | extern unsigned long saved_ebp; |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 5b526357d178..49730ffbbae4 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -100,6 +100,11 @@ const char *acpi_get_sysname (void); | |||
100 | int acpi_request_vector (u32 int_type); | 100 | int acpi_request_vector (u32 int_type); |
101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
102 | 102 | ||
103 | /* routines for saving/restoring kernel state */ | ||
104 | extern int acpi_save_state_mem(void); | ||
105 | extern void acpi_restore_state_mem(void); | ||
106 | extern unsigned long acpi_wakeup_address; | ||
107 | |||
103 | /* | 108 | /* |
104 | * Record the cpei override flag and current logical cpu. This is | 109 | * Record the cpei override flag and current logical cpu. This is |
105 | * useful for CPU removal. | 110 | * useful for CPU removal. |
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index 35b360b82e43..a66d26827cbb 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h | |||
@@ -33,9 +33,6 @@ irq_canonicalize (int irq) | |||
33 | return ((irq == 2) ? 9 : irq); | 33 | return ((irq == 2) ? 9 : irq); |
34 | } | 34 | } |
35 | 35 | ||
36 | extern void disable_irq (unsigned int); | ||
37 | extern void disable_irq_nosync (unsigned int); | ||
38 | extern void enable_irq (unsigned int); | ||
39 | extern void set_irq_affinity_info (unsigned int irq, int dest, int redir); | 36 | extern void set_irq_affinity_info (unsigned int irq, int dest, int redir); |
40 | bool is_affinity_mask_valid(cpumask_t cpumask); | 37 | bool is_affinity_mask_valid(cpumask_t cpumask); |
41 | 38 | ||
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 4901cb105e2f..eb29a5260591 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -59,9 +59,6 @@ | |||
59 | #define IRQ_USER 8 | 59 | #define IRQ_USER 8 |
60 | 60 | ||
61 | extern unsigned int irq_canonicalize(unsigned int irq); | 61 | extern unsigned int irq_canonicalize(unsigned int irq); |
62 | extern void enable_irq(unsigned int); | ||
63 | extern void disable_irq(unsigned int); | ||
64 | #define disable_irq_nosync disable_irq | ||
65 | 62 | ||
66 | struct pt_regs; | 63 | struct pt_regs; |
67 | 64 | ||
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 2ffb06abe881..262db6b8da73 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -296,6 +296,9 @@ struct mpic | |||
296 | unsigned int dcr_base; | 296 | unsigned int dcr_base; |
297 | #endif | 297 | #endif |
298 | 298 | ||
299 | /* Protected sources */ | ||
300 | unsigned long *protected; | ||
301 | |||
299 | #ifdef CONFIG_MPIC_WEIRD | 302 | #ifdef CONFIG_MPIC_WEIRD |
300 | /* Pointer to HW info array */ | 303 | /* Pointer to HW info array */ |
301 | u32 *hw_set; | 304 | u32 *hw_set; |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 6e391c9894ce..672083787a1d 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -139,7 +139,7 @@ extern unsigned long __init of_get_flat_dt_root(void); | |||
139 | 139 | ||
140 | /* For updating the device tree at runtime */ | 140 | /* For updating the device tree at runtime */ |
141 | extern void of_attach_node(struct device_node *); | 141 | extern void of_attach_node(struct device_node *); |
142 | extern void of_detach_node(const struct device_node *); | 142 | extern void of_detach_node(struct device_node *); |
143 | 143 | ||
144 | /* Other Prototypes */ | 144 | /* Other Prototypes */ |
145 | extern void finish_device_tree(void); | 145 | extern void finish_device_tree(void); |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index f1311a8f310f..cc45780421ca 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -54,6 +54,7 @@ extern void show_regs(struct pt_regs * regs); | |||
54 | extern void flush_instruction_cache(void); | 54 | extern void flush_instruction_cache(void); |
55 | extern void hard_reset_now(void); | 55 | extern void hard_reset_now(void); |
56 | extern void poweroff_now(void); | 56 | extern void poweroff_now(void); |
57 | extern int set_dabr(unsigned long dabr); | ||
57 | #ifdef CONFIG_6xx | 58 | #ifdef CONFIG_6xx |
58 | extern long _get_L2CR(void); | 59 | extern long _get_L2CR(void); |
59 | extern long _get_L3CR(void); | 60 | extern long _get_L3CR(void); |
diff --git a/include/asm-sh64/irq.h b/include/asm-sh64/irq.h index 1ca49e29288a..5c9e6a873aeb 100644 --- a/include/asm-sh64/irq.h +++ b/include/asm-sh64/irq.h | |||
@@ -114,10 +114,6 @@ | |||
114 | #define IRL0_PRIORITY 13 | 114 | #define IRL0_PRIORITY 13 |
115 | #define TOP_PRIORITY 15 | 115 | #define TOP_PRIORITY 15 |
116 | 116 | ||
117 | extern void disable_irq(unsigned int); | ||
118 | extern void disable_irq_nosync(unsigned int); | ||
119 | extern void enable_irq(unsigned int); | ||
120 | |||
121 | extern int intc_evt_to_irq[(0xE20/0x20)+1]; | 117 | extern int intc_evt_to_irq[(0xE20/0x20)+1]; |
122 | int intc_irq_describe(char* p, int irq); | 118 | int intc_irq_describe(char* p, int irq); |
123 | 119 | ||
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index afb88a5973f0..61fb99643afd 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h | |||
@@ -13,10 +13,6 @@ | |||
13 | 13 | ||
14 | #define irq_canonicalize(irq) (irq) | 14 | #define irq_canonicalize(irq) (irq) |
15 | 15 | ||
16 | extern void disable_irq_nosync(unsigned int irq); | ||
17 | extern void disable_irq(unsigned int irq); | ||
18 | extern void enable_irq(unsigned int irq); | ||
19 | |||
20 | extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname); | 16 | extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname); |
21 | 17 | ||
22 | #endif | 18 | #endif |
diff --git a/include/asm-v850/irq.h b/include/asm-v850/irq.h index 88687c181f01..7d0d4cd1ce54 100644 --- a/include/asm-v850/irq.h +++ b/include/asm-v850/irq.h | |||
@@ -50,16 +50,6 @@ init_irq_handlers (int base_irq, int num, int interval, | |||
50 | interrupt. */ | 50 | interrupt. */ |
51 | extern unsigned int handle_irq (int irq, struct pt_regs *regs); | 51 | extern unsigned int handle_irq (int irq, struct pt_regs *regs); |
52 | 52 | ||
53 | |||
54 | /* Enable interrupt handling on an irq. */ | ||
55 | extern void enable_irq(unsigned int irq); | ||
56 | |||
57 | /* Disable an irq and wait for completion. */ | ||
58 | extern void disable_irq (unsigned int irq); | ||
59 | |||
60 | /* Disable an irq without waiting. */ | ||
61 | extern void disable_irq_nosync (unsigned int irq); | ||
62 | |||
63 | #endif /* !__ASSEMBLY__ */ | 53 | #endif /* !__ASSEMBLY__ */ |
64 | 54 | ||
65 | #endif /* __V850_IRQ_H__ */ | 55 | #endif /* __V850_IRQ_H__ */ |
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index 1da8f49c0fe2..98173357dd89 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -108,6 +108,15 @@ static inline void acpi_disable_pci(void) | |||
108 | } | 108 | } |
109 | extern int acpi_irq_balance_set(char *str); | 109 | extern int acpi_irq_balance_set(char *str); |
110 | 110 | ||
111 | /* routines for saving/restoring kernel state */ | ||
112 | extern int acpi_save_state_mem(void); | ||
113 | extern void acpi_restore_state_mem(void); | ||
114 | |||
115 | extern unsigned long acpi_wakeup_address; | ||
116 | |||
117 | /* early initialization routine */ | ||
118 | extern void acpi_reserve_bootmem(void); | ||
119 | |||
111 | #else /* !CONFIG_ACPI */ | 120 | #else /* !CONFIG_ACPI */ |
112 | 121 | ||
113 | #define acpi_lapic 0 | 122 | #define acpi_lapic 0 |
@@ -121,19 +130,6 @@ extern int acpi_numa; | |||
121 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); | 130 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); |
122 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) | 131 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) |
123 | 132 | ||
124 | #ifdef CONFIG_ACPI_SLEEP | ||
125 | |||
126 | /* routines for saving/restoring kernel state */ | ||
127 | extern int acpi_save_state_mem(void); | ||
128 | extern void acpi_restore_state_mem(void); | ||
129 | |||
130 | extern unsigned long acpi_wakeup_address; | ||
131 | |||
132 | /* early initialization routine */ | ||
133 | extern void acpi_reserve_bootmem(void); | ||
134 | |||
135 | #endif /*CONFIG_ACPI_SLEEP*/ | ||
136 | |||
137 | extern int acpi_disabled; | 133 | extern int acpi_disabled; |
138 | extern int acpi_pci_disabled; | 134 | extern int acpi_pci_disabled; |
139 | 135 | ||
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h index eea7aecfac78..ab161e810151 100644 --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h | |||
@@ -154,4 +154,6 @@ apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) | |||
154 | #define __parainstructions_end NULL | 154 | #define __parainstructions_end NULL |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | extern void text_poke(void *addr, unsigned char *opcode, int len); | ||
158 | |||
157 | #endif /* _X86_64_ALTERNATIVE_H */ | 159 | #endif /* _X86_64_ALTERNATIVE_H */ |
diff --git a/include/asm-x86_64/cmpxchg.h b/include/asm-x86_64/cmpxchg.h index 09a6b6b6b74d..5e182062e6ec 100644 --- a/include/asm-x86_64/cmpxchg.h +++ b/include/asm-x86_64/cmpxchg.h | |||
@@ -128,7 +128,7 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
128 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ | 128 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ |
129 | (unsigned long)(n),sizeof(*(ptr)))) | 129 | (unsigned long)(n),sizeof(*(ptr)))) |
130 | #define cmpxchg_local(ptr,o,n)\ | 130 | #define cmpxchg_local(ptr,o,n)\ |
131 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ | 131 | ((__typeof__(*(ptr)))__cmpxchg_local((ptr),(unsigned long)(o),\ |
132 | (unsigned long)(n),sizeof(*(ptr)))) | 132 | (unsigned long)(n),sizeof(*(ptr)))) |
133 | 133 | ||
134 | #endif | 134 | #endif |
diff --git a/include/asm-x86_64/hypertransport.h b/include/asm-x86_64/hypertransport.h index c16c6ff4bdd7..5cbf9fa5e0b5 100644 --- a/include/asm-x86_64/hypertransport.h +++ b/include/asm-x86_64/hypertransport.h | |||
@@ -1,42 +1 @@ | |||
1 | #ifndef ASM_HYPERTRANSPORT_H | #include <asm-i386/hypertransport.h> | |
2 | #define ASM_HYPERTRANSPORT_H | ||
3 | |||
4 | /* | ||
5 | * Constants for x86 Hypertransport Interrupts. | ||
6 | */ | ||
7 | |||
8 | #define HT_IRQ_LOW_BASE 0xf8000000 | ||
9 | |||
10 | #define HT_IRQ_LOW_VECTOR_SHIFT 16 | ||
11 | #define HT_IRQ_LOW_VECTOR_MASK 0x00ff0000 | ||
12 | #define HT_IRQ_LOW_VECTOR(v) (((v) << HT_IRQ_LOW_VECTOR_SHIFT) & HT_IRQ_LOW_VECTOR_MASK) | ||
13 | |||
14 | #define HT_IRQ_LOW_DEST_ID_SHIFT 8 | ||
15 | #define HT_IRQ_LOW_DEST_ID_MASK 0x0000ff00 | ||
16 | #define HT_IRQ_LOW_DEST_ID(v) (((v) << HT_IRQ_LOW_DEST_ID_SHIFT) & HT_IRQ_LOW_DEST_ID_MASK) | ||
17 | |||
18 | #define HT_IRQ_LOW_DM_PHYSICAL 0x0000000 | ||
19 | #define HT_IRQ_LOW_DM_LOGICAL 0x0000040 | ||
20 | |||
21 | #define HT_IRQ_LOW_RQEOI_EDGE 0x0000000 | ||
22 | #define HT_IRQ_LOW_RQEOI_LEVEL 0x0000020 | ||
23 | |||
24 | |||
25 | #define HT_IRQ_LOW_MT_FIXED 0x0000000 | ||
26 | #define HT_IRQ_LOW_MT_ARBITRATED 0x0000004 | ||
27 | #define HT_IRQ_LOW_MT_SMI 0x0000008 | ||
28 | #define HT_IRQ_LOW_MT_NMI 0x000000c | ||
29 | #define HT_IRQ_LOW_MT_INIT 0x0000010 | ||
30 | #define HT_IRQ_LOW_MT_STARTUP 0x0000014 | ||
31 | #define HT_IRQ_LOW_MT_EXTINT 0x0000018 | ||
32 | #define HT_IRQ_LOW_MT_LINT1 0x000008c | ||
33 | #define HT_IRQ_LOW_MT_LINT0 0x0000098 | ||
34 | |||
35 | #define HT_IRQ_LOW_IRQ_MASKED 0x0000001 | ||
36 | |||
37 | |||
38 | #define HT_IRQ_HIGH_DEST_ID_SHIFT 0 | ||
39 | #define HT_IRQ_HIGH_DEST_ID_MASK 0x00ffffff | ||
40 | #define HT_IRQ_HIGH_DEST_ID(v) ((((v) >> 8) << HT_IRQ_HIGH_DEST_ID_SHIFT) & HT_IRQ_HIGH_DEST_ID_MASK) | ||
41 | |||
42 | #endif /* ASM_HYPERTRANSPORT_H */ | ||
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h index 556be5563e30..7bc030a1996d 100644 --- a/include/asm-x86_64/mce.h +++ b/include/asm-x86_64/mce.h | |||
@@ -107,6 +107,9 @@ extern void do_machine_check(struct pt_regs *, long); | |||
107 | 107 | ||
108 | extern int mce_notify_user(void); | 108 | extern int mce_notify_user(void); |
109 | 109 | ||
110 | extern void stop_mce(void); | ||
111 | extern void restart_mce(void); | ||
112 | |||
110 | #endif | 113 | #endif |
111 | 114 | ||
112 | #endif | 115 | #endif |
diff --git a/include/asm-x86_64/msidef.h b/include/asm-x86_64/msidef.h index 5b8acddb70fb..083ad5827e48 100644 --- a/include/asm-x86_64/msidef.h +++ b/include/asm-x86_64/msidef.h | |||
@@ -1,47 +1 @@ | |||
1 | #ifndef ASM_MSIDEF_H | #include <asm-i386/msidef.h> | |
2 | #define ASM_MSIDEF_H | ||
3 | |||
4 | /* | ||
5 | * Constants for Intel APIC based MSI messages. | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * Shifts for MSI data | ||
10 | */ | ||
11 | |||
12 | #define MSI_DATA_VECTOR_SHIFT 0 | ||
13 | #define MSI_DATA_VECTOR_MASK 0x000000ff | ||
14 | #define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & MSI_DATA_VECTOR_MASK) | ||
15 | |||
16 | #define MSI_DATA_DELIVERY_MODE_SHIFT 8 | ||
17 | #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) | ||
18 | #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) | ||
19 | |||
20 | #define MSI_DATA_LEVEL_SHIFT 14 | ||
21 | #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) | ||
22 | #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) | ||
23 | |||
24 | #define MSI_DATA_TRIGGER_SHIFT 15 | ||
25 | #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) | ||
26 | #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) | ||
27 | |||
28 | /* | ||
29 | * Shift/mask fields for msi address | ||
30 | */ | ||
31 | |||
32 | #define MSI_ADDR_BASE_HI 0 | ||
33 | #define MSI_ADDR_BASE_LO 0xfee00000 | ||
34 | |||
35 | #define MSI_ADDR_DEST_MODE_SHIFT 2 | ||
36 | #define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) | ||
37 | #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) | ||
38 | |||
39 | #define MSI_ADDR_REDIRECTION_SHIFT 3 | ||
40 | #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) /* dedicated cpu */ | ||
41 | #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) /* lowest priority */ | ||
42 | |||
43 | #define MSI_ADDR_DEST_ID_SHIFT 12 | ||
44 | #define MSI_ADDR_DEST_ID_MASK 0x00ffff0 | ||
45 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & MSI_ADDR_DEST_ID_MASK) | ||
46 | |||
47 | #endif /* ASM_MSIDEF_H */ | ||
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index d0a7f53b1497..5fb3c0de5ccc 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -88,5 +88,7 @@ unsigned lapic_adjust_nmi_hz(unsigned hz); | |||
88 | int lapic_watchdog_ok(void); | 88 | int lapic_watchdog_ok(void); |
89 | void disable_lapic_nmi_watchdog(void); | 89 | void disable_lapic_nmi_watchdog(void); |
90 | void enable_lapic_nmi_watchdog(void); | 90 | void enable_lapic_nmi_watchdog(void); |
91 | void stop_nmi(void); | ||
92 | void restart_nmi(void); | ||
91 | 93 | ||
92 | #endif /* ASM_NMI_H */ | 94 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 60cff1e4f7a3..c9d8764c89d1 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -403,6 +403,8 @@ extern struct list_head pgd_list; | |||
403 | 403 | ||
404 | extern int kern_addr_valid(unsigned long addr); | 404 | extern int kern_addr_valid(unsigned long addr); |
405 | 405 | ||
406 | pte_t *lookup_address(unsigned long addr); | ||
407 | |||
406 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 408 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
407 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 409 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
408 | 410 | ||
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index a1645bbc03bd..19525175b91c 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -389,17 +389,6 @@ static inline void prefetchw(void *x) | |||
389 | 389 | ||
390 | #define cpu_relax() rep_nop() | 390 | #define cpu_relax() rep_nop() |
391 | 391 | ||
392 | /* | ||
393 | * NSC/Cyrix CPU indexed register access macros | ||
394 | */ | ||
395 | |||
396 | #define getCx86(reg) ({ outb((reg), 0x22); inb(0x23); }) | ||
397 | |||
398 | #define setCx86(reg, data) do { \ | ||
399 | outb((reg), 0x22); \ | ||
400 | outb((data), 0x23); \ | ||
401 | } while (0) | ||
402 | |||
403 | static inline void serialize_cpu(void) | 392 | static inline void serialize_cpu(void) |
404 | { | 393 | { |
405 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | 394 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index d6e3225549c0..31f20ad65876 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -75,8 +75,6 @@ extern void setup_node_bootmem(int nodeid, unsigned long start, unsigned long en | |||
75 | extern void early_quirks(void); | 75 | extern void early_quirks(void); |
76 | extern void check_efer(void); | 76 | extern void check_efer(void); |
77 | 77 | ||
78 | extern int unhandled_signal(struct task_struct *tsk, int sig); | ||
79 | |||
80 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 78 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
81 | 79 | ||
82 | extern unsigned long table_start, table_end; | 80 | extern unsigned long table_start, table_end; |
diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index 9c3f8de90d2d..b897e8cb55fb 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h | |||
@@ -44,7 +44,6 @@ extern unsigned long saved_context_eflags; | |||
44 | 44 | ||
45 | extern void fix_processor_context(void); | 45 | extern void fix_processor_context(void); |
46 | 46 | ||
47 | #ifdef CONFIG_ACPI_SLEEP | ||
48 | extern unsigned long saved_rip; | 47 | extern unsigned long saved_rip; |
49 | extern unsigned long saved_rsp; | 48 | extern unsigned long saved_rsp; |
50 | extern unsigned long saved_rbp; | 49 | extern unsigned long saved_rbp; |
@@ -54,4 +53,3 @@ extern unsigned long saved_rdi; | |||
54 | 53 | ||
55 | /* routines for saving/restoring kernel state */ | 54 | /* routines for saving/restoring kernel state */ |
56 | extern int acpi_save_state_mem(void); | 55 | extern int acpi_save_state_mem(void); |
57 | #endif | ||
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 6313d33a0686..02175aa1d16a 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -75,19 +75,31 @@ static inline unsigned long read_cr0(void) | |||
75 | unsigned long cr0; | 75 | unsigned long cr0; |
76 | asm volatile("movq %%cr0,%0" : "=r" (cr0)); | 76 | asm volatile("movq %%cr0,%0" : "=r" (cr0)); |
77 | return cr0; | 77 | return cr0; |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline void write_cr0(unsigned long val) | 80 | static inline void write_cr0(unsigned long val) |
81 | { | 81 | { |
82 | asm volatile("movq %0,%%cr0" :: "r" (val)); | 82 | asm volatile("movq %0,%%cr0" :: "r" (val)); |
83 | } | 83 | } |
84 | |||
85 | static inline unsigned long read_cr2(void) | ||
86 | { | ||
87 | unsigned long cr2; | ||
88 | asm("movq %%cr2,%0" : "=r" (cr2)); | ||
89 | return cr2; | ||
90 | } | ||
91 | |||
92 | static inline void write_cr2(unsigned long val) | ||
93 | { | ||
94 | asm volatile("movq %0,%%cr2" :: "r" (val)); | ||
95 | } | ||
84 | 96 | ||
85 | static inline unsigned long read_cr3(void) | 97 | static inline unsigned long read_cr3(void) |
86 | { | 98 | { |
87 | unsigned long cr3; | 99 | unsigned long cr3; |
88 | asm("movq %%cr3,%0" : "=r" (cr3)); | 100 | asm("movq %%cr3,%0" : "=r" (cr3)); |
89 | return cr3; | 101 | return cr3; |
90 | } | 102 | } |
91 | 103 | ||
92 | static inline void write_cr3(unsigned long val) | 104 | static inline void write_cr3(unsigned long val) |
93 | { | 105 | { |
@@ -99,12 +111,24 @@ static inline unsigned long read_cr4(void) | |||
99 | unsigned long cr4; | 111 | unsigned long cr4; |
100 | asm("movq %%cr4,%0" : "=r" (cr4)); | 112 | asm("movq %%cr4,%0" : "=r" (cr4)); |
101 | return cr4; | 113 | return cr4; |
102 | } | 114 | } |
103 | 115 | ||
104 | static inline void write_cr4(unsigned long val) | 116 | static inline void write_cr4(unsigned long val) |
105 | { | 117 | { |
106 | asm volatile("movq %0,%%cr4" :: "r" (val) : "memory"); | 118 | asm volatile("movq %0,%%cr4" :: "r" (val) : "memory"); |
107 | } | 119 | } |
120 | |||
121 | static inline unsigned long read_cr8(void) | ||
122 | { | ||
123 | unsigned long cr8; | ||
124 | asm("movq %%cr8,%0" : "=r" (cr8)); | ||
125 | return cr8; | ||
126 | } | ||
127 | |||
128 | static inline void write_cr8(unsigned long val) | ||
129 | { | ||
130 | asm volatile("movq %0,%%cr8" :: "r" (val) : "memory"); | ||
131 | } | ||
108 | 132 | ||
109 | #define stts() write_cr0(8 | read_cr0()) | 133 | #define stts() write_cr0(8 | read_cr0()) |
110 | 134 | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 8ca7ca0b47f0..4bbd8601b8f0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -161,7 +161,7 @@ | |||
161 | * are currently used in an audit field constant understood by the kernel. | 161 | * are currently used in an audit field constant understood by the kernel. |
162 | * If you are adding a new #define AUDIT_<whatever>, please ensure that | 162 | * If you are adding a new #define AUDIT_<whatever>, please ensure that |
163 | * AUDIT_UNUSED_BITS is updated if need be. */ | 163 | * AUDIT_UNUSED_BITS is updated if need be. */ |
164 | #define AUDIT_UNUSED_BITS 0x0FFFFC00 | 164 | #define AUDIT_UNUSED_BITS 0x07FFFC00 |
165 | 165 | ||
166 | 166 | ||
167 | /* Rule fields */ | 167 | /* Rule fields */ |
@@ -213,25 +213,29 @@ | |||
213 | #define AUDIT_NEGATE 0x80000000 | 213 | #define AUDIT_NEGATE 0x80000000 |
214 | 214 | ||
215 | /* These are the supported operators. | 215 | /* These are the supported operators. |
216 | * 4 2 1 | 216 | * 4 2 1 8 |
217 | * = > < | 217 | * = > < ? |
218 | * ------- | 218 | * ---------- |
219 | * 0 0 0 0 nonsense | 219 | * 0 0 0 0 00 nonsense |
220 | * 0 0 1 1 < | 220 | * 0 0 0 1 08 & bit mask |
221 | * 0 1 0 2 > | 221 | * 0 0 1 0 10 < |
222 | * 0 1 1 3 != | 222 | * 0 1 0 0 20 > |
223 | * 1 0 0 4 = | 223 | * 0 1 1 0 30 != |
224 | * 1 0 1 5 <= | 224 | * 1 0 0 0 40 = |
225 | * 1 1 0 6 >= | 225 | * 1 0 0 1 48 &= bit test |
226 | * 1 1 1 7 all operators | 226 | * 1 0 1 0 50 <= |
227 | * 1 1 0 0 60 >= | ||
228 | * 1 1 1 1 78 all operators | ||
227 | */ | 229 | */ |
230 | #define AUDIT_BIT_MASK 0x08000000 | ||
228 | #define AUDIT_LESS_THAN 0x10000000 | 231 | #define AUDIT_LESS_THAN 0x10000000 |
229 | #define AUDIT_GREATER_THAN 0x20000000 | 232 | #define AUDIT_GREATER_THAN 0x20000000 |
230 | #define AUDIT_NOT_EQUAL 0x30000000 | 233 | #define AUDIT_NOT_EQUAL 0x30000000 |
231 | #define AUDIT_EQUAL 0x40000000 | 234 | #define AUDIT_EQUAL 0x40000000 |
235 | #define AUDIT_BIT_TEST (AUDIT_BIT_MASK|AUDIT_EQUAL) | ||
232 | #define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL) | 236 | #define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL) |
233 | #define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL) | 237 | #define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL) |
234 | #define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL) | 238 | #define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK) |
235 | 239 | ||
236 | /* Status symbols */ | 240 | /* Status symbols */ |
237 | /* Mask values */ | 241 | /* Mask values */ |
@@ -407,7 +411,6 @@ extern int audit_bprm(struct linux_binprm *bprm); | |||
407 | extern int audit_socketcall(int nargs, unsigned long *args); | 411 | extern int audit_socketcall(int nargs, unsigned long *args); |
408 | extern int audit_sockaddr(int len, void *addr); | 412 | extern int audit_sockaddr(int len, void *addr); |
409 | extern int __audit_fd_pair(int fd1, int fd2); | 413 | extern int __audit_fd_pair(int fd1, int fd2); |
410 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | ||
411 | extern int audit_set_macxattr(const char *name); | 414 | extern int audit_set_macxattr(const char *name); |
412 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); | 415 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); |
413 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); | 416 | extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); |
@@ -487,7 +490,6 @@ extern int audit_signals; | |||
487 | #define audit_socketcall(n,a) ({ 0; }) | 490 | #define audit_socketcall(n,a) ({ 0; }) |
488 | #define audit_fd_pair(n,a) ({ 0; }) | 491 | #define audit_fd_pair(n,a) ({ 0; }) |
489 | #define audit_sockaddr(len, addr) ({ 0; }) | 492 | #define audit_sockaddr(len, addr) ({ 0; }) |
490 | #define audit_avc_path(dentry, mnt) ({ 0; }) | ||
491 | #define audit_set_macxattr(n) do { ; } while (0) | 493 | #define audit_set_macxattr(n) do { ; } while (0) |
492 | #define audit_mq_open(o,m,a) ({ 0; }) | 494 | #define audit_mq_open(o,m,a) ({ 0; }) |
493 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) | 495 | #define audit_mq_timedsend(d,l,p,t) ({ 0; }) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 1023ba0d6e55..c897c7b03858 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -69,8 +69,8 @@ struct backlight_device { | |||
69 | 69 | ||
70 | /* The framebuffer notifier block */ | 70 | /* The framebuffer notifier block */ |
71 | struct notifier_block fb_notif; | 71 | struct notifier_block fb_notif; |
72 | /* The class device structure */ | 72 | |
73 | struct class_device class_dev; | 73 | struct device dev; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static inline void backlight_update_status(struct backlight_device *bd) | 76 | static inline void backlight_update_status(struct backlight_device *bd) |
@@ -85,6 +85,11 @@ extern struct backlight_device *backlight_device_register(const char *name, | |||
85 | struct device *dev, void *devdata, struct backlight_ops *ops); | 85 | struct device *dev, void *devdata, struct backlight_ops *ops); |
86 | extern void backlight_device_unregister(struct backlight_device *bd); | 86 | extern void backlight_device_unregister(struct backlight_device *bd); |
87 | 87 | ||
88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) | 88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) |
89 | |||
90 | static inline void * bl_get_data(struct backlight_device *bl_dev) | ||
91 | { | ||
92 | return dev_get_drvdata(&bl_dev->dev); | ||
93 | } | ||
89 | 94 | ||
90 | #endif | 95 | #endif |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index f78965fc6426..695e34964cb7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -698,11 +698,6 @@ extern int blk_execute_rq(request_queue_t *, struct gendisk *, | |||
698 | struct request *, int); | 698 | struct request *, int); |
699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, |
700 | struct request *, int, rq_end_io_fn *); | 700 | struct request *, int, rq_end_io_fn *); |
701 | extern int blk_fill_sghdr_rq(request_queue_t *, struct request *, | ||
702 | struct sg_io_hdr *, int); | ||
703 | extern int blk_unmap_sghdr_rq(struct request *, struct sg_io_hdr *); | ||
704 | extern int blk_complete_sghdr_rq(struct request *, struct sg_io_hdr *, | ||
705 | struct bio *); | ||
706 | extern int blk_verify_command(unsigned char *, int); | 701 | extern int blk_verify_command(unsigned char *, int); |
707 | 702 | ||
708 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 703 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index 8547b10c388b..f415f89e0ac8 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
@@ -57,10 +57,10 @@ struct bsg_class_device { | |||
57 | struct request_queue *queue; | 57 | struct request_queue *queue; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | extern int bsg_register_queue(struct request_queue *, const char *); | 60 | extern int bsg_register_queue(struct request_queue *, struct device *, const char *); |
61 | extern void bsg_unregister_queue(struct request_queue *); | 61 | extern void bsg_unregister_queue(struct request_queue *); |
62 | #else | 62 | #else |
63 | #define bsg_register_queue(disk, name) (0) | 63 | #define bsg_register_queue(disk, dev, name) (0) |
64 | #define bsg_unregister_queue(disk) do { } while (0) | 64 | #define bsg_unregister_queue(disk) do { } while (0) |
65 | #endif | 65 | #endif |
66 | 66 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5323f6275854..0a3c2ebf2008 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -120,11 +120,11 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); | |||
120 | # define local_irq_enable_in_hardirq() local_irq_enable() | 120 | # define local_irq_enable_in_hardirq() local_irq_enable() |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
124 | extern void disable_irq_nosync(unsigned int irq); | 123 | extern void disable_irq_nosync(unsigned int irq); |
125 | extern void disable_irq(unsigned int irq); | 124 | extern void disable_irq(unsigned int irq); |
126 | extern void enable_irq(unsigned int irq); | 125 | extern void enable_irq(unsigned int irq); |
127 | 126 | ||
127 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
128 | /* | 128 | /* |
129 | * Special lockdep variants of irq disabling/enabling. | 129 | * Special lockdep variants of irq disabling/enabling. |
130 | * These should be used for locking constructs that | 130 | * These should be used for locking constructs that |
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 598793c0745b..1d379787f2e7 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -62,8 +62,8 @@ struct lcd_device { | |||
62 | struct mutex update_lock; | 62 | struct mutex update_lock; |
63 | /* The framebuffer notifier block */ | 63 | /* The framebuffer notifier block */ |
64 | struct notifier_block fb_notif; | 64 | struct notifier_block fb_notif; |
65 | /* The class device structure */ | 65 | |
66 | struct class_device class_dev; | 66 | struct device dev; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static inline void lcd_set_power(struct lcd_device *ld, int power) | 69 | static inline void lcd_set_power(struct lcd_device *ld, int power) |
@@ -75,9 +75,15 @@ static inline void lcd_set_power(struct lcd_device *ld, int power) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | extern struct lcd_device *lcd_device_register(const char *name, | 77 | extern struct lcd_device *lcd_device_register(const char *name, |
78 | void *devdata, struct lcd_ops *ops); | 78 | struct device *parent, void *devdata, struct lcd_ops *ops); |
79 | extern void lcd_device_unregister(struct lcd_device *ld); | 79 | extern void lcd_device_unregister(struct lcd_device *ld); |
80 | 80 | ||
81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) | 81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, dev) |
82 | |||
83 | static inline void * lcd_get_data(struct lcd_device *ld_dev) | ||
84 | { | ||
85 | return dev_get_drvdata(&ld_dev->dev); | ||
86 | } | ||
87 | |||
82 | 88 | ||
83 | #endif | 89 | #endif |
diff --git a/include/linux/leds.h b/include/linux/leds.h index 494bed7c2fc1..421175092ee2 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | 16 | ||
17 | struct device; | 17 | struct device; |
18 | struct class_device; | ||
19 | /* | 18 | /* |
20 | * LED Core | 19 | * LED Core |
21 | */ | 20 | */ |
@@ -37,7 +36,7 @@ struct led_classdev { | |||
37 | void (*brightness_set)(struct led_classdev *led_cdev, | 36 | void (*brightness_set)(struct led_classdev *led_cdev, |
38 | enum led_brightness brightness); | 37 | enum led_brightness brightness); |
39 | 38 | ||
40 | struct class_device *class_dev; | 39 | struct device *dev; |
41 | struct list_head node; /* LED Device list */ | 40 | struct list_head node; /* LED Device list */ |
42 | char *default_trigger; /* Trigger to use */ | 41 | char *default_trigger; /* Trigger to use */ |
43 | 42 | ||
@@ -109,4 +108,18 @@ extern void ledtrig_ide_activity(void); | |||
109 | #define ledtrig_ide_activity() do {} while(0) | 108 | #define ledtrig_ide_activity() do {} while(0) |
110 | #endif | 109 | #endif |
111 | 110 | ||
111 | /* For the leds-gpio driver */ | ||
112 | struct gpio_led { | ||
113 | const char *name; | ||
114 | char *default_trigger; | ||
115 | unsigned gpio; | ||
116 | u8 active_low; | ||
117 | }; | ||
118 | |||
119 | struct gpio_led_platform_data { | ||
120 | int num_leds; | ||
121 | struct gpio_led *leds; | ||
122 | }; | ||
123 | |||
124 | |||
112 | #endif /* __LINUX_LEDS_H_INCLUDED */ | 125 | #endif /* __LINUX_LEDS_H_INCLUDED */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index be5a43928c84..9aa6c10f7bb1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -412,6 +412,7 @@ struct ata_queued_cmd { | |||
412 | ata_qc_cb_t complete_fn; | 412 | ata_qc_cb_t complete_fn; |
413 | 413 | ||
414 | void *private_data; | 414 | void *private_data; |
415 | void *lldd_task; | ||
415 | }; | 416 | }; |
416 | 417 | ||
417 | struct ata_port_stats { | 418 | struct ata_port_stats { |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 5fd44e63fb26..448f70b30a0c 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -31,8 +31,8 @@ extern struct bus_type of_platform_bus_type; | |||
31 | */ | 31 | */ |
32 | struct of_platform_driver | 32 | struct of_platform_driver |
33 | { | 33 | { |
34 | char *name; | 34 | const char *name; |
35 | struct of_device_id *match_table; | 35 | const struct of_device_id *match_table; |
36 | struct module *owner; | 36 | struct module *owner; |
37 | 37 | ||
38 | int (*probe)(struct of_device* dev, | 38 | int (*probe)(struct of_device* dev, |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b15c6498fe67..cbabb9c675c9 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2019,6 +2019,8 @@ | |||
2019 | 2019 | ||
2020 | #define PCI_VENDOR_ID_ARIMA 0x161f | 2020 | #define PCI_VENDOR_ID_ARIMA 0x161f |
2021 | 2021 | ||
2022 | #define PCI_VENDOR_ID_BROCADE 0x1657 | ||
2023 | |||
2022 | #define PCI_VENDOR_ID_SIBYTE 0x166d | 2024 | #define PCI_VENDOR_ID_SIBYTE 0x166d |
2023 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 | 2025 | #define PCI_DEVICE_ID_BCM1250_PCI 0x0001 |
2024 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 | 2026 | #define PCI_DEVICE_ID_BCM1250_HT 0x0002 |
@@ -2040,6 +2042,8 @@ | |||
2040 | #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea | 2042 | #define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea |
2041 | #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb | 2043 | #define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb |
2042 | 2044 | ||
2045 | #define PCI_VENDOR_ID_LENOVO 0x17aa | ||
2046 | |||
2043 | #define PCI_VENDOR_ID_ARECA 0x17d3 | 2047 | #define PCI_VENDOR_ID_ARECA 0x17d3 |
2044 | #define PCI_DEVICE_ID_ARECA_1110 0x1110 | 2048 | #define PCI_DEVICE_ID_ARECA_1110 0x1110 |
2045 | #define PCI_DEVICE_ID_ARECA_1120 0x1120 | 2049 | #define PCI_DEVICE_ID_ARECA_1120 0x1120 |
diff --git a/include/linux/signal.h b/include/linux/signal.h index ea91abe740da..0ae338866240 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -237,12 +237,15 @@ extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct | |||
237 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | 237 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); |
238 | extern long do_sigpending(void __user *, unsigned long); | 238 | extern long do_sigpending(void __user *, unsigned long); |
239 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 239 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
240 | extern int show_unhandled_signals; | ||
240 | 241 | ||
241 | struct pt_regs; | 242 | struct pt_regs; |
242 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 243 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
243 | 244 | ||
244 | extern struct kmem_cache *sighand_cachep; | 245 | extern struct kmem_cache *sighand_cachep; |
245 | 246 | ||
247 | int unhandled_signal(struct task_struct *tsk, int sig); | ||
248 | |||
246 | /* | 249 | /* |
247 | * In POSIX a signal is sent either to a specific thread (Linux task) | 250 | * In POSIX a signal is sent either to a specific thread (Linux task) |
248 | * or to the process as a whole (Linux thread group). How the signal | 251 | * or to the process as a whole (Linux thread group). How the signal |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 2e6bdc4e7a0a..df36461fe881 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/timer.h> | 30 | #include <linux/timer.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <scsi/sas.h> | 32 | #include <scsi/sas.h> |
33 | #include <linux/libata.h> | ||
33 | #include <linux/list.h> | 34 | #include <linux/list.h> |
34 | #include <asm/semaphore.h> | 35 | #include <asm/semaphore.h> |
35 | #include <scsi/scsi_device.h> | 36 | #include <scsi/scsi_device.h> |
@@ -165,6 +166,13 @@ struct sata_device { | |||
165 | 166 | ||
166 | u8 port_no; /* port number, if this is a PM (Port) */ | 167 | u8 port_no; /* port number, if this is a PM (Port) */ |
167 | struct list_head children; /* PM Ports if this is a PM */ | 168 | struct list_head children; /* PM Ports if this is a PM */ |
169 | |||
170 | struct ata_port *ap; | ||
171 | struct ata_host ata_host; | ||
172 | struct ata_taskfile tf; | ||
173 | u32 sstatus; | ||
174 | u32 serror; | ||
175 | u32 scontrol; | ||
168 | }; | 176 | }; |
169 | 177 | ||
170 | /* ---------- Domain device ---------- */ | 178 | /* ---------- Domain device ---------- */ |
@@ -624,6 +632,7 @@ int sas_set_phy_speed(struct sas_phy *phy, | |||
624 | struct sas_phy_linkrates *rates); | 632 | struct sas_phy_linkrates *rates); |
625 | int sas_phy_enable(struct sas_phy *phy, int enabled); | 633 | int sas_phy_enable(struct sas_phy *phy, int enabled); |
626 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 634 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
635 | int sas_queue_up(struct sas_task *task); | ||
627 | extern int sas_queuecommand(struct scsi_cmnd *, | 636 | extern int sas_queuecommand(struct scsi_cmnd *, |
628 | void (*scsi_done)(struct scsi_cmnd *)); | 637 | void (*scsi_done)(struct scsi_cmnd *)); |
629 | extern int sas_target_alloc(struct scsi_target *); | 638 | extern int sas_target_alloc(struct scsi_target *); |
@@ -661,4 +670,10 @@ int __sas_task_abort(struct sas_task *); | |||
661 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); | 670 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); |
662 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); | 671 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); |
663 | 672 | ||
673 | extern void sas_target_destroy(struct scsi_target *); | ||
674 | extern int sas_slave_alloc(struct scsi_device *); | ||
675 | extern int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg); | ||
676 | |||
677 | extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | ||
678 | struct request *req); | ||
664 | #endif /* _SASLIB_H_ */ | 679 | #endif /* _SASLIB_H_ */ |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h new file mode 100644 index 000000000000..dd5edc915417 --- /dev/null +++ b/include/scsi/sas_ata.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Support for SATA devices on Serial Attached SCSI (SAS) controllers | ||
3 | * | ||
4 | * Copyright (C) 2006 IBM Corporation | ||
5 | * | ||
6 | * Written by: Darrick J. Wong <djwong@us.ibm.com>, IBM Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation; either version 2 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * 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 | ||
21 | * USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _SAS_ATA_H_ | ||
26 | #define _SAS_ATA_H_ | ||
27 | |||
28 | #include <linux/libata.h> | ||
29 | #include <scsi/libsas.h> | ||
30 | |||
31 | #ifdef CONFIG_SCSI_SAS_ATA | ||
32 | |||
33 | static inline int dev_is_sata(struct domain_device *dev) | ||
34 | { | ||
35 | return (dev->rphy->identify.target_port_protocols & SAS_PROTOCOL_SATA); | ||
36 | } | ||
37 | |||
38 | int sas_ata_init_host_and_port(struct domain_device *found_dev, | ||
39 | struct scsi_target *starget); | ||
40 | |||
41 | void sas_ata_task_abort(struct sas_task *task); | ||
42 | |||
43 | #else | ||
44 | |||
45 | |||
46 | static inline int dev_is_sata(struct domain_device *dev) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||
50 | int sas_ata_init_host_and_port(struct domain_device *found_dev, | ||
51 | struct scsi_target *starget) | ||
52 | { | ||
53 | return 0; | ||
54 | } | ||
55 | void sas_ata_task_abort(struct sas_task *task) | ||
56 | { | ||
57 | } | ||
58 | #endif | ||
59 | |||
60 | #endif /* _SAS_ATA_H_ */ | ||
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index ba07cf7c04ba..3b8a6a85c2f8 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -341,7 +341,7 @@ struct scsi_host_template { | |||
341 | /* | 341 | /* |
342 | * Name of proc directory | 342 | * Name of proc directory |
343 | */ | 343 | */ |
344 | char *proc_name; | 344 | const char *proc_name; |
345 | 345 | ||
346 | /* | 346 | /* |
347 | * Used to store the procfs directory if a driver implements the | 347 | * Used to store the procfs directory if a driver implements the |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 9aedc19820b0..abdfd2e27dd7 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | struct scsi_transport_template; | 8 | struct scsi_transport_template; |
9 | struct sas_rphy; | 9 | struct sas_rphy; |
10 | 10 | struct request; | |
11 | 11 | ||
12 | enum sas_device_type { | 12 | enum sas_device_type { |
13 | SAS_PHY_UNUSED, | 13 | SAS_PHY_UNUSED, |
@@ -23,6 +23,12 @@ enum sas_protocol { | |||
23 | SAS_PROTOCOL_SSP = 0x08, | 23 | SAS_PROTOCOL_SSP = 0x08, |
24 | }; | 24 | }; |
25 | 25 | ||
26 | static inline int sas_protocol_ata(enum sas_protocol proto) | ||
27 | { | ||
28 | return ((proto & SAS_PROTOCOL_SATA) || | ||
29 | (proto & SAS_PROTOCOL_STP))? 1 : 0; | ||
30 | } | ||
31 | |||
26 | enum sas_linkrate { | 32 | enum sas_linkrate { |
27 | /* These Values are defined in the SAS standard */ | 33 | /* These Values are defined in the SAS standard */ |
28 | SAS_LINK_RATE_UNKNOWN = 0, | 34 | SAS_LINK_RATE_UNKNOWN = 0, |
@@ -85,10 +91,12 @@ struct sas_phy { | |||
85 | #define phy_to_shost(phy) \ | 91 | #define phy_to_shost(phy) \ |
86 | dev_to_shost((phy)->dev.parent) | 92 | dev_to_shost((phy)->dev.parent) |
87 | 93 | ||
94 | struct request_queue; | ||
88 | struct sas_rphy { | 95 | struct sas_rphy { |
89 | struct device dev; | 96 | struct device dev; |
90 | struct sas_identify identify; | 97 | struct sas_identify identify; |
91 | struct list_head list; | 98 | struct list_head list; |
99 | struct request_queue *q; | ||
92 | u32 scsi_target_id; | 100 | u32 scsi_target_id; |
93 | }; | 101 | }; |
94 | 102 | ||
@@ -166,6 +174,7 @@ struct sas_function_template { | |||
166 | int (*phy_reset)(struct sas_phy *, int); | 174 | int (*phy_reset)(struct sas_phy *, int); |
167 | int (*phy_enable)(struct sas_phy *, int); | 175 | int (*phy_enable)(struct sas_phy *, int); |
168 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); | 176 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); |
177 | int (*smp_handler)(struct Scsi_Host *, struct sas_rphy *, struct request *); | ||
169 | }; | 178 | }; |
170 | 179 | ||
171 | 180 | ||